diff --git a/.clang-format b/.clang-format index 5729c5c05d..d3378d0f4a 100644 --- a/.clang-format +++ b/.clang-format @@ -9,9 +9,10 @@ AlignEscapedNewlines: Left AlignOperands: true AlignTrailingComments: false AllowAllParametersOfDeclarationOnNextLine: false +AllowAllArgumentsOnNextLine: false AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: None +AllowShortFunctionsOnASingleLine: false AllowShortIfStatementsOnASingleLine: false AllowShortLoopsOnASingleLine: false AlwaysBreakAfterDefinitionReturnType: None @@ -44,7 +45,7 @@ BreakBeforeTernaryOperators: true BreakConstructorInitializersBeforeComma: false BreakConstructorInitializers: BeforeColon BreakStringLiterals: true -ColumnLimit: 200 +ColumnLimit: 132 CommentPragmas: '^ IWYU pragma:' CompactNamespaces: false ConstructorInitializerAllOnOneLineOrOnePerLine: true diff --git a/CMakeLists.txt b/CMakeLists.txt index 9061f2f71c..2e14f7fe10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,12 +37,6 @@ include("cmake_targets/macros.cmake") ################################### include(FindPkgConfig) -pkg_search_module(LIBXML2 libxml-2.0 REQUIRED) -include_directories(${LIBXML2_INCLUDE_DIRS}) - -pkg_search_module(LIBXSLT libxslt REQUIRED) -include_directories(${LIBXSLT_INCLUDE_DIRS}) - pkg_search_module(OPENSSL openssl REQUIRED) include_directories(${OPENSSL_INCLUDE_DIRS}) @@ -289,7 +283,6 @@ add_definitions("-DFIRMWARE_VERSION=\"${FIRMWARE_VERSION}\"") add_definitions("-DPACKAGE_VERSION=\"Branch: ${GIT_BRANCH} Abrev. Hash: ${GIT_COMMIT_HASH} Date: ${GIT_COMMIT_DATE}\"") add_definitions("-DPACKAGE_BUGREPORT=\"openair4g-devel@lists.eurecom.fr\"") - # Debug related options ######################################### add_boolean_option(DEBUG_ASN1 False "ASN1 coder/decoder Debug" OFF) @@ -301,7 +294,7 @@ add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace" ON) set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti) add_library(ITTI ${OCP_ITTI}/intertask_interface.cpp) -target_link_libraries(ITTI PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(ITTI PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) # asn1c skeletons have hardcoded this flag to make customized debug logs # OAI uses this feature to re-use OAI LOG_I(ASN, ...) @@ -348,7 +341,7 @@ add_library(s1ap ${S1AP_DIR}/s1ap_eNB_ue_context.c ) target_link_libraries(s1ap PUBLIC asn1_s1ap) -target_link_libraries(s1ap PRIVATE nr_rrc asn1_nr_rrc lte_rrc) +target_link_libraries(s1ap PRIVATE nr_rrc asn1_nr_rrc_hdrs lte_rrc) # NGAP ############## @@ -368,8 +361,8 @@ add_library(ngap ${NGAP_DIR}/ngap_gNB_trace.c ${NGAP_DIR}/ngap_gNB_ue_context.c ) -target_link_libraries(ngap PUBLIC asn1_ngap lte_rrc) -target_link_libraries(ngap PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(ngap PUBLIC asn1_ngap) +target_link_libraries(ngap PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) #M2AP ############## @@ -417,7 +410,7 @@ add_library(m3ap ) target_link_libraries(m3ap PUBLIC asn1_m3ap) target_link_libraries(m3ap PRIVATE m2ap) -target_link_libraries(m3ap PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(m3ap PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) target_include_directories(m3ap PUBLIC "${M3AP_DIR}") #X2AP @@ -437,7 +430,7 @@ add_library(x2ap ${X2AP_DIR}/x2ap_timers.c ) target_link_libraries(x2ap PUBLIC asn1_x2ap) -target_link_libraries(x2ap PRIVATE nr_rrc lte_rrc) +target_link_libraries(x2ap PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) # F1AP @@ -448,7 +441,6 @@ add_library(f1ap ${F1AP_DIR}/f1ap_cu_interface_management.c ${F1AP_DIR}/f1ap_cu_paging.c ${F1AP_DIR}/f1ap_cu_rrc_message_transfer.c - ${F1AP_DIR}/f1ap_cu_system_information.c ${F1AP_DIR}/f1ap_cu_task.c ${F1AP_DIR}/f1ap_cu_ue_context_management.c ${F1AP_DIR}/f1ap_cu_warning_message_transmission.c @@ -566,7 +558,6 @@ set_target_properties(benetel_4g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden - SET(DPDK_LIBS "-Wl,-rpath,$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -Wl,--whole-archive -L$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -ldpdk -Wl,--no-whole-archive") target_link_libraries(benetel_4g PRIVATE ${DPDK_LIBS}) target_link_libraries(benetel_4g PRIVATE pthread dl rt m numa) -target_link_libraries(benetel_4g PRIVATE asn1_nr_rrc asn1_lte_rrc) # Benetel 5G library ###################################################################### @@ -585,7 +576,6 @@ set_target_properties(benetel_5g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden - SET(DPDK_LIBS "-Wl,-rpath,$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -Wl,--whole-archive -L$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -ldpdk -Wl,--no-whole-archive") target_link_libraries(benetel_5g PRIVATE ${DPDK_LIBS}) target_link_libraries(benetel_5g PRIVATE pthread dl rt m numa) -target_link_libraries(benetel_5g PRIVATE asn1_nr_rrc asn1_lte_rrc) ########################################################## @@ -655,11 +645,6 @@ add_boolean_option(NAS_BUILT_IN_UE True "UE NAS layer present in this e add_boolean_option(NAS_UE True "NAS UE INSTANCE (<> NAS_MME)" ON) -########################## -# ACCESS STRATUM LAYER2 OPTIONS -########################## -add_boolean_option(JUMBO_FRAME True "ENABLE LARGE SDU in ACCESS STRATUM (larger than common MTU)" ON) - ########################## # PDCP LAYER OPTIONS ########################## @@ -752,7 +737,6 @@ include_directories("${OPENAIR2_DIR}/UTIL/OSA") include_directories("${OPENAIR2_DIR}/UTIL/MEM") include_directories("${OPENAIR2_DIR}/UTIL/LISTS") include_directories("${OPENAIR2_DIR}/UTIL/FIFO") -include_directories("${OPENAIR2_DIR}/UTIL/OCG") include_directories("${OPENAIR2_DIR}/UTIL/MATH") include_directories("${OPENAIR2_DIR}/UTIL/TIMER") include_directories("${OPENAIR2_DIR}/UTIL/OMG") @@ -783,7 +767,6 @@ add_library(UTIL ${OPENAIR_DIR}/common/utils/time_meas.c ${OPENAIR_DIR}/common/utils/time_stat.c ) -target_link_libraries(UTIL PRIVATE asn1_nr_rrc asn1_lte_rrc) set(SECU_OSA_SRC ${OPENAIR2_DIR}/UTIL/OSA/osa_key_deriver.c @@ -822,7 +805,7 @@ set(SCHED_SRC ${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c ) add_library(SCHED_LIB ${SCHED_SRC}) -target_link_libraries(SCHED_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(SCHED_LIB PRIVATE asn1_lte_rrc_hdrs) set(SCHED_NR_SRC ${OPENAIR1_DIR}/SCHED_NR/fapi_nr_l1.c @@ -831,7 +814,7 @@ set(SCHED_NR_SRC ${OPENAIR1_DIR}/SCHED_NR/phy_frame_config_nr.c ) add_library(SCHED_NR_LIB ${SCHED_NR_SRC}) -target_link_libraries(SCHED_NR_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(SCHED_NR_LIB PRIVATE asn1_nr_rrc_hdrs) set(SCHED_SRC_RU ${OPENAIR1_DIR}/SCHED/ru_procedures.c @@ -839,7 +822,7 @@ set(SCHED_SRC_RU ${OPENAIR1_DIR}/SCHED/prach_procedures.c ) add_library(SCHED_RU_LIB ${SCHED_SRC_RU}) -target_link_libraries(SCHED_RU_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(SCHED_RU_LIB PRIVATE asn1_lte_rrc_hdrs) set(SCHED_SRC_UE ${OPENAIR1_DIR}/SCHED_UE/phy_procedures_lte_ue.c @@ -849,7 +832,7 @@ set(SCHED_SRC_UE ${OPENAIR1_DIR}/SCHED_UE/srs_pc.c ) add_library(SCHED_UE_LIB ${SCHED_SRC_UE}) -target_link_libraries(SCHED_UE_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(SCHED_UE_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) set(SCHED_SRC_NR_UE ${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -859,7 +842,7 @@ set(SCHED_SRC_NR_UE ${OPENAIR1_DIR}/SCHED_NR_UE/pucch_uci_ue_nr.c ) add_library(SCHED_NR_UE_LIB ${SCHED_SRC_NR_UE}) -target_link_libraries(SCHED_NR_UE_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(SCHED_NR_UE_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) # nFAPI @@ -889,7 +872,7 @@ set(NFAPI_PNF_SRC ${NFAPI_DIR}/pnf/src/pnf_p7_interface.c ) add_library(NFAPI_PNF_LIB ${NFAPI_PNF_SRC}) -target_link_libraries(NFAPI_PNF_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(NFAPI_PNF_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) include_directories(${NFAPI_DIR}/pnf/public_inc) include_directories(${NFAPI_DIR}/pnf/inc) @@ -901,7 +884,7 @@ set(NFAPI_VNF_SRC ${NFAPI_DIR}/vnf/src/vnf_p7_interface.c ) add_library(NFAPI_VNF_LIB ${NFAPI_VNF_SRC}) -target_link_libraries(NFAPI_VNF_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(NFAPI_VNF_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) include_directories(${NFAPI_DIR}/vnf/public_inc) include_directories(${NFAPI_DIR}/vnf/inc) @@ -915,7 +898,7 @@ set(NFAPI_USER_SRC ${NFAPI_USER_DIR}/gnb_ind_vars.c ) add_library(NFAPI_USER_LIB ${NFAPI_USER_SRC}) -target_link_libraries(NFAPI_USER_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(NFAPI_USER_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) include_directories(${NFAPI_USER_DIR}) # Layer 1 @@ -1017,7 +1000,6 @@ add_library(ldpc MODULE ${PHY_LDPC_OPTIM8SEGMULTI_SRC} ) target_link_libraries(ldpc PRIVATE ldpc_gen_HEADERS) add_library(coding MODULE ${PHY_TURBOSRC} ) -target_link_libraries(coding PRIVATE asn1_nr_rrc asn1_lte_rrc) add_library(dfts MODULE ${OPENAIR1_DIR}/PHY/TOOLS/oai_dfts.c ) @@ -1274,27 +1256,23 @@ set(PHY_SRC_UE ${PHY_SRC_UE} ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_comp set(PHY_NR_UE_SRC ${PHY_NR_UE_SRC} ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c) add_library(PHY_COMMON ${PHY_SRC_COMMON}) -target_link_libraries(PHY_COMMON PRIVATE lte_rrc) add_dependencies(PHY_COMMON dfts) -target_link_libraries(PHY_COMMON PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(PHY_COMMON PRIVATE asn1_lte_rrc_hdrs) add_library(PHY ${PHY_SRC}) -target_link_libraries(PHY PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(PHY PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) add_library(PHY_UE ${PHY_SRC_UE}) -target_link_libraries(PHY_UE PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(PHY_UE PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) add_library(PHY_NR_COMMON ${PHY_NR_SRC_COMMON}) -target_link_libraries(PHY_NR_COMMON PRIVATE asn1_nr_rrc asn1_lte_rrc) add_library(PHY_NR ${PHY_NR_SRC}) -target_link_libraries(PHY_NR PRIVATE asn1_nr_rrc asn1_lte_rrc) add_library(PHY_NR_UE ${PHY_NR_UE_SRC}) -target_link_libraries(PHY_NR_UE PRIVATE asn1_nr_rrc asn1_lte_rrc) add_library(PHY_RU ${PHY_SRC_RU}) -target_link_libraries(PHY_RU PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(PHY_RU PRIVATE asn1_lte_rrc_hdrs) #Library for mex functions #########################3 @@ -1318,7 +1296,7 @@ set(PHY_MEX_UE ${OPENAIR_DIR}/common/utils/T/local_tracer.c ) add_library(PHY_MEX ${PHY_MEX_UE} ${CONFIG_LIB}) -target_link_libraries(PHY_MEX PRIVATE asn1_lte_rrc) +target_link_libraries(PHY_MEX PRIVATE asn1_lte_rrc_hdrs) #Layer 2 library ##################### @@ -1559,14 +1537,12 @@ set (MISC_NFAPI_LTE ) add_library(MISC_NFAPI_LTE_LIB ${MISC_NFAPI_LTE}) -target_link_libraries(MISC_NFAPI_LTE_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc) set (MISC_NFAPI_NR ${OPENAIR1_DIR}/SCHED/nfapi_nr_dummy.c ) add_library(MISC_NFAPI_NR_LIB ${MISC_NFAPI_NR}) -target_link_libraries(MISC_NFAPI_NR_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc) add_library(L2 ${L2_SRC} @@ -1575,16 +1551,16 @@ add_library(L2 ${MCE_APP_SRC} ) target_link_libraries(L2 PRIVATE x2ap s1ap lte_rrc m2ap) -target_link_libraries(L2 PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(L2 PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) add_library(MAC_NR ${MAC_NR_SRC}) -target_link_libraries(MAC_NR PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(MAC_NR PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) add_library(MAC_UE_NR ${MAC_NR_SRC_UE}) -target_link_libraries(MAC_UE_NR PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(MAC_UE_NR PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) add_library(L2_LTE ${L2_LTE_SRC}) -target_link_libraries(L2_LTE PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(L2_LTE PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) add_library(L2_NR ${L2_NR_SRC} @@ -1597,13 +1573,13 @@ add_library(e1_if ${NR_RRC_DIR}/cucp_cuup_e1ap.c ) -target_link_libraries(e1_if PRIVATE asn1_nr_rrc asn1_lte_rrc asn1_f1ap e1ap GTPV1U) +target_link_libraries(e1_if PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs asn1_f1ap e1ap GTPV1U) add_library(e1_pdcp_if ${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_e1_api.c ) -target_link_libraries(e1_pdcp_if PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(e1_pdcp_if PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap ngap nr_rrc e1ap) @@ -1620,29 +1596,29 @@ add_library(L2_UE ${L2_SRC_UE} ${MAC_SRC_UE} ) -target_link_libraries(L2_UE PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(L2_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_library(L2_UE_LTE_NR ${L2_RRC_SRC_UE} ${MAC_SRC_UE} ) -target_link_libraries(L2_UE_LTE_NR PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(L2_UE_LTE_NR PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) if (NOT ${NOS1}) target_compile_definitions(L2_UE PUBLIC -DPDCP_USE_NETLINK) endif() -target_link_libraries(L2_UE PRIVATE lte_rrc) +target_link_libraries(L2_UE PRIVATE asn1_lte_rrc_hdrs) add_library( NR_L2_UE ${NR_L2_SRC_UE} ${MAC_NR_SRC_UE} ) target_link_libraries(NR_L2_UE PRIVATE f1ap) -target_link_libraries(NR_L2_UE PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(NR_L2_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_library(MAC_NR_COMMON ${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.c ${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c ) -target_link_libraries(MAC_NR_COMMON PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(MAC_NR_COMMON PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) include_directories("${OPENAIR2_DIR}/NR_UE_PHY_INTERFACE") include_directories("${OPENAIR2_DIR}/LAYER2") @@ -1660,7 +1636,7 @@ add_library (GTPV1U ${RRC_DIR}/rrc_eNB_GTPV1U.c ${OPENAIR3_DIR}/ocp-gtpu/gtp_itf.cpp ) -target_link_libraries(GTPV1U PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(GTPV1U PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) target_link_libraries(GTPV1U PRIVATE SIMU) include_directories(${OPENAIR3_DIR}/ocp-gtp) @@ -1670,7 +1646,7 @@ set (MME_APP_SRC ) add_library(MME_APP ${MME_APP_SRC}) target_link_libraries(MME_APP PRIVATE m2ap m3ap) -target_link_libraries(MME_APP PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(MME_APP PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) set(SCTP_SRC ${OPENAIR3_DIR}/SCTP/sctp_common.c @@ -1678,7 +1654,7 @@ set(SCTP_SRC ${OPENAIR3_DIR}/SCTP/sctp_eNB_itti_messaging.c ) add_library(SCTP_CLIENT ${SCTP_SRC}) -target_link_libraries(SCTP_CLIENT PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(SCTP_CLIENT PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) set(NAS_SRC ${OPENAIR3_DIR}/NAS/) set(libnas_api_OBJS @@ -1960,7 +1936,7 @@ target_link_libraries(LIB_NAS_SIMUE PRIVATE lte_rrc) set(NAS_SIM_LIB LIB_NAS_SIMUE) -target_link_libraries(LIB_NAS_SIMUE PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(LIB_NAS_SIMUE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_library(LIB_NAS_UE ${NAS_SRC}UE/nas_itti_messaging.c @@ -1981,9 +1957,8 @@ add_library(LIB_NAS_UE $ ) target_include_directories(LIB_NAS_UE PRIVATE ${OPENAIR_DIR}/common/utils/ds/) -target_link_libraries(LIB_NAS_UE PRIVATE lte_rrc) set(NAS_UE_LIB LIB_NAS_UE) -target_link_libraries(LIB_NAS_UE PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(LIB_NAS_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) include_directories(${NAS_SRC}NR_UE) include_directories(${NAS_SRC}UE) @@ -2015,7 +1990,7 @@ add_library(LIB_5GNAS_GNB target_include_directories(LIB_5GNAS_GNB PRIVATE ${OPENAIR_DIR}/common/utils/ds/) target_link_libraries(LIB_5GNAS_GNB PRIVATE SECU_CN ${CRYPTO_LIBRARIES}) -target_link_libraries(LIB_5GNAS_GNB PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(LIB_5GNAS_GNB PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) # Simulation library ########################## @@ -2034,7 +2009,6 @@ set (SIMUSRC ) add_library(SIMU STATIC ${SIMUSRC} ) target_include_directories(SIMU PUBLIC ${OPENAIR1_DIR}/SIMULATION/TOOLS ${OPENAIR1_DIR}/SIMULATION/RF) -target_link_libraries(SIMU PRIVATE asn1_nr_rrc asn1_lte_rrc) # Qt-based scope add_boolean_option(ENABLE_NRQTSCOPE OFF "Build the Qt-Scope" OFF) @@ -2046,16 +2020,15 @@ if (ENABLE_NRQTSCOPE) qt5_wrap_cpp(QTSCOPE_SOURCE_NR ${OPENAIR1_DIR}/PHY/TOOLS/nr_phy_qt_scope.h) add_library(nrqtscope MODULE ${QTSCOPE_SOURCE_NR}) target_link_libraries(nrqtscope PRIVATE Qt5::Widgets Qt5::Charts) - target_link_libraries(nrqtscope PRIVATE asn1_nr_rrc asn1_lte_rrc) + target_link_libraries(nrqtscope PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) endif() -add_library(SIMU_ETH -${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c -${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c -${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c -${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/bypass_session_layer.c -#${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/emu_transport.c +add_library(SIMU_ETH STATIC + ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c + ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c + ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c ) +target_link_libraries(SIMU_ETH PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) include_directories("${NFAPI_DIR}/nfapi/public_inc") include_directories("${NFAPI_DIR}/common/public_inc") @@ -2073,7 +2046,6 @@ add_library(rfsimulator MODULE ${OPENAIR1_DIR}/PHY/TOOLS/signal_energy.c ) target_link_libraries(rfsimulator PRIVATE SIMU ${ATLAS_LIBRARIES}) -target_link_libraries(rfsimulator PRIVATE asn1_nr_rrc asn1_lte_rrc) add_library(oai_iqplayer MODULE ${OPENAIR_DIR}/radio/iqplayer/iqplayer_lib.c @@ -2166,9 +2138,6 @@ add_executable(lte-softmodem ${OPENAIR_DIR}/radio/COMMON/record_player.c ${OPENAIR2_DIR}/RRC/NAS/nas_config.c ${OPENAIR2_DIR}/RRC/NAS/rb_config.c - ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c - ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c - ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c ${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c ${PHY_INTERFACE_DIR}/queue_t.c ${OPENAIR_DIR}/common/utils/lte/ue_power.c @@ -2183,13 +2152,12 @@ target_link_libraries(lte-softmodem PRIVATE -Wl,--start-group lte_rrc nr_rrc s1ap m2ap x2ap m3ap GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB - ${NAS_UE_LIB} ITTI SIMU + ${NAS_UE_LIB} ITTI SIMU SIMU_ETH -Wl,--end-group z dl) -target_link_libraries(lte-softmodem PRIVATE ${LIBXML2_LIBRARIES}) target_link_libraries(lte-softmodem PRIVATE pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp) target_link_libraries(lte-softmodem PRIVATE ${T_LIB}) -target_link_libraries(lte-softmodem PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(lte-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_executable(oairu @@ -2211,7 +2179,7 @@ target_link_libraries(oairu PRIVATE -Wl,--end-group z dl) target_link_libraries(oairu PRIVATE pthread m CONFIG_LIB rt ${T_LIB}) -target_link_libraries(oairu PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(oairu PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) # force the generation of ASN.1 so that we don't need to wait during the build target_link_libraries(lte-softmodem PRIVATE @@ -2230,9 +2198,6 @@ add_executable(lte-uesoftmodem ${OPENAIR_DIR}/radio/COMMON/record_player.c ${OPENAIR2_DIR}/RRC/NAS/nas_config.c ${OPENAIR2_DIR}/RRC/NAS/rb_config.c - ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c - ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c - ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c ${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c ${OPENAIR_DIR}/common/utils/lte/ue_power.c ${OPENAIR_DIR}/common/utils/lte/prach_utils.c @@ -2248,14 +2213,13 @@ target_link_libraries(lte-uesoftmodem PRIVATE -Wl,--start-group lte_rrc nr_rrc s1ap x2ap m2ap m3ap SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON - PHY_UE PHY_RU L2_UE L2_LTE SIMU NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB + PHY_UE PHY_RU L2_UE L2_LTE SIMU SIMU_ETH NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB ${NAS_UE_LIB} ITTI ${ATLAS_LIBRARIES} -Wl,--end-group z dl) -target_link_libraries(lte-uesoftmodem PRIVATE ${LIBXML2_LIBRARIES}) target_link_libraries(lte-uesoftmodem PRIVATE pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${ATLAS_LIBRARIES}) target_link_libraries(lte-uesoftmodem PRIVATE ${T_LIB}) -target_link_libraries(lte-uesoftmodem PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(lte-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) # force the generation of ASN.1 so that we don't need to wait during the build target_link_libraries(lte-uesoftmodem PRIVATE @@ -2277,7 +2241,6 @@ add_executable(nr-softmodem ${OPENAIR_DIR}/radio/COMMON/record_player.c ${OPENAIR2_DIR}/RRC/NAS/nas_config.c ${OPENAIR2_DIR}/RRC/NAS/rb_config.c - ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${OPENAIR_DIR}/common/utils/lte/ue_power.c ${OPENAIR_DIR}/common/utils/lte/prach_utils.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c @@ -2291,14 +2254,13 @@ target_link_libraries(nr-softmodem PRIVATE -Wl,--start-group UTIL HASHTABLE SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU GTPV1U SECU_CN SECU_OSA ITTI ${NAS_UE_LIB} lte_rrc nr_rrc - ngap s1ap L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB SIMU + ngap s1ap L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB SIMU SIMU_ETH x2ap f1ap m2ap m3ap e1ap -Wl,--end-group z dl) -target_link_libraries(nr-softmodem PRIVATE ${LIBXML2_LIBRARIES}) target_link_libraries(nr-softmodem PRIVATE pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${ATLAS_LIBRARIES}) target_link_libraries(nr-softmodem PRIVATE ${T_LIB}) -target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_dependencies(nr-softmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc) @@ -2313,7 +2275,6 @@ target_link_libraries(nr-softmodem PRIVATE add_executable(nr-cuup executables/nr-cuup.c executables/softmodem-common.c - ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${OPENAIR2_DIR}/RRC/NAS/nas_config.c ${NR_RRC_DIR}/rrc_gNB_UE_context.c ${OPENAIR2_DIR}/E1AP/e1ap_setup.c @@ -2325,9 +2286,9 @@ add_executable(nr-cuup target_link_libraries(nr-cuup PRIVATE CONFIG_LIB ITTI SCTP_CLIENT - GTPV1U e1ap e1_pdcp_if f1ap + GTPV1U e1ap e1_pdcp_if f1ap SIMU_ETH SECU_OSA SECU_CN ${OPENSSL_LIBRARIES} crypt z sctp dl pthread) -target_link_libraries(nr-cuup PRIVATE asn1_lte_rrc asn1_nr_rrc) +target_link_libraries(nr-cuup PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) # nr-uesoftmodem is UE implementation ####################################### @@ -2344,7 +2305,6 @@ add_executable(nr-uesoftmodem ${OPENAIR2_DIR}/RRC/NAS/nas_config.c ${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.c ${OPENAIR2_DIR}/RRC/NAS/rb_config.c - ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c ${OPENAIR1_DIR}/PHY/TOOLS/phy_scope_interface.c @@ -2357,13 +2317,12 @@ target_link_libraries(nr-uesoftmodem PRIVATE nr_rrc SECU_CN SECU_OSA UTIL HASHTABLE SCHED_RU_LIB SCHED_NR_UE_LIB PHY_COMMON PHY_NR_COMMON PHY_NR_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_NR_LIB - ITTI ${ATLAS_LIBRARIES} LIB_5GNAS_GNB LIB_NAS_SIMUE ${NAS_SIM_LIB} SIMU + ITTI ${ATLAS_LIBRARIES} LIB_5GNAS_GNB LIB_NAS_SIMUE ${NAS_SIM_LIB} SIMU SIMU_ETH -Wl,--end-group z dl) -target_link_libraries(nr-uesoftmodem PRIVATE ${LIBXML2_LIBRARIES}) target_link_libraries(nr-uesoftmodem PRIVATE pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${ATLAS_LIBRARIES}) target_link_libraries(nr-uesoftmodem PRIVATE ${T_LIB}) -target_link_libraries(nr-uesoftmodem PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(nr-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_dependencies( nr-uesoftmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc ) if (ENABLE_LDPC_CUDA) @@ -2402,7 +2361,7 @@ add_executable(rftest ${SHLIB_LOADER_SOURCES} ) target_link_libraries(rftest PRIVATE minimal_lib CONFIG_LIB PHY_NR_COMMON UTIL pthread dl m ${T_LIB} ) -target_link_libraries(rftest PRIVATE asn1_lte_rrc asn1_nr_rrc) +target_link_libraries(rftest PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) add_executable(polartest ${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/polartest.c @@ -2414,7 +2373,6 @@ target_link_libraries(polartest PRIVATE -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_COMMON PHY_NR_UE CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} dl ) -target_link_libraries(polartest PRIVATE asn1_nr_rrc asn1_lte_rrc) add_executable(smallblocktest ${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/smallblocktest.c @@ -2427,7 +2385,6 @@ target_link_libraries(smallblocktest PRIVATE -Wl,--start-group UTIL SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} dl ) -target_link_libraries(smallblocktest PRIVATE asn1_nr_rrc asn1_lte_rrc) add_executable(ldpctest @@ -2445,12 +2402,11 @@ target_link_libraries(ldpctest PRIVATE -Wl,--start-group UTIL SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} dl ) -target_link_libraries(ldpctest PRIVATE asn1_nr_rrc asn1_lte_rrc) add_executable(nr_dlschsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c + ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c - ${OPENAIR_DIR}/executables/softmodem-common.c ${T_SOURCE} ${SHLIB_LOADER_SOURCES} ) @@ -2458,10 +2414,11 @@ target_link_libraries(nr_dlschsim PRIVATE -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl ) -target_link_libraries(nr_dlschsim PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(nr_dlschsim PRIVATE asn1_nr_rrc_hdrs) add_executable(nr_pbchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c + ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c ${T_SOURCE} ${SHLIB_LOADER_SOURCES} @@ -2470,14 +2427,14 @@ target_link_libraries(nr_pbchsim PRIVATE -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl ) -target_link_libraries(nr_pbchsim PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(nr_pbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) #PUCCH ---> Prashanth add_executable(nr_pucchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c + ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c - ${OPENAIR_DIR}/executables/softmodem-common.c ${T_SOURCE} ${SHLIB_LOADER_SOURCES} ) @@ -2485,45 +2442,42 @@ target_link_libraries(nr_pucchsim PRIVATE -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl ) -target_link_libraries(nr_pucchsim PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(nr_pucchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_executable(nr_dlsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlsim.c + ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c ${OPENAIR_DIR}/executables/softmodem-common.c ${OPENAIR2_DIR}/RRC/NAS/nas_config.c - ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${NR_UE_RRC_DIR}/rrc_nsa.c ${NFAPI_USER_DIR}/nfapi.c + ${NFAPI_USER_DIR}/gnb_ind_vars.c ${PHY_INTERFACE_DIR}/queue_t.c ${T_SOURCE} ${SHLIB_LOADER_SOURCES} ) target_link_libraries(nr_dlsim PRIVATE - -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON lte_rrc nr_rrc CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN ngap NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group + -Wl,--start-group UTIL SIMU SIMU_ETH PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR HASHTABLE x2ap SECU_CN ngap -lz -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl ) -target_link_libraries(nr_dlsim PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(nr_dlsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_executable(nr_prachsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/prachsim.c + ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c - ${OPENAIR2_DIR}/RRC/NAS/nas_config.c - ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c - ${NR_UE_RRC_DIR}/rrc_nsa.c - ${NFAPI_USER_DIR}/nfapi.c - ${PHY_INTERFACE_DIR}/queue_t.c ${T_SOURCE} ${SHLIB_LOADER_SOURCES}) target_link_libraries(nr_prachsim PRIVATE - -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON lte_rrc nr_rrc CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN ngap NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group + -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB CONFIG_LIB -lz -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl) -target_link_libraries(nr_prachsim PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(nr_prachsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_executable(nr_ulschsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c + ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c - ${OPENAIR_DIR}/executables/softmodem-common.c ${PHY_INTERFACE_DIR}/queue_t.c ${T_SOURCE} ${SHLIB_LOADER_SOURCES} @@ -2532,16 +2486,17 @@ target_link_libraries(nr_ulschsim PRIVATE -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl ) -target_link_libraries(nr_ulschsim PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(nr_ulschsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_executable(nr_ulsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulsim.c + ${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c ${OPENAIR_DIR}/common/utils/nr/nr_common.c ${OPENAIR_DIR}/executables/softmodem-common.c ${OPENAIR2_DIR}/RRC/NAS/nas_config.c - ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${NR_UE_RRC_DIR}/rrc_nsa.c ${NFAPI_USER_DIR}/nfapi.c + ${NFAPI_USER_DIR}/gnb_ind_vars.c ${PHY_INTERFACE_DIR}/queue_t.c ${T_SOURCE} ${SHLIB_LOADER_SOURCES} @@ -2552,10 +2507,10 @@ if (ENABLE_LDPC_T1) endif() target_link_libraries(nr_ulsim PRIVATE - -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON lte_rrc nr_rrc CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN ngap NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group + -Wl,--start-group UTIL SIMU SIMU_ETH PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR HASHTABLE x2ap SECU_CN ngap -lz -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl ) -target_link_libraries(nr_ulsim PRIVATE asn1_nr_rrc asn1_lte_rrc) +target_link_libraries(nr_ulsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim) @@ -2572,7 +2527,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr -Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_NR_COMMON PHY PHY_UE PHY_RU ITTI -Wl,--end-group pthread m rt CONFIG_LIB ${ATLAS_LIBRARIES} ${T_LIB} dl ) - target_link_libraries(${myExe} PRIVATE asn1_nr_rrc asn1_lte_rrc) + target_link_libraries(${myExe} PRIVATE asn1_lte_rrc_hdrs) endforeach(myExe) diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa index e7f803b45c..078adb2a68 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb-nsa @@ -24,7 +24,6 @@ // Location of the python executor node shall be in the same subnet as the others servers def pythonExecutor = params.pythonExecutor -def DataBaseHost = params.DataBaseHost // Location of the test XML file to be run def testXMLFile = params.pythonTestXmlFile @@ -169,10 +168,6 @@ pipeline { allParametersPresent = false } - if (params.DataBaseHost == "none") { - DataBaseHost = pythonExecutor - } - if (allParametersPresent) { echo "All parameters are present" if (eNB_AllowMergeRequestProcess) { @@ -357,18 +352,6 @@ pipeline { } } } - stage ("SQL Collect"){ - when { - expression { params.DataBaseHost != "none" } - } - agent {label DataBaseHost} - steps { - script { - if (currentBuild.result=='FAILURE') {StatusForDb = 'FAIL'} else {StatusForDb = 'PASS'} - sh "python3 /home/oaicicd/mysql/sql_connect.py ${JOB_NAME} ${params.eNB_MR} ${params.eNB_Branch} ${env.BUILD_ID} ${env.BUILD_URL} ${StatusForDb} ''" - } - } - } } } } diff --git a/ci-scripts/ci_ueinfra.yaml b/ci-scripts/ci_ueinfra.yaml index 23d6aee785..c51be6652c 100644 --- a/ci-scripts/ci_ueinfra.yaml +++ b/ci-scripts/ci_ueinfra.yaml @@ -22,15 +22,15 @@ nrmodule2_quectel: adb_ue_1: Host: nano - InitScript: /home/oaicicd/ci_ctl_adb.sh initialize 5200a933fee93521 - TermScript: /home/oaicicd/ci_ctl_adb.sh terminate 5200a933fee93521 - AttachScript: /home/oaicicd/ci_ctl_adb.sh attach 5200a933fee93521 - DetachScript: /home/oaicicd/ci_ctl_adb.sh detach 5200a933fee93521 - CheckStatusScript: /home/oaicicd/ci_ctl_adb.sh check 5200a933fee93521 - DataEnableScript: adb -s 5200a933fee93521 shell "svc data enable" - DataDisableScript: adb -s 5200a933fee93521 shell "svc data disable" - UENetworkScript: adb -s 5200a933fee93521 shell "ip address show | grep rmnet" - CmdPrefix: adb -s 5200a933fee93521 shell + InitScript: /home/oaicicd/ci_ctl_adb.sh initialize R3CM40LZPHT + TermScript: /home/oaicicd/ci_ctl_adb.sh terminate R3CM40LZPHT + AttachScript: /home/oaicicd/ci_ctl_adb.sh attach R3CM40LZPHT + DetachScript: /home/oaicicd/ci_ctl_adb.sh detach R3CM40LZPHT + CheckStatusScript: /home/oaicicd/ci_ctl_adb.sh check R3CM40LZPHT + DataEnableScript: adb -s R3CM40LZPHT shell "svc data enable" + DataDisableScript: adb -s R3CM40LZPHT shell "svc data disable" + UENetworkScript: adb -s R3CM40LZPHT shell "ip address show | grep rmnet_data0" + CmdPrefix: adb -s R3CM40LZPHT shell MTU: 1500 LogStore: /media/usb-drive/ci_adb_1-logs adb_ue_2: diff --git a/ci-scripts/cls_containerize.py b/ci-scripts/cls_containerize.py index 4c7701842e..9a00ec3dfe 100644 --- a/ci-scripts/cls_containerize.py +++ b/ci-scripts/cls_containerize.py @@ -980,7 +980,7 @@ class Containerize(): services = [] for s in allServices: mySSH.command(f'docker-compose -f ci-docker-compose.yml ps --all -- {s}', '\$', 5, silent=False) - running = mySSH.getBefore().split('\r\n')[3:-1] + running = mySSH.getBefore().split('\r\n')[2:-1] #logging.debug(f'running services: {running}') if len(running) > 0: # something is running for that service services.append(s) @@ -1490,11 +1490,6 @@ class Containerize(): result = re.search('172.21.16.128', mySSH.getBefore()) if result is None: mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.128/26 via 172.21.16.128 dev eno1', '\$', 10) - # Check if route to nepes gnb exists - mySSH.command('ip route | grep --colour=never "192.168.68.192/26"', '\$', 10) - result = re.search('172.21.16.137', mySSH.getBefore()) - if result is None: - mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.192/26 via 172.21.16.137 dev eno1', '\$', 10) # Check if forwarding is enabled mySSH.command('sysctl net.ipv4.conf.all.forwarding', '\$', 10) result = re.search('net.ipv4.conf.all.forwarding = 1', mySSH.getBefore()) @@ -1564,16 +1559,39 @@ class Containerize(): mySSH.close() if svrName == 'nepes': mySSH.open(ipAddr, userName, password) - # Check if route to porcepix epc exists - mySSH.command('ip route | grep --colour=never "192.168.61.192/26"', '\$', 10) - result = re.search('172.21.16.136', mySSH.getBefore()) + # Check if route to porcepix epc exists: not necessary, is on same host + #mySSH.command('ip route | grep --colour=never "192.168.61.192/26"', '\$', 10) + #result = re.search('172.21.16.136', mySSH.getBefore()) + #if result is None: + # mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.61.192/26 via 172.21.16.136 dev enp0s31f6', '\$', 10) + # Check if X2 route to obelix enb exists: not necessary, gnb is on ofqot + #mySSH.command('ip route | grep --colour=never "192.168.68.128/26"', '\$', 10) + #result = re.search('172.21.16.128', mySSH.getBefore()) + #if result is None: + # mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.128/26 via 172.21.16.128 dev enp0s31f6', '\$', 10) + # Check if forwarding is enabled + # Check if route to ofqot gnb exists + mySSH.command('ip route | grep --colour=never "192.168.68.192/26"', '\$', 10) + result = re.search('172.21.16.109', mySSH.getBefore()) if result is None: - mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.61.192/26 via 172.21.16.136 dev enp0s31f6', '\$', 10) - # Check if X2 route to obelix enb exists + mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.192/26 via 172.21.16.109 dev enp0s31f6', '\$', 10) + mySSH.command('sysctl net.ipv4.conf.all.forwarding', '\$', 10) + result = re.search('net.ipv4.conf.all.forwarding = 1', mySSH.getBefore()) + if result is None: + mySSH.command('echo ' + password + ' | sudo -S sysctl net.ipv4.conf.all.forwarding=1', '\$', 10) + # Check if iptables forwarding is accepted + mySSH.command('echo ' + password + ' | sudo -S iptables -L FORWARD', '\$', 10) + result = re.search('Chain FORWARD .*policy ACCEPT', mySSH.getBefore()) + if result is None: + mySSH.command('echo ' + password + ' | sudo -S iptables -P FORWARD ACCEPT', '\$', 10) + mySSH.close() + if svrName == 'ofqot': + mySSH.open(ipAddr, userName, password) + # Check if X2 route to nepes enb/epc exists mySSH.command('ip route | grep --colour=never "192.168.68.128/26"', '\$', 10) - result = re.search('172.21.16.128', mySSH.getBefore()) + result = re.search('172.21.16.137', mySSH.getBefore()) if result is None: - mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.128/26 via 172.21.16.128 dev enp0s31f6', '\$', 10) + mySSH.command('echo ' + password + ' | sudo -S ip route add 192.168.68.128/26 via 172.21.16.137 dev enp2s0', '\$', 10) # Check if forwarding is enabled mySSH.command('sysctl net.ipv4.conf.all.forwarding', '\$', 10) result = re.search('net.ipv4.conf.all.forwarding = 1', mySSH.getBefore()) diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 72d948ce94..9fa1dcbb71 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -461,7 +461,7 @@ class OaiCiTest(): doInterfaceCheck = True # For the moment, only in explicit noS1 without kernel module (ie w/ tunnel interface) if self.air_interface == 'nr-uesoftmodem': - result = re.search('--noS1 --nokrnmod 1', str(self.Initialize_OAI_UE_args)) + result = re.search('--noS1', str(self.Initialize_OAI_UE_args)) if result is not None: doInterfaceCheck = True if doInterfaceCheck: diff --git a/ci-scripts/conf_files/gNB_SA_CU.conf b/ci-scripts/conf_files/gNB_SA_CU.conf index 9910e761b2..d619c8311b 100644 --- a/ci-scripts/conf_files/gNB_SA_CU.conf +++ b/ci-scripts/conf_files/gNB_SA_CU.conf @@ -169,7 +169,7 @@ gNBs = ////////// AMF parameters: - amf_ip_address = ( { ipv4 = "192.168.5.233"; + amf_ip_address = ( { ipv4 = "192.168.70.132"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; @@ -178,11 +178,10 @@ gNBs = NETWORK_INTERFACES : { - - GNB_INTERFACE_NAME_FOR_NG_AMF = "eth0"; - GNB_IPV4_ADDRESS_FOR_NG_AMF = "CI_GNB_IP_ADDR"; - GNB_INTERFACE_NAME_FOR_NGU = "eth0"; - GNB_IPV4_ADDRESS_FOR_NGU = "CI_GNB_IP_ADDR"; + GNB_INTERFACE_NAME_FOR_NG_AMF = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NG_AMF = "192.168.70.129/24"; + GNB_INTERFACE_NAME_FOR_NGU = "demo-oai"; + GNB_IPV4_ADDRESS_FOR_NGU = "192.168.70.129/24"; GNB_PORT_FOR_S1U = 2152; # Spec 2152 }; } @@ -213,7 +212,7 @@ security = { rlc_log_level ="debug"; pdcp_log_level ="info"; rrc_log_level ="info"; - f1ap_log_level ="debug"; + f1ap_log_level ="info"; ngap_log_level ="debug"; }; diff --git a/ci-scripts/conf_files/gNB_SA_DU.conf b/ci-scripts/conf_files/gNB_SA_DU.conf index 2749ba5876..4013c0d475 100644 --- a/ci-scripts/conf_files/gNB_SA_DU.conf +++ b/ci-scripts/conf_files/gNB_SA_DU.conf @@ -233,7 +233,7 @@ serveraddr = "server"; rlc_log_level ="info"; pdcp_log_level ="info"; rrc_log_level ="info"; - f1ap_log_level ="debug"; + f1ap_log_level ="info"; ngap_log_level ="debug"; }; diff --git a/ci-scripts/conf_files/gNB_SA_n78_106PRB.2x2_usrpn310.conf b/ci-scripts/conf_files/gNB_SA_n78_106PRB.2x2_usrpn310.conf index 4c68ea1f94..445ff458c7 100644 --- a/ci-scripts/conf_files/gNB_SA_n78_106PRB.2x2_usrpn310.conf +++ b/ci-scripts/conf_files/gNB_SA_n78_106PRB.2x2_usrpn310.conf @@ -274,5 +274,5 @@ security = { rlc_log_level ="info"; pdcp_log_level ="info"; rrc_log_level ="info"; - f1ap_log_level ="debug"; + f1ap_log_level ="info"; }; diff --git a/ci-scripts/conf_files/gNB_SA_n78_133PRB.2x2_usrpn310.conf b/ci-scripts/conf_files/gNB_SA_n78_133PRB.2x2_usrpn310.conf index 7a474f3bb4..ed1294585b 100644 --- a/ci-scripts/conf_files/gNB_SA_n78_133PRB.2x2_usrpn310.conf +++ b/ci-scripts/conf_files/gNB_SA_n78_133PRB.2x2_usrpn310.conf @@ -270,5 +270,5 @@ security = { rlc_log_level ="info"; pdcp_log_level ="info"; rrc_log_level ="info"; - f1ap_log_level ="debug"; + f1ap_log_level ="info"; }; diff --git a/ci-scripts/conf_files/gnb-cucp.sa.f1.conf b/ci-scripts/conf_files/gnb-cucp.sa.f1.conf index 62063030bd..f92ef6842c 100644 --- a/ci-scripts/conf_files/gnb-cucp.sa.f1.conf +++ b/ci-scripts/conf_files/gnb-cucp.sa.f1.conf @@ -222,7 +222,7 @@ security = { rlc_log_level ="debug"; pdcp_log_level ="info"; rrc_log_level ="info"; - f1ap_log_level ="debug"; + f1ap_log_level ="info"; ngap_log_level ="debug"; }; diff --git a/ci-scripts/conf_files/gnb-cuup.sa.f1.conf b/ci-scripts/conf_files/gnb-cuup.sa.f1.conf index 2a57a37273..6759654e0d 100644 --- a/ci-scripts/conf_files/gnb-cuup.sa.f1.conf +++ b/ci-scripts/conf_files/gnb-cuup.sa.f1.conf @@ -81,7 +81,7 @@ security = { rlc_log_level ="debug"; pdcp_log_level ="info"; rrc_log_level ="info"; - f1ap_log_level ="debug"; + f1ap_log_level ="info"; ngap_log_level ="debug"; }; diff --git a/ci-scripts/conf_files/gnb-du.band78.106prb.rfsim.conf b/ci-scripts/conf_files/gnb-du.band78.106prb.rfsim.conf index 7f6f6c949d..95b28a38ed 100644 --- a/ci-scripts/conf_files/gnb-du.band78.106prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb-du.band78.106prb.rfsim.conf @@ -233,6 +233,6 @@ log_config : rlc_log_level = "info"; pdcp_log_level = "info"; rrc_log_level = "info"; - f1ap_log_level = "debug"; + f1ap_log_level = "info"; ngap_log_level = "debug"; }; diff --git a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.asue.conf b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.asue.conf index 6f8c53e681..a723e3a4b7 100644 --- a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.asue.conf +++ b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.asue.conf @@ -278,5 +278,5 @@ security = { rlc_log_level ="info"; pdcp_log_level ="info"; rrc_log_level ="info"; - f1ap_log_level ="debug"; + f1ap_log_level ="info"; }; diff --git a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf index a78fa953c1..f5c0e23670 100644 --- a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf +++ b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf @@ -276,5 +276,5 @@ security = { rlc_log_level ="info"; pdcp_log_level ="info"; rrc_log_level ="info"; - f1ap_log_level ="debug"; + f1ap_log_level ="info"; }; diff --git a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.ddsuu.2x2.usrpn310.conf b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.ddsuu.2x2.usrpn310.conf index 92e1ca573f..e8fc796b61 100644 --- a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.ddsuu.2x2.usrpn310.conf +++ b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.ddsuu.2x2.usrpn310.conf @@ -277,5 +277,5 @@ security = { rlc_log_level ="info"; pdcp_log_level ="info"; rrc_log_level ="info"; - f1ap_log_level ="debug"; + f1ap_log_level ="info"; }; diff --git a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpn310.conf b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpn310.conf index cc363e215f..b1abd0024f 100644 --- a/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpn310.conf +++ b/ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpn310.conf @@ -280,5 +280,5 @@ security = { rlc_log_level ="info"; pdcp_log_level ="info"; rrc_log_level ="info"; - f1ap_log_level ="debug"; + f1ap_log_level ="info"; }; diff --git a/ci-scripts/conf_files/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf b/ci-scripts/conf_files/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf index d83770c852..ec443b174a 100644 --- a/ci-scripts/conf_files/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf +++ b/ci-scripts/conf_files/gnb.band78.sa.fr1.162PRB.2x2.usrpn310.conf @@ -279,5 +279,5 @@ security = { rlc_log_level ="info"; pdcp_log_level ="info"; rrc_log_level ="info"; - f1ap_log_level ="debug"; + f1ap_log_level ="info"; }; diff --git a/ci-scripts/conf_files/gnb.sa.band66.u0.25prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band66.u0.25prb.rfsim.conf index 1656d3bcd1..ab0e9c2a8d 100644 --- a/ci-scripts/conf_files/gnb.sa.band66.u0.25prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band66.u0.25prb.rfsim.conf @@ -280,5 +280,5 @@ log_config : pdcp_log_level ="info"; rrc_log_level ="info"; ngap_log_level ="debug"; - f1ap_log_level ="debug"; + f1ap_log_level ="info"; }; diff --git a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.2x2.conf b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.2x2.conf index e35a6b1d4d..66c82c99d1 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.2x2.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.2x2.conf @@ -158,65 +158,6 @@ gNBs = ); -# Dedicated Serving Cell Configuration -servingCellConfigDedicated = ({ - # BWP-Downlink - # BWP 1 Configuration - dl_bwp-Id_1 = 1; - dl_bwp1_locationAndBandwidth = 28875; // RBstart=0, L=106 (40 MHz BW) - # subcarrierSpacing - # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - dl_bwp1_subcarrierSpacing = 1; - - # BWP 2 Configuration - dl_bwp-Id_2 = 2; - dl_bwp2_locationAndBandwidth = 13750; // RBstart=0, L=51 (20 MHz BW) - # subcarrierSpacing - # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - dl_bwp2_subcarrierSpacing = 1; - - # BWP 3 Configuration - dl_bwp-Id_3 = 3; - dl_bwp3_locationAndBandwidth = 6325; // RBstart=0, L=24 (10 MHz BW) - # subcarrierSpacing - # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - dl_bwp3_subcarrierSpacing = 1; - - firstActiveDownlinkBWP-Id = 1; #BWP-Id - defaultDownlinkBWP-Id = 1; #BWP-Id - - # bwp-InactivityTimer ENUMERATED {ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, - # ms40,ms50, ms60, ms80,ms100, ms200,ms300, ms500, - # ms750, ms1280, ms1920, ms2560, spare10, spare9, spare8, - # spare7, spare6, spare5, spare4, spare3, spare2, spare1 } - - # UplinkConfig - # BWP-Uplink - # BWP 1 Configuration - ul_bwp-Id_1 = 1; - ul_bwp1_locationAndBandwidth = 28875; // RBstart=0, L=106 (40 MHz BW) - # subcarrierSpacing - # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - ul_bwp1_subcarrierSpacing = 1; - - # BWP 2 Configuration - ul_bwp-Id_2 = 2; - ul_bwp2_locationAndBandwidth = 13750; // RBstart=0, L=51 (20 MHz BW) - # subcarrierSpacing - # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - ul_bwp2_subcarrierSpacing = 1; - - # BWP 3 Configuration - ul_bwp-Id_3 = 3; - ul_bwp3_locationAndBandwidth = 6325; // RBstart=0, L=24 (10 MHz BW) - # subcarrierSpacing - # 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120 - ul_bwp3_subcarrierSpacing = 1; - - firstActiveUplinkBWP-Id = 1; #BWP-Id - } -); - # ------- SCTP definitions SCTP : { @@ -331,5 +272,5 @@ log_config : pdcp_log_level ="info"; rrc_log_level ="info"; ngap_log_level ="debug"; - f1ap_log_level ="debug"; + f1ap_log_level ="info"; }; diff --git a/ci-scripts/conf_files/gnb.sa.band78.fr1.51PRB.usrpb210.conf b/ci-scripts/conf_files/gnb.sa.band78.fr1.51PRB.usrpb210.conf index 6e012b5098..5dc8cf12f7 100644 --- a/ci-scripts/conf_files/gnb.sa.band78.fr1.51PRB.usrpb210.conf +++ b/ci-scripts/conf_files/gnb.sa.band78.fr1.51PRB.usrpb210.conf @@ -262,6 +262,6 @@ log_config : pdcp_log_level ="info"; rrc_log_level ="info"; ngap_log_level ="debug"; - f1ap_log_level ="debug"; + f1ap_log_level ="info"; }; diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 7be8c594fd..1a7607d5d5 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -429,6 +429,7 @@ def GetParametersFromXML(action): elif action == 'Custom_Command': RAN.node = test.findtext('node') RAN.command = test.findtext('command') + RAN.command_fail = test.findtext('command_fail') in ['True', 'true', 'Yes', 'yes'] else: logging.warning(f"unknown action {action} from option-parsing point-of-view") @@ -705,6 +706,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re # On CI bench w/ containers, we need to validate if IP routes are set if EPC.IPAddress == '172.21.16.136': CONTAINERS.CheckAndAddRoute('porcepix', EPC.IPAddress, EPC.UserName, EPC.Password) + if EPC.IPAddress == '172.21.16.137': + CONTAINERS.CheckAndAddRoute('nepes', EPC.IPAddress, EPC.UserName, EPC.Password) if CONTAINERS.eNBIPAddress == '172.21.16.127': CONTAINERS.CheckAndAddRoute('asterix', CONTAINERS.eNBIPAddress, CONTAINERS.eNBUserName, CONTAINERS.eNBPassword) if CONTAINERS.eNB1IPAddress == '172.21.16.127': @@ -713,6 +716,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re CONTAINERS.CheckAndAddRoute('obelix', CONTAINERS.eNBIPAddress, CONTAINERS.eNBUserName, CONTAINERS.eNBPassword) if CONTAINERS.eNB1IPAddress == '172.21.16.128': CONTAINERS.CheckAndAddRoute('obelix', CONTAINERS.eNB1IPAddress, CONTAINERS.eNB1UserName, CONTAINERS.eNB1Password) + if CONTAINERS.eNBIPAddress == '172.21.16.109' or CONTAINERS.eNBIPAddress == 'ofqot': + CONTAINERS.CheckAndAddRoute('ofqot', CONTAINERS.eNBIPAddress, CONTAINERS.eNBUserName, CONTAINERS.eNBPassword) if CONTAINERS.eNBIPAddress == '172.21.16.137': CONTAINERS.CheckAndAddRoute('nepes', CONTAINERS.eNBIPAddress, CONTAINERS.eNBUserName, CONTAINERS.eNBPassword) if CONTAINERS.eNB1IPAddress == '172.21.16.137': @@ -752,6 +757,8 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re elif action == 'Custom_Command': logging.info(f"Executing custom command") RAN.CustomCommand(HTML) + if RAN.prematureExit: + CiTestObj.AutoTerminateeNB(HTML,RAN,EPC,CONTAINERS) elif action == 'Initialize_eNB': RAN.InitializeeNB(HTML, EPC) if RAN.prematureExit: diff --git a/ci-scripts/ran.py b/ci-scripts/ran.py index a8e66989c2..c2ee7af1e3 100644 --- a/ci-scripts/ran.py +++ b/ci-scripts/ran.py @@ -99,6 +99,7 @@ class RANManagement(): self.cmd_prefix = '' # prefix before {lte,nr}-softmodem self.node = '' self.command = '' + self.command_fail = False #----------------------------------------------------------- @@ -259,19 +260,24 @@ class RANManagement(): self.checkBuildeNB(lIpAddr, lUserName, lPassWord, lSourcePath, self.backgroundBuildTestId[int(self.eNB_instance)], HTML) def CustomCommand(self, HTML): - if self.node == '' or self.node == "localhost": - cmd = cls_cmd.LocalCmd() - else: - cmd = cls_cmd.RemoteCmd(self.node) + cmd = cls_cmd.getConnection(self.node) ret = cmd.run(self.command) cmd.close() - logging.debug(f'CustomCommand: {self.command} returnCode: {ret.returncode} output: {ret.stdout}') - html_queue = SimpleQueue() + logging.debug(f'CustomCommand: {self.command} returnCode: {ret.returncode}') status = 'OK' - if ret.returncode != 0: - html_queue.put(ret.stdout) + message = [] + if ret.returncode != 0 and not self.command_fail: + message = [ret.stdout] + logging.warning(f'CustomCommand output: {message}') status = 'Warning' - HTML.CreateHtmlTestRow(self.command, status, 1, html_queue) + if self.command_fail: # important command since it would make the pipeline fail, so show output in HTML + message = [ret.stdout] + if ret.returncode != 0 and self.command_fail: + message = [ret.stdout] + logging.error(f'CustomCommand failed: output: {message}') + status = 'KO' + self.prematureExit = True + HTML.CreateHtmlTestRowQueue(self.command, status, message) def checkBuildeNB(self, lIpAddr, lUserName, lPassWord, lSourcePath, testcaseId, HTML): HTML.testCase_id=testcaseId diff --git a/ci-scripts/xml_files/container_4g_l2sim_proxy.xml b/ci-scripts/xml_files/container_4g_l2sim_proxy.xml index 153cfffda6..2d841cbc69 100644 --- a/ci-scripts/xml_files/container_4g_l2sim_proxy.xml +++ b/ci-scripts/xml_files/container_4g_l2sim_proxy.xml @@ -36,7 +36,7 @@ 1 1 True - a6169d8 + a2fa216 diff --git a/ci-scripts/xml_files/container_l2sim_proxy.xml b/ci-scripts/xml_files/container_l2sim_proxy.xml index e4fe9be275..a237d7be5f 100644 --- a/ci-scripts/xml_files/container_l2sim_proxy.xml +++ b/ci-scripts/xml_files/container_l2sim_proxy.xml @@ -36,7 +36,7 @@ 1 1 True - a6169d8 + a2fa216 diff --git a/ci-scripts/xml_files/container_nsa_b200_quectel.xml b/ci-scripts/xml_files/container_nsa_b200_quectel.xml index 2f0c8dfeda..ee5430010f 100644 --- a/ci-scripts/xml_files/container_nsa_b200_quectel.xml +++ b/ci-scripts/xml_files/container_nsa_b200_quectel.xml @@ -86,14 +86,14 @@ Custom_Command - Disable Sleep States (obelix) - obelix + Disable Sleep States (ofqot) + ofqot sudo cpupower idle-set -D 0 Custom_Command - Enable Sleep States (obelix) - obelix + Enable Sleep States (ofqot) + ofqot sudo cpupower idle-set -E @@ -185,8 +185,8 @@ Iperf - iperf (DL/125Mbps/UDP)(60 sec)(single-ue profile) - -u -b 125M -t 60 -i 1 -fm + iperf (DL/90Mbps/UDP)(60 sec)(single-ue profile) + -u -b 90M -t 60 -i 1 -fm DL idefix 25 diff --git a/ci-scripts/xml_files/container_sa_b200_quectel.xml b/ci-scripts/xml_files/container_sa_b200_quectel.xml index ed0b27080b..b862d90cfb 100644 --- a/ci-scripts/xml_files/container_sa_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_b200_quectel.xml @@ -22,7 +22,7 @@ --> TEST-SA-FR1-B200 - 40 MHz TDD SA + 20 MHz TDD SA tasks 1 @@ -36,6 +36,10 @@ 070000 070001 070002 + 060001 + 000002 + 060002 + 050000 010010 010002 030201 @@ -53,13 +57,13 @@ Custom_Command Disable Sleep States - nepes + ofqot sudo cpupower idle-set -D 0 Custom_Command Enable Sleep States - nepes + ofqot sudo cpupower idle-set -E @@ -136,8 +140,8 @@ Iperf - iperf (UL/8Mbps/UDP)(30 sec)(single-ue profile) - -u -b 8M -t 30 -i 1 -fm + iperf (UL/3.5Mbps/UDP)(30 sec)(single-ue profile) + -u -b 3.5M -t 30 -i 1 -fm UL idefix 1 @@ -154,6 +158,21 @@ single-ue + + Custom_Command + Trigger Reestablishment + ofqot + echo ci force_reestab | nc -N 192.168.68.194 9090 | grep -E 'force-remove UE RNTI [0-9a-f]{4} from RLC to trigger reestablishment' + yes + + + Custom_Command + Verify Reestablishment + ofqot + echo ci get_reestab_count | nc -N 192.168.68.194 9090 | grep -E 'UE RNTI [0-9a-f]{4} reestab 1 reconf_after_reestab 1' + yes + + Undeploy_Object Undeploy gNB diff --git a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml index 2f6aad7eef..3fab62b265 100644 --- a/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml +++ b/ci-scripts/xml_files/container_sa_f1_b200_quectel.xml @@ -93,13 +93,13 @@ Custom_Command Disable Sleep States - nepes + ofqot sudo cpupower idle-set -D 0 Custom_Command Enable Sleep States - nepes + ofqot sudo cpupower idle-set -E diff --git a/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml index 0a8fd1bfa0..454cd1486b 100644 --- a/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml +++ b/ci-scripts/xml_files/fr1_sa_oaiue_b200.xml @@ -42,7 +42,7 @@ Initialize_OAI_UE Initialize OAI UE nr - --sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "serial=30C51D1" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 -E --log_config.global_log_options level,nocolor,time + --sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "serial=30C51D1" --numerology 1 -r 106 --band 78 -C 3319680000 --ue-txgain 0 -E --log_config.global_log_options level,nocolor,time diff --git a/ci-scripts/xml_files/fr1_sa_oaiue_n310.xml b/ci-scripts/xml_files/fr1_sa_oaiue_n310.xml index 1e7311d4d0..7105828be4 100644 --- a/ci-scripts/xml_files/fr1_sa_oaiue_n310.xml +++ b/ci-scripts/xml_files/fr1_sa_oaiue_n310.xml @@ -44,7 +44,7 @@ Initialize_OAI_UE Initialize OAI UE (N310) nr - --sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "mgmt_addr=172.21.19.13,addr=192.168.10.2" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 --ue-rxgain 70 --ue-fo-compensation --log_config.global_log_options level,nocolor,time + --sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "mgmt_addr=172.21.19.13,addr=192.168.10.2" --numerology 1 -r 106 --band 78 -C 3319680000 --ue-txgain 0 --ue-rxgain 70 --ue-fo-compensation --log_config.global_log_options level,nocolor,time diff --git a/ci-scripts/xml_files/fr1_sa_oaiue_x300.xml b/ci-scripts/xml_files/fr1_sa_oaiue_x300.xml index e3c7a04806..fcc6088096 100644 --- a/ci-scripts/xml_files/fr1_sa_oaiue_x300.xml +++ b/ci-scripts/xml_files/fr1_sa_oaiue_x300.xml @@ -42,7 +42,7 @@ Initialize_OAI_UE Initialize OAI UE (X300) nr - --sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "addr=192.168.60.2" --numerology 1 -r 106 --band 78 -C 3319680000 --nokrnmod 1 --ue-txgain 0 --ue-rxgain 70 --ue-fo-compensation --log_config.global_log_options level,nocolor,time + --sa -O ../../../ci-scripts/conf_files/ue.sa.conf --usrp-args "addr=192.168.60.2" --numerology 1 -r 106 --band 78 -C 3319680000 --ue-txgain 0 --ue-rxgain 70 --ue-fo-compensation --log_config.global_log_options level,nocolor,time diff --git a/ci-scripts/xml_files/fr1_sa_quectel.xml b/ci-scripts/xml_files/fr1_sa_quectel.xml index 7d1dda270a..b13de6f3ef 100644 --- a/ci-scripts/xml_files/fr1_sa_quectel.xml +++ b/ci-scripts/xml_files/fr1_sa_quectel.xml @@ -166,8 +166,8 @@ 0 0 nr - 5,50,100,100 - 5,50,100,100 + 5,80,100,100 + 5,80,100,100 diff --git a/ci-scripts/xml_files/fr1_sa_quectel_162prb.xml b/ci-scripts/xml_files/fr1_sa_quectel_162prb.xml index 0f990db8c6..d1c250862d 100644 --- a/ci-scripts/xml_files/fr1_sa_quectel_162prb.xml +++ b/ci-scripts/xml_files/fr1_sa_quectel_162prb.xml @@ -119,8 +119,8 @@ Iperf - iperf (DL/200Mbps/UDP)(60 sec)(single-ue profile) - -u -b 200M -t 60 + iperf (DL/180Mbps/UDP)(60 sec)(single-ue profile) + -u -b 180M -t 60 DL nrmodule2_quectel 50 @@ -155,8 +155,8 @@ 0 0 nr - 5,50,100,100 - 5,50,100,100 + 5,80,100,100 + 5,80,100,100 diff --git a/ci-scripts/xml_files/fr1_sa_quectel_stages.xml b/ci-scripts/xml_files/fr1_sa_quectel_stages.xml index 15cefab747..94cf5d71ef 100644 --- a/ci-scripts/xml_files/fr1_sa_quectel_stages.xml +++ b/ci-scripts/xml_files/fr1_sa_quectel_stages.xml @@ -193,8 +193,8 @@ 0 0 nr - 5,50,100,100 - 5,50,100,100 + 5,80,100,100 + 5,80,100,100 diff --git a/ci-scripts/xml_files/ue_band20_test_10mhz_orange.xml b/ci-scripts/xml_files/ue_band20_test_10mhz_orange.xml index eba64191f0..f1ad3e17b7 100644 --- a/ci-scripts/xml_files/ue_band20_test_10mhz_orange.xml +++ b/ci-scripts/xml_files/ue_band20_test_10mhz_orange.xml @@ -34,7 +34,7 @@ Initialize_OAI_UE Initialize OAI UE -- sniffing Orange frequency - -C 816000000 -r 50 --ue-rxgain 135 --ue-scan-carrier --no-L2-connect --nokrnmod 1 --log_config.global_log_options level,nocolor,time + -C 816000000 -r 50 --ue-rxgain 135 --ue-scan-carrier --no-L2-connect --log_config.global_log_options level,nocolor,time diff --git a/ci-scripts/xml_files/ue_band20_test_10mhz_sfr.xml b/ci-scripts/xml_files/ue_band20_test_10mhz_sfr.xml index 359fca1a11..7ab83443c8 100644 --- a/ci-scripts/xml_files/ue_band20_test_10mhz_sfr.xml +++ b/ci-scripts/xml_files/ue_band20_test_10mhz_sfr.xml @@ -34,7 +34,7 @@ Initialize_OAI_UE Initialize OAI UE -- sniffing SFR frequency - -C 806000000 -r 50 --ue-rxgain 130 --ue-scan-carrier --no-L2-connect --nokrnmod 1 --log_config.global_log_options level,nocolor,time + -C 806000000 -r 50 --ue-rxgain 130 --ue-scan-carrier --no-L2-connect --log_config.global_log_options level,nocolor,time diff --git a/ci-scripts/yaml_files/4g_l2sim_fdd/docker-compose.yml b/ci-scripts/yaml_files/4g_l2sim_fdd/docker-compose.yml index e861db2511..f5292f77da 100644 --- a/ci-scripts/yaml_files/4g_l2sim_fdd/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_l2sim_fdd/docker-compose.yml @@ -248,7 +248,7 @@ services: UE_NFAPI_IF_NAME: eno1 ENB_IP_ADDRESS: 127.0.0.1 LTE_UE_IP_ADDRESS: 127.0.0.1 - USE_ADDITIONAL_OPTIONS: --L2-emul 5 --nokrnmod 1 --num-ues 1 --node-number 2 --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --L2-emul 5 --num-ues 1 --node-number 2 --log_config.global_log_options level,nocolor,time volumes: - ../../../openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results:/opt/oai-nr-ue/openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results healthcheck: @@ -276,7 +276,7 @@ services: UE_NFAPI_IF_NAME: eno1 ENB_IP_ADDRESS: 127.0.0.1 LTE_UE_IP_ADDRESS: 127.0.0.1 - USE_ADDITIONAL_OPTIONS: --L2-emul 5 --nokrnmod 1 --num-ues 1 --node-number 3 --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --L2-emul 5 --num-ues 1 --node-number 3 --log_config.global_log_options level,nocolor,time volumes: - ../../../openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results:/opt/oai-nr-ue/openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results healthcheck: diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml index 9ca81f6d52..f36ea4ea7e 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/docker-compose.yml @@ -233,7 +233,7 @@ services: OPC: 'c42449363bbad02b66d16bc975d77cc1' MSISDN: '001011234561010' HPLMN: 20896 - USE_ADDITIONAL_OPTIONS: --rfsim -C 2680000000 -r 25 --ue-rxgain 140 --ue-txgain 120 --nokrnmod 1 --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --rfsim -C 2680000000 -r 25 --ue-rxgain 140 --ue-txgain 120 --log_config.global_log_options level,nocolor,time healthcheck: test: /bin/bash -c "pgrep lte-uesoftmodem" interval: 10s diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml index 02bc3c56f2..411e49a7dd 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz_noS1/docker-compose.yml @@ -55,7 +55,7 @@ services: OPC: 'c42449363bbad02b66d16bc975d77cc1' MSISDN: '001011234561010' HPLMN: 20896 - USE_ADDITIONAL_OPTIONS: --rfsim -C 2680000000 -r 25 --ue-rxgain 140 --ue-txgain 120 --nokrnmod 1 --log_config.global_log_options level,nocolor,time --noS1 + USE_ADDITIONAL_OPTIONS: --rfsim -C 2680000000 -r 25 --ue-rxgain 140 --ue-txgain 120 --log_config.global_log_options level,nocolor,time --noS1 healthcheck: test: /bin/bash -c "pgrep lte-uesoftmodem" interval: 10s diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml index 892d52b5c9..9cb546fdf1 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_10MHz/docker-compose.yml @@ -233,7 +233,7 @@ services: OPC: 'c42449363bbad02b66d16bc975d77cc1' MSISDN: '001011234561010' HPLMN: 20896 - USE_ADDITIONAL_OPTIONS: --rfsim -C 2680000000 -r 50 --ue-rxgain 140 --ue-txgain 120 --nokrnmod 1 --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --rfsim -C 2680000000 -r 50 --ue-rxgain 140 --ue-txgain 120 --log_config.global_log_options level,nocolor,time healthcheck: test: /bin/bash -c "pgrep lte-uesoftmodem" interval: 10s diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml index 921030d263..97ad211fab 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_rfsimulator_fdd_20MHz/docker-compose.yml @@ -233,7 +233,7 @@ services: OPC: 'c42449363bbad02b66d16bc975d77cc1' MSISDN: '001011234561010' HPLMN: 20896 - USE_ADDITIONAL_OPTIONS: --rfsim -C 2680000000 -r 100 --ue-rxgain 140 --ue-txgain 120 --nokrnmod 1 --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --rfsim -C 2680000000 -r 100 --ue-rxgain 140 --ue-txgain 120 --log_config.global_log_options level,nocolor,time healthcheck: test: /bin/bash -c "pgrep lte-uesoftmodem" interval: 10s diff --git a/ci-scripts/yaml_files/4g_rfsimulator_fembms/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_fembms/docker-compose.yml index f57b913daf..a39f39f9b1 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_fembms/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_rfsimulator_fembms/docker-compose.yml @@ -39,7 +39,7 @@ services: OPC: 'e734f8734007d6c5ce7a0508809e7e9c' MSISDN: '33611123456' HPLMN: 20893 - USE_ADDITIONAL_OPTIONS: -C 2680000000 -r 25 --ue-rxgain 140 --ue-txgain 120 --nokrnmod 1 --rfsim --noS1 --log_config.global_log_options level,nocolor,time --noS1 + USE_ADDITIONAL_OPTIONS: -C 2680000000 -r 25 --ue-rxgain 140 --ue-txgain 120 --rfsim --noS1 --log_config.global_log_options level,nocolor,time --noS1 healthcheck: test: /bin/bash -c "pgrep lte-uesoftmodem" interval: 10s diff --git a/ci-scripts/yaml_files/4g_rfsimulator_mbms/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_mbms/docker-compose.yml index 98cb6d5d53..6677ed4cdc 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_mbms/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_rfsimulator_mbms/docker-compose.yml @@ -43,7 +43,7 @@ services: OPC: 'e734f8734007d6c5ce7a0508809e7e9c' MSISDN: '33611123456' HPLMN: 20893 - USE_ADDITIONAL_OPTIONS: -C 2680000000 -r 25 --ue-rxgain 140 --ue-txgain 120 --nokrnmod 1 --rfsim --noS1 --log_config.global_log_options level,nocolor,time --noS1 + USE_ADDITIONAL_OPTIONS: -C 2680000000 -r 25 --ue-rxgain 140 --ue-txgain 120 --rfsim --noS1 --log_config.global_log_options level,nocolor,time --noS1 healthcheck: test: /bin/bash -c "pgrep lte-uesoftmodem" interval: 10s diff --git a/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml b/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml index 51e967ca4c..f7de67ee2b 100644 --- a/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml +++ b/ci-scripts/yaml_files/4g_rfsimulator_tdd_05MHz/docker-compose.yml @@ -232,7 +232,7 @@ services: OPC: 'c42449363bbad02b66d16bc975d77cc1' MSISDN: '001011234561010' HPLMN: 20896 - USE_ADDITIONAL_OPTIONS: --rfsim -T -C 2605000000 -r 25 --ue-rxgain 140 --ue-txgain 120 --nokrnmod 1 --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --rfsim -T -C 2605000000 -r 25 --ue-rxgain 140 --ue-txgain 120 --log_config.global_log_options level,nocolor,time healthcheck: test: /bin/bash -c "pgrep lte-uesoftmodem" interval: 10s diff --git a/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml b/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml index 1fe8089304..4a2195f37d 100644 --- a/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_f1_rfsimulator/docker-compose.yaml @@ -219,7 +219,7 @@ services: F1_DU_IP_ADDRESS: 192.168.71.142 F1_CU_D_PORT: 2153 F1_DU_D_PORT: 2153 - USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --sa --rfsim --rfsimulator.wait_timeout 20 --log_config.global_log_options level,nocolor,time depends_on: - oai-cu networks: @@ -241,7 +241,7 @@ services: OPC: 'C42449363BBAD02B66D16BC975D77CC1' DNN: oai NSSAI_SST: 1 - USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 106 --numerology 1 -C 3619200000 --nokrnmod --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 106 --numerology 1 -C 3619200000 --log_config.global_log_options level,nocolor,time depends_on: - oai-du networks: diff --git a/ci-scripts/yaml_files/5g_fdd_rfsimulator/docker-compose.yaml b/ci-scripts/yaml_files/5g_fdd_rfsimulator/docker-compose.yaml index 451b1e5ca9..38a21e4dd0 100644 --- a/ci-scripts/yaml_files/5g_fdd_rfsimulator/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_fdd_rfsimulator/docker-compose.yaml @@ -180,7 +180,7 @@ services: GNB_NGA_IP_ADDRESS: 192.168.71.140 GNB_NGU_IF_NAME: eth0 GNB_NGU_IP_ADDRESS: 192.168.71.140 - USE_ADDITIONAL_OPTIONS: --sa -E --rfsim --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --sa -E --rfsim --rfsimulator.wait_timeout 20 --log_config.global_log_options level,nocolor,time depends_on: - oai-ext-dn networks: @@ -202,7 +202,7 @@ services: OPC: 'C42449363BBAD02B66D16BC975D77CC1' DNN: oai NSSAI_SST: 1 - USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --band 66 -C 2169080000 --CO -400000000 --ssb 396 --nokrnmod --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --band 66 -C 2169080000 --CO -400000000 --ssb 396 --log_config.global_log_options level,nocolor,time depends_on: - oai-gnb networks: diff --git a/ci-scripts/yaml_files/5g_l2sim_tdd/docker-compose.yaml b/ci-scripts/yaml_files/5g_l2sim_tdd/docker-compose.yaml index ee6c54994d..978f204058 100644 --- a/ci-scripts/yaml_files/5g_l2sim_tdd/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_l2sim_tdd/docker-compose.yaml @@ -228,7 +228,7 @@ services: NR_UE_NFAPI_IF_NAME: eno1 GNB_IP_ADDRESS: 127.0.0.1 NR_UE_IP_ADDRESS: 127.0.0.1 - USE_ADDITIONAL_OPTIONS: --nokrnmod 1 --nfapi STANDALONE_PNF --node-number 2 --sa --emulate-l1 --log_config.global_log_options level,time,thread_id,nocolor + USE_ADDITIONAL_OPTIONS: --nfapi STANDALONE_PNF --node-number 2 --sa --emulate-l1 --log_config.global_log_options level,time,thread_id,nocolor volumes: - ../../../openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results:/opt/oai-nr-ue/openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results depends_on: diff --git a/ci-scripts/yaml_files/5g_rfsimulator/README.md b/ci-scripts/yaml_files/5g_rfsimulator/README.md index e82f8bed39..b516e93813 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator/README.md +++ b/ci-scripts/yaml_files/5g_rfsimulator/README.md @@ -250,7 +250,7 @@ Create entry for Second UE in docker-compose.yaml file as follows: OPC: 'C42449363BBAD02B66D16BC975D77CC1' DNN: oai NSSAI_SST: 1 - USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --nokrnmod --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --log_config.global_log_options level,nocolor,time depends_on: - oai-gnb networks: diff --git a/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml index 80ef1d6327..98bf516ae0 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_rfsimulator/docker-compose.yaml @@ -181,7 +181,7 @@ services: GNB_NGU_IF_NAME: eth0 GNB_NGU_IP_ADDRESS: 192.168.71.140 SDR_ADDRS: serial=XXXXXXX - USE_ADDITIONAL_OPTIONS: --sa -E --rfsim --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --sa -E --rfsim --rfsimulator.wait_timeout 20 --log_config.global_log_options level,nocolor,time depends_on: - oai-ext-dn networks: @@ -203,7 +203,7 @@ services: OPC: 'C42449363BBAD02B66D16BC975D77CC1' DNN: oai NSSAI_SST: 1 - USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --nokrnmod --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --log_config.global_log_options level,nocolor,time depends_on: - oai-gnb networks: @@ -226,7 +226,7 @@ services: OPC: 'C42449363BBAD02B66D16BC975D77CC1' DNN: oai NSSAI_SST: 1 - USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --nokrnmod --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 -C 3619200000 --log_config.global_log_options level,nocolor,time depends_on: - oai-gnb networks: diff --git a/ci-scripts/yaml_files/5g_rfsimulator_24prb/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_24prb/docker-compose.yaml index 4c85f643f8..0009277e01 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator_24prb/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_rfsimulator_24prb/docker-compose.yaml @@ -169,7 +169,7 @@ services: environment: RFSIMULATOR: server USE_VOLUMED_CONF: 'yes' - USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --sa --rfsim --rfsimulator.wait_timeout 20 --log_config.global_log_options level,nocolor,time depends_on: - oai-ext-dn networks: @@ -193,7 +193,7 @@ services: OPC: 'C42449363BBAD02B66D16BC975D77CC1' DNN: oai NSSAI_SST: 1 - USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 24 --ssb 24 --numerology 1 -C 3604320000 --nokrnmod --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 24 --ssb 24 --numerology 1 -C 3604320000 --log_config.global_log_options level,nocolor,time depends_on: - oai-gnb networks: diff --git a/ci-scripts/yaml_files/5g_rfsimulator_2x2/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_2x2/docker-compose.yaml index 14f76b20b3..5f55ae8877 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator_2x2/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_rfsimulator_2x2/docker-compose.yaml @@ -169,7 +169,7 @@ services: environment: RFSIMULATOR: server USE_VOLUMED_CONF: 'yes' - USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --sa --rfsim --rfsimulator.wait_timeout 20 --log_config.global_log_options level,nocolor,time depends_on: - oai-ext-dn networks: @@ -194,7 +194,7 @@ services: OPC: 'C42449363BBAD02B66D16BC975D77CC1' DNN: oai NSSAI_SST: 1 - USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 106 --numerology 1 --band 78 -C 3319680000 --nokrnmod --ue-nb-ant-tx 2 --ue-nb-ant-rx 2 --uecap_file /opt/oai-nr-ue/etc/uecap.xml --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 106 --numerology 1 --band 78 -C 3319680000 --ue-nb-ant-tx 2 --ue-nb-ant-rx 2 --uecap_file /opt/oai-nr-ue/etc/uecap.xml --log_config.global_log_options level,nocolor,time depends_on: - oai-gnb networks: diff --git a/ci-scripts/yaml_files/5g_rfsimulator_e1/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_e1/docker-compose.yaml index 8ae56ac277..26e01febb7 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator_e1/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_rfsimulator_e1/docker-compose.yaml @@ -216,7 +216,7 @@ services: environment: RFSIMULATOR: server USE_VOLUMED_CONF: 'yes' - USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --sa --rfsim --rfsimulator.wait_timeout 20 --log_config.global_log_options level,nocolor,time networks: ran_net: ipv4_address: 192.168.72.142 @@ -239,7 +239,7 @@ services: OPC: 'C42449363BBAD02B66D16BC975D77CC1' DNN: oai NSSAI_SST: 1 - USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 106 --numerology 1 -C 3619200000 --nokrnmod --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 106 --numerology 1 -C 3619200000 --log_config.global_log_options level,nocolor,time depends_on: - oai-du networks: diff --git a/ci-scripts/yaml_files/5g_rfsimulator_fdd_phytest/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_fdd_phytest/docker-compose.yaml index dbab2002a7..034ae6f7b8 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator_fdd_phytest/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_rfsimulator_fdd_phytest/docker-compose.yaml @@ -7,7 +7,7 @@ services: environment: RFSIMULATOR: server USE_VOLUMED_CONF: 'yes' - USE_ADDITIONAL_OPTIONS: --phy-test --rfsim --noS1 --nokrnmod --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --phy-test --rfsim --rfsimulator.wait_timeout 20 --noS1 --log_config.global_log_options level,nocolor,time networks: public_net: ipv4_address: 192.168.71.140 @@ -31,7 +31,7 @@ services: OPC: 'C42449363BBAD02B66D16BC975D77CC1' DNN: oai NSSAI_SST: 1 - USE_ADDITIONAL_OPTIONS: --phy-test --rfsim --noS1 --nokrnmod --rrc_config_path etc/rrc/ --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --phy-test --rfsim --noS1 --rrc_config_path etc/rrc/ --log_config.global_log_options level,nocolor,time volumes: - rrc.config:/opt/oai-nr-ue/etc/rrc/ depends_on: diff --git a/ci-scripts/yaml_files/5g_rfsimulator_fr2_32prb/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_fr2_32prb/docker-compose.yaml index 2705a69f10..b51cecc1df 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator_fr2_32prb/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_rfsimulator_fr2_32prb/docker-compose.yaml @@ -7,7 +7,7 @@ services: environment: RFSIMULATOR: server USE_VOLUMED_CONF: 'yes' - USE_ADDITIONAL_OPTIONS: --do-ra --rfsim --noS1 --nokrnmod --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --do-ra --rfsim --rfsimulator.wait_timeout 20 --noS1 --log_config.global_log_options level,nocolor,time networks: public_net: ipv4_address: 192.168.71.140 @@ -31,7 +31,7 @@ services: OPC: 'C42449363BBAD02B66D16BC975D77CC1' DNN: oai NSSAI_SST: 1 - USE_ADDITIONAL_OPTIONS: --do-ra --rfsim --noS1 --rrc_config_path etc/rrc/ --nokrnmod --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --do-ra --rfsim --noS1 --rrc_config_path etc/rrc/ --log_config.global_log_options level,nocolor,time volumes: - rrc.config:/opt/oai-nr-ue/etc/rrc/ depends_on: diff --git a/ci-scripts/yaml_files/5g_rfsimulator_tdd_dora/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_tdd_dora/docker-compose.yaml index 2afa9027f3..befcb54e3f 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator_tdd_dora/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_rfsimulator_tdd_dora/docker-compose.yaml @@ -7,7 +7,7 @@ services: environment: RFSIMULATOR: server USE_VOLUMED_CONF: 'yes' - USE_ADDITIONAL_OPTIONS: --do-ra --rfsim --noS1 --nokrnmod --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --do-ra --rfsim --rfsimulator.wait_timeout 20 --noS1 --log_config.global_log_options level,nocolor,time networks: public_net: ipv4_address: 192.168.71.140 @@ -31,7 +31,7 @@ services: OPC: 'C42449363BBAD02B66D16BC975D77CC1' DNN: oai NSSAI_SST: 1 - USE_ADDITIONAL_OPTIONS: --do-ra --rfsim --noS1 --rrc_config_path etc/rrc/ --nokrnmod --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --do-ra --rfsim --noS1 --rrc_config_path etc/rrc/ --log_config.global_log_options level,nocolor,time volumes: - rrc.config:/opt/oai-nr-ue/etc/rrc/ depends_on: diff --git a/ci-scripts/yaml_files/5g_rfsimulator_u0_25prb/docker-compose.yaml b/ci-scripts/yaml_files/5g_rfsimulator_u0_25prb/docker-compose.yaml index f47698f7ca..93c18cdfd9 100644 --- a/ci-scripts/yaml_files/5g_rfsimulator_u0_25prb/docker-compose.yaml +++ b/ci-scripts/yaml_files/5g_rfsimulator_u0_25prb/docker-compose.yaml @@ -169,7 +169,7 @@ services: environment: RFSIMULATOR: server USE_VOLUMED_CONF: 'yes' - USE_ADDITIONAL_OPTIONS: --sa --rfsim --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --sa --rfsim --rfsimulator.wait_timeout 20 --log_config.global_log_options level,nocolor,time depends_on: - oai-ext-dn networks: @@ -194,7 +194,7 @@ services: OPC: 'C42449363BBAD02B66D16BC975D77CC1' DNN: oai NSSAI_SST: 1 - USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 25 --numerology 0 --band 66 -C 2152250000 --CO -400000000 --ssb 48 --nokrnmod --nokrnmod --log_config.global_log_options level,nocolor,time + USE_ADDITIONAL_OPTIONS: --sa --rfsim -r 25 --numerology 0 --band 66 -C 2152250000 --CO -400000000 --ssb 48 --log_config.global_log_options level,nocolor,time depends_on: - oai-gnb networks: diff --git a/ci-scripts/yaml_files/nsa_b200_enb/docker-compose.yml b/ci-scripts/yaml_files/nsa_b200_enb/docker-compose.yml index 70e8fc7c8e..706a22b0da 100644 --- a/ci-scripts/yaml_files/nsa_b200_enb/docker-compose.yml +++ b/ci-scripts/yaml_files/nsa_b200_enb/docker-compose.yml @@ -20,7 +20,7 @@ services: NB_PRB: 25 ENABLE_MEASUREMENT_REPORTS: 'yes' ENABLE_X2: 'yes' - MME_S1C_IP_ADDRESS: 172.21.16.136 + MME_S1C_IP_ADDRESS: 172.21.16.137 ENB_S1C_IF_NAME: eth0 ENB_S1C_IP_ADDRESS: 192.168.68.130 ENB_S1U_IF_NAME: eth0 diff --git a/ci-scripts/yaml_files/nsa_b200_gnb/docker-compose.yml b/ci-scripts/yaml_files/nsa_b200_gnb/docker-compose.yml index 06f0cd8d4a..529aa2a2b7 100644 --- a/ci-scripts/yaml_files/nsa_b200_gnb/docker-compose.yml +++ b/ci-scripts/yaml_files/nsa_b200_gnb/docker-compose.yml @@ -15,7 +15,7 @@ services: TAC: 1 ENABLE_X2: 'yes' ENB_X2_IP_ADDRESS: 192.168.68.130 - MME_S1C_IP_ADDRESS: 172.21.16.136 + MME_S1C_IP_ADDRESS: 172.21.16.137 GNB_S1C_IF_NAME: eth0 GNB_S1C_IP_ADDRESS: 192.168.68.194 GNB_S1U_IF_NAME: eth0 diff --git a/ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml b/ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml index 32655ffe77..965ab652bd 100644 --- a/ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml +++ b/ci-scripts/yaml_files/sa_b200_gnb/docker-compose.yml @@ -15,12 +15,12 @@ services: TAC: 1 NSSAI_SST: 1 NSSAI_SD0: 1 - AMF_IP_ADDRESS: 172.21.16.136 + AMF_IP_ADDRESS: 172.21.16.137 GNB_NGA_IF_NAME: eth0 GNB_NGA_IP_ADDRESS: 192.168.68.194 GNB_NGU_IF_NAME: eth0 GNB_NGU_IP_ADDRESS: 192.168.68.194 - USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function + USE_ADDITIONAL_OPTIONS: --sa --RUs.[0].sdr_addrs serial=30C51D4 --telnetsrv --telnetsrv.shrmod ci --continuous-tx --log_config.global_log_options level,nocolor,time,line_num,function volumes: - /dev:/dev networks: diff --git a/ci-scripts/yaml_files/sa_f1_b200_gnb/docker-compose.yml b/ci-scripts/yaml_files/sa_f1_b200_gnb/docker-compose.yml index 05b6ee03bc..05112c2104 100644 --- a/ci-scripts/yaml_files/sa_f1_b200_gnb/docker-compose.yml +++ b/ci-scripts/yaml_files/sa_f1_b200_gnb/docker-compose.yml @@ -16,7 +16,7 @@ services: NSSAI_SST: 1 NSSAI_SD0: 1 NSSAI_SD1: 2 - AMF_IP_ADDRESS: 172.21.16.136 + AMF_IP_ADDRESS: 172.21.16.137 GNB_NGA_IF_NAME: eth0 GNB_NGA_IP_ADDRESS: 192.168.68.194 GNB_NGU_IF_NAME: eth0 diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 3d15361430..24b18e41dc 100755 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -351,17 +351,18 @@ - nr_ulsim Test cases. (Test1: MCS 9 106 PRBs), - (Test2: MCS 16 50 PRBs), - (Test3: MCS 28 50 PRBs), - (Test4: MCS 9 217 PRBs), - (Test5: MCS 9 273 PRBs), + nr_ulsim Test cases. (Test1: MCS 9, 106 PRBs), + (Test2: MCS 16, 50 PRBs), + (Test3: MCS 28, 50 PRBs), + (Test4: MCS 9, 217 PRBs), + (Test5: MCS 9, 273 PRBs), (Test6: PUSCH Type A, 2 DMRS Symbols), (Test7: PUSCH Type A, 3 DMRS, 4 PTRS, 5 Interpolated Symbols), (Test8: PUSCH Type B, 3 DMRS, 2 PTRS, 7 Interpolated Symbols), (Test9: PUSCH Type B, 3 DMRS, 2 PTRS, 3 Interpolated Symbols), (Test10: 25 PRBs, 15 kHz SCS), - (Test11: MCS 0, low SNR performance) + (Test11: MCS 0, low SNR performance) + (Test12: MCS 28, 106 PRBs, Time shift 8) nr_ulsim -n100 -m9 -r106 -s5 -n100 -m16 -s10 @@ -373,8 +374,9 @@ -n100 -s5 -T 2,2 -U 1,2,1,1 -n100 -s5 -a4 -b8 -T 1,2 -U 1,3,1,1 -n100 -u0 -m0 -R25 -r25 -i 1,0 - -n100 -m0 -S -0.6 -i 1,0 - test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 + -n100 -m0 -S -0.6 -i 1,0 + -n100 -m 28 -R106 -r106 -t90 -s24 -S24 -d 8 + test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 PUSCH test OK segmentation fault|assertion|exiting|fatal 3 @@ -440,7 +442,8 @@ (Test21: 3GPP G-FR1-A5-13, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test), (Test22: 3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test), (Test23: 3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 4 RX Antennas Requirements Test), - (Test24: 3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test) + (Test24: 3GPP G-FR1-A5-14, PUSCH Type B, 100 MHz BW, 30 kHz SCS, 8 RX Antennas Requirements Test), + (Test25: 3GPP G-FR1-A4-27, PUSCH Type B, 40 MHz BW, 30 kHz SCS, 2 RX Antennas Requirements Test, 2 layers) nr_ulsim -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 0,1,1,2 -z2 -s12.4 -S12.4 -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 0,1,1,2 -z4 -s8.5 -S8.5 @@ -465,8 +468,9 @@ -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R106 -r106 -U 1,1,1,2 -z8 -s5.5 -S5.5 -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z2 -s13.1 -S13.1 -n100 -b14 -I7 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z4 -s9.2 -S9.2 - -n100 -b14 -I8 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z8 -s5.9 -S5.9 - test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 test22 test23 test24 + -n100 -b14 -I8 -i 0,1 -g A,l,10 -t70 -u 1 -m20 -R273 -r273 -U 1,1,1,2 -z8 -s5.9 -S5.9 + -n100 -b14 -I15 -i 0,1 -g C,l -t70 -u 1 -m16 -R106 -r106 -U 1,1,1,2 -W2 -y2 -z2 -s18.7 -S18.7 + test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 test22 test23 test24 test25 PUSCH test OK segmentation fault|assertion|exiting|fatal 3 diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 1886c46052..1d4c55da20 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -56,7 +56,7 @@ CMAKE_CMD="$CMAKE" MAKE_CMD=make BUILD_ECLIPSE=0 NR="False" -OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope nrqtscope ldpc_cuda ldpc_t1 websrv" +OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope nrqtscope ldpc_cuda ldpc_t1 websrv oai_iqplayer" RU=0 CMAKE_C_FLAGS=() CMAKE_CXX_FLAGS=() @@ -300,10 +300,6 @@ function main() { SIMUS_PHY=1 echo_info "Will compile dlsim, ulsim, ..." shift;; - -S | --core_simulators) - SIMUS_CORE=1 - echo_info "Will compile security unitary tests" - shift;; -s | --check) OAI_TEST=1 echo_info "Will run auto-tests" @@ -466,17 +462,6 @@ function main() { cecho "OPENAIR_DIR = $OPENAIR_DIR" $green - # for conf files copy in this bash script - if [ -d /usr/lib/freeDiameter ]; then - export FREEDIAMETER_PREFIX=/usr - else - if [ -d /usr/local/lib/freeDiameter ]; then - export FREEDIAMETER_PREFIX=/usr/local - else - echo_warning "FreeDiameter prefix not found, install freeDiameter if EPC, HSS" - fi - fi - if [ "$CLEAN_ALL" = "1" ] ; then clean_all_files echo_info "Erased all previously producted files" @@ -517,25 +502,15 @@ function main() { fi execlist="" - if [ "$eNB" = "1" ] ; then - execlist="$execlist lte-softmodem" - fi - if [ "$gNB" = "1" ] ; then - execlist="$execlist nr-softmodem nr-cuup" - fi - if [ "$RU" = "1" ] ; then - execlist="$execlist oairu" - fi - if [ "$UE" = 1 ] ; then - execlist="$execlist lte-uesoftmodem" - fi - if [ "$nrUE" = 1 ] ; then - execlist="$execlist nr-uesoftmodem" - fi - - if [[ "$execlist" == "" && "$SIMUS_PHY" != "1" && "$HW" == "None" ]]; then - SKIP_SHARED_LIB_FLAG="True" - fi + [[ "$eNB" == "1" ]] && execlist="$execlist lte-softmodem" + [[ "$gNB" == "1" ]] && execlist="$execlist nr-softmodem nr-cuup" + [[ "$RU" == "1" ]] && execlist="$execlist oairu" + [[ "$UE" == 1 ]] && execlist="$execlist lte-uesoftmodem" + [[ "$nrUE" == 1 ]] && execlist="$execlist nr-uesoftmodem" + # TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim + [[ "$SIMUS_PHY" == "1" ]] && execlist="$execlist dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim" + [[ "$BUILD_OPTLIB" != "" ]] && execlist="$execlist $BUILD_OPTLIB" + [[ "$execlist" != "" ]] && execlist="$execlist params_libconfig coding rfsimulator" DIR=$OPENAIR_DIR/cmake_targets @@ -552,34 +527,19 @@ function main() { echo_info "running $CMAKE_CMD" eval $CMAKE_CMD - for f in $execlist ; do - echo_info "Compiling $f..." - compilations $BUILD_DIR $f - done - - - # mandatory shared libraries common to UE and (e/g)NB - - if [ "$SKIP_SHARED_LIB_FLAG" = "False" ]; then - echo_info "Building shared libraries common to UE and gNB" - - # configuration module libraries, one currently available, using libconfig - config_libconfig_shlib=params_libconfig - - compilations $BUILD_DIR $config_libconfig_shlib - - compilations $BUILD_DIR coding - + if [[ "$execlist" != "" ]]; then + echo_info "Compiling $execlist..." + compilations $BUILD_DIR all.txt $execlist fi if [ "$UE" = 1 ] ; then echo_info "Compiling UE specific part" - if [ $UE_ip -eq 1 ] + if [ "$UE_ip" = 1 ] then echo_info "Building ue_ip module" - compilations $BUILD_DIR ue_ip + compilations $BUILD_DIR ue_ip.txt ue_ip else echo_info "Bypassing ue_ip build" fi #IS_CONTAINER @@ -594,9 +554,9 @@ function main() { cd $DIR/nas_sim_tools/build eval $CMAKE_CMD .. - compilations nas_sim_tools usim - compilations nas_sim_tools nvram - compilations nas_sim_tools conf2uedata + compilations nas_sim_tools usim.txt usim + compilations nas_sim_tools nvram.txt nvram + compilations nas_sim_tools conf2uedata.txt conf2uedata # generate USIM data if [ -f conf2uedata ]; then @@ -606,42 +566,6 @@ function main() { fi fi - cd $DIR/$BUILD_DIR/build - - ################## - # PHY simulators # - ################## - if [ "$SIMUS_PHY" = "1" ] ; then - echo_info "Compiling physical unitary tests simulators" - # TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim - simlist="dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim" - # simlist="ldpctest" - for f in $simlist ; do - compilations $BUILD_DIR $f - done - compilations $BUILD_DIR coding - fi - - ################### - # Core simulators # - ################### - if [ "$SIMUS_CORE" = "1" ] ; then - echo_info "Compiling security unitary tests simulators" - simlist="secu_knas_encrypt_eia1 secu_kenb aes128_ctr_encrypt aes128_ctr_decrypt secu_knas_encrypt_eea2 secu_knas secu_knas_encrypt_eea1 kdf aes128_cmac_encrypt secu_knas_encrypt_eia2" - for f in $simlist ; do - compilations $BUILD_DIR test_$f - done - fi - - ###################### - # Optional libraries # - ###################### - if [ ! -z "$BUILD_OPTLIB" ] ; then - for oklib in $BUILD_OPTLIB ; do - compilations $BUILD_DIR $oklib - done - fi - #################################################### # Build RF device and transport protocol libraries # #################################################### @@ -652,31 +576,31 @@ function main() { rm -f liboai_device.so if [ "$HW" == "OAI_USRP" ] ; then - compilations $BUILD_DIR oai_usrpdevif + compilations $BUILD_DIR oai_usrpdevif.txt oai_usrpdevif ln -sf liboai_usrpdevif.so liboai_device.so echo_info "liboai_device.so is linked to USRP device library" elif [ "$HW" == "OAI_BLADERF" ] ; then if [ -f "/usr/include/libbladeRF.h" ] ; then - compilations $BUILD_DIR oai_bladerfdevif + compilations $BUILD_DIR oai_bladerfdevif.txt oai_bladerfdevif fi ln -sf liboai_bladerfdevif.so liboai_device.so echo_info "liboai_device.so is linked to BLADERF device library" elif [ "$HW" == "OAI_LMSSDR" ] ; then # if [ -f "/usr/include/libbladeRF.h" ] ; then - compilations $BUILD_DIR oai_lmssdrdevif + compilations $BUILD_DIR oai_lmssdrdevif.txt oai_lmssdrdevif # fi ln -sf liboai_lmssdrdevif.so liboai_device.so echo_info "liboai_device.so is linked to LMSSDR device library" elif [ "$HW" == "OAI_IRIS" ] ; then - compilations $BUILD_DIR oai_irisdevif + compilations $BUILD_DIR oai_irisdevif.txt oai_irisdevif ln -s liboai_irisdevif.so liboai_device.so echo_info "liboai_device.so is linked to IRIS device library" elif [ "$HW" == "OAI_AW2SORI" ] ; then - compilations $BUILD_DIR aw2sori_transpro + compilations $BUILD_DIR aw2sori_transpro.txt aw2sori_transpro ln -sf libaw2sori_transpro.so libthirdparty_transpro.so echo_info "build libthirdparty_transpro.so for AW2SORI fronthaul" @@ -685,28 +609,22 @@ function main() { fi fi - #build simulators devices - if [ "$SKIP_SHARED_LIB_FLAG" = "False" ]; then - echo_info "Compiling rfsimulator" - compilations $BUILD_DIR rfsimulator - fi - #build transport protocol libraries (currently only ETHERNET is available) if [ "$SKIP_SHARED_LIB_FLAG" = "False" ]; then echo_info "Building transport protocol libraries" rm -f liboai_transpro.so if [ "$TP" == "Ethernet" ]; then - compilations $BUILD_DIR oai_eth_transpro + compilations $BUILD_DIR oai_eth_transpro.txt oai_eth_transpro ln -sf liboai_eth_transpro.so liboai_transpro.so echo_info "liboai_transpro.so is linked to ETHERNET transport" fi if [ "$TP" == "benetel4g" ]; then - compilations $BUILD_DIR benetel_4g + compilations $BUILD_DIR benetel_4g.txt benetel4g ln -sf libbenetel_4g.so liboai_transpro.so echo_info "liboai_transpro.so is linked to BENETEL4G transport" fi if [ "$TP" == "benetel5g" ]; then - compilations $BUILD_DIR benetel_5g + compilations $BUILD_DIR benetel_5g.txt benetel_5g ln -sf libbenetel_5g.so liboai_transpro.so echo_info "liboai_transpro.so is linked to BENETEL4G transport" fi diff --git a/cmake_targets/macros.cmake b/cmake_targets/macros.cmake index 0a2dbab182..c794affa26 100644 --- a/cmake_targets/macros.cmake +++ b/cmake_targets/macros.cmake @@ -55,7 +55,7 @@ macro(add_list2_option name val helpstr) endif() set(${name} ${value} CACHE STRING "${helpstr}") set_property(CACHE ${name} PROPERTY STRINGS ${ARGN}) - if(NOT "${value}" STREQUAL "False") + if(NOT "${value}" STREQUAL "None") add_definitions("-D${value}=1") endif() endmacro(add_list2_option) diff --git a/cmake_targets/tools/MODULES/FindFreeDiameter.cmake b/cmake_targets/tools/MODULES/FindFreeDiameter.cmake deleted file mode 100755 index 62517c0528..0000000000 --- a/cmake_targets/tools/MODULES/FindFreeDiameter.cmake +++ /dev/null @@ -1,89 +0,0 @@ -# - Find freediameter -# Find the native FreeDiameter includes and libraries -# -# FREEDIAMETER_FOUND - True if FreeDiameter found. -# FREEDIAMETER_INCLUDE_DIR - where to find gnutls.h, etc. -# FREEDIAMETER_LIBRARIES - List of libraries when using gnutls. -# FREEDIAMETER_HSS_S6A_ENABLED - true if FreeDiameter enabled for S6A interface - - -if (FREEDIAMETER_INCLUDE_DIR AND FREEDIAMETER_LIBRARIES) - set(FREEDIAMETER_FIND_QUIETLY TRUE) -endif (FREEDIAMETER_INCLUDE_DIR AND FREEDIAMETER_LIBRARIES) - -# Include dir -find_path(FREEDIAMETER_INCLUDE_DIR - NAMES - freeDiameter/freeDiameter-host.h - freeDiameter/libfdcore.h - freeDiameter/libfdproto.h -) - -# Library -find_library(FREEDIAMETER_LIBRARY - NAMES fdcore -) - -# handle the QUIETLY and REQUIRED arguments and set FREEDIAMETER_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(FREEDIAMETER DEFAULT_MSG FREEDIAMETER_LIBRARY FREEDIAMETER_INCLUDE_DIR) - -IF(FREEDIAMETER_FOUND) - SET( FREEDIAMETER_LIBRARIES ${FREEDIAMETER_LIBRARY} ) -ELSE(FREEDIAMETER_FOUND) - SET( FREEDIAMETER_LIBRARIES ) -ENDIF(FREEDIAMETER_FOUND) - -find_library(FREEDIAMETER_LIBRARY2 - NAMES fdproto -) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(FREEDIAMETER2 DEFAULT_MSG FREEDIAMETER_LIBRARY2 FREEDIAMETER_INCLUDE_DIR) -IF(FREEDIAMETER2_FOUND) - SET( FREEDIAMETER_LIBRARIES ${FREEDIAMETER_LIBRARIES} ${FREEDIAMETER_LIBRARY2} ) -ELSE(FREEDIAMETER2_FOUND) - SET( FREEDIAMETER_LIBRARIES ) -ENDIF(FREEDIAMETER2_FOUND) - - -# Lastly make it so that the FREEDIAMETER_LIBRARY and FREEDIAMETER_INCLUDE_DIR variables -# only show up under the advanced options in the gui cmake applications. -MARK_AS_ADVANCED( FREEDIAMETER_LIBRARY FREEDIAMETER_INCLUDE_DIR ) - -# Now check if the library is patched for OPENAIR HSS S6A. -IF(FREEDIAMETER_FOUND) - IF( FREEDIAMETER_INCLUDE_DIR ) - # Extract FD_PROJECT_VERSION_MAJOR, FD_PROJECT_VERSION_MINOR from freeDiameter-host.h - # Read the whole file: - # - FILE(READ "${FREEDIAMETER_INCLUDE_DIR}/freeDiameter/freeDiameter-host.h" _freeDiameter_HOST_H_CONTENTS) - - STRING(REGEX REPLACE ".*#define FD_PROJECT_VERSION_MAJOR ([0-9]+).*" "\\1" FD_PROJECT_VERSION_MAJOR "${_freeDiameter_HOST_H_CONTENTS}") - STRING(REGEX REPLACE ".*#define FD_PROJECT_VERSION_MINOR ([0-9]+).*" "\\1" FD_PROJECT_VERSION_MINOR "${_freeDiameter_HOST_H_CONTENTS}") - - IF(FD_PROJECT_VERSION_MAJOR GREATER 0) - MATH(EXPR FREEDIAMETER_VERSION_VALUE "${FD_PROJECT_VERSION_MAJOR} * 100 + ${FD_PROJECT_VERSION_MINOR} * 10") - SET(FREEDIAMETER_VERSION "${FREEDIAMETER_VERSION_VALUE}" CACHE INTERNAL "Freediameter release version") - MESSAGE(STATUS "freeDiameter version found ${FREEDIAMETER_VERSION}") - ENDIF(FD_PROJECT_VERSION_MAJOR GREATER 0) - ENDIF( FREEDIAMETER_INCLUDE_DIR ) - GET_FILENAME_COMPONENT(FREEDIAMETER_PATH ${FREEDIAMETER_LIBRARY} PATH) - IF( NOT( "${FREEDIAMETER_VERSION_TEST_FOR}" STREQUAL "${FREEDIAMETER_LIBRARIES}" )) - INCLUDE (CheckLibraryExists) - MESSAGE(STATUS "Checking freeDiameter patched for S6A") - UNSET(FREEDIAMETER_HSS_S6A_ENABLED) - UNSET(FREEDIAMETER_HSS_S6A_ENABLED CACHE) - UNSET(DICT_S6A_FOUND) - UNSET(DICT_S6A_FOUND CACHE) - - - FIND_FILE(DICT_S6A_FOUND NAMES dict_s6a.fdx PATHS ${FREEDIAMETER_PATH} ${FREEDIAMETER_PATH}/freeDiameter) - IF(DICT_S6A_FOUND) - SET( FREEDIAMETER_HSS_S6A_ENABLED TRUE CACHE INTERNAL "dict_s6a.fdx Found") - ELSE(DICT_S6A_FOUND) - SET( FREEDIAMETER_HSS_S6A_ENABLED FALSE CACHE INTERNAL "dict_s6a.fdx not Found") - ENDIF(DICT_S6A_FOUND) - SET( FREEDIAMETER_VERSION_TEST_FOR ${FREEDIAMETER_LIBRARIES} CACHE INTERNAL "Version the test was made against" ) - ENDIF (NOT( "${FREEDIAMETER_VERSION_TEST_FOR}" STREQUAL "${FREEDIAMETER_LIBRARIES}" )) -ENDIF(FREEDIAMETER_FOUND) - diff --git a/cmake_targets/tools/MODULES/FindMySQL.cmake b/cmake_targets/tools/MODULES/FindMySQL.cmake deleted file mode 100755 index 668f8a434d..0000000000 --- a/cmake_targets/tools/MODULES/FindMySQL.cmake +++ /dev/null @@ -1,55 +0,0 @@ -# - Find mysqlclient -# -# -*- cmake -*- -# -# Find the native MySQL includes and library -# -# MySQL_INCLUDE_DIR - where to find mysql.h, etc. -# MySQL_LIBRARIES - List of libraries when using MySQL. -# MySQL_FOUND - True if MySQL found. - -IF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY) - # Already in cache, be silent - SET(MySQL_FIND_QUIETLY TRUE) -ENDIF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY) - -# Include dir -FIND_PATH(MySQL_INCLUDE_DIR - NAMES mysql.h - PATH_SUFFIXES mysql -) - -# Library -#SET(MySQL_NAMES mysqlclient mysqlclient_r) -SET(MySQL_NAMES mysqlclient) -FIND_LIBRARY(MySQL_LIBRARY - NAMES ${MySQL_NAMES} - PATHS /usr/lib /usr/local/lib - PATH_SUFFIXES mysql -) - -IF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY) - SET(MySQL_FOUND TRUE) - SET( MySQL_LIBRARIES ${MySQL_LIBRARY} ) -ELSE (MySQL_INCLUDE_DIR AND MySQL_LIBRARY) - SET(MySQL_FOUND FALSE) - SET( MySQL_LIBRARIES ) -ENDIF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY) - - -IF (MySQL_FOUND) - IF (NOT MySQL_FIND_QUIETLY) - MESSAGE(STATUS "Found MySQL: ${MySQL_LIBRARY}") - ENDIF (NOT MySQL_FIND_QUIETLY) -ELSE (MySQL_FOUND) - IF (MySQL_FIND_REQUIRED) - MESSAGE(STATUS "Looked for MySQL libraries named ${MySQL_NAMES}.") - MESSAGE(FATAL_ERROR "Could NOT find MySQL library") - ENDIF (MySQL_FIND_REQUIRED) -ENDIF (MySQL_FOUND) - -MARK_AS_ADVANCED( - MySQL_LIBRARY - MySQL_INCLUDE_DIR - ) - diff --git a/cmake_targets/tools/MODULES/FindPostgreSQL.cmake b/cmake_targets/tools/MODULES/FindPostgreSQL.cmake deleted file mode 100755 index a639a262b0..0000000000 --- a/cmake_targets/tools/MODULES/FindPostgreSQL.cmake +++ /dev/null @@ -1,36 +0,0 @@ -# - Find PostgreSQL library -# -# This module defines: -# POSTGRESQL_FOUND - True if the package is found -# POSTGRESQL_INCLUDE_DIR - containing libpq-fe.h -# POSTGRESQL_LIBRARIES - Libraries to link to use PQ functions. - -if (POSTGRESQL_INCLUDE_DIR AND POSTGRESQL_LIBRARIES) - set(POSTGRESQL_FIND_QUIETLY TRUE) -endif (POSTGRESQL_INCLUDE_DIR AND POSTGRESQL_LIBRARIES) - -# Include dir -find_path(POSTGRESQL_INCLUDE_DIR - NAMES libpq-fe.h - PATH_SUFFIXES pgsql postgresql -) - -# Library -find_library(POSTGRESQL_LIBRARY - NAMES pq -) - -# handle the QUIETLY and REQUIRED arguments and set POSTGRESQL_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(POSTGRESQL DEFAULT_MSG POSTGRESQL_LIBRARY POSTGRESQL_INCLUDE_DIR) - -IF(POSTGRESQL_FOUND) - SET( POSTGRESQL_LIBRARIES ${POSTGRESQL_LIBRARY} ) -ELSE(POSTGRESQL_FOUND) - SET( POSTGRESQL_LIBRARIES ) -ENDIF(POSTGRESQL_FOUND) - -# Lastly make it so that the POSTGRESQL_LIBRARY and POSTGRESQL_INCLUDE_DIR variables -# only show up under the advanced options in the gui cmake applications. -MARK_AS_ADVANCED( POSTGRESQL_LIBRARY POSTGRESQL_INCLUDE_DIR ) diff --git a/cmake_targets/tools/MODULES/path_prefixes.cmake b/cmake_targets/tools/MODULES/path_prefixes.cmake deleted file mode 100755 index 7deaec0fed..0000000000 --- a/cmake_targets/tools/MODULES/path_prefixes.cmake +++ /dev/null @@ -1,264 +0,0 @@ -# Declare variables for path prefixes for different types of files. -# NB: depends on 'multi_kernel' and 'uninstall_target'. - -# fill_install_prefixes( -# [BASE_INSTALL_PREFIX ] -# [KERNEL] -# ) -# -# Setup variables _* to the install prefixes for -# different project components. -# Precisely, variables with next sufficies are set: -# INSTALL_PREFIX_EXEC - executables -# INSTALL_PREFIX_READONLY - readonly files -# INSTALL_PREFIX_GLOBAL_CONF - global configuration files -# INSTALL_PREFIX_PREFIX_LIB - libraries -# INSTALL_INCLUDE_DIR - include directory(for flags to compiler) -# INSTALL_PREFIX_INCLUDE - include files -# INSTALL_PREFIX_TEMP_SESSION - temporary files(exists until system restarts) -# INSTALL_PREFIX_TEMP - temporary files(preserved even when system restats) -# INSTALL_PREFIX_STATE - files which describe current state of the project. -# INSTALL_PREFIX_CACHE - cache files -# INSTALL_PREFIX_VAR - other modifiable files -# INSTALL_PREFIX_DOC - documentation files -# INSTALL_PREFIX_EXAMPLES - documentation files -# -# With 'KERNEL' option enabled paths for kernel-related files also set: -# INSTALL_KINCLUDE_DIR - directory for include when build kernel components -# INSTALL_PREFIX_KINCLUDE - include files for the kernel. -# -# Additionally, with 'KERNEL' option enabled, several variables are set to -# paths, which contains "%kernel%" pattern. -# These paths are intended for kernel-dependent files; for make paths -# complete one should replace "%kernel%" substring with version of the -# kernel. -# Next kernel-dependend paths are set(sufficies only): -# KERNEL_INSTALL_PREFIX_KMODULE - directory for install kernel modules -# KERNEL_INSTALL_PREFIX_KSYMVERS - directory for install kernel modules' symvers files. -# KERNEL_INSTALL_INCLUDE_KERNEL_DIR - include directory with kernel-dependent headers. -# KERNEL_INSTALL_PREFIX_INCLUDE_KERNEL - include files, which depends from kernel. -# -# Iff option 'COMMON_INSTALL_PREFIX' is given, all paths above are -# calculated using as base prefix. -# Otherwise, CMAKE_INSTALL_PREFIX is used for that purpose. -# -# Additionally, -# INSTALL_TYPE -# variable(suffix) is set to one of: -# - "GLOBAL_OPT" - install into "/opt", -# - "GLOBAL" - global installation except one into "/opt", -# - "LOCAL" - local installation. -function(fill_install_prefixes project_name project_prefix) - cmake_parse_arguments(fip "KERNEL" "BASE_INSTALL_PREFIX" "" ${ARGN}) - if(fip_UNPARSED_ARGUMENTS) - list(GET fip_UNPARSED_ARGUMENTS 0 exceeded_arg) - message(SEND_ERROR "Exceeded argument: ${exceeded_arg}") - endif(fip_UNPARSED_ARGUMENTS) - if(NOT fip_BASE_INSTALL_PREFIX) - set(fip_BASE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - endif(NOT fip_BASE_INSTALL_PREFIX) - - # Follow conventions about paths listed in - # devel-docs/general/path_conventions.txt - # in kedr-devel package. - - # Determine type of installation - if(fip_BASE_INSTALL_PREFIX MATCHES "^/opt") - set(fip_INSTALL_TYPE "GLOBAL_OPT") - elseif(fip_BASE_INSTALL_PREFIX MATCHES "^/usr" - OR fip_BASE_INSTALL_PREFIX STREQUAL "/" - ) - set(fip_INSTALL_TYPE "GLOBAL") - else() - set(fip_INSTALL_TYPE "LOCAL") - endif() - - # 1 - if(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT") - set(fip_INSTALL_PREFIX_EXEC "/opt/${project_name}/bin") - else(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT") - set(fip_INSTALL_PREFIX_EXEC "${fip_BASE_INSTALL_PREFIX}/bin") - endif(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT") - # 2 - set(fip_INSTALL_PREFIX_EXEC_AUX - "${fip_BASE_INSTALL_PREFIX}/lib/${project_name}" - ) - # 3 - set(fip_INSTALL_PREFIX_READONLY - "${fip_BASE_INSTALL_PREFIX}/share/${project_name}" - ) - # 4 - set(fip_INSTALL_PREFIX_MANPAGE - "${fip_BASE_INSTALL_PREFIX}/share/man" - ) - # 5 - if(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT") - set(fip_INSTALL_PREFIX_GLOBAL_CONF "/etc/opt/${project_name}") - elseif(fip_INSTALL_TYPE STREQUAL "GLOBAL") - set(fip_INSTALL_PREFIX_GLOBAL_CONF "/etc/${project_name}") - else(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT") - set(fip_INSTALL_PREFIX_GLOBAL_CONF - "${fip_BASE_INSTALL_PREFIX}/etc/${project_name}" - ) - endif(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT") - # 6 - set(fip_INSTALL_PREFIX_LIB "${fip_BASE_INSTALL_PREFIX}/lib") - # 7 - set(fip_INSTALL_PREFIX_LIB_AUX - "${fip_BASE_INSTALL_PREFIX}/lib/${project_name}" - ) - # 8 - set(fip_INSTALL_INCLUDE_DIR "${fip_BASE_INSTALL_PREFIX}/include") - - set(fip_INSTALL_PREFIX_INCLUDE - "${fip_INSTALL_INCLUDE_DIR}/${project_name}" - ) - # 9 - set(fip_INSTALL_PREFIX_TEMP_SESSION "/tmp/${project_name}") - # 10 - if(fip_INSTALL_TYPE MATCHES "GLOBAL") - set(fip_INSTALL_PREFIX_TEMP "/var/tmp/${project_name}") - else(fip_INSTALL_TYPE MATCHES "GLOBAL") - set(fip_INSTALL_PREFIX_TEMP - "${fip_BASE_INSTALL_PREFIX}/var/tmp/${project_name}" - ) - endif(fip_INSTALL_TYPE MATCHES "GLOBAL") - # 11 - if(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT") - set(fip_INSTALL_PREFIX_STATE - "/var/opt/${project_name}/lib/${project_name}" - ) - elseif(fip_INSTALL_TYPE STREQUAL "GLOBAL") - set(fip_INSTALL_PREFIX_STATE "/var/lib/${project_name}") - else(fip_INSTALL_TYPE STREQUAL "GLOBAL") - set(fip_INSTALL_PREFIX_STATE - "${fip_BASE_INSTALL_PREFIX}/var/lib/${project_name}" - ) - endif(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT") - # 12 - if(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT") - set(fip_INSTALL_PREFIX_CACHE - "/var/opt/${project_name}/cache/${project_name}" - ) - elseif(fip_INSTALL_TYPE STREQUAL "GLOBAL") - set(fip_INSTALL_PREFIX_CACHE "/var/cache/${project_name}") - else(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT") - set(fip_INSTALL_PREFIX_CACHE - "${fip_BASE_INSTALL_PREFIX}/var/cache/${project_name}" - ) - endif(fip_INSTALL_TYPE STREQUAL "GLOBAL_OPT") - # 13 - if(fip_INSTALL_TYPE MATCHES "GLOBAL") - set(fip_INSTALL_PREFIX_VAR "/var/opt/${project_name}") - else(fip_INSTALL_TYPE MATCHES "GLOBAL") - set(fip_INSTALL_PREFIX_VAR - "${fip_BASE_INSTALL_PREFIX}/var/${project_name}" - ) - endif(fip_INSTALL_TYPE MATCHES "GLOBAL") - # 14 - set(fip_INSTALL_PREFIX_DOC - "${fip_BASE_INSTALL_PREFIX}/share/doc/${project_name}" - ) - - # Set derivative install path and prefixes - - # additional, 4 - set(fip_INSTALL_PREFIX_EXAMPLES - "${fip_INSTALL_PREFIX_READONLY}/examples") - - # Export symbols to the outer scope - foreach(suffix - INSTALL_TYPE - INSTALL_PREFIX_EXEC - INSTALL_PREFIX_EXEC_AUX - INSTALL_PREFIX_READONLY - INSTALL_PREFIX_MANPAGE - INSTALL_PREFIX_GLOBAL_CONF - INSTALL_PREFIX_LIB - INSTALL_PREFIX_LIB_AUX - INSTALL_INCLUDE_DIR - INSTALL_PREFIX_INCLUDE - INSTALL_PREFIX_TEMP_SESSION - INSTALL_PREFIX_TEMP - INSTALL_PREFIX_STATE - INSTALL_PREFIX_CACHE - INSTALL_PREFIX_VAR - INSTALL_PREFIX_DOC - INSTALL_PREFIX_EXAMPLES - ) - set(${project_prefix}_${suffix} "${fip_${suffix}}" PARENT_SCOPE) - endforeach(suffix) - - if(fip_KERNEL) - # Set derivative install path and prefixes - # additional, 1 - if(fip_INSTALL_TYPE MATCHES GLOBAL) - set(fip_KERNEL_INSTALL_PREFIX_KMODULE - "/lib/modules/%kernel%/extra" - ) - else(fip_INSTALL_TYPE MATCHES GLOBAL) - set(fip_KERNEL_INSTALL_PREFIX_KMODULE - "${fip_INSTALL_PREFIX_LIB}/modules/%kernel%/extra" - ) - endif(fip_INSTALL_TYPE MATCHES GLOBAL) - - # additional, 2 - set(fip_KERNEL_INSTALL_PREFIX_KSYMVERS - "${fip_INSTALL_PREFIX_LIB}/modules/%kernel%/symvers" - ) - # additional, 3 - set(fip_INSTALL_KINCLUDE_DIR "${fip_INSTALL_INCLUDE_DIR}") - set(fip_INSTALL_PREFIX_KINCLUDE "${fip_INSTALL_PREFIX_INCLUDE}") - - # Kernel include files, which depends from kernel version. - # This prefix is not listed in path conventions. - set(fip_KERNEL_INSTALL_INCLUDE_KERNEL_DIR - "${fip_BASE_INSTALL_PREFIX}/include-kernel/%kernel%" - ) - - set(fip_KERNEL_INSTALL_PREFIX_INCLUDE_KERNEL - "${fip_KERNEL_INSTALL_INCLUDE_KERNEL_DIR}/${project_name}-kernel" - ) - - # Export symbols to the outer scope - foreach(suffix - KERNEL_INSTALL_PREFIX_KMODULE - KERNEL_INSTALL_PREFIX_KSYMVERS - INSTALL_KINCLUDE_DIR - INSTALL_PREFIX_KINCLUDE - KERNEL_INSTALL_INCLUDE_KERNEL_DIR - KERNEL_INSTALL_PREFIX_INCLUDE_KERNEL - ) - set(${project_prefix}_${suffix} "${fip_${suffix}}" PARENT_SCOPE) - endforeach(suffix) - endif(fip_KERNEL) -endfunction(fill_install_prefixes project_name project_prefix) - - -######################################################################## -# Kernel-dependent paths. -# -# Some deliverables may depends on linux kernel. -# -# For make "one user installation for several kernels" paradigm works, -# installation directory for that deliverables should include -# kernel-version part(like "3.10.2-generic"). -# -# So, components installed by user installation can determine at runtime, -# which kernel-dependent deliverable should be used on currently loaded system. -# They do selection using 'uname -r' request. -# -# For define variables represented kernel-dependent directories, -# we use strings containing "%kernel%" stem. - -# kernel_path(kernel_version RESULT_VARIABLE pattern ...) -# -# Form concrete path representation from kernel-dependent pattern(s). -# Replace occurence of %kernel% in pattern(s) with given @kernel_version string. -# Result is stored in the RESULT_VARIABLE. -# -# @kernel_version may be concrete version of the kernel, -# or variable reference in some language. -macro(kernel_path kernel_version RESULT_VARIABLE pattern) - string(REPLACE "%kernel%" "${kernel_version}" ${RESULT_VARIABLE} ${pattern} ${ARGN}) -endmacro(kernel_path kernel_version RESULT_VARIABLE pattern) diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index b8ff564ae8..79d0d9673e 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -207,8 +207,13 @@ check_errors() { } compilations() { - cd $OPENAIR_DIR/cmake_targets/$1/build - echo_info "Log file for compilation is being written to: $dlog/$2.txt" + local dir=$1 + shift 1 + local logfile=$1 + shift 1 + local targets=$@ + cd $OPENAIR_DIR/cmake_targets/$dir/build + echo_info "Log file for compilation is being written to: $dlog/$logfile" set +e { if [ "$BUILD_COVERITY_SCAN" == "1" ]; then @@ -217,28 +222,27 @@ compilations() { COV_SCAN_PREFIX="" fi if [ "$MAKE_CMD" != "" ]; then - $MAKE_CMD $2 + $MAKE_CMD $targets else if [ "$VERBOSE_COMPILE" == "1" ]; then - $COV_SCAN_PREFIX make -j`nproc` $2 VERBOSE=$VERBOSE_COMPILE + $COV_SCAN_PREFIX make -j`nproc` $targets VERBOSE=$VERBOSE_COMPILE else - $COV_SCAN_PREFIX make -j`nproc` $2 + $COV_SCAN_PREFIX make -j`nproc` $targets fi fi ret=$? - } > $dlog/$2.txt 2>&1 - set -e + } > $dlog/$logfile 2>&1 if [ "$VERBOSE_CI" == "1" ]; then - echo_info "====== Start of log for $2.txt ======" - cat $dlog/$2.txt - echo_info "====== End of log for $2.txt ======" + echo_info "====== Start of log for $logfile ======" + cat $dlog/$logfile + echo_info "====== End of log for $logfile ======" fi - check_warnings "$dlog/$2.txt" + check_warnings "$dlog/$logfile" if [[ $ret -eq 0 ]]; then - echo_success "$2 compiled" + echo_success "$targets compiled" else - check_errors "$dlog/$2.txt" - echo_error "$2 compilation failed" + check_errors "$dlog/$logfile" + echo_error "compilation of $targets failed" exit 1 fi } @@ -590,19 +594,10 @@ check_install_oai_software() { case "$(get_distribution_release)" in "ubuntu18.04") add_cmake_repo - specific_packages="libgcrypt11-dev guile-2.0-dev" - ;; - "ubuntu20.04") - specific_packages="guile-2.0-dev" - ;; - "ubuntu21.04") - specific_packages="guile-2.0-dev" - ;; - "ubuntu22.04") - specific_packages="guile-2.2-dev" + specific_packages="libgcrypt11-dev" ;; "debian11") - specific_packages="guile-2.2-dev libz-dev" + specific_packages="libz-dev" ;; esac $SUDO apt-get install -y \ @@ -623,8 +618,6 @@ check_install_oai_software() { libsctp-dev \ libssl-dev \ libtool \ - libxslt1-dev \ - libtasn1-6-dev \ patch \ openssl \ xxd @@ -645,7 +638,6 @@ check_install_oai_software() { gcc \ gcc-c++ \ git \ - guile-devel \ atlas-devel \ pkgconfig \ libconfig-devel \ @@ -653,9 +645,7 @@ check_install_oai_software() { libgcrypt-devel \ lksctp-tools \ lksctp-tools-devel \ - libtasn1 \ libtool \ - libxslt-devel \ ninja-build \ make \ openssl \ diff --git a/common/config/config_load_configmodule.h b/common/config/config_load_configmodule.h index 42e82260c9..fd9dd16854 100644 --- a/common/config/config_load_configmodule.h +++ b/common/config/config_load_configmodule.h @@ -121,14 +121,16 @@ static char config_helpstr [] = "\n lte-softmodem -O [config mode]<:dbgl[debugfl #define CONFIGP_DEBUGFLAGS "debugflags" #define CONFIGP_TMPDIR "tmpdir" +// clang-format off static paramdef_t Config_Params[] = { - /*--------------------------------------------------------------------------------------------------------------------------*/ - /* config parameters for config module */ - /* optname helpstr paramflags XXXptr defXXXval type numelt */ - /*--------------------------------------------------------------------------------------------------------------------------*/ - {CONFIGP_DEBUGFLAGS, config_helpstr, 0, uptr : NULL, defintval : 0, TYPE_MASK, 0}, - {CONFIGP_TMPDIR, CONFIG_HELP_TMPDIR, PARAMFLAG_NOFREE, strptr : NULL, defstrval : "/tmp", TYPE_STRING, 0}, + /*--------------------------------------------------------------------------------------------------------------------------*/ + /* config parameters for config module */ + /* optname helpstr paramflags XXXptr defXXXval type numelt */ + /*--------------------------------------------------------------------------------------------------------------------------*/ + {CONFIGP_DEBUGFLAGS, config_helpstr, 0, .uptr = NULL, .defintval = 0, TYPE_MASK, 0}, + {CONFIGP_TMPDIR, CONFIG_HELP_TMPDIR, PARAMFLAG_NOFREE, .strptr = NULL, .defstrval = "/tmp", TYPE_STRING, 0}, }; +// clang-format on #else extern configmodule_interface_t *cfgptr; diff --git a/common/ngran_types.h b/common/ngran_types.h index ddd1ec2cca..95ad167961 100644 --- a/common/ngran_types.h +++ b/common/ngran_types.h @@ -54,4 +54,7 @@ typedef enum { CPtype = 0, UPtype } E1_t; #define NODE_IS_DU(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB_DU || (nOdE_TyPe) == ngran_gNB_DU) #define NODE_IS_MBMS(nOdE_TyPe) ((nOdE_TyPe) == ngran_eNB_MBMS_STA) #define GTPV1_U_PORT_NUMBER (2152) + +typedef enum { non_dynamic, dynamic } fiveQI_type_t; +#define maxSRBs 4 #endif diff --git a/common/platform_constants.h b/common/platform_constants.h index 38ec11d49e..8fc8d9c237 100644 --- a/common/platform_constants.h +++ b/common/platform_constants.h @@ -19,26 +19,11 @@ * contact@openairinterface.org */ -/* - platform_constants.h - ------------------- - AUTHOR : Lionel GAUTHIER and Navid Nikaein - COMPANY : EURECOM - EMAIL : Lionel.Gauthier@eurecom.fr - - ***************************************************************************/ #ifndef __PLATFORM_CONSTANTS_H__ #define __PLATFORM_CONSTANTS_H__ -#include "LTE_asn_constant.h" -#include "NR_asn_constant.h" -#define NR_MAXDRB 14 -#ifdef JUMBO_FRAME #define NL_MAX_PAYLOAD 18000 /* this should cover the max mtu size*/ -#else -#define NL_MAX_PAYLOAD 9000 /* this should cover the max mtu size*/ -#endif #ifdef LARGE_SCALE #define NB_MODULES_MAX 128 @@ -48,19 +33,7 @@ #define NB_NODE_MAX 32 #endif -#ifdef JUMBO_FRAME #define MAX_IP_PACKET_SIZE 10000 // 9000 -#else -#if defined(OAI_NW_DRIVER_TYPE_ETHERNET) -/* SR: When using ethernet network driver the packet size is 1512 : - * 1500 bytes IP packet + 14 bytes ethernet header - */ -#define MAX_IP_PACKET_SIZE 1514 -#else -#define MAX_IP_PACKET_SIZE 1500 // 3000 -#endif -#endif -// overwrite the previous deinitions #define MAX_MODULES NB_MODULES_MAX #define MAX_NR_RRC_UE_CONTEXTS 64 @@ -89,62 +62,29 @@ #define MAX_MANAGED_GNB_PER_MOBILE 2 /// NB-IOT -#define NB_RB_MAX_NB_IOT (LTE_maxDRB_NB_r13 + 3) // MP: NB_IoT --> 2(DRB)+3(SRBs - 2 is not used) = 5 +#define NB_RB_MAX_NB_IOT (2 + 3) /* 2 from LTE_maxDRB_NB_r13 in LTE_asn_constant.h + 3 SRBs */ #define DEFAULT_RAB_ID 1 -#define NB_RB_MAX (LTE_maxDRB + 3) /* was 11, now 14, maxDRB comes from asn1_constants.h, + 3 because of 3 SRB, one invisible id 0, then id 1 and 2 */ -#define NR_NB_RB_MAX (NR_maxDRB + 3) +#define NB_RB_MAX (11 + 3) /* LTE_maxDRB from LTE_asn_constant.h + 3 SRBs */ +#define NR_NB_RB_MAX (29 + 3) /* NR_maxDRB from NR_asn_constant.hm + 3 SRBs */ #define NGAP_MAX_PDU_SESSION (256) /* As defined in TS 38.413 9.2.1.1 Range Bound for PDU Sessions. */ #define NGAP_MAX_DRBS_PER_UE (32) /* As defined in TS 38.413 9.2.1.1 - maxnoofDRBs */ -#define NB_RB_MBMS_MAX (LTE_maxSessionPerPMCH * LTE_maxServiceCount) +#define NB_RB_MBMS_MAX (29 * 16) /* 29 = LTE_maxSessionPerPMCH + 16 = LTE_maxServiceCount from LTE_asn_constant.h */ -#define NB_RAB_MAX LTE_maxDRB /* was 8, now 11 */ -#define RAB_SHIFT1 9 -#define RAB_SHIFT2 3 -//#define RAB_OFFSET 0x0007 +#define NB_RAB_MAX 11 /* from LTE_maxDRB in LTE_asn_constant.h */ #define RAB_OFFSET 0x000F -#define RAB_OFFSET1 0x7E00 -#define RAB_OFFSET2 0x01F8 -#define DIR_OFFSET 0x8000 -#define DIR_SHIFT 15 -#define CH_OFFSET 0x0004 -#define CH_SHIFT 2 // RLC Entity #define RLC_TX_MAXSIZE 10000000 #define RLC_RX_MAXSIZE 10000000 - -// RLC_AM_SEND_MRW -#define SEND_MRW_OFF 15 #define SEND_MRW_ON 240 -// RLC_SEGMENTATION_INDICATION -#define SEGMENTATION_NOT_ALLOWED 0 -#define SEGMENTATION_ALLOWED 1 - -// RLC_DELIVERY_OF_ERRONEOUS_SDU -#define DELIVERY_OF_ERRONEOUS_SDU_NO 0 -#define DELIVERY_OF_ERRONEOUS_SDU_YES 1 -#define DELIVERY_OF_ERRONEOUS_SDU_NO_DETECT 2 - // CBA constant #define NUM_MAX_CBA_GROUP 4 -#ifndef __cplusplus -#ifndef NULL -#define NULL 0 -#endif -#ifndef null -#define null 0 -#endif -#endif - -#define UNUSED_PARAM_MBMS_SESSION_ID 0 -#define UNUSED_PARAM_MBMS_SERVICE_ID 0 - #define printk printf #define UNUSED_VARIABLE(vARIABLE) (void)(vARIABLE) diff --git a/common/ran_context.h b/common/ran_context.h index 320d431e73..244e6fd30d 100644 --- a/common/ran_context.h +++ b/common/ran_context.h @@ -34,17 +34,18 @@ #define __RAN_CONTEXT_H__ #include -#include "common/platform_constants.h" -#include "PHY/defs_eNB.h" -#include "PHY/types.h" -#include "PHY/impl_defs_top.h" - -#include "PHY/defs_L1_NB_IoT.h" -#include "RRC/LTE/defs_NB_IoT.h" -#include "RRC/LTE/rrc_defs.h" -#include "RRC/NR/nr_rrc_defs.h" -#include +#include +// forward declarations to avoid including the full typess ***eNB; +struct PHY_VARS_gNB_s; +struct PHY_VARS_eNB_NB_IoT_s; +struct eNB_RRC_INST_s; +struct gNB_RRC_INST_s; +struct eNB_MAC_INST_s; +struct eNB_MAC_INST_NB_IoT_s; +struct gNB_MAC_INST_s; +struct gtpv1u_data_s; +struct RU_t_s; typedef struct { /// RAN context config file name @@ -98,7 +99,7 @@ typedef struct { /// NR MAC context variables struct gNB_MAC_INST_s **nrmac; /// GTPu descriptor - gtpv1u_data_t *gtpv1u_data_g; + struct gtpv1u_data_s *gtpv1u_data_g; /// RU descriptors. These describe what each radio unit is supposed to do and contain the necessary functions for fronthaul interfaces struct RU_t_s **ru; /// Mask to indicate fronthaul setup status of RU (hard-limit to 64 RUs) diff --git a/common/utils/LOG/log.c b/common/utils/LOG/log.c index 84c70c3767..a620dfa5c5 100644 --- a/common/utils/LOG/log.c +++ b/common/utils/LOG/log.c @@ -460,7 +460,6 @@ int logInit (void) register_log_component("OTG_GP","dat",OTG_GP); register_log_component("OTG_GP_BG","dat",OTG_GP_BG); register_log_component("OTG_JITTER","dat",OTG_JITTER); - register_log_component("OCG","",OCG); register_log_component("PERF","",PERF); register_log_component("OIP","",OIP); register_log_component("OCM","log",OCM); diff --git a/common/utils/LOG/log.h b/common/utils/LOG/log.h index bf1ca28ed0..ba4759fba1 100644 --- a/common/utils/LOG/log.h +++ b/common/utils/LOG/log.h @@ -197,7 +197,6 @@ typedef enum { MAC, EMU, SIM, - OCG, OMG, OPT, OTG, @@ -393,11 +392,13 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int /* LOG global configuration parameters */ /* optname help paramflags XXXptr defXXXval type numelt */ /*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define LOG_GLOBALPARAMS_DESC { \ - {LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL, "Default log level for all componemts\n", 0, strptr:&gloglevel, defstrval:log_level_names[3].name, TYPE_STRING, 0}, \ - {LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE, "Default console output option, for all components\n", 0, iptr:&(consolelog), defintval:1, TYPE_INT, 0}, \ - {LOG_CONFIG_STRING_GLOBAL_LOG_OPTIONS, LOG_CONFIG_HELP_OPTIONS, 0, strlistptr:NULL, defstrlistval:NULL, TYPE_STRINGLIST, 0} \ - } + {LOG_CONFIG_STRING_GLOBAL_LOG_LEVEL, "Default log level for all componemts\n", 0, .strptr=&gloglevel, .defstrval=log_level_names[3].name, TYPE_STRING, 0}, \ + {LOG_CONFIG_STRING_GLOBAL_LOG_ONLINE, "Default console output option, for all components\n", 0, .iptr=&(consolelog), .defintval=1, TYPE_INT, 0}, \ + {LOG_CONFIG_STRING_GLOBAL_LOG_OPTIONS, LOG_CONFIG_HELP_OPTIONS, 0, .strlistptr=NULL, .defstrlistval=NULL, TYPE_STRINGLIST, 0}, \ +} +// clang-format on #define LOG_OPTIONS_IDX 2 @@ -414,12 +415,12 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int # if T_TRACER /* per component, level dependent macros */ -# define LOG_E(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} else { T(T_LEGACY_ ## c ## _ERROR, T_PRINTF(x)) ;}} while (0) -# define LOG_W(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_WARNING) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} else { T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x)) ;}} while (0) -# define LOG_A(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_ANALYSIS) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ANALYSIS, x) ;} else { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ;}} while (0) -# define LOG_I(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} else { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ;}} while (0) -# define LOG_D(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} else { T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) ;}} while (0) -# define LOG_T(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} else { T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) ;}} while (0) +# define LOG_E(c, x...) do { T(T_LEGACY_ ## c ## _ERROR, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} } while (0) +# define LOG_W(c, x...) do { T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x)); if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_WARNING ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} } while (0) +# define LOG_A(c, x...) do { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_ANALYSIS) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ANALYSIS, x);} } while (0) +# define LOG_I(c, x...) do { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} } while (0) +# define LOG_D(c, x...) do { T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} } while (0) +# define LOG_T(c, x...) do { T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) ; if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} } while (0) # define VLOG(c,l, f, args) do { if (T_stdout) { if( g_log->log_component[c].level >= l ) vlogRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, l, f, args) ;} } while (0) /* macro used to dump a buffer or a message as in openair2/RRC/LTE/RRC_eNB.c, replaces LOG_F macro */ # define LOG_DUMPMSG(c, f, b, s, x...) do { if(g_log->dump_mask & f) log_dump(c, b, s, LOG_DUMP_CHAR, x) ;} while (0) /* */ @@ -431,14 +432,13 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int # define LOG_M(file, vector, data, len, dec, format) do { write_file_matlab(file, vector, data, len, dec, format, 0);} while(0)/* */ /* define variable only used in LOG macro's */ # define LOG_VAR(A,B) A B -# else /* T_TRACER: remove all debugging and tracing messages, except errors */ - -# define LOG_E(c, x...) do { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} while (0) -# define LOG_W(c, x...) do { if( g_log->log_component[c].level >= OAILOG_WARNING) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} while (0) +# else /* T_TRACER */ +# define LOG_E(c, x...) do { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} while (0) +# define LOG_W(c, x...) do { if( g_log->log_component[c].level >= OAILOG_WARNING ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} while (0) # define LOG_A(c, x...) do { if( g_log->log_component[c].level >= OAILOG_ANALYSIS) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ANALYSIS, x);} while (0) -# define LOG_I(c, x...) do { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} while (0) -# define LOG_D(c, x...) do { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} while (0) -# define LOG_T(c, x...) do { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} while (0) +# define LOG_I(c, x...) do { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} while (0) +# define LOG_D(c, x...) do { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} while (0) +# define LOG_T(c, x...) do { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} while (0) # define VLOG(c,l, f, args) do { if( g_log->log_component[c].level >= l ) vlogRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, l, f, args) ; } while (0) # define nfapi_log(FILE, FNC, LN, COMP, LVL, FMT...) diff --git a/common/utils/LOG/vcd_signal_dumper.c b/common/utils/LOG/vcd_signal_dumper.c index 5bf9759933..841f2889b6 100644 --- a/common/utils/LOG/vcd_signal_dumper.c +++ b/common/utils/LOG/vcd_signal_dumper.c @@ -555,7 +555,9 @@ struct vcd_module_s vcd_modules[] = { }; FILE *vcd_fd = NULL; +#if defined(ENABLE_VCD_FIFO) static inline unsigned long long int vcd_get_time(void); +#endif #if defined(ENABLE_USE_CPU_EXECUTION_TIME) struct timespec g_time_start; @@ -809,6 +811,7 @@ static inline void vcd_signal_dumper_print_time_since_start(void) } } +#if defined(ENABLE_VCD_FIFO) static inline unsigned long long int vcd_get_time(void) { #if defined(ENABLE_USE_CPU_EXECUTION_TIME) @@ -821,6 +824,7 @@ static inline unsigned long long int vcd_get_time(void) #endif return 0; } +#endif void vcd_signal_dumper_create_header(void) { diff --git a/common/utils/T/T.h b/common/utils/T/T.h index dd698906c8..4f5ef046fe 100644 --- a/common/utils/T/T.h +++ b/common/utils/T/T.h @@ -19,7 +19,7 @@ /* known type - this is where you add new types */ #define T_INT(x) int, (x) #define T_FLOAT(x) float, (x) -#define T_BUFFER(x, len) buffer, ((T_buffer){addr:(x), length:(len)}) +#define T_BUFFER(x, len) buffer, ((T_buffer){.addr=(x), .length=(len)}) #define T_STRING(x) string, (x) #define T_PRINTF(...) printf, (__VA_ARGS__) @@ -571,11 +571,13 @@ extern int *T_active; /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-------------------------------------------------------------------------------------------------------------------------------------------------*/ #define TTRACER_DEFAULT_PORTNUM 2021 +// clang-format off #define CMDLINE_TTRACEPARAMS_DESC { \ - {"T_port", CONFIG_HLP_TPORT, 0, iptr:&T_port, defintval:TTRACER_DEFAULT_PORTNUM, TYPE_INT, 0},\ - {"T_nowait", CONFIG_HLP_NOTWAIT, PARAMFLAG_BOOL, iptr:&T_nowait, defintval:0, TYPE_INT, 0},\ - {"T_stdout", CONFIG_HLP_STDOUT, 0, iptr:&T_stdout, defintval:1, TYPE_INT, 0},\ + {"T_port", CONFIG_HLP_TPORT, 0, .iptr=&T_port, .defintval=TTRACER_DEFAULT_PORTNUM, TYPE_INT, 0},\ + {"T_nowait", CONFIG_HLP_NOTWAIT, PARAMFLAG_BOOL, .iptr=&T_nowait, .defintval=0, TYPE_INT, 0},\ + {"T_stdout", CONFIG_HLP_STDOUT, 0, .iptr=&T_stdout, .defintval=1, TYPE_INT, 0},\ } +// clang-format on void T_init(int remote_port, int wait_for_tracer); void T_Config_Init(void); diff --git a/common/utils/T/T_messages.txt b/common/utils/T/T_messages.txt index 97185aa138..c535f36f5e 100644 --- a/common/utils/T/T_messages.txt +++ b/common/utils/T/T_messages.txt @@ -801,27 +801,6 @@ ID = LEGACY_OTG_TRACE GROUP = ALL:LEGACY_OTG:LEGACY_GROUP_TRACE:LEGACY FORMAT = string,log -ID = LEGACY_OCG_INFO - DESC = OCG legacy logs - info level - GROUP = ALL:LEGACY_OCG:LEGACY_GROUP_INFO:LEGACY - FORMAT = string,log -ID = LEGACY_OCG_ERROR - DESC = OCG legacy logs - error level - GROUP = ALL:LEGACY_OCG:LEGACY_GROUP_ERROR:LEGACY - FORMAT = string,log -ID = LEGACY_OCG_WARNING - DESC = OCG legacy logs - warning level - GROUP = ALL:LEGACY_OCG:LEGACY_GROUP_WARNING:LEGACY - FORMAT = string,log -ID = LEGACY_OCG_DEBUG - DESC = OCG legacy logs - debug level - GROUP = ALL:LEGACY_OCG:LEGACY_GROUP_DEBUG:LEGACY - FORMAT = string,log -ID = LEGACY_OCG_TRACE - DESC = OCG legacy logs - trace level - GROUP = ALL:LEGACY_OCG:LEGACY_GROUP_TRACE:LEGACY - FORMAT = string,log - ID = LEGACY_OCM_INFO DESC = OCM legacy logs - info level GROUP = ALL:LEGACY_OCM:LEGACY_GROUP_INFO:LEGACY diff --git a/common/utils/T/check_vcd.c b/common/utils/T/check_vcd.c index 1460d7e20a..4a21e4d2f5 100644 --- a/common/utils/T/check_vcd.c +++ b/common/utils/T/check_vcd.c @@ -19,7 +19,19 @@ #define ENABLE_USE_CPU_EXECUTION_TIME #include "../LOG/vcd_signal_dumper.c" -void err(char *fmt, ...) __attribute__ ((format (printf, 1, 2))); +/* + * Dummy needed by assertions.h + */ +void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) +{ + if (assert) { + abort(); + } else { + exit(EXIT_SUCCESS); + } +} + +void err(char *fmt, ...) __attribute__((format(printf, 1, 2))); void err(char *fmt, ...) { va_list ap; diff --git a/common/utils/T/local_tracer.c b/common/utils/T/local_tracer.c index b4f1804c41..c1f1002505 100644 --- a/common/utils/T/local_tracer.c +++ b/common/utils/T/local_tracer.c @@ -139,11 +139,7 @@ void send_T_messages_txt(void *forwarder) { /* TODO: be careful, we use internal T stuff, to rewrite? */ T_LOCAL_size = 0; T_HEADER(T_ID(-1)); - T_PUT_buffer(1, ((T_buffer) { -addr: -(src), length: - (send_size) - })); + T_PUT_buffer(1, ((T_buffer) { .addr= (src), .length= (send_size) })); forward(forwarder, buf, T_LOCAL_size); src += send_size; src_len -= send_size; diff --git a/common/utils/assertions.h b/common/utils/assertions.h index b2916139e0..3424392e7a 100644 --- a/common/utils/assertions.h +++ b/common/utils/assertions.h @@ -29,6 +29,9 @@ #include #include +#define OAI_EXIT_NORMAL 0 +#define OAI_EXIT_ASSERT 1 + #define _Assert_Exit_ \ if (getenv("gdbStacks")) { \ char tmp [1000]; \ @@ -38,7 +41,8 @@ fprintf(stderr, "\nExiting execution\n"); \ fflush(stdout); \ fflush(stderr); \ - abort(); + exit_function(__FILE__, __FUNCTION__, __LINE__, "_Assert_Exit_", OAI_EXIT_ASSERT); \ + abort(); // to avoid gcc warnings - never executed unless app-specific exit_function() does not exit() nor abort() #define _Assert_(cOND, aCTION, fORMAT, aRGS...) \ do { \ diff --git a/common/utils/load_module_shlib.c b/common/utils/load_module_shlib.c index 15b42577e6..3a47dca782 100644 --- a/common/utils/load_module_shlib.c +++ b/common/utils/load_module_shlib.c @@ -69,8 +69,12 @@ char *loader_format_shlibpath(char *modname, char *version) char *tmpstr; char *shlibpath =NULL; char *shlibversion=NULL; -paramdef_t LoaderParams[] ={{"shlibpath", NULL, 0, strptr:&shlibpath, defstrval:NULL, TYPE_STRING, 0, NULL}, - {"shlibversion", NULL, 0, strptr:&shlibversion, defstrval:"", TYPE_STRING, 0, NULL}}; +// clang-format off +paramdef_t LoaderParams[] = { + {"shlibpath", NULL, 0, .strptr = &shlibpath, .defstrval = NULL, TYPE_STRING, 0, NULL}, + {"shlibversion", NULL, 0, .strptr = &shlibversion, .defstrval = "", TYPE_STRING, 0, NULL} +}; +// clang-format on int ret; diff --git a/common/utils/load_module_shlib.h b/common/utils/load_module_shlib.h index e804edbfe7..1609ef9ec5 100644 --- a/common/utils/load_module_shlib.h +++ b/common/utils/load_module_shlib.h @@ -76,12 +76,14 @@ loader_data_t loader_data; /*----------------------------------------------------------------------------------------------------------------------------------------------------------*/ /* LOADER parameters */ -/* optname helpstr paramflags XXXptr defXXXval type numelt check func*/ +/* optname helpstr paramflags XXXptr defXXXval type numelt check func*/ /*----------------------------------------------------------------------------------------------------------------------------------------------------------*/ -#define LOADER_PARAMS_DESC { \ -{"shlibpath", NULL, PARAMFLAG_NOFREE, strptr:&loader_data.shlibpath, defstrval:DEFAULT_PATH, TYPE_STRING, 0, NULL},\ -{"maxshlibs", NULL, 0, uptr:&(loader_data.maxshlibs),defintval:DEFAULT_MAXSHLIBS, TYPE_UINT32, 0, NULL}\ +// clang-format off +#define LOADER_PARAMS_DESC { \ + {"shlibpath", NULL, PARAMFLAG_NOFREE, .strptr = &loader_data.shlibpath, .defstrval = DEFAULT_PATH, TYPE_STRING, 0, NULL }, \ + {"maxshlibs", NULL, 0, .uptr = &(loader_data.maxshlibs), .defintval = DEFAULT_MAXSHLIBS, TYPE_UINT32, 0, NULL }, \ } +// clang-format on /*-------------------------------------------------------------------------------------------------------------*/ #else /* LOAD_MODULE_SHLIB_MAIN */ diff --git a/common/utils/minimal_stub.c b/common/utils/minimal_stub.c index 79e35bf7a6..be9c1b399d 100644 --- a/common/utils/minimal_stub.c +++ b/common/utils/minimal_stub.c @@ -2,5 +2,11 @@ int T_stdout; #endif -void exit_function(const char *file, const char *function, const int line, const char *s) { +void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) +{ + if (assert) { + abort(); + } else { + exit(EXIT_SUCCESS); + } } diff --git a/common/utils/nr/nr_common.c b/common/utils/nr/nr_common.c index 1dcafd4751..ca9d735fca 100644 --- a/common/utils/nr/nr_common.c +++ b/common/utils/nr/nr_common.c @@ -132,7 +132,7 @@ const nr_bandentry_t nr_bandtable[] = { uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex) { - const uint64_t dl_freq_khz = downlink_frequency / 1000; + const int64_t dl_freq_khz = downlink_frequency / 1000; const int32_t delta_duplex_khz = delta_duplex / 1000; uint64_t center_freq_diff_khz = UINT64_MAX; // 2^64 @@ -148,11 +148,11 @@ uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex) if (current_offset_khz != delta_duplex_khz) continue; - uint64_t center_frequency_khz = (nr_bandtable[ind].dl_max + nr_bandtable[ind].dl_min) / 2; + int64_t center_frequency_khz = (nr_bandtable[ind].dl_max + nr_bandtable[ind].dl_min) / 2; - if (abs(dl_freq_khz - center_frequency_khz) < center_freq_diff_khz){ + if (labs(dl_freq_khz - center_frequency_khz) < center_freq_diff_khz){ current_band = nr_bandtable[ind].band; - center_freq_diff_khz = abs(dl_freq_khz - center_frequency_khz); + center_freq_diff_khz = labs(dl_freq_khz - center_frequency_khz); } } @@ -723,6 +723,18 @@ void get_samplerate_and_bw(int mu, } } +void get_K1_K2(int N1, int N2, int *K1, int *K2) +{ + // num of allowed k1 and k2 according to 5.2.2.2.1-3 and -4 in 38.214 + if(N2 == N1 || N1 == 2) + *K1 = 2; + else if (N2 == 1) + *K1 = 5; + else + *K1 = 3; + *K2 = N2 > 1 ? 2 : 1; +} + // from start symbol index and nb or symbols to symbol occupation bitmap in a slot uint16_t SL_to_bitmap(int startSymbolIndex, int nrOfSymbols) { return ((1< file in the `cmake_targets/ran_build/build` subdirectory of the oai repository. can be "enb", "gnb", "4GUE" or "5GUE", each library containing functions specific to a given executable. +This will create the `libtelnetsrv.so` and `libtelnetsrv_` file in the `cmake_targets/ran_build/build` subdirectory of the oai repository. `` can be "enb", "gnb", "4GUE", "5GUE", or "ci", each library containing functions specific to a given executable. When starting the softmodem, you must specify the **_\-\-telnetsrv_** option to load and start the telnet server. The telnet server is loaded via the [oai shared library loader](loader). @@ -32,9 +32,15 @@ The telnet server is using the [oai configuration module](Config/Rtusage). Telne |:---:|:---:|:---:|:----|:----:| | `listenaddr` | `ipV4 address, ascii format` | "0.0.0.0" | local address the server is listening on| N | | `listenport` | `integer` | 9090 | port number the server is listening on | N | +| `listenstdin` | `integer` (bool) | 0 | enable input from stdin via additional thread | N | +| `policy` | `integer` | 0 | scheduling priority for telnet (0-99) | N | | `loopcount` | `integer` | 10 | number of iterations for the loop command | Y | | `loopdelay` | `integer` | 5000 | delay (in ms) between 2 loop command iterations | Y | -| `histfile` | `character string` | "oaitelnet.history" | file used for command history persistency | Y | -| `histfsize` | `integer` | 50 | maximum number of commands saved in the history | Y | +| `histfile` | `string` | "oaitelnet.history" | file used for command history persistency | Y | +| `histsize` | `integer` | 50 | maximum number of commands saved in the history | Y | +| `logfile` | `string` | `oaisoftmodem.log` | output file to which to redirect +| `phypbsize` | `integer` | 65000 | string buffer size to dump phy stats | Y | +| `staticmod` | `string` | (empty) | additional internally defined telnet modules (`--telnetsrv.staticmod X`, comma-separated) to load on startup. The modules should define a function `add_X_cmds()` in which the module can register telnet commands | N | +| `shrmod` | `string` | (empty) | additional shared object files `telnetsrv_X.so` (`--telnetsrv.shrmod X`, comma-separated) to load on startup. The shared object(s) should define a function `add_X_cmds()` in which the shared object can register telnet commands | N | [oai telnet server home](telnetsrv.md) diff --git a/common/utils/telnetsrv/telnetsrv.c b/common/utils/telnetsrv/telnetsrv.c index 89e0003bef..a91e7b2398 100644 --- a/common/utils/telnetsrv/telnetsrv.c +++ b/common/utils/telnetsrv/telnetsrv.c @@ -821,14 +821,14 @@ void poll_telnetcmdq(void *qid, void *arg) { * * */ -void exec_moduleinit(char *modname) { +static bool exec_moduleinit(char *modname) { void (*fptr)(void); char initfunc[TELNET_CMD_MAXSIZE+10]; if (strlen(modname) > TELNET_CMD_MAXSIZE) { fprintf(stderr,"[TELNETSRV] module %s not loaded, name exceeds the %i size limit\n", modname, TELNET_CMD_MAXSIZE); - return; + return false; } sprintf(initfunc,"add_%s_cmds",modname); @@ -836,37 +836,35 @@ void exec_moduleinit(char *modname) { if ( fptr != NULL) { fptr(); - } else { - fprintf(stderr,"[TELNETSRV] couldn't find %s for module %s \n",initfunc,modname); + return true; } + fprintf(stderr, "[TELNETSRV] couldn't find %s for module %s \n", initfunc, modname); + return false; } int add_embeddedmodules(void) { int ret=0; int pindex = config_paramidx_fromname(telnetoptions,sizeof(telnetoptions)/sizeof(paramdef_t), TELNETSRV_OPTNAME_STATICMOD); for(int i=0; i +#include +#include +#include +#include +#include +#include + +#include "openair2/RRC/NR/rrc_gNB_UE_context.h" +#include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h" +#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h" + +#define TELNETSERVERCODE +#include "telnetsrv.h" + +#define ERROR_MSG_RET(mSG, aRGS...) do { prnt(mSG, ##aRGS); return 1; } while (0) + +static int get_single_ue_rnti(void) +{ + NR_UE_info_t *ue = NULL; + UE_iterator(RC.nrmac[0]->UE_info.list, it) { + if (it && ue) + return -1; + if (it) + ue = it; + } + if (!ue) + return -1; + + // verify it exists in RRC as well + rrc_gNB_ue_context_t *rrcue = rrc_gNB_get_ue_context_by_rnti(RC.nrrrc[0], ue->rnti); + if (!rrcue) + return -1; + + return ue->rnti; +} + +int get_single_rnti(char *buf, int debug, telnet_printfunc_t prnt) +{ + if (buf) + ERROR_MSG_RET("no parameter allowed\n"); + + int rnti = get_single_ue_rnti(); + if (rnti < 1) + ERROR_MSG_RET("different number of UEs\n"); + + prnt("single UE RNTI %04x\n", rnti); + return 0; +} + +int get_reestab_count(char *buf, int debug, telnet_printfunc_t prnt) +{ + int rnti = -1; + if (!buf) { + rnti = get_single_ue_rnti(); + if (rnti < 1) + ERROR_MSG_RET("no UE found\n"); + } else { + rnti = strtol(buf, NULL, 16); + if (rnti < 1 || rnti >= 0xfffe) + ERROR_MSG_RET("RNTI needs to be [1,0xfffe]\n"); + } + + rrc_gNB_ue_context_t *ue = rrc_gNB_get_ue_context_by_rnti(RC.nrrrc[0], rnti); + if (!ue) + ERROR_MSG_RET("could not find UE with RNTI %04x\n", rnti); + + prnt("UE RNTI %04x reestab %d reconf_after_reestab %d\n", + rnti, + ue->ue_context.ue_reestablishment_counter, + ue->ue_context.ue_reconfiguration_after_reestablishment_counter); + return 0; +} + +int trigger_reestab(char *buf, int debug, telnet_printfunc_t prnt) +{ + int rnti = -1; + if (!buf) { + rnti = get_single_ue_rnti(); + if (rnti < 1) + ERROR_MSG_RET("no UE found\n"); + } else { + rnti = strtol(buf, NULL, 16); + if (rnti < 1 || rnti >= 0xfffe) + ERROR_MSG_RET("RNTI needs to be [1,0xfffe]\n"); + } + + // verify it exists in RRC as well + rrc_gNB_ue_context_t *rrcue = rrc_gNB_get_ue_context_by_rnti(RC.nrrrc[0], rnti); + if (!rrcue) + ERROR_MSG_RET("could not find UE with RNTI %04x\n", rnti); + + nr_rlc_remove_ue(rnti); + prnt("force-remove UE RNTI %04x from RLC to trigger reestablishment\n", rnti); + return 0; +} + +static telnetshell_cmddef_t cicmds[] = { + {"get_single_rnti", "", get_single_rnti}, + {"force_reestab", "[rnti(hex,opt)]", trigger_reestab}, + {"get_reestab_count", "[rnti(hex,opt)]", get_reestab_count}, + {"", "", NULL}, +}; + +static telnetshell_vardef_t civars[] = { + + {"", 0, 0, NULL} +}; + +void add_ci_cmds(void) { + add_telnetcmd("ci", civars, cicmds); +} diff --git a/common/utils/telnetsrv/telnetsrv_enb_measurements.c b/common/utils/telnetsrv/telnetsrv_enb_measurements.c index b3f52a5e27..b8898b665e 100644 --- a/common/utils/telnetsrv/telnetsrv_enb_measurements.c +++ b/common/utils/telnetsrv/telnetsrv_enb_measurements.c @@ -51,6 +51,8 @@ #include "telnetsrv_cpumeasur_def.h" #include "openair2/LAYER2/MAC/mac.h" #include "openair1/PHY/phy_extern.h" +#include "openair2/LAYER2/RLC/rlc.h" +#include "openair2/LAYER2/PDCP_v10.1.0/pdcp.c" void measurcmd_display_macstats(telnet_printfunc_t prnt); void measurcmd_display_macstats_ue(telnet_printfunc_t prnt); diff --git a/common/utils/telnetsrv/telnetsrv_enb_phycmd.c b/common/utils/telnetsrv/telnetsrv_enb_phycmd.c index f7deec1801..f3b40980f1 100644 --- a/common/utils/telnetsrv/telnetsrv_enb_phycmd.c +++ b/common/utils/telnetsrv/telnetsrv_enb_phycmd.c @@ -38,6 +38,10 @@ #include "telnetsrv.h" #define TELNETSRV_PHYCMD_MAIN #include "telnetsrv_phycmd.h" + +#include "PHY/defs_eNB.h" +#include "LAYER2/MAC/mac_proto.h" + char *prnbuff; extern int dump_eNB_stats(PHY_VARS_eNB *eNB, char *buffer, int length); diff --git a/common/utils/threadPool/thread-pool.c b/common/utils/threadPool/thread-pool.c index 3cd18fab02..b351a667b5 100644 --- a/common/utils/threadPool/thread-pool.c +++ b/common/utils/threadPool/thread-pool.c @@ -176,7 +176,13 @@ void initFloatingCoresTpool(int nbThreads,tpool_t *pool, bool performanceMeas, c #ifdef TEST_THREAD_POOL volatile int oai_exit=0; -void exit_function(const char *file, const char *function, const int line, const char *s) { +void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) +{ + if (assert) { + abort(); + } else { + exit(EXIT_SUCCESS); + } } struct testData { diff --git a/common/utils/threadPool/thread-pool.h b/common/utils/threadPool/thread-pool.h index 273c832662..0c544e5b0f 100644 --- a/common/utils/threadPool/thread-pool.h +++ b/common/utils/threadPool/thread-pool.h @@ -286,27 +286,31 @@ static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_ notifiedFIFO_elt_t *msg= pullNotifiedFIFO(responseFifo); if (msg == NULL) return NULL; - AssertFatal(t->traceFd, "Thread pool used while not initialized"); + AssertFatal(t->traceFd != 0, "Thread pool used while not initialized"); if (t->measurePerf) msg->returnTime=rdtsc_oai(); - if (t->traceFd > 0) - if(write(t->traceFd, msg, sizeof(*msg))); + if (t->traceFd > 0) { + ssize_t b = write(t->traceFd, msg, sizeof(*msg)); + AssertFatal(b == sizeof(*msg), "error in write(): %d, %s\n", errno, strerror(errno)); + } return msg; } static inline notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) { notifiedFIFO_elt_t *msg= pollNotifiedFIFO(responseFifo); - AssertFatal(t->traceFd, "Thread pool used while not initialized"); + AssertFatal(t->traceFd != 0, "Thread pool used while not initialized"); if (msg == NULL) return NULL; if (t->measurePerf) msg->returnTime=rdtsc_oai(); - if (t->traceFd) - if(write(t->traceFd, msg, sizeof(*msg))); + if (t->traceFd > 0) { + ssize_t b = write(t->traceFd, msg, sizeof(*msg)); + AssertFatal(b == sizeof(*msg), "error in write(): %d, %s\n", errno, strerror(errno)); + } return msg; } diff --git a/common/utils/time_meas.h b/common/utils/time_meas.h index 943856fa1f..1bca9c3466 100644 --- a/common/utils/time_meas.h +++ b/common/utils/time_meas.h @@ -195,9 +195,11 @@ static inline void merge_meas(time_stats_t *dst_ts, const time_stats_t *src_ts) #define CPUMEASUR_SECTION "cpumeasur" +// clang-format off #define CPUMEASUR_PARAMS_DESC { \ - {"max_cpumeasur", "Max number of cpu measur entries", 0, uptr:&max_cpumeasur, defintval:100, TYPE_UINT, 0},\ - } + {"max_cpumeasur", "Max number of cpu measur entries", 0, .uptr=&max_cpumeasur, .defintval=100, TYPE_UINT, 0}, \ +} +// clang-format on void init_meas(void); time_stats_t *register_meas(char *name); diff --git a/common/utils/websrv/CMakeLists.txt b/common/utils/websrv/CMakeLists.txt index dd5576ae79..fd1b216c88 100644 --- a/common/utils/websrv/CMakeLists.txt +++ b/common/utils/websrv/CMakeLists.txt @@ -62,7 +62,6 @@ add_library(websrv MODULE websrv_utils.c ../../../openair1/PHY/TOOLS/nr_phy_scope.c ) -target_link_libraries(websrv PRIVATE asn1_lte_rrc asn1_nr_rrc) target_link_libraries(websrv PRIVATE ulfius jansson) target_compile_definitions(websrv PUBLIC WEBSRVSCOPE) # put websrv into build root and not under build/common/utils/websrv/ diff --git a/common/utils/websrv/DOC/websrvuse.md b/common/utils/websrv/DOC/websrvuse.md index 0573825980..eaaf863892 100644 --- a/common/utils/websrv/DOC/websrvuse.md +++ b/common/utils/websrv/DOC/websrvuse.md @@ -182,7 +182,7 @@ To trigger the back-end use the `--websrv` option, possibly modifying the parame `./nr-softmodem -O /usr/local/oai/conf/gnb.band78.sa.fr1.106PRB.usrpb210.conf --rfsim --rfsimulator.serveraddr server --telnetsrv --telnetsrv.listenstdin --websrv --rfsimulator.options chanmod` -.`/nr-uesoftmodem -O /usr/local/oai/conf/nrue_sim.conf --sa --numerology 1 -r 106 -C 3649440000 --rfsim --rfsimulator.serveraddr 127.0.0.1 --websrv --telnetsrv --websrv.listenport 8092 --nokrnmod --telnetsrv.listenport 8091` +.`/nr-uesoftmodem -O /usr/local/oai/conf/nrue_sim.conf --sa --numerology 1 -r 106 -C 3649440000 --rfsim --rfsimulator.serveraddr 127.0.0.1 --websrv --telnetsrv --websrv.listenport 8092 --telnetsrv.listenport 8091` diff --git a/doc/Doxyfile b/doc/Doxyfile index 51492143d7..6a4dd850a3 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -986,9 +986,6 @@ INPUT = \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/ASYNC_IF/ringbuffer_queue.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/ASYNC_IF/message_queue.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/ASYNC_IF/link_manager.c \ -@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/OCG/OCG.h \ -@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/OCG/OCG_extern.h \ -@CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/OCG/OCG_vars.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/LISTS/list.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/LISTS/list.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/UTIL/LISTS/list2.c \ @@ -1024,7 +1021,6 @@ INPUT = \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_encoder.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_du_task.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_du_system_information.c \ -@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_cu_system_information.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_cu_rrc_message_transfer.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_cu_interface_management.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_handlers.c \ @@ -2244,7 +2240,6 @@ INPUT = \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/defs_L1_NB_IoT.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/phy_extern_ue.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/defs_gNB.h \ -@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/LTE_REFSIG/primary_synch.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/LTE_REFSIG/defs_NB_IoT.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/LTE_REFSIG/lte_refsig.h \ diff --git a/doc/E1-design.md b/doc/E1-design.md index db4bc85f74..90e0807793 100644 --- a/doc/E1-design.md +++ b/doc/E1-design.md @@ -96,7 +96,7 @@ You need to use `--rfsim` if you are running the test with rfsimulator. OAI UE: ``` -sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --nokrnmod --rfsim --sa +sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa ``` # 3. Configuration file IP addresses of network functions diff --git a/doc/L2NFAPI.md b/doc/L2NFAPI.md index d480db71d7..e87f9f270c 100644 --- a/doc/L2NFAPI.md +++ b/doc/L2NFAPI.md @@ -64,7 +64,7 @@ $ sudo -E ./nr-softmodem -O ../ci-scripts/conf_files/episci/proxy_rcc.band78.tm1 ``` ### Start UE ```bash -$ sudo -E ./nr-uesoftmodem -O ../ci-scripts/conf_files/episci/proxy_nr-ue.nfapi.conf --nokrnmod 1 --nfapi STANDALONE_PNF --node-number 2 --sa --emulate-l1 +$ sudo -E ./nr-uesoftmodem -O ../ci-scripts/conf_files/episci/proxy_nr-ue.nfapi.conf --nfapi STANDALONE_PNF --node-number 2 --sa --emulate-l1 ``` ### EpiSci's Documentation A more detailed tutorial is available on the [EpiSci GitHub Repository](https://github.com/EpiSci/oai-lte-5g-multi-ue-proxy#readme). diff --git a/doc/L2NFAPI_NOS1.md b/doc/L2NFAPI_NOS1.md index 0d4d6b538c..10d0c2a577 100644 --- a/doc/L2NFAPI_NOS1.md +++ b/doc/L2NFAPI_NOS1.md @@ -246,16 +246,15 @@ In the second terminal (the one you used to build the UE): $ ssh sudousername@machineC cd ue_folder/cmake_targets # Test 64 UEs, 1 thread in FDD mode -sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --noS1 --L2-emul 3 --num-ues 64 --nums_ue_thread 1 --nokrnmod 1 > ue.log 2>&1 +sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --noS1 --L2-emul 3 --num-ues 64 --nums_ue_thread 1 > ue.log 2>&1 # Test 64 UEs, 1 thread in TDD mode -sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --noS1 --L2-emul 3 --num-ues 64 --nums_ue_thread 1 --nokrnmod 1 -T 1 > ue.log 2>&1 +sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --noS1 --L2-emul 3 --num-ues 64 --nums_ue_thread 1 -T 1 > ue.log 2>&1 # The "-T 1" option means TDD config ``` - The number of UEs can set by using `--num-ues` option and the maximum UE number is 255 (with the `--mu*` options, otherwise 16). - The number of threads can set with the `--nums-ue-thread`. This number **SHALL NOT** be greater than the number of UEs. * At the time of writing, it seems to be enough to run on a single thread. -- The `--nokrnmod 1` option makes use of the preferred and supported tunnel interface. - How many UE that can be tested depends on hardware (server , PC, etc) performance in your environment. For example, running with 4 UEs: @@ -263,7 +262,7 @@ For example, running with 4 UEs: ```bash $ ssh sudousername@machineC cd ue_folder/cmake_targets -sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --noS1 --L2-emul 3 --num-ues 64 --nums_ue_thread 1 --nokrnmod 1 > ue.log 2>&1 +sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --noS1 --L2-emul 3 --num-ues 64 --nums_ue_thread 1 > ue.log 2>&1 sleep 10 ifconfig ens3 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX diff --git a/doc/L2NFAPI_S1.md b/doc/L2NFAPI_S1.md index 2d3de04b43..e7faec106f 100644 --- a/doc/L2NFAPI_S1.md +++ b/doc/L2NFAPI_S1.md @@ -252,16 +252,15 @@ In the second terminal (the one you used to build the UE): $ ssh sudousername@machineC cd ue_folder/cmake_targets # Test 64 UEs, 1 thread in FDD mode -sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --L2-emul 3 --num-ues 64 --nums_ue_thread 1 --nokrnmod 1 > ue.log 2>&1 +sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --L2-emul 3 --num-ues 64 --nums_ue_thread 1 > ue.log 2>&1 # Test 64 UEs, 1 thread in TDD mode -sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --L2-emul 3 --num-ues 64 --nums_ue_thread 1 --nokrnmod 1 -T 1 > ue.log 2>&1 +sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --L2-emul 3 --num-ues 64 --nums_ue_thread 1 -T 1 > ue.log 2>&1 # The "-T 1" option means TDD config ``` - The number of UEs can set by using `--num-ues` option and the maximum UE number is 255 (with the `--mu*` options, otherwise 16). - The number of threads can set with the `--nums-ue-thread`. This number **SHALL NOT** be greater than the number of UEs. * At the time of writing, it seems to be enough to run on a single thread. -- The `--nokrnmod 1` option makes use of the preferred and supported tunnel interface. - How many UE that can be tested depends on hardware (server , PC, etc) performance in your environment. For example, running with 4 UEs: @@ -269,7 +268,7 @@ For example, running with 4 UEs: ```bash $ ssh sudousername@machineC cd ue_folder/cmake_targets -sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --L2-emul 3 --num-ues 64 --nums_ue_thread 1 --nokrnmod 1 > ue.log 2>&1 +sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --L2-emul 3 --num-ues 64 --nums_ue_thread 1 > ue.log 2>&1 sleep 10 ifconfig ens3 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX diff --git a/doc/NR_SA_CN5G_gNB_USRP_COTS_UE_Tutorial.md b/doc/NR_SA_Tutorial_COTS_UE.md similarity index 58% rename from doc/NR_SA_CN5G_gNB_USRP_COTS_UE_Tutorial.md rename to doc/NR_SA_Tutorial_COTS_UE.md index 13624042ee..88ca97e863 100644 --- a/doc/NR_SA_CN5G_gNB_USRP_COTS_UE_Tutorial.md +++ b/doc/NR_SA_Tutorial_COTS_UE.md @@ -7,7 +7,7 @@ - OAI 5G SA tutorial + OAI 5G NR SA tutorial with COTS UE @@ -17,11 +17,11 @@ [[_TOC_]] # 1. Scenario -In this tutorial we describe how to configure and run a 5G end-to-end setup with OAI CN5G, OAI gNB, OAI nrUE and COTS UE. +In this tutorial we describe how to configure and run a 5G end-to-end setup with OAI CN5G, OAI gNB and COTS UE. Minimum hardware requirements: - Laptop/Desktop/Server for OAI CN5G and OAI gNB - - Operating System: [Ubuntu 22.04.1 LTS](https://releases.ubuntu.com/22.04.1/ubuntu-22.04.1-desktop-amd64.iso) + - Operating System: [Ubuntu 22.04 LTS](https://releases.ubuntu.com/22.04/ubuntu-22.04.1-desktop-amd64.iso) - CPU: 8 cores x86_64 @ 3.5 GHz - RAM: 32 GB - Laptop for UE @@ -40,63 +40,11 @@ Minimum hardware requirements: ## 2.1 OAI CN5G pre-requisites -```bash -sudo apt install -y git net-tools putty +Please install and configure OAI CN5G as described here: +[OAI CN5G](NR_SA_Tutorial_OAI_CN5G.md) -sudo apt install -y apt-transport-https ca-certificates curl software-properties-common -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - -sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -sudo apt update -sudo apt install -y docker docker-ce -# Add your username to the docker group, otherwise you will have to run in sudo mode. -sudo usermod -a -G docker $(whoami) -reboot - -# https://docs.docker.com/compose/install/ -sudo curl -L "https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose -sudo chmod +x /usr/local/bin/docker-compose -``` - -## 2.2 OAI CN5G Setup - -```bash -# Git oai-cn5g-fed repository -git clone https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-fed.git ~/oai-cn5g-fed - -# Pull docker images -docker pull oaisoftwarealliance/oai-amf:develop -docker pull oaisoftwarealliance/oai-nrf:develop -docker pull oaisoftwarealliance/oai-smf:develop -docker pull oaisoftwarealliance/oai-udr:develop -docker pull oaisoftwarealliance/oai-udm:develop -docker pull oaisoftwarealliance/oai-ausf:develop -docker pull oaisoftwarealliance/oai-spgwu-tiny:develop -docker pull oaisoftwarealliance/trf-gen-cn5g:latest - -# Tag docker images -docker image tag oaisoftwarealliance/oai-amf:develop oai-amf:develop -docker image tag oaisoftwarealliance/oai-nrf:develop oai-nrf:develop -docker image tag oaisoftwarealliance/oai-smf:develop oai-smf:develop -docker image tag oaisoftwarealliance/oai-udr:develop oai-udr:develop -docker image tag oaisoftwarealliance/oai-udm:develop oai-udm:develop -docker image tag oaisoftwarealliance/oai-ausf:develop oai-ausf:develop -docker image tag oaisoftwarealliance/oai-spgwu-tiny:develop oai-spgwu-tiny:develop -docker image tag oaisoftwarealliance/trf-gen-cn5g:latest trf-gen-cn5g:latest -``` - -## 2.3 OAI CN5G Configuration files -Download and copy configuration files: -- Copy [docker-compose-basic-nrf.yaml](tutorial_resources/docker-compose-basic-nrf.yaml) to `~/oai-cn5g-fed/docker-compose` -```bash -wget -O ~/oai-cn5g-fed/docker-compose/docker-compose-basic-nrf.yaml https://gitlab.eurecom.fr/oai/openairinterface5g/-/raw/develop/doc/tutorial_resources/docker-compose-basic-nrf.yaml?inline=false -``` -- Copy [oai_db.sql](tutorial_resources/oai_db.sql) to `~/oai-cn5g-fed/docker-compose/database` -```bash -wget -O ~/oai-cn5g-fed/docker-compose/database/oai_db.sql https://gitlab.eurecom.fr/oai/openairinterface5g/-/raw/develop/doc/tutorial_resources/oai_db.sql?inline=false -``` - -## 2.4 SIM Card +## 2.2 SIM Card Program SIM Card with [Open Cells Project](https://open-cells.com/) application [uicc-v2.6](https://open-cells.com/d5138782a8739209ec5760865b1e53b0/uicc-v2.6.tgz). ```bash @@ -114,7 +62,7 @@ sudo apt install -y libboost-all-dev libusb-1.0-0-dev doxygen python3-docutils p git clone https://github.com/EttusResearch/uhd.git ~/uhd cd ~/uhd -git checkout v4.3.0.0 +git checkout v4.4.0.0 cd host mkdir build cd build @@ -135,16 +83,14 @@ cd ~/openairinterface5g git checkout develop # Install OAI dependencies -cd ~/openairinterface5g -source oaienv -cd cmake_targets +cd ~/openairinterface5g/cmake_targets ./build_oai -I # Build OAI gNB cd ~/openairinterface5g source oaienv cd cmake_targets -./build_oai -w USRP --ninja --nrUE --gNB --build-lib "telnetsrv nrscope" -c +./build_oai -w USRP --ninja --gNB -c ``` # 4. Run OAI CN5G and OAI gNB @@ -152,8 +98,8 @@ cd cmake_targets ## 4.1 Run OAI CN5G ```bash -cd ~/oai-cn5g-fed/docker-compose -python3 core-network.py --type start-basic --scenario 1 +cd ~/oai-cn5g +docker compose up -d ``` ## 4.2 Run OAI gNB @@ -181,14 +127,6 @@ cd cmake_targets/ran_build/build sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf --sa --usrp-tx-thread-config 1 -E --continuous-tx ``` -### RFsimulator -```bash -cd ~/openairinterface5g -source oaienv -cd cmake_targets/ran_build/build -sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --rfsim --sa -``` - # 5. Run UE ## 5.1 Testing with Quectel RM500Q @@ -196,9 +134,6 @@ sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band With [PuTTY](https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe), send the following AT commands to the module using a serial interface (ex: COM2) at 115200 bps: ```bash # MUST be sent at least once everytime there is a firmware upgrade! -AT+QMBNCFG="Select","ROW_Commercial" -AT+QMBNCFG="AutoSel",0 -AT+CFUN=1,1 AT+CGDCONT=1,"IP","oai" AT+CGDCONT=2 AT+CGDCONT=3 @@ -233,40 +168,6 @@ iperf -s -u -i 1 -B 12.1.1.2 docker exec -it oai-ext-dn iperf -u -t 86400 -i 1 -fk -B 192.168.70.135 -b 100M -c 12.1.1.2 ``` -## 5.2 Testing with OAI nrUE -### 5.2.1 Testing with OAI nrUE with USRP B210 -Important notes: -- This should be run in a second Ubuntu 20.04 host, other than gNB -- It only applies when running OAI gNB with USRP B210 -- OAI gNB must run with the following flag: `--gNBs.[0].min_rxtxtime 6` - -Run OAI nrUE -```bash -cd ~/openairinterface5g -source oaienv -cd cmake_targets/ran_build/build -sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --nokrnmod --ue-fo-compensation --sa -E --uicc0.imsi 001010000000001 --uicc0.nssai_sd 1 -``` - -### 5.2.2 Testing with OAI nrUE with RFsimulator -Important notes: -- This should be run on the same host as the OAI gNB -- It only applies when running OAI gNB with RFsimulator - -Run OAI nrUE with RFsimulator -```bash -cd ~/openairinterface5g -source oaienv -cd cmake_targets/ran_build/build -sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --nokrnmod --rfsim --sa --uicc0.imsi 001010000000001 --uicc0.nssai_sd 1 -``` - -### 5.2.3 Ping test -- UE host -```bash -ping 192.168.70.135 -I oaitun_ue1 -``` - # 6. Advanced configurations (optional) ## 6.1 USRP N300 and X300 Ethernet Tuning @@ -292,8 +193,7 @@ sudo ethtool -G enp1s0f0 tx 4096 rx 4096 ``` ## 6.2 Real-time performance workarounds -- Enable Performance Mode in Ubuntu 22: - - Settings/Power/Power Mode: Performance +- Enable Performance Mode `sudo cpupower idle-set -D 0` - If you get real-time problems on heavy UL traffic, reduce the maximum UL MCS using an additional command-line switch: `--MACRLCs.[0].ul_max_mcs 14`. ## 6.3 Uplink issues related with noise on the DC carriers diff --git a/doc/NR_SA_Tutorial_OAI_CN5G.md b/doc/NR_SA_Tutorial_OAI_CN5G.md new file mode 100644 index 0000000000..cee4c904cf --- /dev/null +++ b/doc/NR_SA_Tutorial_OAI_CN5G.md @@ -0,0 +1,90 @@ + + + + + +
+ + + + + + OAI 5G NR SA tutorial: setting up OAI CN5G +
+ +**Table of Contents** + +[[_TOC_]] + +# 1. Scenario +In this tutorial we describe how to configure and run a 5G end-to-end setup with OAI CN5G, OAI gNB and COTS UE. + +Minimum hardware requirements: +- Laptop/Desktop/Server for OAI CN5G and OAI gNB + - Operating System: [Ubuntu 22.04 LTS](https://releases.ubuntu.com/22.04/ubuntu-22.04.1-desktop-amd64.iso) + - CPU: 8 cores x86_64 @ 3.5 GHz + - RAM: 32 GB + +# 2. OAI CN5G + +## 2.1 OAI CN5G pre-requisites + +```bash +sudo apt install -y git net-tools putty + +sudo apt install -y apt-transport-https ca-certificates curl software-properties-common +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - +sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" +sudo apt update +sudo apt install -y docker docker-ce + +# Add your username to the docker group, otherwise you will have to run in sudo mode. +sudo usermod -a -G docker $(whoami) +reboot +``` + +## 2.2 OAI CN5G configuration files +Download and copy configuration files: +```bash +wget -O ~/oai-cn5g.zip https://gitlab.eurecom.fr/oai/openairinterface5g/-/archive/develop/openairinterface5g-develop.zip?path=doc/tutorial_resources/oai-cn5g +unzip ~/oai-cn5g.zip +mv ~/openairinterface5g-develop-doc-tutorial_resources-oai-cn5g/doc/tutorial_resources/oai-cn5g ~/oai-cn5g +rm -r ~/openairinterface5g-develop-doc-tutorial_resources-oai-cn5g ~/oai-cn5g.zip +``` + +## 2.3 Pull OAI CN5G docker images + +```bash +docker pull mysql:8.0 +docker pull oaisoftwarealliance/oai-amf:develop +docker pull oaisoftwarealliance/oai-nrf:develop +docker pull oaisoftwarealliance/oai-smf:develop +docker pull oaisoftwarealliance/oai-udr:develop +docker pull oaisoftwarealliance/oai-udm:develop +docker pull oaisoftwarealliance/oai-ausf:develop +docker pull oaisoftwarealliance/oai-spgwu-tiny:develop +docker pull oaisoftwarealliance/trf-gen-cn5g:latest +docker build --target ims --tag asterisk-ims:latest --file ~/oai-cn5g/Dockerfile . +``` + +# 3. Run OAI CN5G +## 3.1 Start OAI CN5G +```bash +cd ~/oai-cn5g +docker compose up -d +``` + +## 3.2 Stop OAI CN5G +```bash +cd ~/oai-cn5g +docker compose down +``` + +# 4. Run 5G NR SA end-to-end setup with OAI gNB +## 4.1 Testing with COTS UE +Please check this link: +[Testing with OAI gNB and COTS UE](NR_SA_Tutorial_COTS_UE.md) + +## 4.2 Testing with OAI nrUE +Please check this link: +[Testing with OAI gNB and OAI nrUE](NR_SA_Tutorial_OAI_nrUE.md) \ No newline at end of file diff --git a/doc/NR_SA_Tutorial_OAI_nrUE.md b/doc/NR_SA_Tutorial_OAI_nrUE.md new file mode 100644 index 0000000000..f49b57354b --- /dev/null +++ b/doc/NR_SA_Tutorial_OAI_nrUE.md @@ -0,0 +1,209 @@ + + + + + +
+ + + + + + OAI 5G NR SA tutorial with OAI nrUE +
+ +**Table of Contents** + +[[_TOC_]] + +# 1. Scenario +In this tutorial we describe how to configure and run a 5G end-to-end setup with OAI CN5G, OAI gNB and OAI nrUE. + +Minimum hardware requirements: +- Laptop/Desktop/Server for OAI CN5G and OAI gNB + - Operating System: [Ubuntu 22.04 LTS](https://releases.ubuntu.com/22.04/ubuntu-22.04.1-desktop-amd64.iso) + - CPU: 8 cores x86_64 @ 3.5 GHz + - RAM: 32 GB +- Laptop for UE + - Operating System: [Ubuntu 22.04 LTS](https://releases.ubuntu.com/22.04/ubuntu-22.04.1-desktop-amd64.iso) + - CPU: 8 cores x86_64 @ 3.5 GHz + - RAM: 8 GB +- [USRP B210](https://www.ettus.com/all-products/ub210-kit/), [USRP N300](https://www.ettus.com/all-products/USRP-N300/) or [USRP X300](https://www.ettus.com/all-products/x300-kit/) + - Please identify the network interface(s) on which the USRP is connected and update the gNB configuration file + + +# 2. OAI CN5G + +## 2.1 OAI CN5G pre-requisites + +Please install and configure OAI CN5G as described here: +[OAI CN5G](NR_SA_Tutorial_OAI_CN5G.md) + + +# 3. OAI gNB and OAI nrUE + +## 3.1 OAI gNB and OAI nrUE pre-requisites + +### Build UHD from source +```bash +sudo apt install -y libboost-all-dev libusb-1.0-0-dev doxygen python3-docutils python3-mako python3-numpy python3-requests python3-ruamel.yaml python3-setuptools cmake build-essential + +git clone https://github.com/EttusResearch/uhd.git ~/uhd +cd ~/uhd +git checkout v4.4.0.0 +cd host +mkdir build +cd build +cmake ../ +make -j $(nproc) +make test # This step is optional +sudo make install +sudo ldconfig +sudo uhd_images_downloader +``` + +## 3.2 Build OAI gNB and OAI nrUE + +```bash +# Get openairinterface5g source code +git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git ~/openairinterface5g +cd ~/openairinterface5g +git checkout develop + +# Install OAI dependencies +cd ~/openairinterface5g/cmake_targets +./build_oai -I + +# nrscope dependencies +sudo apt install -y libforms-dev libforms-bin + +# Build OAI gNB +cd ~/openairinterface5g +source oaienv +cd cmake_targets +./build_oai -w USRP --ninja --nrUE --gNB --build-lib "nrscope" -c +``` + +# 4. Run OAI CN5G and OAI gNB + +## 4.1 Run OAI CN5G + +```bash +cd ~/oai-cn5g +docker compose up -d +``` + +## 4.2 Run OAI gNB + +### USRP B210 +```bash +cd ~/openairinterface5g +source oaienv +cd cmake_targets/ran_build/build +sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --sa -E --continuous-tx +``` +### USRP N300 +```bash +cd ~/openairinterface5g +source oaienv +cd cmake_targets/ran_build/build +sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf --gNBs.[0].min_rxtxtime 6 --sa --usrp-tx-thread-config 1 +``` + +### USRP X300 +```bash +cd ~/openairinterface5g +source oaienv +cd cmake_targets/ran_build/build +sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf --gNBs.[0].min_rxtxtime 6 --sa --usrp-tx-thread-config 1 -E --continuous-tx +``` + +### RFsimulator +```bash +cd ~/openairinterface5g +source oaienv +cd cmake_targets/ran_build/build +sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --rfsim --sa +``` + +# 5. OAI UE + +## 5.1 SIM Card +Edit openair3/UICC/usim_interface.c +```bash +#define UICC_PARAMS_DESC {\ + {"imsi", "USIM IMSI\n", 0, strptr:&(uicc->imsiStr), defstrval:"001010000000001", TYPE_STRING, 0 },\ + {"nmc_size" "number of digits in NMC", 0, iptr:&(uicc->nmc_size), defintval:2, TYPE_INT, 0 },\ + {"key", "USIM Ki\n", 0, strptr:&(uicc->keyStr), defstrval:"fec86ba6eb707ed08905757b1bb44b8f", TYPE_STRING, 0 },\ + {"opc", "USIM OPc\n", 0, strptr:&(uicc->opcStr), defstrval:"c42449363bbad02b66d16bc975d77cc1", TYPE_STRING, 0 },\ + {"amf", "USIM amf\n", 0, strptr:&(uicc->amfStr), defstrval:"8000", TYPE_STRING, 0 },\ + {"sqn", "USIM sqn\n", 0, strptr:&(uicc->sqnStr), defstrval:"000000", TYPE_STRING, 0 },\ + {"dnn", "UE dnn (apn)\n", 0, strptr:&(uicc->dnnStr), defstrval:"oai", TYPE_STRING, 0 },\ + {"nssai_sst", "UE nssai\n", 0, iptr:&(uicc->nssai_sst), defintval:1, TYPE_INT, 0 }, \ + {"nssai_sd", "UE nssai\n", 0, iptr:&(uicc->nssai_sd), defintval:0xffffff, TYPE_INT, 0 }, \ +}; +``` + +## 5.2 Testing OAI nrUE with USRP B210 + +Important notes: +- This should be run in a second Ubuntu 22.04 host, other than gNB +- It only applies when running OAI gNB with USRP B210 + +Run OAI nrUE +```bash +cd ~/openairinterface5g +source oaienv +cd cmake_targets/ran_build/build +sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --nokrnmod --ue-fo-compensation --sa -E --uicc0.imsi 001010000000001 +``` + +## 5.2 Testing OAI nrUE with RFsimulator +Important notes: +- This should be run on the same host as the OAI gNB +- It only applies when running OAI gNB with RFsimulator + +Run OAI nrUE with RFsimulator +```bash +cd ~/openairinterface5g +source oaienv +cd cmake_targets/ran_build/build +sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --nokrnmod --rfsim --sa --uicc0.imsi 001010000000001 +``` + +### 5.2.1 Ping test +- UE host +```bash +ping 192.168.70.135 -I oaitun_ue1 +``` + +# 6. Advanced configurations (optional) + +## 6.1 USRP N300 and X300 Ethernet Tuning + +Please also refer to the official [USRP Host Performance Tuning Tips and Tricks](https://kb.ettus.com/USRP_Host_Performance_Tuning_Tips_and_Tricks) tuning guide. + +The following steps are recommended. Please change the network interface(s) as required. Also, you should have 10Gbps interface(s): if you use two cables, you should have the XG firmware. Refer to the [N300 Getting Started Guide](https://kb.ettus.com/USRP_N300/N310/N320/N321_Getting_Started_Guide) for more information. + +* Use an MTU of 9000: how to change this depends on the network management tool. In the case of Network Manager, this can be done from the GUI. +* Increase the kernel socket buffer (also done by the USRP driver in OAI) +* Increase Ethernet Ring Buffers: `sudo ethtool -G rx 4096 tx 4096` +* Disable hyper-threading in the BIOS (This step is optional) +* Optional: Disable KPTI Protections for Spectre/Meltdown for more performance. **This is a security risk.** Add `mitigations=off nosmt` in your grub config and update grub. (This step is optional) + +Example code to run: +``` +for ((i=0;i<$(nproc);i++)); do sudo cpufreq-set -c $i -r -g performance; done +sudo sysctl -w net.core.wmem_max=62500000 +sudo sysctl -w net.core.rmem_max=62500000 +sudo sysctl -w net.core.wmem_default=62500000 +sudo sysctl -w net.core.rmem_default=62500000 +sudo ethtool -G enp1s0f0 tx 4096 rx 4096 +``` + +## 6.2 Real-time performance workarounds +- Enable Performance Mode `sudo cpupower idle-set -D 0` +- If you get real-time problems on heavy UL traffic, reduce the maximum UL MCS using an additional command-line switch: `--MACRLCs.[0].ul_max_mcs 14`. + +## 6.3 Uplink issues related with noise on the DC carriers +- There is noise on the DC carriers on N300 and especially the X300 in UL. To avoid their use or shift them away from the center to use more UL spectrum, use the `--tune-offset ` command line switch, where `` is ideally half the bandwidth, or possibly less. diff --git a/doc/RUN_NR_PRS.md b/doc/RUN_NR_PRS.md index 9b69e0960b..b5dfe43a1d 100644 --- a/doc/RUN_NR_PRS.md +++ b/doc/RUN_NR_PRS.md @@ -71,7 +71,7 @@ If **N310 USRPs** are used, then run above command `without -E option` i.e witho To run using **rfsimulator**, execute following command: -```sudo RFSIMULATOR=server ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.sa.band78.fr1.106PRB.prs.usrpx310.conf --parallel-config PARALLEL_SINGLE_THREAD --noS1 --nokrnmod 1 --rfsim --phy-test``` +```sudo RFSIMULATOR=server ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.sa.band78.fr1.106PRB.prs.usrpx310.conf --parallel-config PARALLEL_SINGLE_THREAD --noS1 --rfsim --phy-test``` ## FR2 test In FR2 mode, we need RF beamforming module to transmit signal in mmWave frequency range. **X310 USRPs** can be used with BasicTx daughtercard to transmit baseband signal at **Intermediate Frequncy(IF)** and then RF beamforming module would perform beamforming and the upconversion to FR2 frequencies. IF can be specified using `if_freq` in the RU section of gNB config. @@ -83,7 +83,7 @@ If RF beamforming module is NOT present, gNB can still be launched with USRP alo To run using **rfsimulator**, execute following command: -```sudo RFSIMULATOR=server ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.sa.band261.fr2.64PRB.prs.usrpx310.conf --parallel-config PARALLEL_SINGLE_THREAD --noS1 --nokrnmod 1 --rfsim --phy-test``` +```sudo RFSIMULATOR=server ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb0.sa.band261.fr2.64PRB.prs.usrpx310.conf --parallel-config PARALLEL_SINGLE_THREAD --noS1 --rfsim --phy-test``` ## Multiple gNB scenario PRS is primarily used for positioning and localization of the UE with multiple gNBs transmitting simultaneously. OAI PRS implementation supports multiple gNB transmission provided all the gNBs are tightely synchronized using GPSDO clock. Therefore before running this scenario, make sure the USRPs has built-in GPSDO and the GPS antennas are connected with good satellite visibility. Also every time a gNB is launched, wait until `GPS LOCKED` is printed on the terminal during gNB startup. If USRP fails to lock with GPSDO, try again until its locked. @@ -112,7 +112,7 @@ If **N310 USRPs** are used, then run above command `without -E option` i.e witho To run using **rfsimulator** with local ETH IF `127.0.0.1`, execute following command: -```sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem --nokrnmod 1 --rfsim --phy-test --noS1 -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.nr.prs.fr1.106prb.conf``` +```sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem --rfsim --phy-test --noS1 -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.nr.prs.fr1.106prb.conf``` ## FR2 test Like gNB, RF beamforming module is receiving at mmWave frequencies and then **X310 USRPs** with BasicRx daughtercard to receive the signal at intermediate frequncy(IF) from RF beamforming module. IF can be specified using `--if_freq` option in nrUE command line. @@ -124,7 +124,7 @@ If RF beamforming module is NOT present, nrUE can still be launched with USRP al To run using **rfsimulator** with local ETH IF `127.0.0.1`, execute following command: -```sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem --nokrnmod 1 --rfsim --phy-test --noS1 -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.nr.prs.fr2.64prb.conf``` +```sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem --rfsim --phy-test --noS1 -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.nr.prs.fr2.64prb.conf``` ## Multiple gNB scenario In nrUE prs config file, change `Active_gNBs` to the actual number of gNBs launched. Also verify the parameter in `prs_config` sections of nrUE config is matching with that of gNB config used. And launch nrUE using one of the above commands depending on FR1/FR2 test scenario. diff --git a/doc/RUN_NR_multiple_BWPs.md b/doc/RUN_NR_multiple_BWPs.md index 2c2c2fcf25..80a0515b56 100644 --- a/doc/RUN_NR_multiple_BWPs.md +++ b/doc/RUN_NR_multiple_BWPs.md @@ -47,5 +47,5 @@ Each dedicated BWP must have: ## UE command: ``` - sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --nokrnmod --rfsim --sa --uicc0.imsi 208990000000001 + sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa --uicc0.imsi 208990000000001 ``` \ No newline at end of file diff --git a/doc/SW_archi.md b/doc/SW_archi.md index 3886b04099..7f16edab11 100644 --- a/doc/SW_archi.md +++ b/doc/SW_archi.md @@ -315,7 +315,7 @@ Still on DL (gNB side), PDCP push incoming data into RLC by calling: rlc_data_re For UL, the low layer push data into rlc by: mac_rlc_data_ind() Then, rlc push it to pdcp by calling pdcp_data_ind() from a complex rlc internal call back (deliver_sdu()) -When adding a UE, external code have to call nr_rrc_rlc_config_asn1_req(), to remove it: rrc_rlc_remove_ue() +When adding a UE, external code have to call `add_rlc_srb()` and/or `add_rlc_drb()`, to remove it: `rrc_rlc_remove_ue()` Inside UE, channels called drd or srb can be created: ??? and deleted: rrc_rlc_config_req() nr_rlc_tick() must be called periodically to manage the internal timers diff --git a/doc/TESTING_5GSA_setup.md b/doc/TESTING_5GSA_setup.md index 18b61d30a5..736005803d 100644 --- a/doc/TESTING_5GSA_setup.md +++ b/doc/TESTING_5GSA_setup.md @@ -207,7 +207,7 @@ the gNB can be launched in 2 modes: - To launch the OAI UE (valid in `monolithic` gNB and `CU/DU split` gNB): ```bash sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 \ - --rfsim --sa --nokrnmod -O + --rfsim --sa -O ``` If you get the following error: diff --git a/doc/tutorial_resources/oai-cn5g/Dockerfile b/doc/tutorial_resources/oai-cn5g/Dockerfile new file mode 100644 index 0000000000..9aeba34d02 --- /dev/null +++ b/doc/tutorial_resources/oai-cn5g/Dockerfile @@ -0,0 +1,15 @@ +ARG BASE_IMAGE=ubuntu:jammy + +FROM $BASE_IMAGE as ims + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ + DEBIAN_FRONTEND=noninteractive apt-get install --yes \ + psmisc \ + git \ + asterisk \ + && rm -rf /var/lib/apt/lists/* + +ENTRYPOINT ["asterisk", "-fp"] diff --git a/doc/tutorial_resources/oai-cn5g/conf/sip.conf b/doc/tutorial_resources/oai-cn5g/conf/sip.conf new file mode 100644 index 0000000000..8a3f9f6b92 --- /dev/null +++ b/doc/tutorial_resources/oai-cn5g/conf/sip.conf @@ -0,0 +1,6 @@ +[general] +language=fr +tcpenable=yes +tcpbindaddr=0.0.0.0 +tcpbindport=5060 +srvlookup=yes diff --git a/doc/tutorial_resources/oai-cn5g/conf/users.conf b/doc/tutorial_resources/oai-cn5g/conf/users.conf new file mode 100644 index 0000000000..e029274846 --- /dev/null +++ b/doc/tutorial_resources/oai-cn5g/conf/users.conf @@ -0,0 +1,27 @@ +[001010000000001] +fullname = user1 +hassip = yes +context = users +host = dynamic +transport=udp + +[001010000000002] +fullname = user2 +hassip = yes +context = users +host = dynamic +transport=udp + +[001010000000003] +fullname = user3 +hassip = yes +context = users +host = dynamic +transport=udp + +[001010000000004] +fullname = user4 +hassip = yes +context = users +host = dynamic +transport=udp diff --git a/doc/tutorial_resources/oai_db.sql b/doc/tutorial_resources/oai-cn5g/database/oai_db.sql similarity index 75% rename from doc/tutorial_resources/oai_db.sql rename to doc/tutorial_resources/oai-cn5g/database/oai_db.sql index 0f6d5ae01c..d312db93c3 100644 --- a/doc/tutorial_resources/oai_db.sql +++ b/doc/tutorial_resources/oai-cn5g/database/oai_db.sql @@ -156,6 +156,8 @@ INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPe ('001010000000002', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000000\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000002'); INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES ('001010000000003', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000000\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000003'); +INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES + ('001010000000004', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000000\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000004'); -- -------------------------------------------------------- @@ -209,11 +211,13 @@ CREATE TABLE `SessionManagementSubscriptionData` ( -- INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES - ('001010000000001', '00101', '{\"sst\": 1, \"sd\": \"1\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"10000Mbps\", \"downlink\":\"10000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.2\"}]}}'); +('001010000000001', '00101', '{\"sst\": 1, \"sd\": \"0xFFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.99\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES - ('001010000000002', '00101', '{\"sst\": 1, \"sd\": \"1\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"10000Mbps\", \"downlink\":\"10000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.3\"}]}}'); +('001010000000002', '00101', '{\"sst\": 1, \"sd\": \"0xFFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.100\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES - ('001010000000003', '00101', '{\"sst\": 1, \"sd\": \"1\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"10000Mbps\", \"downlink\":\"10000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.4\"}]}}'); +('001010000000003', '00101', '{\"sst\": 1, \"sd\": \"0xFFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.101\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); +INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES +('001010000000004', '00101', '{\"sst\": 1, \"sd\": \"0xFFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.102\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}'); -- -------------------------------------------------------- diff --git a/doc/tutorial_resources/docker-compose-basic-nrf.yaml b/doc/tutorial_resources/oai-cn5g/docker-compose.yml similarity index 52% rename from doc/tutorial_resources/docker-compose-basic-nrf.yaml rename to doc/tutorial_resources/oai-cn5g/docker-compose.yml index 7c2287a3c4..b57942fea0 100644 --- a/doc/tutorial_resources/docker-compose-basic-nrf.yaml +++ b/doc/tutorial_resources/oai-cn5g/docker-compose.yml @@ -2,10 +2,10 @@ version: '3.8' services: mysql: container_name: "mysql" - image: mysql:5.7 + image: mysql:8.0 volumes: - ./database/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql - - ./healthscripts/mysql-healthcheck2.sh:/tmp/mysql-healthcheck.sh + - ./healthscripts/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh environment: - TZ=Europe/Paris - MYSQL_DATABASE=oai_db @@ -20,30 +20,35 @@ services: networks: public_net: ipv4_address: 192.168.70.131 + ims: + container_name: "asterisk-ims" + image: asterisk-ims:latest + volumes: + - ./conf/sip.conf:/etc/asterisk/sip.conf + - ./conf/users.conf:/etc/asterisk/users.conf + healthcheck: + test: /bin/bash -c "pgrep asterisk" + interval: 10s + timeout: 5s + retries: 5 + networks: + public_net: + ipv4_address: 192.168.70.139 oai-udr: container_name: "oai-udr" - image: oai-udr:develop + image: oaisoftwarealliance/oai-udr:develop environment: - TZ=Europe/Paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - UDR_NAME=OAI_UDR - UDR_INTERFACE_NAME_FOR_NUDR=eth0 - - UDR_INTERFACE_PORT_FOR_NUDR=80 - - UDR_INTERFACE_HTTP2_PORT_FOR_NUDR=8080 - - USE_HTTP2=no - - UDR_API_VERSION=v1 - - MYSQL_IPV4_ADDRESS=192.168.70.131 + - MYSQL_IPV4_ADDRESS=mysql - MYSQL_USER=test - MYSQL_PASS=test - - DB_CONNECTION_TIMEOUT=300 # Reset the connection to the DB after expiring the timeout (in second) currently can't be changed - MYSQL_DB=oai_db - WAIT_MYSQL=120 - USE_FQDN_DNS=yes - REGISTER_NRF=yes - NRF_IPV4_ADDRESS=192.168.70.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf depends_on: - mysql @@ -53,80 +58,57 @@ services: ipv4_address: 192.168.70.136 oai-udm: container_name: "oai-udm" - image: oai-udm:develop + image: oaisoftwarealliance/oai-udm:develop environment: - TZ=Europe/Paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - UDM_NAME=OAI_UDM - SBI_IF_NAME=eth0 - - SBI_PORT=80 - - SBI_HTTP2_PORT=8080 - - USE_HTTP2=no - - UDM_VERSION_NB=v1 + - REGISTER_NRF=yes - USE_FQDN_DNS=yes - UDR_IP_ADDRESS=192.168.70.136 - - UDR_PORT=80 - - UDR_VERSION_NB=v1 - UDR_FQDN=oai-udr - - REGISTER_NRF=yes - NRF_IPV4_ADDRESS=192.168.70.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf depends_on: + - oai-nrf - oai-udr networks: public_net: ipv4_address: 192.168.70.137 oai-ausf: container_name: "oai-ausf" - image: oai-ausf:develop + image: oaisoftwarealliance/oai-ausf:develop environment: - TZ=Europe/Paris - - INSTANCE_ID=0 - - PID_DIR=/var/run - AUSF_NAME=OAI_AUSF - SBI_IF_NAME=eth0 - - SBI_PORT=80 - - USE_HTTP2=no - - SBI_HTTP2_PORT=8080 - USE_FQDN_DNS=yes - - UDM_IP_ADDRESS=192.168.70.137 - - UDM_PORT=80 - - UDM_VERSION_NB=v1 - - UDM_FQDN=oai-udm - REGISTER_NRF=yes + - UDM_IP_ADDRESS=192.168.70.137 + - UDM_FQDN=oai-udm - NRF_IPV4_ADDRESS=192.168.70.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf depends_on: + - oai-nrf - oai-udm networks: public_net: ipv4_address: 192.168.70.138 oai-nrf: container_name: "oai-nrf" - image: oai-nrf:develop + image: oaisoftwarealliance/oai-nrf:develop environment: - TZ=Europe/Paris - NRF_INTERFACE_NAME_FOR_SBI=eth0 - - NRF_INTERFACE_PORT_FOR_SBI=80 - - NRF_INTERFACE_HTTP2_PORT_FOR_SBI=8080 - - NRF_API_VERSION=v1 - - INSTANCE=0 - - PID_DIRECTORY=/var/run networks: public_net: ipv4_address: 192.168.70.130 oai-amf: container_name: "oai-amf" - image: oai-amf:develop + image: oaisoftwarealliance/oai-amf:develop environment: - - TZ=Europe/paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run + - TZ=Europe/Paris + # PLMN informations - MCC=001 - MNC=01 - REGION_ID=128 @@ -135,60 +117,33 @@ services: - SERVED_GUAMI_MNC_0=01 - SERVED_GUAMI_REGION_ID_0=128 - SERVED_GUAMI_AMF_SET_ID_0=1 - - SERVED_GUAMI_MCC_1=460 - - SERVED_GUAMI_MNC_1=11 - - SERVED_GUAMI_REGION_ID_1=10 - - SERVED_GUAMI_AMF_SET_ID_1=1 - PLMN_SUPPORT_MCC=001 - PLMN_SUPPORT_MNC=01 - PLMN_SUPPORT_TAC=0x0001 + # Slice 0 (1, 0xFFFFFF) - SST_0=1 - - SD_0=0x1 - - SST_1=1 - - SD_1=0x2 - - SST_2=1 - - SD_2=0x3 - AMF_INTERFACE_NAME_FOR_NGAP=eth0 - AMF_INTERFACE_NAME_FOR_N11=eth0 + # One single SMF instance - SMF_INSTANCE_ID_0=1 - SMF_FQDN_0=oai-smf - SMF_IPV4_ADDR_0=192.168.70.133 - - SMF_HTTP_VERSION_0=v1 - SELECTED_0=true - - SMF_INSTANCE_ID_1=2 - - SMF_FQDN_1=oai-smf - - SMF_IPV4_ADDR_1=0.0.0.0 - - SMF_HTTP_VERSION_1=v1 - - SELECTED_1=false - - MYSQL_SERVER=192.168.70.131 - - MYSQL_USER=root - - MYSQL_PASS=linux - - MYSQL_DB=oai_db - - OPERATOR_KEY=1006020f0a478bf6b699f15c062e42b3 - - NRF_IPV4_ADDRESS=192.168.70.130 - - NRF_PORT=80 - - EXTERNAL_NRF=no + # Interaction with other NFs - NF_REGISTRATION=yes - - SMF_SELECTION=yes - USE_FQDN_DNS=yes - EXTERNAL_AUSF=yes - - EXTERNAL_UDM=no - - EXTERNAL_NSSF=no - - USE_HTTP2=no - - NRF_API_VERSION=v1 + # Algorithm choices + - CIPH_ALGO_LIST=["NEA0" , "NEA1" , "NEA2"] + - INT_ALGO_LIST=["NIA1" , "NIA2"] + # Other NF + - NRF_IPV4_ADDRESS=192.168.70.130 - NRF_FQDN=oai-nrf - AUSF_IPV4_ADDRESS=192.168.70.138 - - AUSF_PORT=80 - - AUSF_API_VERSION=v1 - AUSF_FQDN=oai-ausf - UDM_IPV4_ADDRESS=192.168.70.137 - - UDM_PORT=80 - - UDM_API_VERSION=v2 - UDM_FQDN=oai-udm - - INT_ALGO_LIST=["NIA1", "NIA2"] - - CIPH_ALGO_LIST=["NEA0", "NEA2"] depends_on: - - mysql - oai-nrf - oai-ausf networks: @@ -196,113 +151,80 @@ services: ipv4_address: 192.168.70.132 oai-smf: container_name: "oai-smf" - image: oai-smf:develop + image: oaisoftwarealliance/oai-smf:develop environment: - TZ=Europe/Paris - - INSTANCE=0 - - PID_DIRECTORY=/var/run - SMF_INTERFACE_NAME_FOR_N4=eth0 - SMF_INTERFACE_NAME_FOR_SBI=eth0 - - SMF_INTERFACE_PORT_FOR_SBI=80 - - SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090 - - SMF_API_VERSION=v1 - DEFAULT_DNS_IPV4_ADDRESS=8.8.8.8 - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4 - AMF_IPV4_ADDRESS=192.168.70.132 - - AMF_PORT=80 - - AMF_API_VERSION=v1 - AMF_FQDN=oai-amf - UDM_IPV4_ADDRESS=192.168.70.137 - - UDM_PORT=80 - - UDM_API_VERSION=v2 - UDM_FQDN=oai-udm - UPF_IPV4_ADDRESS=192.168.70.134 - - UPF_FQDN_0=oai-spgwu + - UPF_FQDN_0=oai-spgwu-tiny - NRF_IPV4_ADDRESS=192.168.70.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - - USE_LOCAL_SUBSCRIPTION_INFO=yes #Set to yes if SMF uses local subscription information instead of from an UDM - - USE_NETWORK_INSTANCE=no #Set yes if network instance is to be used for given UPF - NRF_FQDN=oai-nrf + - USE_LOCAL_SUBSCRIPTION_INFO=yes - REGISTER_NRF=yes - DISCOVER_UPF=yes - USE_FQDN_DNS=yes - - HTTP_VERSION=1 # Default: 1 - UE_MTU=1500 + # Slice 0 (1, 0xFFFFFF) - DNN_NI0=oai - TYPE0=IPv4 - - DNN_RANGE0=12.1.1.2 - 12.1.1.253 + - DNN_RANGE0=12.1.1.2 - 12.1.1.254 - NSSAI_SST0=1 - - NSSAI_SD0=0x1 - - SESSION_AMBR_UL0=10000Mbps - - SESSION_AMBR_DL0=10000Mbps - - DNN_NI1=oai2 - - TYPE1=IPv4 - - DNN_RANGE1=12.1.2.2 - 12.1.2.253 + - SESSION_AMBR_UL0=10Gbps + - SESSION_AMBR_DL0=10Gbps + # Slice 1 (1, 0xFFFFFF) + - DNN_NI1=openairinterface + - TYPE1=IPv4v6 + - DNN_RANGE1=12.1.2.2 - 12.1.2.254 - NSSAI_SST1=1 - - NSSAI_SD1=0x2 - - SESSION_AMBR_UL1=10000Mbps - - SESSION_AMBR_DL1=10000Mbps - - DNN_NI2=oai3 - - TYPE2=IPv4 - - DNN_RANGE2=12.1.3.2 - 12.1.3.253 + - SESSION_AMBR_UL1=10Gbps + - SESSION_AMBR_DL1=10Gbps + # Slice 2 for ims + - DNN_NI2=ims + - TYPE2=IPv4v6 + - DNN_RANGE2=12.1.9.2 - 12.1.9.254 - NSSAI_SST2=1 - - NSSAI_SD2=0x3 - - SESSION_AMBR_UL2=10000Mbps - - SESSION_AMBR_DL2=10000Mbps - - DNN_NI3=ims - - TYPE3=IPv4v6 - - DNN_RANGE3=14.1.1.2 - 14.1.1.253 - - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1 # only needed when ims is being used - - ENABLE_USAGE_REPORTING=no # Set yes if UE USAGE REPORTING is to be done at UPF + - SESSION_AMBR_UL2=10Gbps + - SESSION_AMBR_DL2=10Gbps + # IMS server + - DEFAULT_CSCF_IPV4_ADDRESS=192.168.70.139 depends_on: - oai-nrf - oai-amf networks: public_net: ipv4_address: 192.168.70.133 - oai-spgwu: - container_name: "oai-spgwu" - image: oai-spgwu-tiny:develop + oai-spgwu-tiny: + container_name: "oai-spgwu-tiny" + image: oaisoftwarealliance/oai-spgwu-tiny:develop environment: - TZ=Europe/Paris - - PID_DIRECTORY=/var/run - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0 - SGW_INTERFACE_NAME_FOR_SX=eth0 - PGW_INTERFACE_NAME_FOR_SGI=eth0 - NETWORK_UE_NAT_OPTION=yes - - NETWORK_UE_IP=12.1.1.0/24 - - SPGWC0_IP_ADDRESS=192.168.70.133 - - BYPASS_UL_PFCP_RULES=no - - MCC=001 - - MNC=01 - - MNC03=001 - - TAC=1 - - GW_ID=1 - - THREAD_S1U_PRIO=80 - - S1U_THREADS=8 - - THREAD_SX_PRIO=81 - - SX_THREADS=1 - - THREAD_SGI_PRIO=80 - - SGI_THREADS=8 - - REALM=openairinterface.org + - NETWORK_UE_IP=12.1.0.0/16 - ENABLE_5G_FEATURES=yes - REGISTER_NRF=yes - USE_FQDN_NRF=yes - - UPF_FQDN_5G=oai-spgwu + - UPF_FQDN_5G=oai-spgwu-tiny - NRF_IPV4_ADDRESS=192.168.70.130 - - NRF_PORT=80 - - NRF_API_VERSION=v1 - NRF_FQDN=oai-nrf + # Slice 0 (1, 0xFFFFFF) - NSSAI_SST_0=1 - - NSSAI_SD_0=0x1 - DNN_0=oai + # Slice 1 (1, 0xFFFFFF) - NSSAI_SST_1=1 - - NSSAI_SD_1=0x2 - - DNN_1=oai2 + - DNN_1=openairinterface + # Slice 2 (1, 0xFFFFFF) - NSSAI_SST_2=1 - - NSSAI_SD_2=0x3 - - DNN_2=oai3 + - DNN_2=ims depends_on: - oai-nrf - oai-smf @@ -316,15 +238,15 @@ services: public_net: ipv4_address: 192.168.70.134 oai-ext-dn: - image: trf-gen-cn5g:latest + image: oaisoftwarealliance/trf-gen-cn5g:latest privileged: true container_name: oai-ext-dn entrypoint: /bin/bash -c \ - "ip route add 12.1.1.0/24 via 192.168.70.134 dev eth0; sleep infinity" + "ip route add 12.1.0.0/16 via 192.168.70.134 dev eth0; sleep infinity" depends_on: - - oai-spgwu + - oai-spgwu-tiny healthcheck: - test: /bin/bash -c "ip r | grep 12.1.1" + test: /bin/bash -c "ip r | grep 12.1.0" interval: 10s timeout: 5s retries: 5 @@ -332,9 +254,6 @@ services: public_net: ipv4_address: 192.168.70.135 networks: - # public_net: - # external: - # name: demo-oai-public-net public_net: driver: bridge name: demo-oai-public-net diff --git a/doc/tutorial_resources/oai-cn5g/healthscripts/mysql-healthcheck.sh b/doc/tutorial_resources/oai-cn5g/healthscripts/mysql-healthcheck.sh new file mode 100755 index 0000000000..6fa1728f2a --- /dev/null +++ b/doc/tutorial_resources/oai-cn5g/healthscripts/mysql-healthcheck.sh @@ -0,0 +1,46 @@ +#!/bin/bash +set -eo pipefail + +if [ "$MYSQL_ROOT_PASSWORD" ] && [ -z "$MYSQL_USER" ] && [ -z "$MYSQL_PASSWORD" ]; then + echo >&2 'Healthcheck error: cannot determine root password (and MYSQL_USER and MYSQL_PASSWORD were not set)' + exit 0 +fi + +host="$(hostname --ip-address || echo '127.0.0.1')" +user="${MYSQL_USER:-root}" +export MYSQL_PWD="${MYSQL_PASSWORD:-$MYSQL_ROOT_PASSWORD}" + +args=( + # force mysql to not use the local "mysqld.sock" (test "external" connectivity) + -h"$host" + -u"$user" + --silent +) + +STATUS=0 +if command -v mysqladmin &> /dev/null; then + if mysqladmin "${args[@]}" ping > /dev/null; then + database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM AuthenticationSubscription;") + if [[ -z $database_check ]]; then + echo "Healthcheck error: oai_db not populated" + STATUS=1 + fi + STATUS=0 + else + echo "Healthcheck error: Mysql port inactive" + STATUS=1 + fi +else + if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then + database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM AuthenticationSubscription;") + if [[ -z $database_check ]]; then + echo "Healthcheck error: oai_db not populated" + STATUS=1 + fi + STATUS=0 + else + echo "Healthcheck error: Mysql port inactive" + STATUS=1 + fi +fi +exit $STATUS diff --git a/docker/Dockerfile.build.ubuntu20 b/docker/Dockerfile.build.ubuntu20 index 71025d3bab..fd4de7c22a 100644 --- a/docker/Dockerfile.build.ubuntu20 +++ b/docker/Dockerfile.build.ubuntu20 @@ -35,4 +35,4 @@ COPY . . RUN /bin/sh oaienv && \ cd cmake_targets && \ mkdir -p log && \ - ./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope nrqtscope" -w USRP --verbose-ci --noavx512 -c + ./build_oai --eNB --gNB --RU --UE --nrUE --ninja --build-lib "telnetsrv enbscope uescope nrscope nrqtscope" -w USRP --verbose-ci --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror diff --git a/docker/Dockerfile.gNB.rhel8.2 b/docker/Dockerfile.gNB.rhel8.2 index 9af0812cd6..187de03e37 100644 --- a/docker/Dockerfile.gNB.rhel8.2 +++ b/docker/Dockerfile.gNB.rhel8.2 @@ -73,6 +73,7 @@ COPY --from=gnb-build \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \ /oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \ + /oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \ /usr/local/lib/ COPY --from=gnb-base \ diff --git a/docker/Dockerfile.gNB.ubuntu20 b/docker/Dockerfile.gNB.ubuntu20 index f2d89a406e..07d1413093 100644 --- a/docker/Dockerfile.gNB.ubuntu20 +++ b/docker/Dockerfile.gNB.ubuntu20 @@ -78,6 +78,7 @@ COPY --from=gnb-build \ /oai-ran/cmake_targets/ran_build/build/libldpc_optim8seg.so \ /oai-ran/cmake_targets/ran_build/build/libldpc_orig.so \ /oai-ran/cmake_targets/ran_build/build/libtelnetsrv.so \ + /oai-ran/cmake_targets/ran_build/build/libtelnetsrv_ci.so \ /usr/local/lib/ # Now we are copying from builder-image the UHD files. diff --git a/executables/lte-ru.c b/executables/lte-ru.c index 8d5f4254ee..a784ee5a09 100644 --- a/executables/lte-ru.c +++ b/executables/lte-ru.c @@ -51,6 +51,7 @@ #include "PHY/defs_common.h" #include "PHY/types.h" #include "PHY/INIT/phy_init.h" +#include "PHY/phy_extern.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h" #include "PHY/LTE_REFSIG/lte_refsig.h" #include "PHY/LTE_TRANSPORT/if4_tools.h" @@ -105,13 +106,6 @@ void wait_eNBs(void); const char ru_states[6][9] = {"RU_IDLE","RU_CONFIG","RU_READY","RU_RUN","RU_ERROR","RU_SYNC"}; -extern const char NB_functions[7][20]; -extern const char NB_timing[2][20]; - - -extern const char ru_if_types[MAX_RU_IF_TYPES][20]; - - #if defined(PRE_SCD_THREAD) #include "common/ran_context.h" #include "nfapi/oai_integration/vendor_ext.h" diff --git a/executables/lte-softmodem.c b/executables/lte-softmodem.c index 7c25548349..6d75f0acbd 100644 --- a/executables/lte-softmodem.c +++ b/executables/lte-softmodem.c @@ -77,6 +77,7 @@ unsigned short config_frames[4] = {2,9,11,13}; #include "create_tasks.h" +#include "pdcp.h" #include "PHY/INIT/phy_init.h" @@ -241,8 +242,8 @@ unsigned int build_rfdc(int dcoff_i_rxfe, int dcoff_q_rxfe) { return (dcoff_i_rxfe + (dcoff_q_rxfe<<8)); } - -void exit_function(const char *file, const char *function, const int line, const char *s) { +void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) +{ int ru_id; if (s != NULL) { @@ -266,8 +267,12 @@ void exit_function(const char *file, const char *function, const int line, const } } - sleep(1); //allow lte-softmodem threads to exit first - exit(1); + if (assert) { + abort(); + } else { + sleep(1); // allow lte-softmodem threads to exit first + exit(EXIT_SUCCESS); + } } diff --git a/executables/lte-uesoftmodem.c b/executables/lte-uesoftmodem.c index 04358c7ec9..4fe94f0b80 100644 --- a/executables/lte-uesoftmodem.c +++ b/executables/lte-uesoftmodem.c @@ -39,6 +39,7 @@ #include "assertions.h" #include "PHY/types.h" +#include "pdcp.h" #include "PHY/defs_UE.h" #include "common/ran_context.h" @@ -244,7 +245,7 @@ unsigned int build_rfdc(int dcoff_i_rxfe, int dcoff_q_rxfe) { } -void exit_function(const char *file, const char *function, const int line, const char *s) { +void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) { int CC_id; logClean(); printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, ((s==NULL)?"":s)); @@ -258,12 +259,15 @@ void exit_function(const char *file, const char *function, const int line, const PHY_vars_UE_g[0][CC_id]->rfdevice.trx_end_func(&PHY_vars_UE_g[0][CC_id]->rfdevice); } - sleep(1); //allow lte-softmodem threads to exit first - if(PHY_vars_UE_g != NULL ) itti_terminate_tasks (TASK_UNKNOWN); - exit(1); + if (assert) { + abort(); + } else { + sleep(1); // allow lte-softmodem threads to exit first + exit(EXIT_SUCCESS); + } } extern int16_t dlsch_demod_shift; diff --git a/executables/main_ru.c b/executables/main_ru.c index ee2e6dc39c..2de9ba5d12 100644 --- a/executables/main_ru.c +++ b/executables/main_ru.c @@ -49,12 +49,14 @@ #include "radio/ETHERNET/USERSPACE/LIB/if_defs.h" #include "PHY/phy_vars.h" +#include "PHY/phy_extern.h" #include "PHY/TOOLS/phy_scope_interface.h" #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "PHY/INIT/phy_init.h" #include "openair2/ENB_APP/enb_paramdef.h" #include "system.h" +#include "nfapi/oai_integration/vendor_ext.h" #include #include @@ -85,7 +87,7 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; void nfapi_setmode(nfapi_mode_t nfapi_mode) { return; } -void exit_function(const char *file, const char *function, const int line, const char *s) { +void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) { if (s != NULL) { printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, s); @@ -102,11 +104,15 @@ void exit_function(const char *file, const char *function, const int line, const ru_m.ifdevice.trx_end_func(&ru_m.ifdevice); ru_m.ifdevice.trx_end_func = NULL; } - + pthread_mutex_destroy(ru_m.ru_mutex); - pthread_cond_destroy(ru_m.ru_cond); - sleep(1); //allow lte-softmodem threads to exit first - exit(1); + pthread_cond_destroy(ru_m.ru_cond); + if (assert) { + abort(); + } else { + sleep(1); // allow lte-softmodem threads to exit first + exit(EXIT_SUCCESS); + } } diff --git a/executables/nr-cuup.c b/executables/nr-cuup.c index 14fff00a70..25ebe6df13 100644 --- a/executables/nr-cuup.c +++ b/executables/nr-cuup.c @@ -28,6 +28,7 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "openair2/F1AP/f1ap_common.h" #include "openair2/GNB_APP/gnb_config.h" +#include "pdcp.h" RAN_CONTEXT_t RC; THREAD_STRUCT thread_struct; @@ -36,10 +37,15 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; int asn1_xer_print; int oai_exit = 0; instance_t CUuniqInstance = 0; -RRC_release_list_t rrc_release_info; -void exit_function(const char *file, const char *function, const int line, const char *s) +void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) { + if (assert) { + abort(); + } else { + sleep(1); // allow other threads to exit first + exit(EXIT_SUCCESS); + } } nfapi_mode_t nfapi_mod = -1; @@ -93,14 +99,9 @@ void nr_rlc_bearer_init_ul_spec(struct NR_LogicalChannelConfig *mac_LogicalChann abort(); } -rlc_op_status_t nr_rrc_rlc_config_asn1_req(const protocol_ctxt_t *const ctxt_pP, - const NR_SRB_ToAddModList_t *const srb2add_listP, - const NR_DRB_ToAddModList_t *const drb2add_listP, - const NR_DRB_ToReleaseList_t *const drb2release_listP, - struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list) +void nr_rlc_add_drb(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig) { abort(); - return 0; } int nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(const protocol_ctxt_t *const ctxt_pP, const gtpv1u_gnb_create_tunnel_resp_t *const create_tunnel_resp_p, int offset) diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index 105465df02..830e3d193b 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -42,7 +42,7 @@ #include "PHY/types.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "PHY/defs_gNB.h" #include "SCHED/sched_eNB.h" @@ -230,7 +230,7 @@ void rx_func(void *param) { gNB->ulsch[j]->harq_mask = 0; int h; for (h = 0; h < NR_MAX_ULSCH_HARQ_PROCESSES; h++) { - gNB->ulsch[j]->harq_processes[h]->status = SCH_IDLE; + gNB->ulsch[j]->harq_processes[h]->status = NR_SCH_IDLE; gNB->ulsch[j]->harq_processes[h]->round = 0; gNB->ulsch[j]->harq_processes[h]->handled = 0; } @@ -639,7 +639,7 @@ void init_eNB_afterRU(void) { for (i=0; iRU_list[ru_id]->nb_rx; aa++,i++) { LOG_I(PHY,"Attaching RU %d antenna %d to gNB antenna %d\n",gNB->RU_list[ru_id]->idx,i,aa); gNB->prach_vars.rxsigF[aa] = gNB->RU_list[ru_id]->prach_rxsigF[0][i]; - gNB->common_vars.rxdataF[aa] = gNB->RU_list[ru_id]->common.rxdataF[i]; + gNB->common_vars.rxdataF[aa] = (c16_t *)gNB->RU_list[ru_id]->common.rxdataF[i]; } } diff --git a/executables/nr-ru.c b/executables/nr-ru.c index 7edaaf98a8..33c58cc973 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -46,7 +46,7 @@ #include "PHY/defs_nr_common.h" #include "PHY/phy_extern.h" #include "PHY/NR_TRANSPORT/nr_transport_proto.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "SCHED_NR/sched_nr.h" #include "common/utils/LOG/log.h" @@ -1860,6 +1860,16 @@ static void NRRCconfig_RU(void) { RC.ru[j]->openair0_cfg.sdr_addrs = strdup(*(RUParamList.paramarray[j][RU_SDR_ADDRS].strptr)); } + if (config_isparamset(RUParamList.paramarray[j], RU_TX_SUBDEV)) { + RC.ru[j]->openair0_cfg.tx_subdev = strdup(*(RUParamList.paramarray[j][RU_TX_SUBDEV].strptr)); + LOG_I(PHY, "RU USRP tx subdev == %s\n", RC.ru[j]->openair0_cfg.tx_subdev); + } + + if (config_isparamset(RUParamList.paramarray[j], RU_RX_SUBDEV)) { + RC.ru[j]->openair0_cfg.rx_subdev = strdup(*(RUParamList.paramarray[j][RU_RX_SUBDEV].strptr)); + LOG_I(PHY, "RU USRP rx subdev == %s\n", RC.ru[j]->openair0_cfg.rx_subdev); + } + if (config_isparamset(RUParamList.paramarray[j], RU_SDR_CLK_SRC)) { if (strcmp(*(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr), "internal") == 0) { RC.ru[j]->openair0_cfg.clock_source = internal; diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 7d75dfbe36..120a7c0e65 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -59,10 +59,11 @@ unsigned short config_frames[4] = {2,9,11,13}; #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" +#include "pdcp.h" #include "intertask_interface.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "system.h" #include @@ -249,8 +250,8 @@ unsigned int build_rfdc(int dcoff_i_rxfe, int dcoff_q_rxfe) { #define KBLU "\x1B[34m" #define RESET "\033[0m" - -void exit_function(const char *file, const char *function, const int line, const char *s) { +void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) +{ int ru_id; if (s != NULL) { @@ -274,8 +275,12 @@ void exit_function(const char *file, const char *function, const int line, const } } - sleep(1); //allow lte-softmodem threads to exit first - exit(1); + if (assert) { + abort(); + } else { + sleep(1); // allow nr-softmodem threads to exit first + exit(EXIT_SUCCESS); + } } @@ -528,7 +533,7 @@ void wait_gNBs(void) { void terminate_task(task_id_t task_id, module_id_t mod_id) { LOG_I(GNB_APP, "sending TERMINATE_MESSAGE to task %s (%d)\n", itti_get_task_name(task_id), task_id); MessageDef *msg; - msg = itti_alloc_new_message (ENB_APP, 0, TERMINATE_MESSAGE); + msg = itti_alloc_new_message (TASK_ENB_APP, 0, TERMINATE_MESSAGE); itti_send_msg_to_task (task_id, ENB_MODULE_ID_TO_INSTANCE(mod_id), msg); } diff --git a/executables/nr-softmodem.h b/executables/nr-softmodem.h index f3bc7f5b71..63a2391826 100644 --- a/executables/nr-softmodem.h +++ b/executables/nr-softmodem.h @@ -15,23 +15,25 @@ /* command line parameters common to eNodeB and UE */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*----------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ -#define CMDLINE_PARAMS_DESC_GNB { \ - {"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \ - {"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \ - {"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i8ptr:&threequarter_fs, defintval:0, TYPE_INT8, 0}, \ - {"m" , CONFIG_HLP_DLMCS_PHYTEST,0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \ - {"l" , CONFIG_HLP_DLNL_PHYTEST,0, uptr:&target_dl_Nl, defintval:0, TYPE_UINT, 0}, \ - {"L" , CONFIG_HLP_ULNL_PHYTEST,0, uptr:&target_ul_Nl, defintval:0, TYPE_UINT, 0}, \ - {"t" , CONFIG_HLP_ULMCS_PHYTEST,0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \ - {"M" , CONFIG_HLP_DLBW_PHYTEST,0, uptr:&target_dl_bw, defintval:0, TYPE_UINT, 0}, \ - {"T" , CONFIG_HLP_ULBW_PHYTEST,0, uptr:&target_ul_bw, defintval:0, TYPE_UINT, 0}, \ - {"D" , CONFIG_HLP_DLBM_PHYTEST,0, u64ptr:&dlsch_slot_bitmap, defintval:0, TYPE_UINT64, 0}, \ - {"U" , CONFIG_HLP_ULBM_PHYTEST,0, u64ptr:&ulsch_slot_bitmap, defintval:0, TYPE_UINT64, 0}, \ - {"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defstrval:0, TYPE_INT, 0}, \ - {"ldpc-offload-enable", CONFIG_HLP_LDPC_OFFLOAD, 0, iptr:&ldpc_offload_flag, defstrval:0, TYPE_INT, 0}, \ - {"uecap_file", CONFIG_HLP_UECAP_FILE, 0, strptr:&uecap_file, defstrval:"./uecap_ports1.xml",TYPE_STRING, 0}, \ - {"s" , CONFIG_HLP_SNR, 0, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0}, \ - } +// clang-format off +#define CMDLINE_PARAMS_DESC_GNB { \ + {"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, .iptr=&single_thread_flag, .defintval=1, TYPE_INT, 0}, \ + {"A" , CONFIG_HLP_TADV, 0, .uptr=&timing_advance, .defintval=0, TYPE_UINT, 0}, \ + {"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, .i8ptr=&threequarter_fs, .defintval=0, TYPE_INT8, 0}, \ + {"m" , CONFIG_HLP_DLMCS_PHYTEST, 0, .uptr=&target_dl_mcs, .defintval=0, TYPE_UINT, 0}, \ + {"l" , CONFIG_HLP_DLNL_PHYTEST, 0, .uptr=&target_dl_Nl, .defintval=0, TYPE_UINT, 0}, \ + {"L" , CONFIG_HLP_ULNL_PHYTEST, 0, .uptr=&target_ul_Nl, .defintval=0, TYPE_UINT, 0}, \ + {"t" , CONFIG_HLP_ULMCS_PHYTEST, 0, .uptr=&target_ul_mcs, .defintval=0, TYPE_UINT, 0}, \ + {"M" , CONFIG_HLP_DLBW_PHYTEST, 0, .uptr=&target_dl_bw, .defintval=0, TYPE_UINT, 0}, \ + {"T" , CONFIG_HLP_ULBW_PHYTEST, 0, .uptr=&target_ul_bw, .defintval=0, TYPE_UINT, 0}, \ + {"D" , CONFIG_HLP_DLBM_PHYTEST, 0, .u64ptr=&dlsch_slot_bitmap, .defintval=0, TYPE_UINT64, 0}, \ + {"U" , CONFIG_HLP_ULBM_PHYTEST, 0, .u64ptr=&ulsch_slot_bitmap, .defintval=0, TYPE_UINT64, 0}, \ + {"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, .iptr=&usrp_tx_thread, .defstrval=0, TYPE_INT, 0}, \ + {"ldpc-offload-enable", CONFIG_HLP_LDPC_OFFLOAD, 0, .iptr=&ldpc_offload_flag, .defstrval=0, TYPE_INT, 0}, \ + {"uecap_file", CONFIG_HLP_UECAP_FILE, 0, .strptr=&uecap_file, .defstrval="./uecap_ports1.xml", TYPE_STRING, 0}, \ + {"s" , CONFIG_HLP_SNR, 0, .dblptr=&snr_dB, .defdblval=25, TYPE_DOUBLE, 0}, \ +} +// clang-format on extern uint32_t target_dl_mcs; extern uint32_t target_dl_Nl; diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 61e12a158f..075789e12b 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -24,7 +24,7 @@ #include #include "executables/nr-uesoftmodem.h" #include "PHY/phy_extern_nr_ue.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "NR_MAC_UE/mac_proto.h" #include "RRC/NR_UE/rrc_proto.h" #include "SCHED_NR_UE/phy_frame_config_nr.h" @@ -33,6 +33,7 @@ #include "executables/softmodem-common.h" #include "PHY/NR_REFSIG/refsig_defs_ue.h" #include "radio/COMMON/common_lib.h" +#include "pdcp.h" /* * NR SLOT PROCESSING SEQUENCE @@ -351,8 +352,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg) mac->scc_SIB->tdd_UL_DL_ConfigurationCommon, ul_info.slot_tx, mac->frame_type)) { LOG_D(NR_MAC, "Slot %d. calling nr_ue_ul_ind() and nr_ue_pucch_scheduler() from %s\n", ul_info.slot_tx, __FUNCTION__); - nr_ue_scheduler(NULL, &ul_info); - nr_ue_prach_scheduler(mod_id, ul_info.frame_tx, ul_info.slot_tx); + nr_ue_ul_scheduler(&ul_info); nr_ue_pucch_scheduler(mod_id, ul_info.frame_tx, ul_info.slot_tx, NULL); } if (!IS_SOFTMODEM_NOS1 && get_softmodem_params()->sa) { @@ -687,21 +687,33 @@ void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) { LOG_I(PHY,"Resynchronizing RX by %d samples (mode = %d)\n",UE->rx_offset,UE->mode); - *timestamp += UE->frame_parms.get_samples_per_slot(1,&UE->frame_parms); - for ( int size=UE->rx_offset ; size > 0 ; size -= UE->frame_parms.samples_per_subframe ) { - int unitTransfer=size>UE->frame_parms.samples_per_subframe ? UE->frame_parms.samples_per_subframe : size ; - // we write before read because gNB waits for UE to write and both executions halt - // this happens here as the read size is samples_per_subframe which is very much larger than samp_per_slot - if (IS_SOFTMODEM_RFSIM) dummyWrite(UE,*timestamp, unitTransfer); - AssertFatal(unitTransfer == - UE->rfdevice.trx_read_func(&UE->rfdevice, - timestamp, - (void **)UE->common_vars.rxdata, - unitTransfer, - UE->frame_parms.nb_antennas_rx),""); - *timestamp += unitTransfer; // this does not affect the read but needed for RFSIM write + if (IS_SOFTMODEM_IQPLAYER || IS_SOFTMODEM_IQRECORDER) { + // Resynchonize by slot (will work with numerology 1 only) + for ( int size=UE->rx_offset ; size > 0 ; size -= UE->frame_parms.samples_per_subframe/2 ) { + int unitTransfer=size>UE->frame_parms.samples_per_subframe/2 ? UE->frame_parms.samples_per_subframe/2 : size ; + AssertFatal(unitTransfer == + UE->rfdevice.trx_read_func(&UE->rfdevice, + timestamp, + (void **)UE->common_vars.rxdata, + unitTransfer, + UE->frame_parms.nb_antennas_rx),""); + } + } else { + *timestamp += UE->frame_parms.get_samples_per_slot(1,&UE->frame_parms); + for ( int size=UE->rx_offset ; size > 0 ; size -= UE->frame_parms.samples_per_subframe ) { + int unitTransfer=size>UE->frame_parms.samples_per_subframe ? UE->frame_parms.samples_per_subframe : size ; + // we write before read because gNB waits for UE to write and both executions halt + // this happens here as the read size is samples_per_subframe which is very much larger than samp_per_slot + if (IS_SOFTMODEM_RFSIM) dummyWrite(UE,*timestamp, unitTransfer); + AssertFatal(unitTransfer == + UE->rfdevice.trx_read_func(&UE->rfdevice, + timestamp, + (void **)UE->common_vars.rxdata, + unitTransfer, + UE->frame_parms.nb_antennas_rx),""); + *timestamp += unitTransfer; // this does not affect the read but needed for RFSIM write + } } - } int computeSamplesShift(PHY_VARS_NR_UE *UE) { @@ -773,6 +785,11 @@ void *UE_thread(void *arg) { syncRunning=false; syncData_t *tmp=(syncData_t *)NotifiedFifoData(res); if (UE->is_synchronized) { + LOG_I(PHY,"UE synchronized decoded_frame_rx=%d UE->init_sync_frame=%d trashed_frames=%d\n", + decoded_frame_rx, + UE->init_sync_frame, + trashed_frames); + decoded_frame_rx=(((mac->mib->systemFrameNumber.buf[0] >> mac->mib->systemFrameNumber.bits_unused)<<4) | tmp->proc.decoded_frame_rx); // shift the frame index with all the frames we trashed meanwhile we perform the synch search decoded_frame_rx=(decoded_frame_rx + UE->init_sync_frame + trashed_frames) % MAX_FRAME_NUMBER; @@ -780,8 +797,16 @@ void *UE_thread(void *arg) { delNotifiedFIFO_elt(res); start_rx_stream=0; } else { - readFrame(UE, ×tamp, true); - trashed_frames+=2; + if (IS_SOFTMODEM_IQPLAYER || IS_SOFTMODEM_IQRECORDER) { + // For IQ recorder/player we force synchronization to happen in 280 ms + while (trashed_frames != 28) { + readFrame(UE, ×tamp, true); + trashed_frames+=2; + } + } else { + readFrame(UE, ×tamp, true); + trashed_frames+=2; + } continue; } } diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index d64d2cdb2e..eb6e160ec3 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -59,10 +59,11 @@ unsigned short config_frames[4] = {2,9,11,13}; #include "UTIL/OPT/opt.h" #include "enb_config.h" +#include "pdcp.h" #include "intertask_interface.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "system.h" #include #include @@ -213,7 +214,8 @@ int create_tasks_nrue(uint32_t ue_nb) { return 0; } -void exit_function(const char *file, const char *function, const int line, const char *s) { +void exit_function(const char *file, const char *function, const int line, const char *s, const int assert) +{ int CC_id; if (s != NULL) { @@ -229,8 +231,12 @@ void exit_function(const char *file, const char *function, const int line, const } } - sleep(1); //allow lte-softmodem threads to exit first - exit(1); + if (assert) { + abort(); + } else { + sleep(1); // allow lte-softmodem threads to exit first + exit(EXIT_SUCCESS); + } } uint64_t get_nrUE_optmask(void) { @@ -504,13 +510,13 @@ int main( int argc, char **argv ) { nr_band); } else{ - if(mac->if_module != NULL && mac->if_module->phy_config_request != NULL) - mac->if_module->phy_config_request(&mac->phy_config); - + DevAssert(mac->if_module != NULL && mac->if_module->phy_config_request != NULL); + mac->if_module->phy_config_request(&mac->phy_config); + mac->phy_config_request_sent = true; fapi_nr_config_request_t *nrUE_config = &UE[CC_id]->nrUE_config; nr_init_frame_parms_ue(&UE[CC_id]->frame_parms, nrUE_config, - *mac->scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]); + *mac->scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]); } init_nr_ue_vars(UE[CC_id], 0, abstraction_flag); diff --git a/executables/nr-uesoftmodem.h b/executables/nr-uesoftmodem.h index d19b5b9ce1..60b9d91f72 100644 --- a/executables/nr-uesoftmodem.h +++ b/executables/nr-uesoftmodem.h @@ -28,54 +28,56 @@ /* command line parameters defining UE running mode */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*------------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define CMDLINE_NRUEPARAMS_DESC { \ - {"usrp-args", CONFIG_HLP_USRP_ARGS, 0, strptr:&usrp_args, defstrval:"type=b200", TYPE_STRING, 0}, \ - {"tx_subdev", CONFIG_HLP_TX_SUBDEV, 0, strptr:&tx_subdev, defstrval:NULL, TYPE_STRING, 0}, \ - {"rx_subdev", CONFIG_HLP_RX_SUBDEV, 0, strptr:&rx_subdev, defstrval:NULL, TYPE_STRING, 0}, \ - {"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \ - {"dlsch-parallel", CONFIG_HLP_DLSCH_PARA, 0, u8ptr:NULL, defintval:0, TYPE_UINT8, 0}, \ - {"offset-divisor", CONFIG_HLP_OFFSET_DIV, 0, uptr:&nrUE_params.ofdm_offset_divisor, defuintval:8, TYPE_UINT32, 0}, \ - {"max-ldpc-iterations", CONFIG_HLP_MAX_LDPC_ITERATIONS, 0, u8ptr:&nrUE_params.max_ldpc_iterations, defuintval:5, TYPE_UINT8, 0}, \ - {"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&nr_dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \ - {"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&vcdflag, defintval:0, TYPE_INT, 0}, \ - {"uecap_file", CONFIG_HLP_UECAP_FILE, 0, strptr:&uecap_file, defstrval:"./uecap_ports1.xml", TYPE_STRING, 0}, \ - {"rrc_config_path", CONFIG_HLP_RRC_CFG_PATH,0, strptr:&rrc_config_path, defstrval:"./", TYPE_STRING, 0}, \ - {"ue-idx-standalone", NULL, 0, u16ptr:&ue_idx_standalone, defuintval:0xFFFF, TYPE_UINT16, 0} \ + {"usrp-args", CONFIG_HLP_USRP_ARGS, 0, .strptr=&usrp_args, .defstrval="type=b200", TYPE_STRING, 0}, \ + {"tx_subdev", CONFIG_HLP_TX_SUBDEV, 0, .strptr=&tx_subdev, .defstrval=NULL, TYPE_STRING, 0}, \ + {"rx_subdev", CONFIG_HLP_RX_SUBDEV, 0, .strptr=&rx_subdev, .defstrval=NULL, TYPE_STRING, 0}, \ + {"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, .iptr=&single_thread_flag, .defintval=1, TYPE_INT, 0}, \ + {"dlsch-parallel", CONFIG_HLP_DLSCH_PARA, 0, .u8ptr=NULL, .defintval=0, TYPE_UINT8, 0}, \ + {"offset-divisor", CONFIG_HLP_OFFSET_DIV, 0, .uptr=&nrUE_params.ofdm_offset_divisor, .defuintval=8, TYPE_UINT32, 0}, \ + {"max-ldpc-iterations", CONFIG_HLP_MAX_LDPC_ITERATIONS, 0, .u8ptr=&nrUE_params.max_ldpc_iterations, .defuintval=5, TYPE_UINT8, 0}, \ + {"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, .iptr=(int32_t *)&nr_dlsch_demod_shift, .defintval=0, TYPE_INT, 0}, \ + {"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, .iptr=&vcdflag, .defintval=0, TYPE_INT, 0}, \ + {"uecap_file", CONFIG_HLP_UECAP_FILE, 0, .strptr=&uecap_file, .defstrval="./uecap_ports1.xml", TYPE_STRING, 0}, \ + {"rrc_config_path", CONFIG_HLP_RRC_CFG_PATH, 0, .strptr=&rrc_config_path, .defstrval="./", TYPE_STRING, 0}, \ + {"ue-idx-standalone", NULL, 0, .u16ptr=&ue_idx_standalone, .defuintval=0xFFFF, TYPE_UINT16, 0} \ } - +// clang-format on /*------------------------------------------------------------------------------------------------------------------------------------------*/ /* command line parameters defining UE running mode */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*------------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define CMDLINE_NRUE_PHYPARAMS_DESC { \ - { CALIBRX_OPT, CONFIG_HLP_CALUER, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \ - { CALIBRXMED_OPT, CONFIG_HLP_CALUERM, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \ - { CALIBRXBYP_OPT, CONFIG_HLP_CALUERB, 0, iptr:&rx_input_level_dBm, defintval:0, TYPE_INT, 0}, \ - { DBGPRACH_OPT, CONFIG_HLP_DBGUEPR, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \ - { NOL2CONNECT_OPT, CONFIG_HLP_NOL2CN, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \ - { CALIBPRACH_OPT, CONFIG_HLP_CALPRACH, PARAMFLAG_BOOL, uptr:NULL, defuintval:1, TYPE_INT, 0}, \ - { DUMPFRAME_OPT, CONFIG_HLP_DUMPFRAME, PARAMFLAG_BOOL, iptr:&dumpframe, defintval:0, TYPE_INT, 0}, \ - {"ue-rxgain", CONFIG_HLP_UERXG, 0, dblptr:&(rx_gain[0][0]), defdblval:110, TYPE_DOUBLE,0}, \ - {"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0, dblptr:&rx_gain_off, defdblval:0, TYPE_DOUBLE,0}, \ - {"ue-txgain", CONFIG_HLP_UETXG, 0, dblptr:&(tx_gain[0][0]), defdblval:0, TYPE_DOUBLE,0}, \ - {"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0, u8ptr:&(fp->nb_antennas_rx), defuintval:1, TYPE_UINT8, 0}, \ - {"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0, u8ptr:&(fp->nb_antennas_tx), defuintval:1, TYPE_UINT8, 0}, \ - {"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&(UE->UE_scan_carrier), defintval:0, TYPE_INT, 0}, \ - {"ue-fo-compensation", CONFIG_HLP_UEFO, PARAMFLAG_BOOL, iptr:&(UE->UE_fo_compensation), defintval:0, TYPE_INT, 0}, \ - {"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \ - {"A" , CONFIG_HLP_TADV, 0, iptr:&(UE->timing_advance), defintval:0, TYPE_INT, 0}, \ - {"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, u8ptr:&(fp->threequarter_fs), defintval:0, TYPE_UINT8, 0}, \ - {"r" , CONFIG_HLP_PRB_SA, 0, iptr:&(fp->N_RB_DL), defintval:106, TYPE_UINT, 0}, \ - {"ssb", CONFIG_HLP_SSC, 0, u16ptr:&(fp->ssb_start_subcarrier), defintval:516, TYPE_UINT16,0}, \ - {"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \ - {"if_freq" , CONFIG_HLP_IF_FREQ, 0, u64ptr:&(UE->if_freq), defuintval:0, TYPE_UINT64,0}, \ - {"if_freq_off" , CONFIG_HLP_IF_FREQ_OFF, 0, iptr:&(UE->if_freq_off), defuintval:0, TYPE_INT, 0}, \ - {"chest-freq", CONFIG_HLP_CHESTFREQ, 0, iptr:&(UE->chest_freq), defintval:0, TYPE_INT, 0}, \ - {"chest-time", CONFIG_HLP_CHESTTIME, 0, iptr:&(UE->chest_time), defintval:0, TYPE_INT, 0}, \ - {"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, iptr:&(UE->no_timing_correction), defintval:0, TYPE_INT, 0}, \ + { CALIBRX_OPT, CONFIG_HLP_CALUER, 0, .iptr=&rx_input_level_dBm, .defintval=0, TYPE_INT, 0}, \ + { CALIBRXMED_OPT, CONFIG_HLP_CALUERM, 0, .iptr=&rx_input_level_dBm, .defintval=0, TYPE_INT, 0}, \ + { CALIBRXBYP_OPT, CONFIG_HLP_CALUERB, 0, .iptr=&rx_input_level_dBm, .defintval=0, TYPE_INT, 0}, \ + { DBGPRACH_OPT, CONFIG_HLP_DBGUEPR, PARAMFLAG_BOOL, .uptr=NULL, .defuintval=1, TYPE_INT, 0}, \ + { NOL2CONNECT_OPT, CONFIG_HLP_NOL2CN, PARAMFLAG_BOOL, .uptr=NULL, .defuintval=1, TYPE_INT, 0}, \ + { CALIBPRACH_OPT, CONFIG_HLP_CALPRACH, PARAMFLAG_BOOL, .uptr=NULL, .defuintval=1, TYPE_INT, 0}, \ + { DUMPFRAME_OPT, CONFIG_HLP_DUMPFRAME, PARAMFLAG_BOOL, .iptr=&dumpframe, .defintval=0, TYPE_INT, 0}, \ + {"ue-rxgain", CONFIG_HLP_UERXG, 0, .dblptr=&(rx_gain[0][0]), .defdblval=110, TYPE_DOUBLE, 0}, \ + {"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0, .dblptr=&rx_gain_off, .defdblval=0, TYPE_DOUBLE, 0}, \ + {"ue-txgain", CONFIG_HLP_UETXG, 0, .dblptr=&(tx_gain[0][0]), .defdblval=0, TYPE_DOUBLE, 0}, \ + {"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0, .u8ptr=&(fp->nb_antennas_rx), .defuintval=1, TYPE_UINT8, 0}, \ + {"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0, .u8ptr=&(fp->nb_antennas_tx), .defuintval=1, TYPE_UINT8, 0}, \ + {"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, .iptr=&(UE->UE_scan_carrier), .defintval=0, TYPE_INT, 0}, \ + {"ue-fo-compensation", CONFIG_HLP_UEFO, PARAMFLAG_BOOL, .iptr=&(UE->UE_fo_compensation), .defintval=0, TYPE_INT, 0}, \ + {"ue-max-power", NULL, 0, .iptr=&(tx_max_power[0]), .defintval=90, TYPE_INT, 0}, \ + {"A" , CONFIG_HLP_TADV, 0, .iptr=&(UE->timing_advance), .defintval=0, TYPE_INT, 0}, \ + {"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, .u8ptr=&(fp->threequarter_fs), .defintval=0, TYPE_UINT8, 0}, \ + {"r" , CONFIG_HLP_PRB_SA, 0, .iptr=&(fp->N_RB_DL), .defintval=106, TYPE_UINT, 0}, \ + {"ssb", CONFIG_HLP_SSC, 0, .u16ptr=&(fp->ssb_start_subcarrier), .defintval=516, TYPE_UINT16, 0}, \ + {"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, .iptr=&tddflag, .defintval=0, TYPE_INT, 0}, \ + {"if_freq" , CONFIG_HLP_IF_FREQ, 0, .u64ptr=&(UE->if_freq), .defuintval=0, TYPE_UINT64, 0}, \ + {"if_freq_off" , CONFIG_HLP_IF_FREQ_OFF, 0, .iptr=&(UE->if_freq_off), .defuintval=0, TYPE_INT, 0}, \ + {"chest-freq", CONFIG_HLP_CHESTFREQ, 0, .iptr=&(UE->chest_freq), .defintval=0, TYPE_INT, 0}, \ + {"chest-time", CONFIG_HLP_CHESTTIME, 0, .iptr=&(UE->chest_time), .defintval=0, TYPE_INT, 0}, \ + {"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, .iptr=&(UE->no_timing_correction), .defintval=0, TYPE_INT, 0}, \ } - +// clang-format on typedef struct { uint64_t optmask; //mask to store boolean config options diff --git a/executables/softmodem-common.c b/executables/softmodem-common.c index d420b3ac1c..25672f2280 100644 --- a/executables/softmodem-common.c +++ b/executables/softmodem-common.c @@ -146,7 +146,6 @@ void get_common_options(uint32_t execmask) { } if (nokrnmod) { - printf("nokrnmod bit enabled \n"); set_softmodem_optmask(SOFTMODEM_NOKRNMOD_BIT); } @@ -220,7 +219,7 @@ void signal_handler(int sig) { softmodem_printresources(sig,(telnet_printfunc_t)printf); if (sig != SOFTMODEM_RTSIGNAL) { printf("Linux signal %s...\n",strsignal(sig)); - exit_function(__FILE__, __FUNCTION__, __LINE__,"softmodem starting exit procedure\n"); + exit_function(__FILE__, __FUNCTION__, __LINE__, "softmodem starting exit procedure\n", OAI_EXIT_NORMAL); } } } diff --git a/executables/softmodem-common.h b/executables/softmodem-common.h index 2b430ee8fb..3044acf851 100644 --- a/executables/softmodem-common.h +++ b/executables/softmodem-common.h @@ -137,50 +137,49 @@ extern "C" #define DEFAULT_RFCONFIG_FILE "/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR40.dat"; extern int usrp_tx_thread; -extern char *nfapi_str; - +// clang-format off #define CMDLINE_PARAMS_DESC { \ - {"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:&RF_CONFIG_FILE, defstrval:NULL, TYPE_STRING, 0},\ - {"thread-pool", CONFIG_HLP_TPOOL, 0, strptr:&TP_CONFIG, defstrval:"-1,-1,-1,-1,-1,-1,-1,-1", TYPE_STRING, 0}, \ - {"reorder-thread-disable",CONFIG_HLP_REORDER, PARAMFLAG_BOOL, iptr:&REORDER_THREAD_DISABLE, defintval:0, TYPE_INT, 0}, \ - {"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&PHY_TEST, defintval:0, TYPE_INT, 0}, \ - {"do-ra", CONFIG_HLP_DORA, PARAMFLAG_BOOL, iptr:&DO_RA, defintval:0, TYPE_INT, 0}, \ - {"sa", CONFIG_HLP_SA, PARAMFLAG_BOOL, iptr:&SA, defintval:0, TYPE_INT, 0}, \ - {"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&USIM_TEST, defintval:0, TYPE_UINT8, 0}, \ - {"clock-source", CONFIG_HLP_CLK, 0, uptr:&CLOCK_SOURCE, defintval:0, TYPE_UINT, 0}, \ - {"time-source", CONFIG_HLP_TME, 0, uptr:&TIMING_SOURCE, defintval:0, TYPE_UINT, 0}, \ - {"tune-offset", CONFIG_HLP_TUNE_OFFSET, 0, dblptr:&TUNE_OFFSET, defintval:0, TYPE_DOUBLE, 0}, \ - {"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&WAIT_FOR_SYNC, defintval:0, TYPE_INT, 0}, \ - {"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&SINGLE_THREAD_FLAG, defintval:0, TYPE_INT, 0}, \ - {"C" , CONFIG_HLP_DLF, 0, u64ptr:&(downlink_frequency[0][0]), defuintval:0, TYPE_UINT64, 0}, \ - {"CO" , CONFIG_HLP_ULF, 0, iptr:&(uplink_frequency_offset[0][0]), defintval:0, TYPE_INT, 0}, \ - {"a" , CONFIG_HLP_CHOFF, 0, iptr:&CHAIN_OFFSET, defintval:0, TYPE_INT, 0}, \ - {"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, uptr:&do_forms, defintval:0, TYPE_UINT, 0}, \ - {"dqt" , CONFIG_HLP_SOFTS_QT, PARAMFLAG_BOOL, uptr:&do_forms_qt, defintval:0, TYPE_UINT, 0}, \ - {"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \ - {"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&NUMEROLOGY, defintval:1, TYPE_INT, 0}, \ - {"band" , CONFIG_HLP_BAND, PARAMFLAG_BOOL, iptr:&BAND, defintval:78, TYPE_INT, 0}, \ - {"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&EMULATE_RF, defintval:0, TYPE_INT, 0}, \ - {"parallel-config", CONFIG_HLP_PARALLEL_CMD, 0, strptr:¶llel_config, defstrval:NULL, TYPE_STRING, 0}, \ - {"worker-config", CONFIG_HLP_WORKER_CMD, 0, strptr:&worker_config, defstrval:NULL, TYPE_STRING, 0}, \ - {"noS1", CONFIG_HLP_NOS1, PARAMFLAG_BOOL, uptr:&noS1, defintval:0, TYPE_UINT, 0}, \ - {"rfsim", CONFIG_HLP_RFSIM, PARAMFLAG_BOOL, uptr:&rfsim, defintval:0, TYPE_UINT, 0}, \ - {"nokrnmod", CONFIG_HLP_NOKRNMOD, PARAMFLAG_BOOL, uptr:&nokrnmod, defintval:0, TYPE_UINT, 0}, \ - {"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, uptr:&nonbiot, defuintval:0, TYPE_UINT, 0}, \ - {"chest-freq", CONFIG_HLP_CHESTFREQ, 0, iptr:&CHEST_FREQ, defintval:0, TYPE_INT, 0}, \ - {"chest-time", CONFIG_HLP_CHESTTIME, 0, iptr:&CHEST_TIME, defintval:0, TYPE_INT, 0}, \ - {"nsa", CONFIG_HLP_NSA, PARAMFLAG_BOOL, iptr:&NSA, defintval:0, TYPE_INT, 0}, \ - {"node-number", NULL, 0, u16ptr:&NODE_NUMBER, defuintval:0, TYPE_UINT16, 0}, \ - {"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defintval:0, TYPE_INT, 0}, \ - {"nfapi", CONFIG_HLP_NFAPI, 0, strptr:&nfapi_str, defstrval:"MONOLITHIC", TYPE_STRING, 0}, \ - {"non-stop", CONFIG_HLP_NONSTOP, PARAMFLAG_BOOL, iptr:&NON_STOP, defintval:0, TYPE_INT, 0}, \ - {"emulate-l1", CONFIG_L1_EMULATOR, PARAMFLAG_BOOL, iptr:&EMULATE_L1, defintval:0, TYPE_INT, 0}, \ - {"continuous-tx", CONFIG_HLP_CONTINUOUS_TX,PARAMFLAG_BOOL, iptr:&CONTINUOUS_TX, defintval:0, TYPE_INT, 0}, \ - {"disable-stats", CONFIG_HLP_STATS_DISABLE, PARAMFLAG_BOOL, iptr:&stats_disabled, defintval:0, TYPE_INT, 0}, \ - } - - + {"rf-config-file", CONFIG_HLP_RFCFGF, 0, .strptr=&RF_CONFIG_FILE, .defstrval=NULL, TYPE_STRING, 0}, \ + {"thread-pool", CONFIG_HLP_TPOOL, 0, .strptr=&TP_CONFIG, .defstrval="-1,-1,-1,-1,-1,-1,-1,-1", TYPE_STRING, 0}, \ + {"reorder-thread-disable",CONFIG_HLP_REORDER, PARAMFLAG_BOOL, .iptr:&REORDER_THREAD_DISABLE, .defintval:0, TYPE_INT, 0}, \ + {"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, .iptr=&PHY_TEST, .defintval=0, TYPE_INT, 0}, \ + {"do-ra", CONFIG_HLP_DORA, PARAMFLAG_BOOL, .iptr=&DO_RA, .defintval=0, TYPE_INT, 0}, \ + {"sa", CONFIG_HLP_SA, PARAMFLAG_BOOL, .iptr=&SA, .defintval=0, TYPE_INT, 0}, \ + {"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, .u8ptr=&USIM_TEST, .defintval=0, TYPE_UINT8, 0}, \ + {"clock-source", CONFIG_HLP_CLK, 0, .uptr=&CLOCK_SOURCE, .defintval=0, TYPE_UINT, 0}, \ + {"time-source", CONFIG_HLP_TME, 0, .uptr=&TIMING_SOURCE, .defintval=0, TYPE_UINT, 0}, \ + {"tune-offset", CONFIG_HLP_TUNE_OFFSET, 0, .dblptr=&TUNE_OFFSET, .defintval=0, TYPE_DOUBLE, 0}, \ + {"wait-for-sync", NULL, PARAMFLAG_BOOL, .iptr=&WAIT_FOR_SYNC, .defintval=0, TYPE_INT, 0}, \ + {"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, .iptr=&SINGLE_THREAD_FLAG, .defintval=0, TYPE_INT, 0}, \ + {"C" , CONFIG_HLP_DLF, 0, .u64ptr=&(downlink_frequency[0][0]), .defuintval=0, TYPE_UINT64, 0}, \ + {"CO" , CONFIG_HLP_ULF, 0, .iptr=&(uplink_frequency_offset[0][0]), .defintval=0, TYPE_INT, 0}, \ + {"a" , CONFIG_HLP_CHOFF, 0, .iptr=&CHAIN_OFFSET, .defintval=0, TYPE_INT, 0}, \ + {"d" , CONFIG_HLP_SOFTS, PARAMFLAG_BOOL, .uptr=&do_forms, .defintval=0, TYPE_UINT, 0}, \ + {"dqt" , CONFIG_HLP_SOFTS_QT, PARAMFLAG_BOOL, .uptr=&do_forms_qt, .defintval=0, TYPE_UINT, 0}, \ + {"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, .iptr=&opp_enabled, .defintval=0, TYPE_INT, 0}, \ + {"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, .iptr=&NUMEROLOGY, .defintval=1, TYPE_INT, 0}, \ + {"band" , CONFIG_HLP_BAND, PARAMFLAG_BOOL, .iptr=&BAND, .defintval=78, TYPE_INT, 0}, \ + {"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, .iptr=&EMULATE_RF, .defintval=0, TYPE_INT, 0}, \ + {"parallel-config", CONFIG_HLP_PARALLEL_CMD, 0, .strptr=¶llel_config, .defstrval=NULL, TYPE_STRING, 0}, \ + {"worker-config", CONFIG_HLP_WORKER_CMD, 0, .strptr=&worker_config, .defstrval=NULL, TYPE_STRING, 0}, \ + {"noS1", CONFIG_HLP_NOS1, PARAMFLAG_BOOL, .uptr=&noS1, .defintval=0, TYPE_UINT, 0}, \ + {"rfsim", CONFIG_HLP_RFSIM, PARAMFLAG_BOOL, .uptr=&rfsim, .defintval=0, TYPE_UINT, 0}, \ + {"nokrnmod", CONFIG_HLP_NOKRNMOD, PARAMFLAG_BOOL, .uptr=&nokrnmod, .defintval=1, TYPE_UINT, 0}, \ + {"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, .uptr=&nonbiot, .defuintval=0, TYPE_UINT, 0}, \ + {"chest-freq", CONFIG_HLP_CHESTFREQ, 0, .iptr=&CHEST_FREQ, .defintval=0, TYPE_INT, 0}, \ + {"chest-time", CONFIG_HLP_CHESTTIME, 0, .iptr=&CHEST_TIME, .defintval=0, TYPE_INT, 0}, \ + {"nsa", CONFIG_HLP_NSA, PARAMFLAG_BOOL, .iptr=&NSA, .defintval=0, TYPE_INT, 0}, \ + {"node-number", NULL, 0, .u16ptr=&NODE_NUMBER, .defuintval=0, TYPE_UINT16, 0}, \ + {"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, .iptr=&usrp_tx_thread, .defstrval=0, TYPE_INT, 0}, \ + {"nfapi", CONFIG_HLP_NFAPI, 0, .strptr=NULL, .defstrval="MONOLITHIC", TYPE_STRING, 0}, \ + {"non-stop", CONFIG_HLP_NONSTOP, PARAMFLAG_BOOL, .iptr=&NON_STOP, .defintval=0, TYPE_INT, 0}, \ + {"emulate-l1", CONFIG_L1_EMULATOR, PARAMFLAG_BOOL, .iptr=&EMULATE_L1, .defintval=0, TYPE_INT, 0}, \ + {"continuous-tx", CONFIG_HLP_CONTINUOUS_TX, PARAMFLAG_BOOL, .iptr=&CONTINUOUS_TX, .defintval=0, TYPE_INT, 0}, \ + {"disable-stats", CONFIG_HLP_STATS_DISABLE, PARAMFLAG_BOOL, .iptr=&stats_disabled, .defintval=0, TYPE_INT, 0}, \ +} +// clang-format on +// clang-format off #define CMDLINE_PARAMS_CHECK_DESC { \ { .s5 = { NULL } }, \ { .s5 = { NULL } }, \ @@ -223,6 +222,7 @@ extern char *nfapi_str; { .s5 = { NULL } }, \ { .s5 = { NULL } }, \ } +// clang-format on #define CONFIG_HLP_NSA "Enable NSA mode \n" #define CONFIG_HLP_FLOG "Enable online log \n" @@ -235,23 +235,28 @@ extern char *nfapi_str; /* command line parameters for LOG utility */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-------------------------------------------------------------------------------------------------------------------------------------------------*/ -#define CMDLINE_LOGPARAMS_DESC \ - { \ - {CONFIG_FLOG_OPT, CONFIG_HLP_FLOG, 0, uptr : &online_log_messages, defintval : 1, TYPE_INT, 0}, {CONFIG_LOGL_OPT, CONFIG_HLP_LOGL, 0, uptr : &glog_level, defintval : 0, TYPE_UINT, 0}, \ - {"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL | PARAMFLAG_CMDLINEONLY, uptr : &start_telnetsrv, defintval : 0, TYPE_UINT, 0}, \ - {"websrv", CONFIG_HLP_WEB, PARAMFLAG_BOOL | PARAMFLAG_CMDLINEONLY, uptr : &start_websrv, defintval : 0, TYPE_UINT, 0}, \ - {"log-mem", NULL, 0, strptr : &logmem_filename, defstrval : NULL, TYPE_STRING, 0}, {"telnetclt", NULL, 0, uptr : &start_telnetclt, defstrval : NULL, TYPE_UINT, 0}, \ - } +// clang-format off +#define CMDLINE_LOGPARAMS_DESC { \ + {CONFIG_FLOG_OPT, CONFIG_HLP_FLOG, 0, .uptr = &online_log_messages, .defintval = 1, TYPE_INT, 0}, \ + {CONFIG_LOGL_OPT, CONFIG_HLP_LOGL, 0, .uptr = &glog_level, .defintval = 0, TYPE_UINT, 0}, \ + {"telnetsrv", CONFIG_HLP_TELN, PARAMFLAG_BOOL | PARAMFLAG_CMDLINEONLY, .uptr = &start_telnetsrv, .defintval = 0, TYPE_UINT, 0}, \ + {"websrv", CONFIG_HLP_WEB, PARAMFLAG_BOOL | PARAMFLAG_CMDLINEONLY, .uptr = &start_websrv, .defintval = 0, TYPE_UINT, 0}, \ + {"log-mem", NULL, 0, .strptr = &logmem_filename, .defstrval = NULL, TYPE_STRING, 0}, \ + {"telnetclt", NULL, 0, .uptr = &start_telnetclt, .defstrval = NULL, TYPE_UINT, 0}, \ +} +// clang-format on /* check function for global log level */ +// clang-format off #define CMDLINE_LOGPARAMS_CHECK_DESC { \ - { .s5= {NULL} } , \ - { .s2= {config_check_intrange, {0,4}}}, \ - { .s5= {NULL} } , \ - { .s5= {NULL} } , \ - { .s5= {NULL} } , \ - { .s5= {NULL} } , \ - } + { .s5= {NULL} } , \ + { .s2= {config_check_intrange, {0,4}}}, \ + { .s5= {NULL} } , \ + { .s5= {NULL} } , \ + { .s5= {NULL} } , \ + { .s5= {NULL} } , \ +} +// clang-format on /***************************************************************************************************************************************/ @@ -264,6 +269,7 @@ extern char *nfapi_str; #define SOFTMODEM_DOSCOPE_BIT (1<<15) #define SOFTMODEM_RECPLAY_BIT (1<<16) #define SOFTMODEM_TELNETCLT_BIT (1<<17) +#define SOFTMODEM_RECRECORD_BIT (1<<18) #define SOFTMODEM_ENB_BIT (1<<20) #define SOFTMODEM_GNB_BIT (1<<21) #define SOFTMODEM_4GUE_BIT (1<<22) @@ -284,6 +290,7 @@ extern char *nfapi_str; #define IS_SOFTMODEM_DOSCOPE ( get_softmodem_optmask() & SOFTMODEM_DOSCOPE_BIT) #define IS_SOFTMODEM_DOSCOPE_QT ( get_softmodem_optmask() & SOFTMODEM_DOSCOPE_QT_BIT) #define IS_SOFTMODEM_IQPLAYER ( get_softmodem_optmask() & SOFTMODEM_RECPLAY_BIT) +#define IS_SOFTMODEM_IQRECORDER ( get_softmodem_optmask() & SOFTMODEM_RECRECORD_BIT) #define IS_SOFTMODEM_TELNETCLT_BIT ( get_softmodem_optmask() & SOFTMODEM_TELNETCLT_BIT) #define IS_SOFTMODEM_ENB_BIT ( get_softmodem_optmask() & SOFTMODEM_ENB_BIT) #define IS_SOFTMODEM_GNB_BIT ( get_softmodem_optmask() & SOFTMODEM_GNB_BIT) diff --git a/maketags b/maketags index 87f445dd21..4c25bf6292 100755 --- a/maketags +++ b/maketags @@ -1,4 +1,4 @@ #!/bin/sh echo "building ctags for openair1 and openair2 ..." -ctags -e -R --exclude=openair1/DOCS/ --exclude=openair2/DOCS/ --exclude=openair1/SIMULATION/ --exclude=targets/DOCS/ --exclude=targets/PROJECTS/ openair1 openair2 openair3 targets cmake_targets common nfapi executables sdr +ctags -e -R --exclude=openair1/DOCS/ --exclude=openair2/DOCS/ --exclude=openair1/SIMULATION/ --exclude=targets/DOCS/ --exclude=targets/PROJECTS/ openair1 openair2 openair3 targets cmake_targets common nfapi executables radio diff --git a/nfapi/oai_integration/gnb_ind_vars.c b/nfapi/oai_integration/gnb_ind_vars.c index 148c28a5c4..f1f22bcc66 100644 --- a/nfapi/oai_integration/gnb_ind_vars.c +++ b/nfapi/oai_integration/gnb_ind_vars.c @@ -1,3 +1,24 @@ +/* + * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The OpenAirInterface Software Alliance licenses this file to You under + * the OAI Public License, Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.openairinterface.org/?page_id=698 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *------------------------------------------------------------------------------- + * For more information about the OpenAirInterface (OAI) Software Alliance: + * contact@openairinterface.org + */ + #include "gnb_ind_vars.h" queue_t gnb_rach_ind_queue; diff --git a/nfapi/oai_integration/nfapi_pnf.c b/nfapi/oai_integration/nfapi_pnf.c index 559c90f3dc..0ba6df03b9 100644 --- a/nfapi/oai_integration/nfapi_pnf.c +++ b/nfapi/oai_integration/nfapi_pnf.c @@ -52,6 +52,7 @@ #include "common/utils/LOG/log.h" #include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "PHY/LTE_TRANSPORT/transport_proto.h" #include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h" #include "openair1/SCHED_NR/fapi_nr_l1.h" @@ -495,7 +496,7 @@ void nfapi_nr_send_pnf_start_resp(nfapi_pnf_config_t *config, uint16_t phy_id) { memset(&start_resp, 0, sizeof(start_resp)); start_resp.header.message_id = NFAPI_NR_PHY_MSG_TYPE_START_RESPONSE; start_resp.header.phy_id = phy_id; - start_resp.error_code = NFAPI_MSG_OK; + start_resp.error_code = NFAPI_NR_START_MSG_OK; nfapi_nr_pnf_start_resp(config, &start_resp); } diff --git a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h index f14d5220bd..5e8fde4487 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h @@ -1085,7 +1085,7 @@ typedef struct // These TLVs are used by the VNF to configure the RF in the PNF nfapi_uint16_tlv_t max_transmit_power; - nfapi_uint16_tlv_t earfcn; + nfapi_uint32_tlv_t earfcn; nfapi_nmm_frequency_bands_t nmm_gsm_frequency_bands; nfapi_nmm_frequency_bands_t nmm_umts_frequency_bands; diff --git a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h index 97abfbbe4c..0af6504110 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h @@ -452,7 +452,7 @@ typedef struct // ERROR enums typedef enum { // Table 2-22 NFAPI_NR_PARAM_MSG_OK = 0, - NFAPI_NR_PARAM_MSG_INVALID_STATE + NFAPI_NR_PARAM_MSG_INVALID_STATE } nfapi_nr_param_errors_e; typedef enum { // Table 2-25 @@ -463,7 +463,7 @@ typedef enum { // Table 2-25 typedef enum { // Table 2-27 NFAPI_NR_START_MSG_OK = 0, - NFAPI_NR_START_MSG_INVALID_STATE + NFAPI_NR_START_MSG_INVALID_STATE } nfapi_nr_start_errors_e; //PNF P5 NR diff --git a/nfapi/open-nFAPI/nfapi/src/nfapi_p5.c b/nfapi/open-nFAPI/nfapi/src/nfapi_p5.c index ce9c22f7f7..d8d9858eeb 100644 --- a/nfapi/open-nFAPI/nfapi/src/nfapi_p5.c +++ b/nfapi/open-nFAPI/nfapi/src/nfapi_p5.c @@ -505,7 +505,7 @@ static uint8_t pack_param_response(void *msg, uint8_t **ppWritePackedMsg, uint8_ pack_tlv(NFAPI_NFAPI_TIMING_INFO_MODE_TAG, &(pNfapiMsg->nfapi_config.timing_info_mode), ppWritePackedMsg, end, &pack_uint8_tlv_value) && pack_tlv(NFAPI_NFAPI_TIMING_INFO_PERIOD_TAG, &(pNfapiMsg->nfapi_config.timing_info_period), ppWritePackedMsg, end, &pack_uint8_tlv_value) && pack_tlv(NFAPI_NFAPI_MAXIMUM_TRANSMIT_POWER_TAG, &(pNfapiMsg->nfapi_config.max_transmit_power), ppWritePackedMsg, end, &pack_uint16_tlv_value) && - pack_tlv(NFAPI_NFAPI_EARFCN_TAG, &(pNfapiMsg->nfapi_config.earfcn), ppWritePackedMsg, end, &pack_uint16_tlv_value) && + pack_tlv(NFAPI_NFAPI_EARFCN_TAG, &(pNfapiMsg->nfapi_config.earfcn), ppWritePackedMsg, end, &pack_uint32_tlv_value) && pack_tlv(NFAPI_NFAPI_NMM_GSM_FREQUENCY_BANDS_TAG, &(pNfapiMsg->nfapi_config.nmm_gsm_frequency_bands), ppWritePackedMsg, end, &pack_nmm_frequency_bands_value) && pack_tlv(NFAPI_NFAPI_NMM_UMTS_FREQUENCY_BANDS_TAG, &(pNfapiMsg->nfapi_config.nmm_umts_frequency_bands), ppWritePackedMsg, end, &pack_nmm_frequency_bands_value) && pack_tlv(NFAPI_NFAPI_NMM_LTE_FREQUENCY_BANDS_TAG, &(pNfapiMsg->nfapi_config.nmm_lte_frequency_bands), ppWritePackedMsg, end, &pack_nmm_frequency_bands_value) && @@ -693,7 +693,7 @@ static uint8_t pack_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_ pack_tlv(NFAPI_NFAPI_TIMING_INFO_MODE_TAG, &(pNfapiMsg->nfapi_config.timing_info_mode), ppWritePackedMsg, end, &pack_uint8_tlv_value) && pack_tlv(NFAPI_NFAPI_TIMING_INFO_PERIOD_TAG, &(pNfapiMsg->nfapi_config.timing_info_period), ppWritePackedMsg, end, &pack_uint8_tlv_value) && pack_tlv(NFAPI_NFAPI_MAXIMUM_TRANSMIT_POWER_TAG, &(pNfapiMsg->nfapi_config.max_transmit_power), ppWritePackedMsg, end, &pack_uint16_tlv_value) && - pack_tlv(NFAPI_NFAPI_EARFCN_TAG, &(pNfapiMsg->nfapi_config.earfcn), ppWritePackedMsg, end, &pack_uint16_tlv_value) && + pack_tlv(NFAPI_NFAPI_EARFCN_TAG, &(pNfapiMsg->nfapi_config.earfcn), ppWritePackedMsg, end, &pack_uint32_tlv_value) && pack_tlv(NFAPI_NFAPI_NMM_GSM_FREQUENCY_BANDS_TAG, &(pNfapiMsg->nfapi_config.nmm_gsm_frequency_bands), ppWritePackedMsg, end, &pack_nmm_frequency_bands_value) && pack_tlv(NFAPI_NFAPI_NMM_UMTS_FREQUENCY_BANDS_TAG, &(pNfapiMsg->nfapi_config.nmm_umts_frequency_bands), ppWritePackedMsg, end, &pack_nmm_frequency_bands_value) && pack_tlv(NFAPI_NFAPI_NMM_LTE_FREQUENCY_BANDS_TAG, &(pNfapiMsg->nfapi_config.nmm_lte_frequency_bands), ppWritePackedMsg, end, &pack_nmm_frequency_bands_value) && @@ -1492,7 +1492,7 @@ static uint8_t unpack_param_response(uint8_t **ppReadPackedMsg, uint8_t *end, vo { NFAPI_NFAPI_TIMING_INFO_MODE_TAG, &pNfapiMsg->nfapi_config.timing_info_mode, &unpack_uint8_tlv_value}, { NFAPI_NFAPI_TIMING_INFO_PERIOD_TAG, &pNfapiMsg->nfapi_config.timing_info_period, &unpack_uint8_tlv_value}, { NFAPI_NFAPI_MAXIMUM_TRANSMIT_POWER_TAG, &pNfapiMsg->nfapi_config.max_transmit_power, &unpack_uint16_tlv_value}, - { NFAPI_NFAPI_EARFCN_TAG, &pNfapiMsg->nfapi_config.earfcn, &unpack_uint16_tlv_value}, + { NFAPI_NFAPI_EARFCN_TAG, &pNfapiMsg->nfapi_config.earfcn, &unpack_uint32_tlv_value}, { NFAPI_NFAPI_NMM_GSM_FREQUENCY_BANDS_TAG, &pNfapiMsg->nfapi_config.nmm_gsm_frequency_bands, &unpack_nmm_frequency_bands_value}, { NFAPI_NFAPI_NMM_UMTS_FREQUENCY_BANDS_TAG, &pNfapiMsg->nfapi_config.nmm_umts_frequency_bands, &unpack_nmm_frequency_bands_value}, { NFAPI_NFAPI_NMM_LTE_FREQUENCY_BANDS_TAG, &pNfapiMsg->nfapi_config.nmm_lte_frequency_bands, &unpack_nmm_frequency_bands_value}, @@ -1705,7 +1705,7 @@ static uint8_t unpack_config_request(uint8_t **ppReadPackedMsg, uint8_t *end, vo { NFAPI_NFAPI_TIMING_INFO_MODE_TAG, &pNfapiMsg->nfapi_config.timing_info_mode, &unpack_uint8_tlv_value}, { NFAPI_NFAPI_TIMING_INFO_PERIOD_TAG, &pNfapiMsg->nfapi_config.timing_info_period, &unpack_uint8_tlv_value}, { NFAPI_NFAPI_MAXIMUM_TRANSMIT_POWER_TAG, &pNfapiMsg->nfapi_config.max_transmit_power, &unpack_uint16_tlv_value}, - { NFAPI_NFAPI_EARFCN_TAG, &pNfapiMsg->nfapi_config.earfcn, &unpack_uint16_tlv_value}, + { NFAPI_NFAPI_EARFCN_TAG, &pNfapiMsg->nfapi_config.earfcn, &unpack_uint32_tlv_value}, { NFAPI_NFAPI_NMM_GSM_FREQUENCY_BANDS_TAG, &pNfapiMsg->nfapi_config.nmm_gsm_frequency_bands, &unpack_nmm_frequency_bands_value}, { NFAPI_NFAPI_NMM_UMTS_FREQUENCY_BANDS_TAG, &pNfapiMsg->nfapi_config.nmm_umts_frequency_bands, &unpack_nmm_frequency_bands_value}, { NFAPI_NFAPI_NMM_LTE_FREQUENCY_BANDS_TAG, &pNfapiMsg->nfapi_config.nmm_lte_frequency_bands, &unpack_nmm_frequency_bands_value}, diff --git a/nfapi/open-nFAPI/nfapi/src/nfapi_p7.c b/nfapi/open-nFAPI/nfapi/src/nfapi_p7.c index 7cce8fbea4..51cd290632 100644 --- a/nfapi/open-nFAPI/nfapi/src/nfapi_p7.c +++ b/nfapi/open-nFAPI/nfapi/src/nfapi_p7.c @@ -7721,7 +7721,7 @@ static int check_unpack_length(nfapi_message_id_e msgId, uint32_t unpackedBufLen return retLen; } -static int check_nr_unpack_length(nfapi_message_id_e msgId, uint32_t unpackedBufLen) +static int check_nr_unpack_length(nfapi_nr_phy_msg_type_e msgId, uint32_t unpackedBufLen) { int retLen = 0; @@ -7782,21 +7782,6 @@ static int check_nr_unpack_length(nfapi_message_id_e msgId, uint32_t unpackedBuf retLen = sizeof(nfapi_nr_ul_node_sync_t); break; - case NFAPI_TIMING_INFO: - if (unpackedBufLen >= sizeof(nfapi_timing_info_t)) - retLen = sizeof(nfapi_timing_info_t); - break; - - case NFAPI_UE_RELEASE_REQUEST: - if (unpackedBufLen >= sizeof(nfapi_ue_release_request_t)) - retLen = sizeof(nfapi_ue_release_request_t); - break; - - case NFAPI_UE_RELEASE_RESPONSE: - if (unpackedBufLen >= sizeof(nfapi_ue_release_response_t)) - retLen = sizeof(nfapi_ue_release_response_t); - break; - default: NFAPI_TRACE(NFAPI_TRACE_ERROR, "Unknown message ID %d\n", msgId); break; @@ -8148,7 +8133,7 @@ int nfapi_nr_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void * return -1; break; case NFAPI_UE_RELEASE_REQUEST: - if (check_nr_unpack_length(NFAPI_UE_RELEASE_REQUEST, unpackedBufLen)) + if (check_unpack_length(NFAPI_UE_RELEASE_REQUEST, unpackedBufLen)) result = unpack_ue_release_request(&pReadPackedMessage, end, pMessageHeader, config); else return -1; @@ -8228,14 +8213,14 @@ int nfapi_nr_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void * break; case NFAPI_TIMING_INFO: - if (check_nr_unpack_length(NFAPI_TIMING_INFO, unpackedBufLen)) + if (check_unpack_length(NFAPI_TIMING_INFO, unpackedBufLen)) result = unpack_nr_timing_info(&pReadPackedMessage, end, pMessageHeader, config); else return -1; break; case NFAPI_UE_RELEASE_RESPONSE: - if (check_nr_unpack_length(NFAPI_UE_RELEASE_RESPONSE, unpackedBufLen)) + if (check_unpack_length(NFAPI_UE_RELEASE_RESPONSE, unpackedBufLen)) result = unpack_ue_release_resp(&pReadPackedMessage, end, pMessageHeader, config); else return -1; diff --git a/nfapi/open-nFAPI/pnf/src/pnf.c b/nfapi/open-nFAPI/pnf/src/pnf.c index a74c8daca6..3783e34708 100644 --- a/nfapi/open-nFAPI/pnf/src/pnf.c +++ b/nfapi/open-nFAPI/pnf/src/pnf.c @@ -831,7 +831,7 @@ void pnf_nr_handle_start_request(pnf_t* pnf, void *pRecvMsg, int recvMsgLen) memset(&resp, 0, sizeof(resp)); resp.header.message_id = NFAPI_NR_PHY_MSG_TYPE_START_RESPONSE; resp.header.phy_id = req.header.phy_id; - resp.error_code = NFAPI_MSG_INVALID_STATE; + resp.error_code = NFAPI_NR_START_MSG_INVALID_STATE; nfapi_nr_pnf_start_resp(config, &resp); } } @@ -841,7 +841,7 @@ void pnf_nr_handle_start_request(pnf_t* pnf, void *pRecvMsg, int recvMsgLen) memset(&resp, 0, sizeof(resp)); resp.header.message_id = NFAPI_NR_PHY_MSG_TYPE_START_RESPONSE; resp.header.phy_id = req.header.phy_id; - resp.error_code = NFAPI_MSG_INVALID_CONFIG; + resp.error_code = NFAPI_NR_START_MSG_INVALID_STATE; nfapi_nr_pnf_start_resp(config, &resp); } } @@ -851,7 +851,7 @@ void pnf_nr_handle_start_request(pnf_t* pnf, void *pRecvMsg, int recvMsgLen) memset(&resp, 0, sizeof(resp)); resp.header.message_id = NFAPI_NR_PHY_MSG_TYPE_START_RESPONSE; resp.header.phy_id = req.header.phy_id; - resp.error_code = NFAPI_MSG_INVALID_STATE; + resp.error_code = NFAPI_NR_START_MSG_INVALID_STATE; nfapi_nr_pnf_start_resp(config, &resp); } } @@ -2309,7 +2309,7 @@ int pnf_message_pump(pnf_t* pnf) } // Drop back to idle if we have lost connection - pnf->_public.state = NFAPI_PNF_PHY_IDLE; + pnf->_public.state = NFAPI_PNF_IDLE; // close the connection and socket @@ -2370,7 +2370,7 @@ int pnf_nr_message_pump(pnf_t* pnf) } // Drop back to idle if we have lost connection - pnf->_public.state = NFAPI_PNF_PHY_IDLE; + pnf->_public.state = NFAPI_PNF_IDLE; // close the connection and socket diff --git a/openair1/PHY/CODING/DOC/LDPCImplementation.md b/openair1/PHY/CODING/DOC/LDPCImplementation.md index a82c204074..d280106c76 100644 --- a/openair1/PHY/CODING/DOC/LDPCImplementation.md +++ b/openair1/PHY/CODING/DOC/LDPCImplementation.md @@ -81,7 +81,7 @@ At runtime, to successfully use hardware acceleration via OpenCL, you need to in ----------------------------------------------------------------- ``` -`./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa -O libconfig:/usr/local/oai/conf/nrue_sim.conf:dbgl5 --nokrnmod --loader.ldpc.shlibversion _cl --log_config.hw_log_level info` +`./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --sa -O libconfig:/usr/local/oai/conf/nrue_sim.conf:dbgl5 --loader.ldpc.shlibversion _cl --log_config.hw_log_level info` ``` ............................................................ diff --git a/openair1/PHY/CODING/TESTBENCH/coding_unitary_defs.h b/openair1/PHY/CODING/TESTBENCH/coding_unitary_defs.h index be37f06b8d..23d02ef197 100644 --- a/openair1/PHY/CODING/TESTBENCH/coding_unitary_defs.h +++ b/openair1/PHY/CODING/TESTBENCH/coding_unitary_defs.h @@ -28,7 +28,7 @@ PHY_VARS_UE ***PHY_vars_UE_g; #include "common/ran_context.h" RAN_CONTEXT_t RC; -void exit_function(const char* file, const char* function, const int line, const char *s) { +void exit_function(const char* file, const char* function, const int line, const char* s, const int assert) { const char * msg= s==NULL ? "no comment": s; printf("Exiting at: %s:%d %s(), %s\n", file, line, function, msg); exit(-1); diff --git a/openair1/PHY/CODING/TESTBENCH/ltetest.c b/openair1/PHY/CODING/TESTBENCH/ltetest.c index 414c636a31..56053f7784 100644 --- a/openair1/PHY/CODING/TESTBENCH/ltetest.c +++ b/openair1/PHY/CODING/TESTBENCH/ltetest.c @@ -32,7 +32,6 @@ #include "SCHED/defs.h" #include "SCHED/vars.h" #include "LAYER2/MAC/vars.h" -#include "OCG_vars.h" #include "UTIL/LOG/log.h" diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index 18946dac90..9dd5e45958 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -33,7 +33,7 @@ int main(int argc, char *argv[]) uint8_t aggregation_level = 8, decoderListSize = 8, logFlag = 0; uint16_t rnti=0; - while ((arguments = getopt (argc, argv, "s:d:f:m:i:l:a:p:hqgFL:k:")) != -1) + while ((arguments = getopt (argc, argv, "s:d:f:m:i:l:a:p:hqgFL:k:")) != -1) { switch (arguments) { case 's': SNRstart = atof(optarg); @@ -105,14 +105,14 @@ int main(int argc, char *argv[]) exit(-1); break; } - + } //Initiate timing. (Results depend on CPU Frequency. Therefore, might change due to performance variances during simulation.) - time_stats_t timeEncoder,timeDecoder; - opp_enabled=1; - reset_meas(&timeEncoder); - reset_meas(&timeDecoder); - randominit(0); - crcTableInit(); + time_stats_t timeEncoder,timeDecoder; + opp_enabled=1; + reset_meas(&timeEncoder); + reset_meas(&timeDecoder); + randominit(0); + crcTableInit(); if (polarMessageType == 0) { //PBCH aggregation_level = NR_POLAR_PBCH_AGGREGATION_LEVEL; @@ -132,31 +132,31 @@ int main(int argc, char *argv[]) /*folderName=getenv("HOME"); strcat(folderName,"/Desktop/polartestResults");*/ -if (logFlag){ - time (¤tTime); + if (logFlag){ + time (¤tTime); #ifdef DEBUG_POLAR_TIMING - sprintf(fileName,"%s/TIMING_ListSize_%d_Payload_%d_Itr_%d", folderName, decoderListSize, testLength, iterations); + sprintf(fileName,"%s/TIMING_ListSize_%d_Payload_%d_Itr_%d", folderName, decoderListSize, testLength, iterations); #else - sprintf(fileName,"%s/_ListSize_%d_Payload_%d_Itr_%d", folderName, decoderListSize, testLength, iterations); + sprintf(fileName,"%s/_ListSize_%d_Payload_%d_Itr_%d", folderName, decoderListSize, testLength, iterations); #endif - strftime(currentTimeInfo, 25, "_%Y-%m-%d-%H-%M-%S.csv", localtime(¤tTime)); - strcat(fileName,currentTimeInfo); - //Create "~/Desktop/polartestResults" folder if it doesn't already exist. - /*struct stat folder = {0}; + strftime(currentTimeInfo, 25, "_%Y-%m-%d-%H-%M-%S.csv", localtime(¤tTime)); + strcat(fileName,currentTimeInfo); + //Create "~/Desktop/polartestResults" folder if it doesn't already exist. + /*struct stat folder = {0}; if (stat(folderName, &folder) == -1) mkdir(folderName, S_IRWXU | S_IRWXG | S_IRWXO);*/ - logFile = fopen(fileName, "w"); + logFile = fopen(fileName, "w"); - if (logFile==NULL) { - fprintf(stderr,"[polartest.c] Problem creating file %s with fopen\n",fileName); - exit(-1); - } + if (logFile==NULL) { + fprintf(stderr,"[polartest.c] Problem creating file %s with fopen\n",fileName); + exit(-1); + } #ifdef DEBUG_POLAR_TIMING - fprintf(logFile,",timeEncoderCRCByte[us],timeEncoderCRCBit[us],timeEncoderInterleaver[us],timeEncoderBitInsertion[us],timeEncoder1[us],timeEncoder2[us],timeEncoderRateMatching[us],timeEncoderByte2Bit[us]\n"); + fprintf(logFile,",timeEncoderCRCByte[us],timeEncoderCRCBit[us],timeEncoderInterleaver[us],timeEncoderBitInsertion[us],timeEncoder1[us],timeEncoder2[us],timeEncoderRateMatching[us],timeEncoderByte2Bit[us]\n"); #else - fprintf(logFile,",SNR,nBitError,blockErrorState,t_encoder[us],t_decoder[us]\n"); + fprintf(logFile,",SNR,nBitError,blockErrorState,t_encoder[us],t_decoder[us]\n"); #endif -} + } const uint8_t testArrayLength = ceil(testLength / 32.0); const uint8_t coderArrayLength = ceil(coderLength / 32.0); diff --git a/openair1/PHY/CODING/lte_segmentation.c b/openair1/PHY/CODING/lte_segmentation.c index 7b8308656a..5fda1b9490 100644 --- a/openair1/PHY/CODING/lte_segmentation.c +++ b/openair1/PHY/CODING/lte_segmentation.c @@ -59,7 +59,6 @@ int lte_segmentation(unsigned char *input_buffer, } if ((*C)>MAX_NUM_DLSCH_SEGMENTS) { - printf("%d\n",*(int *)0); LOG_E(PHY,"lte_segmentation.c: too many segments %d, B %d, L %d, Bprime %d\n",*C,B,L,Bprime); return(-1); } diff --git a/openair1/PHY/INIT/lte_init_ru.c b/openair1/PHY/INIT/lte_init_ru.c index a856c33999..c07c9230d8 100644 --- a/openair1/PHY/INIT/lte_init_ru.c +++ b/openair1/PHY/INIT/lte_init_ru.c @@ -20,6 +20,7 @@ */ #include "phy_init.h" +#include "PHY/phy_extern.h" #include "SCHED/sched_eNB.h" #include "PHY/LTE_REFSIG/lte_refsig.h" //#include "SIMULATION/TOOLS/sim.h" @@ -33,8 +34,6 @@ void init_7_5KHz(void); -extern const char ru_if_types[MAX_RU_IF_TYPES][20]; - int phy_init_RU(RU_t *ru) { LTE_DL_FRAME_PARMS *fp = ru->frame_parms; RU_CALIBRATION *calibration = &ru->calibration; diff --git a/openair1/PHY/INIT/nr_init.c b/openair1/PHY/INIT/nr_init.c index d30e7e8af8..b02c2e0397 100644 --- a/openair1/PHY/INIT/nr_init.c +++ b/openair1/PHY/INIT/nr_init.c @@ -24,7 +24,7 @@ #include "common/ran_context.h" #include "PHY/defs_gNB.h" #include "PHY/NR_REFSIG/nr_refsig.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h" #include "PHY/NR_TRANSPORT/nr_transport_proto.h" #include "PHY/NR_TRANSPORT/nr_transport_common_proto.h" @@ -66,6 +66,17 @@ int l1_north_init_gNB() { return(0); } +void init_ul_delay_table(NR_DL_FRAME_PARMS *fp) +{ + for (int delay = -MAX_UL_DELAY_COMP; delay <= MAX_UL_DELAY_COMP; delay++) { + for (int k = 0; k < fp->ofdm_symbol_size; k++) { + double complex delay_cexp = cexp(I * (2.0 * M_PI * k * delay / fp->ofdm_symbol_size)); + fp->ul_delay_table[MAX_UL_DELAY_COMP + delay][k].r = (int16_t)round(256 * creal(delay_cexp)); + fp->ul_delay_table[MAX_UL_DELAY_COMP + delay][k].i = (int16_t)round(256 * cimag(delay_cexp)); + } + } +} + int init_codebook_gNB(PHY_VARS_gNB *gNB) { if(gNB->frame_parms.nb_antennas_tx>1){ @@ -500,6 +511,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB) load_nrLDPClib_offload(); init_codebook_gNB(gNB); + init_ul_delay_table(fp); // PBCH DMRS gold sequences generation nr_init_pbch_dmrs(gNB); @@ -620,17 +632,17 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB) } } - common_vars->txdataF = (int32_t **)malloc16(Ptx*sizeof(int32_t*)); - common_vars->rxdataF = (int32_t **)malloc16(Prx*sizeof(int32_t*)); + common_vars->txdataF = (c16_t **)malloc16(Ptx*sizeof(c16_t*)); + common_vars->rxdataF = (c16_t **)malloc16(Prx*sizeof(c16_t*)); /* Do NOT allocate per-antenna txdataF/rxdataF: the gNB gets a pointer to the * RU to copy/recover freq-domain memory from there */ common_vars->beam_id = (uint8_t **)malloc16(Ptx*sizeof(uint8_t*)); for (i=0;itxdataF[i] = (int32_t*)malloc16_clear(fp->samples_per_frame_wCP*sizeof(int32_t)); // [hna] samples_per_frame without CP + common_vars->txdataF[i] = (c16_t*)malloc16_clear(fp->samples_per_frame_wCP*sizeof(c16_t)); // [hna] samples_per_frame without CP LOG_D(PHY,"[INIT] common_vars->txdataF[%d] = %p (%lu bytes)\n", i,common_vars->txdataF[i], - fp->samples_per_frame_wCP*sizeof(int32_t)); + fp->samples_per_frame_wCP*sizeof(c16_t)); common_vars->beam_id[i] = (uint8_t*)malloc16_clear(fp->symbols_per_slot*fp->slots_per_frame*sizeof(uint8_t)); memset(common_vars->beam_id[i],255,fp->symbols_per_slot*fp->slots_per_frame); } @@ -981,7 +993,7 @@ void init_DLSCH_struct(PHY_VARS_gNB *gNB, processingData_L1tx_t *msg) { int num_cw = NR_MAX_NB_LAYERS > 4? 2:1; for (int i = 0; i < NUMBER_OF_NR_DLSCH_MAX; i++) { - LOG_I(PHY,"Allocating Transport Channel Buffers for DLSCH %d/%d\n", i, NUMBER_OF_NR_DLSCH_MAX); + LOG_D(PHY,"Allocating Transport Channel Buffers for DLSCH %d/%d\n", i, NUMBER_OF_NR_DLSCH_MAX); for (int j=0; jdlsch[i][j] = new_gNB_dlsch(fp, grid_size); AssertFatal(msg->dlsch[i][j]!=NULL,"Can't initialize dlsch %d \n", i); @@ -1036,21 +1048,21 @@ void init_nr_transport(PHY_VARS_gNB *gNB) gNB->pucch = (NR_gNB_PUCCH_t **) malloc16(gNB->max_nb_pucch * sizeof(NR_gNB_PUCCH_t*)); for (int i = 0; i < gNB->max_nb_pucch; i++) { - LOG_I(PHY,"Allocating Transport Channel Buffers for PUCCH %d/%d\n", i, gNB->max_nb_pucch); + LOG_D(PHY,"Allocating Transport Channel Buffers for PUCCH %d/%d\n", i, gNB->max_nb_pucch); gNB->pucch[i] = new_gNB_pucch(); AssertFatal(gNB->pucch[i] != NULL,"Can't initialize pucch %d \n", i); } gNB->srs = (NR_gNB_SRS_t **) malloc16(gNB->max_nb_srs * sizeof(NR_gNB_SRS_t*)); for (int i = 0; i < gNB->max_nb_srs; i++) { - LOG_I(PHY,"Allocating Transport Channel Buffers for SRS %d/%d\n", i, gNB->max_nb_srs); + LOG_D(PHY,"Allocating Transport Channel Buffers for SRS %d/%d\n", i, gNB->max_nb_srs); gNB->srs[i] = new_gNB_srs(); AssertFatal(gNB->srs[i]!=NULL,"Can't initialize srs %d \n", i); } for (int i = 0; i < NUMBER_OF_NR_ULSCH_MAX; i++) { - LOG_I(PHY,"Allocating Transport Channel Buffers for ULSCH %d/%d\n", i, NUMBER_OF_NR_ULSCH_MAX); + LOG_D(PHY,"Allocating Transport Channel Buffers for ULSCH %d/%d\n", i, NUMBER_OF_NR_ULSCH_MAX); gNB->ulsch[i] = new_gNB_ulsch(gNB->max_ldpc_iterations, fp->N_RB_UL); diff --git a/openair1/PHY/INIT/nr_init_ru.c b/openair1/PHY/INIT/nr_init_ru.c index f1810e5541..6b433f17d1 100644 --- a/openair1/PHY/INIT/nr_init_ru.c +++ b/openair1/PHY/INIT/nr_init_ru.c @@ -20,6 +20,7 @@ */ #include "phy_init.h" +#include "PHY/phy_extern.h" #include "SCHED/sched_common.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "assertions.h" @@ -28,8 +29,6 @@ void init_prach_ru_list(RU_t *ru); -extern const char ru_if_types[MAX_RU_IF_TYPES][20]; - int nr_phy_init_RU(RU_t *ru) { NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms; diff --git a/openair1/PHY/INIT/nr_init_ue.c b/openair1/PHY/INIT/nr_init_ue.c index ac7d1ceed9..32e5647b69 100644 --- a/openair1/PHY/INIT/nr_init_ue.c +++ b/openair1/PHY/INIT/nr_init_ue.c @@ -19,7 +19,7 @@ * contact@openairinterface.org */ -#include "phy_init.h" +#include "nr_phy_init.h" #include "PHY/phy_extern_nr_ue.h" #include "openair1/PHY/defs_RU.h" #include "openair1/PHY/impl_defs_nr.h" @@ -43,7 +43,7 @@ void RCconfig_nrUE_prs(void *cfg) { int j = 0, k = 0, gNB_id = 0; char aprefix[MAX_OPTNAME_SIZE*2 + 8]; - char str[7][100] = {'\0'}; int16_t n[7] = {0}; + char str[7][100] = {{'\0'}}; int16_t n[7] = {0}; PHY_VARS_NR_UE *ue = (PHY_VARS_NR_UE *)cfg; prs_config_t *prs_config = NULL; @@ -298,19 +298,21 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) ue->tx_power_dBm[i]=-127; // init TX buffers - common_vars->txdata = (int32_t **)malloc16( fp->nb_antennas_tx*sizeof(int32_t *) ); - common_vars->txdataF = (int32_t **)malloc16( fp->nb_antennas_tx*sizeof(int32_t *) ); + common_vars->txdata = (c16_t **)malloc16(fp->nb_antennas_tx*sizeof(c16_t *)); + common_vars->txdataF = (c16_t **)malloc16(fp->nb_antennas_tx*sizeof(c16_t *)); for (i=0; inb_antennas_tx; i++) { - common_vars->txdata[i] = (int32_t *)malloc16_clear( fp->samples_per_subframe*10*sizeof(int32_t) ); - common_vars->txdataF[i] = (int32_t *)malloc16_clear( fp->samples_per_slot_wCP*sizeof(int32_t) ); + common_vars->txdata[i] = (c16_t *)malloc16_clear((fp->samples_per_frame) * sizeof(c16_t)); + common_vars->txdataF[i] = (c16_t *)malloc16_clear((fp->samples_per_frame) * sizeof(c16_t)); } // init RX buffers - common_vars->rxdata = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) ); + common_vars->rxdata = (c16_t **)malloc16( fp->nb_antennas_rx*sizeof(c16_t *)); + common_vars->rxdataF = (c16_t **)malloc16( fp->nb_antennas_rx*sizeof(c16_t *)); for (i=0; inb_antennas_rx; i++) { - common_vars->rxdata[i] = (int32_t *) malloc16_clear( (2*(fp->samples_per_frame)+fp->ofdm_symbol_size)*sizeof(int32_t) ); + common_vars->rxdata[i] = (c16_t *)malloc16_clear((2 * (fp->samples_per_frame)+fp->ofdm_symbol_size) * sizeof(c16_t)); + common_vars->rxdataF[i] = (c16_t *)malloc16_clear((2 * (fp->samples_per_frame)+fp->ofdm_symbol_size) * sizeof(c16_t)); } // ceil(((NB_RB<<1)*3)/32) // 3 RE *2(QPSK) @@ -426,8 +428,10 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) for (int i = 0; i < fp->nb_antennas_rx; i++) { free_and_zero(common_vars->rxdata[i]); + free_and_zero(common_vars->rxdataF[i]); } free_and_zero(common_vars->rxdata); + free_and_zero(common_vars->rxdataF); for (int slot = 0; slot < fp->slots_per_frame; slot++) { for (int symb = 0; symb < fp->symbols_per_slot; symb++) diff --git a/openair1/PHY/INIT/nr_parms.c b/openair1/PHY/INIT/nr_parms.c index b3613c9d62..678036ecc9 100644 --- a/openair1/PHY/INIT/nr_parms.c +++ b/openair1/PHY/INIT/nr_parms.c @@ -19,7 +19,7 @@ * contact@openairinterface.org */ -#include "phy_init.h" +#include "nr_phy_init.h" #include "common/utils/nr/nr_common.h" #include "common/utils/LOG/log.h" diff --git a/openair1/PHY/INIT/nr_phy_init.h b/openair1/PHY/INIT/nr_phy_init.h new file mode 100644 index 0000000000..4c035d13d8 --- /dev/null +++ b/openair1/PHY/INIT/nr_phy_init.h @@ -0,0 +1,59 @@ +/* + * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The OpenAirInterface Software Alliance licenses this file to You under + * the OAI Public License, Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.openairinterface.org/?page_id=698 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *------------------------------------------------------------------------------- + * For more information about the OpenAirInterface (OAI) Software Alliance: + * contact@openairinterface.org + */ + +#ifndef NR_PHY_INIT_H_ +#define NR_PHY_INIT_H_ + +#include "PHY/defs_gNB.h" +#include "PHY/defs_nr_UE.h" + +int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp,uint8_t i_ssb); +int nr_init_frame_parms(nfapi_nr_config_request_scf_t *config, NR_DL_FRAME_PARMS *frame_parms); +int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *frame_parms, fapi_nr_config_request_t *config, uint16_t nr_band); +void nr_init_frame_parms_ue_sa(NR_DL_FRAME_PARMS *frame_parms, uint64_t downlink_frequency, int32_t uplink_frequency_offset, uint8_t mu, uint16_t nr_band); +int init_nr_ue_signal(PHY_VARS_NR_UE *ue,int nb_connected_eNB); +void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB); +void init_nr_ue_transport(PHY_VARS_NR_UE *ue); +void init_N_TA_offset(PHY_VARS_NR_UE *ue); +void nr_dump_frame_parms(NR_DL_FRAME_PARMS *frame_parms); +int phy_init_nr_gNB(PHY_VARS_gNB *gNB); +int init_codebook_gNB(PHY_VARS_gNB *gNB); +void nr_phy_config_request(NR_PHY_Config_t *gNB); +void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,int N_RB_DL,int N_RB_UL,int mu,int Nid_cell,uint64_t position_in_burst); +void phy_free_nr_gNB(PHY_VARS_gNB *gNB); +int l1_north_init_gNB(void); +void init_nr_transport(PHY_VARS_gNB *gNB); +void reset_nr_transport(PHY_VARS_gNB *gNB); + +void init_DLSCH_struct(PHY_VARS_gNB *gNB, processingData_L1tx_t *msg); +void reset_DLSCH_struct(const PHY_VARS_gNB *gNB, processingData_L1tx_t *msg); + +void RCconfig_nrUE_prs(void *cfg); +void init_nr_prs_ue_vars(PHY_VARS_NR_UE *ue); +void nr_init_dl_harq_processes(NR_DL_UE_HARQ_t harq_list[2][NR_MAX_DLSCH_HARQ_PROCESSES], int number_of_processes, int num_rb); +void nr_init_ul_harq_processes(NR_UL_UE_HARQ_t harq_list[NR_MAX_ULSCH_HARQ_PROCESSES], int number_of_processes, int num_rb, int num_ant_tx); +void free_nr_ue_dl_harq(NR_DL_UE_HARQ_t harq_list[2][NR_MAX_DLSCH_HARQ_PROCESSES], int number_of_processes, int num_rb); +void free_nr_ue_ul_harq(NR_UL_UE_HARQ_t harq_list[NR_MAX_ULSCH_HARQ_PROCESSES], int number_of_processes, int num_rb, int num_ant_tx); + +void phy_init_nr_top(PHY_VARS_NR_UE *ue); +void phy_term_nr_top(void); + +#endif diff --git a/openair1/PHY/INIT/phy_init.h b/openair1/PHY/INIT/phy_init.h index 5ec47c1dae..2116ba9c02 100644 --- a/openair1/PHY/INIT/phy_init.h +++ b/openair1/PHY/INIT/phy_init.h @@ -56,9 +56,6 @@ int l1_north_init_eNB(void); */ int phy_init_top(LTE_DL_FRAME_PARMS *frame_parms); -void phy_init_nr_top(PHY_VARS_NR_UE *ue); -void phy_term_nr_top(void); - /*! \brief Allocate and Initialize the PHY variables relevant to the LTE ue signal buffers. @@ -392,37 +389,6 @@ void phy_config_update_sib13_request(PHY_Config_t *phy_config); int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf); void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms); -int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp,uint8_t i_ssb); -int nr_init_frame_parms(nfapi_nr_config_request_scf_t *config, NR_DL_FRAME_PARMS *frame_parms); -int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *frame_parms, fapi_nr_config_request_t *config, uint16_t nr_band); -void nr_init_frame_parms_ue_sa(NR_DL_FRAME_PARMS *frame_parms, uint64_t downlink_frequency, int32_t uplink_frequency_offset, uint8_t mu, uint16_t nr_band); -int init_nr_ue_signal(PHY_VARS_NR_UE *ue,int nb_connected_eNB); -void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB); -void init_nr_ue_transport(PHY_VARS_NR_UE *ue); -void init_N_TA_offset(PHY_VARS_NR_UE *ue); -void nr_dump_frame_parms(NR_DL_FRAME_PARMS *frame_parms); -int phy_init_nr_gNB(PHY_VARS_gNB *gNB); -int init_codebook_gNB(PHY_VARS_gNB *gNB); -void nr_phy_config_request(NR_PHY_Config_t *gNB); -void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,int N_RB_DL,int N_RB_UL,int mu,int Nid_cell,uint64_t position_in_burst); -void phy_free_nr_gNB(PHY_VARS_gNB *gNB); -int l1_north_init_gNB(void); -void init_nr_transport(PHY_VARS_gNB *gNB); -void reset_nr_transport(PHY_VARS_gNB *gNB); - -void init_dfts(void); - void fill_subframe_mask(PHY_VARS_eNB *eNB); -void init_DLSCH_struct(PHY_VARS_gNB *gNB, processingData_L1tx_t *msg); -void reset_DLSCH_struct(const PHY_VARS_gNB *gNB, processingData_L1tx_t *msg); -void RCconfig_nrUE_prs(void *cfg); -void init_nr_prs_ue_vars(PHY_VARS_NR_UE *ue); -void nr_init_dl_harq_processes(NR_DL_UE_HARQ_t harq_list[2][NR_MAX_DLSCH_HARQ_PROCESSES], int number_of_processes, int num_rb); -void nr_init_ul_harq_processes(NR_UL_UE_HARQ_t harq_list[NR_MAX_ULSCH_HARQ_PROCESSES], int number_of_processes, int num_rb, int num_ant_tx); -void free_nr_ue_dl_harq(NR_DL_UE_HARQ_t harq_list[2][NR_MAX_DLSCH_HARQ_PROCESSES], int number_of_processes, int num_rb); -void free_nr_ue_ul_harq(NR_UL_UE_HARQ_t harq_list[NR_MAX_ULSCH_HARQ_PROCESSES], int number_of_processes, int num_rb, int num_ant_tx); - -/** @} */ #endif - diff --git a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c index fc77d4ae18..1e27e99166 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c @@ -555,7 +555,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, 32767-ue->ch_est_alpha, dl_ch-(ue->frame_parms.ofdm_symbol_size<<1),0,ue->frame_parms.ofdm_symbol_size); } else { // high_speed_flag == 1 - if ((symbol == 0)) { + if (symbol == 0) { // printf("Interpolating %d->0\n",4-ue->frame_parms.Ncp); // dl_ch_prev = (int16_t *)&dl_ch_estimates[(p<<1)+aarx][(4-ue->frame_parms.Ncp)*(ue->frame_parms.ofdm_symbol_size)]; if(((Ns>>1)!=0) || ( ((Ns>>1)==0) && interpolateS11S12)) { diff --git a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c index d699e7ebd9..8587bf1f70 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c @@ -28,7 +28,7 @@ //#include #include #include "PHY/defs_UE.h" -#include "PHY/phy_extern_ue.h" +#include "PHY/phy_extern.h" #include "PHY/LTE_REFSIG/lte_refsig.h" // Note: this is for prototype of generate_drs_pusch (OTA synchronization of RRUs) diff --git a/openair1/PHY/LTE_ESTIMATION/lte_sync_timefreq.c b/openair1/PHY/LTE_ESTIMATION/lte_sync_timefreq.c index 524b200e1a..780c3955cf 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_sync_timefreq.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_sync_timefreq.c @@ -38,6 +38,7 @@ //#include "defs.h" #include "PHY/defs_UE.h" #include "PHY/phy_extern_ue.h" +#include "PHY/phy_extern.h" #if defined(__x86_64__) || defined(__i386__) #include "pss6144.h" diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c b/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c index 16b818e90f..340da97d48 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c @@ -23,6 +23,7 @@ #include "PHY/defs_UE.h" #include "PHY/phy_extern_ue.h" +#include "PHY/phy_extern.h" #include "common/utils/LOG/log.h" #include "PHY/sse_intrin.h" diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c index 152a298398..5d5e9c5d56 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c @@ -20,7 +20,7 @@ */ #include "PHY/defs_eNB.h" -//#include "PHY/phy_extern.h" +#include "PHY/phy_extern.h" #include "PHY/sse_intrin.h" //#define DEBUG_CH #include "common/utils/LOG/log.h" @@ -35,8 +35,6 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32 #define SCALE 0x3FFF -static const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1}; - int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms, L1_rxtx_proc_t *proc, LTE_eNB_ULSCH_t * ulsch, diff --git a/openair1/PHY/LTE_REFSIG/README.txt b/openair1/PHY/LTE_REFSIG/README.txt index eae92fb389..8d0014f39b 100644 --- a/openair1/PHY/LTE_REFSIG/README.txt +++ b/openair1/PHY/LTE_REFSIG/README.txt @@ -5,7 +5,6 @@ lte_gold.c : Generators for LTE gold sequences (used for pilots and scr lte_ul_ref.c : UL DRS signal generation for TX and RX defs.h : data structures and function prototypes mod_table.h : lookup tables for QAM modulation (CBMIMO1 tables) -primary_synch.h : 3 PSS sequences primary_synch.m : MATLAB/OCTAVE generator for PSS gen_mod_table.m : MATLAB/OCTAVE generator for CBMIMO1 mod_table.h lte_ul.m : MATLAB/OCTAVE generator for UL (SC-FDMA) DFT sizes diff --git a/openair1/PHY/LTE_REFSIG/primary_synch.h b/openair1/PHY/LTE_REFSIG/primary_synch.h deleted file mode 100644 index 8152722df3..0000000000 --- a/openair1/PHY/LTE_REFSIG/primary_synch.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -short primary_synch0[144] = {0,0,0,0,0,0,0,0,0,0,32767,0,-26120,-19785,11971,-30502,-24020,-22288,32117,6492,31311,9658,-16384,-28378,25100,-21063,-7292,-31946,20429,25618,14948,29158,11971,-30502,31311,9658,25100,-21063,-16384,28377,-24020,22287,32117,6492,-7292,31945,20429,25618,-26120,-19785,-16384,-28378,-16384,28377,-26120,-19785,-32402,4883,31311,-9659,32117,6492,-7292,-31946,32767,-1,25100,-21063,-24020,22287,-32402,4883,-32402,4883,-24020,22287,25100,-21063,32767,-1,-7292,-31946,32117,6492,31311,-9659,-32402,4883,-26120,-19785,-16384,28377,-16384,-28378,-26120,-19785,20429,25618,-7292,31945,32117,6492,-24020,22287,-16384,28377,25100,-21063,31311,9658,11971,-30502,14948,29158,20429,25618,-7292,-31946,25100,-21063,-16384,-28378,31311,9658,32117,6492,-24020,-22288,11971,-30502,-26120,-19785,32767,0,0,0,0,0,0,0,0,0,0,0}; -short primary_synch1[144] = {0,0,0,0,0,0,0,0,0,0,32767,0,-31754,-8086,-24020,-22288,2448,32675,-26120,19784,27073,18458,-16384,28377,25100,21062,-29523,14217,-7292,31945,-13477,-29868,-24020,-22288,27073,18458,25100,21062,-16384,-28378,2448,-32676,-26120,19784,-29523,-14218,-7292,31945,-31754,-8086,-16384,28377,-16384,-28378,-31754,-8086,31311,-9659,27073,-18459,-26120,19784,-29523,14217,32767,-1,25100,21062,2448,-32676,31311,-9659,31311,-9659,2448,-32676,25100,21062,32767,0,-29523,14217,-26120,19784,27073,-18459,31311,-9659,-31754,-8086,-16384,-28378,-16384,28377,-31754,-8086,-7292,31945,-29523,-14218,-26120,19784,2448,-32676,-16384,-28378,25100,21062,27073,18458,-24020,-22288,-13477,-29868,-7292,31945,-29523,14217,25100,21062,-16384,28377,27073,18458,-26120,19784,2448,32675,-24020,-22288,-31754,-8086,32767,0,0,0,0,0,0,0,0,0,0,0}; -short primary_synch2[144] = {0,0,0,0,0,0,0,0,0,0,32767,0,-31754,8085,-24020,22287,2448,-32676,-26120,-19785,27073,-18459,-16384,-28378,25100,-21063,-29523,-14218,-7292,-31946,-13477,29867,-24020,22287,27073,-18459,25100,-21063,-16384,28377,2448,32675,-26120,-19785,-29523,14217,-7292,-31946,-31754,8085,-16384,-28378,-16384,28377,-31754,8085,31311,9658,27073,18458,-26120,-19785,-29523,-14218,32767,0,25100,-21063,2448,32675,31311,9658,31311,9658,2448,32675,25100,-21063,32767,0,-29523,-14218,-26120,-19785,27073,18458,31311,9658,-31754,8085,-16384,28377,-16384,-28378,-31754,8085,-7292,-31946,-29523,14217,-26120,-19785,2448,32675,-16384,28377,25100,-21063,27073,-18459,-24020,22287,-13477,29867,-7292,-31946,-29523,-14218,25100,-21063,-16384,-28378,27073,-18459,-26120,-19785,2448,-32676,-24020,22287,-31754,8085,32767,-1,0,0,0,0,0,0,0,0,0,0}; -unsigned char primary_synch0_tab[72] = {0,0,0,0,0,85,110,97,109,146,145,106,92,103,139,137,97,145,92,127,124,146,130,139,110,106,127,110,118,88,146,103,85,92,124,118,118,124,92,85,103,146,88,118,110,127,106,110,139,130,146,124,127,92,145,97,137,139,103,92,106,145,146,109,97,110,85,0,0,0,0,0}; -unsigned char primary_synch1_tab[72] = {0,0,0,0,0,85,114,109,133,123,142,127,141,121,130,105,109,142,141,106,100,123,112,130,114,127,106,114,88,91,123,121,85,141,100,88,88,100,141,85,121,123,91,88,114,106,127,114,130,112,123,100,106,141,142,109,105,130,121,141,127,142,123,133,109,114,85,0,0,0,0,0}; -unsigned char primary_synch2_tab[72] = {0,0,0,0,0,85,119,124,100,110,91,106,92,112,103,128,124,91,92,127,133,110,121,103,119,106,127,119,145,142,110,112,85,92,133,145,145,133,92,85,112,110,142,145,119,127,106,119,103,121,110,133,127,92,91,124,128,103,112,92,106,91,110,100,124,119,85,0,0,0,0,0}; diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c index dc73a56568..b971e5ce67 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c +++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c @@ -1963,7 +1963,7 @@ void fill_dci0(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc, if(frame_parms->frame_type == TDD) { UE_id = find_ulsch(pdu->dci_pdu_rel8.rnti, eNB,SEARCH_EXIST_OR_FREE); - if(UE_id >=0 -1 || UE_id < NUMBER_OF_ULSCH_MAX) { + if(UE_id >=0 || UE_id < NUMBER_OF_ULSCH_MAX) { eNB->ulsch[UE_id]->harq_processes[pdu->dci_pdu_rel8.harq_pid]->V_UL_DAI = dai +1; } } diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c b/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c index 015a95a862..7075b74fe1 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_scrambling.c @@ -163,8 +163,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_OUT); } - - +uint8_t scrambling_lut[65536*16] __attribute__((aligned(32))); void init_scrambling_lut(void) { uint32_t s; int i=0,j; @@ -215,6 +214,7 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms, } } +int16_t unscrambling_lut[65536*16] __attribute__((aligned(32))); void init_unscrambling_lut(void) { uint32_t s; int i=0,j; diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_tbs.h b/openair1/PHY/LTE_TRANSPORT/dlsch_tbs.h index 3a18924fe4..863eb33d34 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_tbs.h +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_tbs.h @@ -19,6 +19,9 @@ * contact@openairinterface.org */ +#ifndef DLSCH_TBS_H_ +#define DLSCH_TBS_H_ + static const unsigned int dlsch_tbs25[27][25] = { {16, 32, 56, 88, 120, 152, 176, 208, 224, 256, 288, 328, 344, 376, 392, 424, 456, 488, 504, 536, 568, 600, 616, 648, 680}, {24, 56, 88, 144, 176, 208, 224, 256, 328, 344, 376, 424, 456, 488, 520, 568, 600, 632, 680, 712, 744, 776, 808, 872, 904}, @@ -47,3 +50,5 @@ static const unsigned int dlsch_tbs25[27][25] = { {584, 1192, 1800, 2408, 2984, 3624, 4264, 4968, 5544, 5992, 6712, 7224, 7992, 8504, 9144, 9912, 10296, 11064, 11448, 12216, 12960, 13536, 14112, 14688, 15264}, {616, 1256, 1864, 2536, 3112, 3752, 4392, 5160, 5736, 6200, 6968, 7480, 8248, 8760, 9528, 10296, 10680, 11448, 12216, 12576, 13536, 14112, 14688, 15264, 15840}, {712, 1480, 2216, 2984, 3752, 4392, 5160, 5992, 6712, 7480, 8248, 8760, 9528, 10296, 11064, 11832, 12576, 13536, 14112, 14688, 15264, 16416, 16992, 17568, 18336}}; + +#endif /* DLSCH_TBS_H_ */ diff --git a/openair1/PHY/LTE_TRANSPORT/print_stats.c b/openair1/PHY/LTE_TRANSPORT/print_stats.c deleted file mode 100644 index 856e392070..0000000000 --- a/openair1/PHY/LTE_TRANSPORT/print_stats.c +++ /dev/null @@ -1,753 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file PHY/LTE_TRANSPORT/print_stats.c -* \brief PHY statstic logging function -* \author R. Knopp, F. Kaltenberger, navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr, navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#include "PHY/LTE_TRANSPORT/proto.h" -#include "executables/lte-softmodem.h" -#include "PHY/defs.h" -#include "PHY/extern.h" -#include "SCHED/extern.h" - - #include "openair2/LAYER2/MAC/proto.h" - #include "openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h" - -extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index); - -#include "common_lib.h" -extern openair0_config_t openair0_cfg[]; - - -int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char *buffer, int length, runmode_t mode, int input_level_dBm) { - uint8_t eNB=0; - uint32_t RRC_status; - int len=length; - int harq_pid,round; - - if (ue==NULL) - return 0; - - if ((mode == normal_txrx) || (mode == no_L2_connect)) { - len += sprintf(&buffer[len], "[UE_PROC] UE %d, RNTI %x\n",ue->Mod_id, ue->pdcch_vars[0][0]->crnti); - len += sprintf(&buffer[len],"[UE PROC] RSRP[0] %.2f dBm/RE, RSSI %.2f dBm, RSRQ[0] %.2f dB, N0 %d dBm/RE (NF %.1f dB)\n", - 10*log10(ue->measurements.rsrp[0])-ue->rx_total_gain_dB, - 10*log10(ue->measurements.rssi)-ue->rx_total_gain_dB, - 10*log10(ue->measurements.rsrq[0]), - ue->measurements.n0_power_tot_dBm, - (double)ue->measurements.n0_power_tot_dBm+132.24); - /* - len += sprintf(&buffer[len], - "[UE PROC] Frame count: %d\neNB0 RSSI %d dBm/RE (%d dB, %d dB)\neNB1 RSSI %d dBm/RE (%d dB, %d dB)neNB2 RSSI %d dBm/RE (%d dB, %d dB)\nN0 %d dBm/RE, %f dBm/%dPRB (%d dB, %d dB)\n", - proc->frame_rx, - ue->measurements.rx_rssi_dBm[0], - ue->measurements.rx_power_dB[0][0], - ue->measurements.rx_power_dB[0][1], - ue->measurements.rx_rssi_dBm[1], - ue->measurements.rx_power_dB[1][0], - ue->measurements.rx_power_dB[1][1], - ue->measurements.rx_rssi_dBm[2], - ue->measurements.rx_power_dB[2][0], - ue->measurements.rx_power_dB[2][1], - ue->measurements.n0_power_tot_dBm, - ue->measurements.n0_power_tot_dBm+10*log10(12*ue->frame_parms.N_RB_DL), - ue->frame_parms.N_RB_DL, - ue->measurements.n0_power_dB[0], - ue->measurements.n0_power_dB[1]); - */ - len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB\n",ue->rx_total_gain_dB); - len += sprintf(&buffer[len], "[UE_PROC] Frequency offset %d Hz, estimated carrier frequency %f Hz\n",ue->common_vars.freq_offset,openair0_cfg[0].rx_freq[0]-ue->common_vars.freq_offset); - len += sprintf(&buffer[len], "[UE PROC] UE mode = %s (%d)\n",mode_string[ue->UE_mode[0]],ue->UE_mode[0]); - len += sprintf(&buffer[len], "[UE PROC] timing_advance = %d\n",ue->timing_advance); - - if (ue->UE_mode[0]==PUSCH) { - len += sprintf(&buffer[len], "[UE PROC] Po_PUSCH = %d dBm (PL %d dB, Po_NOMINAL_PUSCH %d dBm, PHR %d dB)\n", - ue->ulsch[0]->Po_PUSCH, - get_PL(ue->Mod_id,ue->CC_id,0), - ue->frame_parms.ul_power_control_config_common.p0_NominalPUSCH, - ue->ulsch[0]->PHR); - len += sprintf(&buffer[len], "[UE PROC] Po_PUCCH = %d dBm (Po_NOMINAL_PUCCH %d dBm, g_pucch %d dB)\n", - get_PL(ue->Mod_id,ue->CC_id,0)+ - ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH+ - ue->dlsch[0][0][0]->g_pucch, - ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH, - ue->dlsch[0][0][0]->g_pucch); - } - - //for (eNB=0;eNBmeasurements.rx_spatial_power_dB[eNB][0][0], - ue->measurements.rx_spatial_power_dB[eNB][0][1], - ue->measurements.rx_spatial_power_dB[eNB][1][0], - ue->measurements.rx_spatial_power_dB[eNB][1][1]); - len += sprintf(&buffer[len], "[UE PROC] RX total power eNB%d: %d dB, avg: %d dB\n",eNB,ue->measurements.rx_power_tot_dB[eNB],ue->measurements.rx_power_avg_dB[eNB]); - len += sprintf(&buffer[len], "[UE PROC] RX total power lin: %d, avg: %d, RX total noise lin: %d, avg: %d\n",ue->measurements.rx_power_tot[eNB], - ue->measurements.rx_power_avg[eNB], ue->measurements.n0_power_tot, ue->measurements.n0_power_avg); - len += sprintf(&buffer[len], "[UE PROC] effective SINR %.2f dB\n",ue->sinr_eff); - len += sprintf(&buffer[len], "[UE PROC] Wideband CQI eNB %d: %d dB, avg: %d dB\n",eNB,ue->measurements.wideband_cqi_tot[eNB],ue->measurements.wideband_cqi_avg[eNB]); - - switch (ue->frame_parms.N_RB_DL) { - case 6: - len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 0): [%d %d %d %d %d %d] dB\n", - eNB, - ue->measurements.subband_cqi_dB[eNB][0][0], - ue->measurements.subband_cqi_dB[eNB][0][1], - ue->measurements.subband_cqi_dB[eNB][0][2], - ue->measurements.subband_cqi_dB[eNB][0][3], - ue->measurements.subband_cqi_dB[eNB][0][4], - ue->measurements.subband_cqi_dB[eNB][0][5]); - len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 1): [%d %d %d %d %d %d] dB\n", - eNB, - ue->measurements.subband_cqi_dB[eNB][1][0], - ue->measurements.subband_cqi_dB[eNB][1][1], - ue->measurements.subband_cqi_dB[eNB][1][2], - ue->measurements.subband_cqi_dB[eNB][1][3], - ue->measurements.subband_cqi_dB[eNB][1][4], - ue->measurements.subband_cqi_dB[eNB][1][5]); - len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 0): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n", - eNB, - ue->measurements.subband_pmi_re[eNB][0][0], - ue->measurements.subband_pmi_im[eNB][0][0], - ue->measurements.subband_pmi_re[eNB][1][0], - ue->measurements.subband_pmi_im[eNB][1][0], - ue->measurements.subband_pmi_re[eNB][2][0], - ue->measurements.subband_pmi_im[eNB][2][0], - ue->measurements.subband_pmi_re[eNB][3][0], - ue->measurements.subband_pmi_im[eNB][3][0], - ue->measurements.subband_pmi_re[eNB][4][0], - ue->measurements.subband_pmi_im[eNB][4][0], - ue->measurements.subband_pmi_re[eNB][5][0], - ue->measurements.subband_pmi_im[eNB][5][0]); - len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 1): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n", - eNB, - ue->measurements.subband_pmi_re[eNB][0][1], - ue->measurements.subband_pmi_im[eNB][0][1], - ue->measurements.subband_pmi_re[eNB][1][1], - ue->measurements.subband_pmi_im[eNB][1][1], - ue->measurements.subband_pmi_re[eNB][2][1], - ue->measurements.subband_pmi_im[eNB][2][1], - ue->measurements.subband_pmi_re[eNB][3][1], - ue->measurements.subband_pmi_im[eNB][3][1], - ue->measurements.subband_pmi_re[eNB][4][1], - ue->measurements.subband_pmi_im[eNB][4][1], - ue->measurements.subband_pmi_re[eNB][5][1], - ue->measurements.subband_pmi_im[eNB][5][1]); - len += sprintf(&buffer[len], "[UE PROC] PMI Antenna selection eNB%d : [%d %d %d %d %d %d]\n", - eNB, - ue->measurements.selected_rx_antennas[eNB][0], - ue->measurements.selected_rx_antennas[eNB][1], - ue->measurements.selected_rx_antennas[eNB][2], - ue->measurements.selected_rx_antennas[eNB][3], - ue->measurements.selected_rx_antennas[eNB][4], - ue->measurements.selected_rx_antennas[eNB][5]); - len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (max): %jx\n",eNB,pmi2hex_2Ar1(quantize_subband_pmi(&ue->measurements,eNB,6))); - len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (both): %jx,%jx\n",eNB, - pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,0,6)), - pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,1,6))); - break; - - case 25: - len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 0): [%d %d %d %d %d %d %d] dB\n", - eNB, - ue->measurements.subband_cqi_dB[eNB][0][0], - ue->measurements.subband_cqi_dB[eNB][0][1], - ue->measurements.subband_cqi_dB[eNB][0][2], - ue->measurements.subband_cqi_dB[eNB][0][3], - ue->measurements.subband_cqi_dB[eNB][0][4], - ue->measurements.subband_cqi_dB[eNB][0][5], - ue->measurements.subband_cqi_dB[eNB][0][6]); - len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 1): [%d %d %d %d %d %d %d] dB\n", - eNB, - ue->measurements.subband_cqi_dB[eNB][1][0], - ue->measurements.subband_cqi_dB[eNB][1][1], - ue->measurements.subband_cqi_dB[eNB][1][2], - ue->measurements.subband_cqi_dB[eNB][1][3], - ue->measurements.subband_cqi_dB[eNB][1][4], - ue->measurements.subband_cqi_dB[eNB][1][5], - ue->measurements.subband_cqi_dB[eNB][1][6]); - len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 0): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n", - eNB, - ue->measurements.subband_pmi_re[eNB][0][0], - ue->measurements.subband_pmi_im[eNB][0][0], - ue->measurements.subband_pmi_re[eNB][1][0], - ue->measurements.subband_pmi_im[eNB][1][0], - ue->measurements.subband_pmi_re[eNB][2][0], - ue->measurements.subband_pmi_im[eNB][2][0], - ue->measurements.subband_pmi_re[eNB][3][0], - ue->measurements.subband_pmi_im[eNB][3][0], - ue->measurements.subband_pmi_re[eNB][4][0], - ue->measurements.subband_pmi_im[eNB][4][0], - ue->measurements.subband_pmi_re[eNB][5][0], - ue->measurements.subband_pmi_im[eNB][5][0], - ue->measurements.subband_pmi_re[eNB][6][0], - ue->measurements.subband_pmi_im[eNB][6][0]); - len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 1): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n", - eNB, - ue->measurements.subband_pmi_re[eNB][0][1], - ue->measurements.subband_pmi_im[eNB][0][1], - ue->measurements.subband_pmi_re[eNB][1][1], - ue->measurements.subband_pmi_im[eNB][1][1], - ue->measurements.subband_pmi_re[eNB][2][1], - ue->measurements.subband_pmi_im[eNB][2][1], - ue->measurements.subband_pmi_re[eNB][3][1], - ue->measurements.subband_pmi_im[eNB][3][1], - ue->measurements.subband_pmi_re[eNB][4][1], - ue->measurements.subband_pmi_im[eNB][4][1], - ue->measurements.subband_pmi_re[eNB][5][1], - ue->measurements.subband_pmi_im[eNB][5][1], - ue->measurements.subband_pmi_re[eNB][6][1], - ue->measurements.subband_pmi_im[eNB][6][1]); - len += sprintf(&buffer[len], "[UE PROC] PMI Antenna selection eNB%d : [%d %d %d %d %d %d %d]\n", - eNB, - ue->measurements.selected_rx_antennas[eNB][0], - ue->measurements.selected_rx_antennas[eNB][1], - ue->measurements.selected_rx_antennas[eNB][2], - ue->measurements.selected_rx_antennas[eNB][3], - ue->measurements.selected_rx_antennas[eNB][4], - ue->measurements.selected_rx_antennas[eNB][5], - ue->measurements.selected_rx_antennas[eNB][6]); - len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (max): %jx\n",eNB,pmi2hex_2Ar1(quantize_subband_pmi(&ue->measurements,eNB,7))); - len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (both): %jx,%jx\n",eNB, - pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,0,7)), - pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,1,7))); - break; - - case 50: - len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 0): [%d %d %d %d %d %d %d %d %d] dB\n", - eNB, - ue->measurements.subband_cqi_dB[eNB][0][0], - ue->measurements.subband_cqi_dB[eNB][0][1], - ue->measurements.subband_cqi_dB[eNB][0][2], - ue->measurements.subband_cqi_dB[eNB][0][3], - ue->measurements.subband_cqi_dB[eNB][0][4], - ue->measurements.subband_cqi_dB[eNB][0][5], - ue->measurements.subband_cqi_dB[eNB][0][6], - ue->measurements.subband_cqi_dB[eNB][0][7], - ue->measurements.subband_cqi_dB[eNB][0][8]); - len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 1): [%d %d %d %d %d %d %d %d %d] dB\n", - eNB, - ue->measurements.subband_cqi_dB[eNB][1][0], - ue->measurements.subband_cqi_dB[eNB][1][1], - ue->measurements.subband_cqi_dB[eNB][1][2], - ue->measurements.subband_cqi_dB[eNB][1][3], - ue->measurements.subband_cqi_dB[eNB][1][4], - ue->measurements.subband_cqi_dB[eNB][1][5], - ue->measurements.subband_cqi_dB[eNB][1][6], - ue->measurements.subband_cqi_dB[eNB][1][7], - ue->measurements.subband_cqi_dB[eNB][1][8]); - len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 0): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n", - eNB, - ue->measurements.subband_pmi_re[eNB][0][0], - ue->measurements.subband_pmi_im[eNB][0][0], - ue->measurements.subband_pmi_re[eNB][1][0], - ue->measurements.subband_pmi_im[eNB][1][0], - ue->measurements.subband_pmi_re[eNB][2][0], - ue->measurements.subband_pmi_im[eNB][2][0], - ue->measurements.subband_pmi_re[eNB][3][0], - ue->measurements.subband_pmi_im[eNB][3][0], - ue->measurements.subband_pmi_re[eNB][4][0], - ue->measurements.subband_pmi_im[eNB][4][0], - ue->measurements.subband_pmi_re[eNB][5][0], - ue->measurements.subband_pmi_im[eNB][5][0], - ue->measurements.subband_pmi_re[eNB][6][0], - ue->measurements.subband_pmi_im[eNB][6][0], - ue->measurements.subband_pmi_re[eNB][7][0], - ue->measurements.subband_pmi_im[eNB][7][0], - ue->measurements.subband_pmi_re[eNB][8][0], - ue->measurements.subband_pmi_im[eNB][8][0]); - len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 1): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n", - eNB, - ue->measurements.subband_pmi_re[eNB][0][1], - ue->measurements.subband_pmi_im[eNB][0][1], - ue->measurements.subband_pmi_re[eNB][1][1], - ue->measurements.subband_pmi_im[eNB][1][1], - ue->measurements.subband_pmi_re[eNB][2][1], - ue->measurements.subband_pmi_im[eNB][2][1], - ue->measurements.subband_pmi_re[eNB][3][1], - ue->measurements.subband_pmi_im[eNB][3][1], - ue->measurements.subband_pmi_re[eNB][4][1], - ue->measurements.subband_pmi_im[eNB][4][1], - ue->measurements.subband_pmi_re[eNB][5][1], - ue->measurements.subband_pmi_im[eNB][5][1], - ue->measurements.subband_pmi_re[eNB][6][1], - ue->measurements.subband_pmi_im[eNB][6][1], - ue->measurements.subband_pmi_re[eNB][7][1], - ue->measurements.subband_pmi_im[eNB][7][1], - ue->measurements.subband_pmi_re[eNB][8][1], - ue->measurements.subband_pmi_im[eNB][8][1]); - len += sprintf(&buffer[len], "[UE PROC] PMI Antenna selection eNB%d : [%d %d %d %d %d %d %d %d %d]\n", - eNB, - ue->measurements.selected_rx_antennas[eNB][0], - ue->measurements.selected_rx_antennas[eNB][1], - ue->measurements.selected_rx_antennas[eNB][2], - ue->measurements.selected_rx_antennas[eNB][3], - ue->measurements.selected_rx_antennas[eNB][4], - ue->measurements.selected_rx_antennas[eNB][5], - ue->measurements.selected_rx_antennas[eNB][6], - ue->measurements.selected_rx_antennas[eNB][7], - ue->measurements.selected_rx_antennas[eNB][8]); - len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (max): %jx\n",eNB,pmi2hex_2Ar1(quantize_subband_pmi(&ue->measurements,eNB,9))); - len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (both): %jx,%jx\n",eNB, - pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,0,9)), - pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,1,9))); - break; - - case 100: - len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 0): [%d %d %d %d %d %d %d %d %d %d %d %d %d] dB\n", - eNB, - ue->measurements.subband_cqi_dB[eNB][0][0], - ue->measurements.subband_cqi_dB[eNB][0][1], - ue->measurements.subband_cqi_dB[eNB][0][2], - ue->measurements.subband_cqi_dB[eNB][0][3], - ue->measurements.subband_cqi_dB[eNB][0][4], - ue->measurements.subband_cqi_dB[eNB][0][5], - ue->measurements.subband_cqi_dB[eNB][0][6], - ue->measurements.subband_cqi_dB[eNB][0][7], - ue->measurements.subband_cqi_dB[eNB][0][8], - ue->measurements.subband_cqi_dB[eNB][0][9], - ue->measurements.subband_cqi_dB[eNB][0][10], - ue->measurements.subband_cqi_dB[eNB][0][11], - ue->measurements.subband_cqi_dB[eNB][0][12]); - len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 1): [%d %d %d %d %d %d %d %d %d %d %d %d %d] dB\n", - eNB, - ue->measurements.subband_cqi_dB[eNB][1][0], - ue->measurements.subband_cqi_dB[eNB][1][1], - ue->measurements.subband_cqi_dB[eNB][1][2], - ue->measurements.subband_cqi_dB[eNB][1][3], - ue->measurements.subband_cqi_dB[eNB][1][4], - ue->measurements.subband_cqi_dB[eNB][1][5], - ue->measurements.subband_cqi_dB[eNB][1][6], - ue->measurements.subband_cqi_dB[eNB][1][7], - ue->measurements.subband_cqi_dB[eNB][1][8], - ue->measurements.subband_cqi_dB[eNB][1][9], - ue->measurements.subband_cqi_dB[eNB][1][10], - ue->measurements.subband_cqi_dB[eNB][1][11], - ue->measurements.subband_cqi_dB[eNB][1][12]); - len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 0): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n", - eNB, - ue->measurements.subband_pmi_re[eNB][0][0], - ue->measurements.subband_pmi_im[eNB][0][0], - ue->measurements.subband_pmi_re[eNB][1][0], - ue->measurements.subband_pmi_im[eNB][1][0], - ue->measurements.subband_pmi_re[eNB][2][0], - ue->measurements.subband_pmi_im[eNB][2][0], - ue->measurements.subband_pmi_re[eNB][3][0], - ue->measurements.subband_pmi_im[eNB][3][0], - ue->measurements.subband_pmi_re[eNB][4][0], - ue->measurements.subband_pmi_im[eNB][4][0], - ue->measurements.subband_pmi_re[eNB][5][0], - ue->measurements.subband_pmi_im[eNB][5][0], - ue->measurements.subband_pmi_re[eNB][6][0], - ue->measurements.subband_pmi_im[eNB][6][0], - ue->measurements.subband_pmi_re[eNB][7][0], - ue->measurements.subband_pmi_im[eNB][7][0], - ue->measurements.subband_pmi_re[eNB][8][0], - ue->measurements.subband_pmi_im[eNB][8][0], - ue->measurements.subband_pmi_re[eNB][9][0], - ue->measurements.subband_pmi_im[eNB][9][0], - ue->measurements.subband_pmi_re[eNB][10][0], - ue->measurements.subband_pmi_im[eNB][10][0], - ue->measurements.subband_pmi_re[eNB][11][0], - ue->measurements.subband_pmi_im[eNB][11][0], - ue->measurements.subband_pmi_re[eNB][12][0], - ue->measurements.subband_pmi_im[eNB][12][0]); - len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 1): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n", - eNB, - ue->measurements.subband_pmi_re[eNB][0][1], - ue->measurements.subband_pmi_im[eNB][0][1], - ue->measurements.subband_pmi_re[eNB][1][1], - ue->measurements.subband_pmi_im[eNB][1][1], - ue->measurements.subband_pmi_re[eNB][2][1], - ue->measurements.subband_pmi_im[eNB][2][1], - ue->measurements.subband_pmi_re[eNB][3][1], - ue->measurements.subband_pmi_im[eNB][3][1], - ue->measurements.subband_pmi_re[eNB][4][1], - ue->measurements.subband_pmi_im[eNB][4][1], - ue->measurements.subband_pmi_re[eNB][5][1], - ue->measurements.subband_pmi_im[eNB][5][1], - ue->measurements.subband_pmi_re[eNB][6][1], - ue->measurements.subband_pmi_im[eNB][6][1], - ue->measurements.subband_pmi_re[eNB][7][1], - ue->measurements.subband_pmi_im[eNB][7][1], - ue->measurements.subband_pmi_re[eNB][8][1], - ue->measurements.subband_pmi_im[eNB][8][1], - ue->measurements.subband_pmi_re[eNB][9][1], - ue->measurements.subband_pmi_im[eNB][9][1], - ue->measurements.subband_pmi_re[eNB][10][1], - ue->measurements.subband_pmi_im[eNB][10][1], - ue->measurements.subband_pmi_re[eNB][11][1], - ue->measurements.subband_pmi_im[eNB][11][1], - ue->measurements.subband_pmi_re[eNB][12][1], - ue->measurements.subband_pmi_im[eNB][12][1]); - len += sprintf(&buffer[len], "[UE PROC] PMI Antenna selection eNB%d : [%d %d %d %d %d %d %d %d %d %d %d %d %d]\n", - eNB, - ue->measurements.selected_rx_antennas[eNB][0], - ue->measurements.selected_rx_antennas[eNB][1], - ue->measurements.selected_rx_antennas[eNB][2], - ue->measurements.selected_rx_antennas[eNB][3], - ue->measurements.selected_rx_antennas[eNB][4], - ue->measurements.selected_rx_antennas[eNB][5], - ue->measurements.selected_rx_antennas[eNB][6], - ue->measurements.selected_rx_antennas[eNB][7], - ue->measurements.selected_rx_antennas[eNB][8], - ue->measurements.selected_rx_antennas[eNB][9], - ue->measurements.selected_rx_antennas[eNB][10], - ue->measurements.selected_rx_antennas[eNB][11], - ue->measurements.selected_rx_antennas[eNB][12]); - len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (max): %jx\n",eNB,pmi2hex_2Ar1(quantize_subband_pmi(&ue->measurements,eNB,13))); - len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (both): %jx,%jx\n",eNB, - pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,0,13)), - pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,1,13))); - break; - } - - RRC_status = mac_UE_get_rrc_status(ue->Mod_id, 0); - len += sprintf(&buffer[len],"[UE PROC] RRC status = %d\n",RRC_status); - len += sprintf(&buffer[len], "[UE PROC] Transmission Mode %d \n",ue->transmission_mode[eNB]); - len += sprintf(&buffer[len], "[UE PROC] PBCH err conseq %d, PBCH error total %d, PBCH FER %d\n", - ue->pbch_vars[eNB]->pdu_errors_conseq, - ue->pbch_vars[eNB]->pdu_errors, - ue->pbch_vars[eNB]->pdu_fer); - - if (ue->transmission_mode[eNB] == 6) - len += sprintf(&buffer[len], "[UE PROC] Mode 6 Wideband CQI eNB %d : %d dB\n",eNB,ue->measurements.precoded_cqi_dB[eNB][0]); - - for (harq_pid=0; harq_pid<8; harq_pid++) { - len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 0 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][0][0]->harq_processes[harq_pid]->mcs); - - for (round=0; round<8; round++) - len+=sprintf(&buffer[len],"%d/%d ", - ue->dlsch[0][0][0]->harq_processes[harq_pid]->errors[round], - ue->dlsch[0][0][0]->harq_processes[harq_pid]->trials[round]); - - len+=sprintf(&buffer[len],"\n"); - } - - if (ue->dlsch[0][0] && ue->dlsch[0][0][0] && ue->dlsch[0][0][1]) { - len += sprintf(&buffer[len], "[UE PROC] Saved PMI for DLSCH eNB %d : %jx (%p)\n",eNB,pmi2hex_2Ar1(ue->dlsch[0][0][0]->pmi_alloc),ue->dlsch[0][0][0]); - len += sprintf(&buffer[len], "[UE PROC] eNB %d: dl_power_off = %d\n",eNB,ue->dlsch[0][0][0]->harq_processes[0]->dl_power_off); - - for (harq_pid=0; harq_pid<8; harq_pid++) { - len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 1 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][0][1]->harq_processes[0]->mcs); - - for (round=0; round<8; round++) - len+=sprintf(&buffer[len],"%d/%d ", - ue->dlsch[0][0][1]->harq_processes[harq_pid]->errors[round], - ue->dlsch[0][0][1]->harq_processes[harq_pid]->trials[round]); - - len+=sprintf(&buffer[len],"\n"); - } - } - - len += sprintf(&buffer[len], "[UE PROC] DLSCH Total %d, Error %d, FER %d\n",ue->dlsch_received[0],ue->dlsch_errors[0],ue->dlsch_fer[0]); - len += sprintf(&buffer[len], "[UE PROC] DLSCH (SI) Total %d, Error %d\n",ue->dlsch_SI_received[0],ue->dlsch_SI_errors[0]); - len += sprintf(&buffer[len], "[UE PROC] DLSCH (RA) Total %d, Error %d\n",ue->dlsch_ra_received[0],ue->dlsch_ra_errors[0]); - int i=0; - - //len += sprintf(&buffer[len], "[UE PROC] MCH Total %d\n", ue->dlsch_mch_received[0]); - for(i=0; i frame_parms.num_MBSFN_config; i++ ) { - len += sprintf(&buffer[len], "[UE PROC] MCH (MCCH MBSFN %d) Total %d, Error %d, Trials %d\n", - i, ue->dlsch_mcch_received[i][0],ue->dlsch_mcch_errors[i][0],ue->dlsch_mcch_trials[i][0]); - len += sprintf(&buffer[len], "[UE PROC] MCH (MTCH MBSFN %d) Total %d, Error %d, Trials %d\n", - i, ue->dlsch_mtch_received[i][0],ue->dlsch_mtch_errors[i][0],ue->dlsch_mtch_trials[i][0]); - } - - len += sprintf(&buffer[len], "[UE PROC] DLSCH Bitrate %dkbps\n",(ue->bitrate[0]/1000)); - len += sprintf(&buffer[len], "[UE PROC] Total Received Bits %dkbits\n",(ue->total_received_bits[0]/1000)); - len += sprintf(&buffer[len], "[UE PROC] IA receiver %d\n",ue->use_ia_receiver); - } - } else { - len += sprintf(&buffer[len], "[UE PROC] Frame count: %d, RSSI %3.2f dB (%d dB, %d dB), N0 %3.2f dB (%d dB, %d dB)\n", - proc->frame_rx, - 10*log10(ue->measurements.rssi), - ue->measurements.rx_power_dB[0][0], - ue->measurements.rx_power_dB[0][1], - 10*log10(ue->measurements.n0_power_tot), - ue->measurements.n0_power_dB[0], - ue->measurements.n0_power_dB[1]); - } - - len += sprintf(&buffer[len],"EOF\n"); - return len; -} // is_clusterhead - -/* -int dump_eNB_stats(PHY_VARS_eNB *eNB, char* buffer, int length) -{ - - unsigned int success=0; - uint8_t eNB_id,UE_id,i,j,number_of_cards_l=1; - uint32_t ulsch_errors=0,dlsch_errors=0; - uint32_t ulsch_round_attempts[4]= {0,0,0,0},ulsch_round_errors[4]= {0,0,0,0}; - uint32_t dlsch_round_attempts[4]= {0,0,0,0},dlsch_round_errors[4]= {0,0,0,0}; - uint32_t UE_id_mac, RRC_status; - eNB_rxtx_proc_t *proc = &eNB->proc.proc_rxtx[0]; - if (eNB==NULL) - return 0; - - int len = length; - - // if(eNB->frame==0){ - eNB->total_dlsch_bitrate = 0;//eNB->UE_stats[UE_id].dlsch_bitrate + eNB->total_dlsch_bitrate; - eNB->total_transmitted_bits = 0;// eNB->UE_stats[UE_id].total_transmitted_bits + eNB->total_transmitted_bits; - eNB->total_system_throughput = 0;//eNB->UE_stats[UE_id].total_transmitted_bits + eNB->total_system_throughput; - // } - - for (eNB_id=0; eNB_idframe_tx, - eNB->rx_total_gain_dB, - eNB->measurements.n0_power_tot_dBm, - eNB->measurements.n0_power_dB[0], - eNB->measurements.n0_power_dB[1]); - - len += sprintf(&buffer[len],"PRB I0 (%X.%X.%X.%X): ", - eNB->rb_mask_ul[0], - eNB->rb_mask_ul[1],eNB->rb_mask_ul[2],eNB->rb_mask_ul[3]); - - for (i=0; iframe_parms.N_RB_UL; i++) { - len += sprintf(&buffer[len],"%4d ", - eNB->measurements.n0_subband_power_tot_dBm[i]); - if ((i>0) && ((i%25) == 0)) - len += sprintf(&buffer[len],"\n"); - } - len += sprintf(&buffer[len],"\n"); - len += sprintf(&buffer[len],"\nPERFORMANCE PARAMETERS\n"); - - for (UE_id=0; UE_iddlsch!=NULL) && - (eNB->dlsch[(uint8_t)UE_id]!=NULL) && - (eNB->dlsch[(uint8_t)UE_id][0]->rnti>0)&& - (eNB->UE_stats[UE_id].mode == PUSCH)) { - - eNB->total_dlsch_bitrate = eNB->UE_stats[UE_id].dlsch_bitrate + eNB->total_dlsch_bitrate; - eNB->total_transmitted_bits = eNB->UE_stats[UE_id].total_TBS + eNB->total_transmitted_bits; - - //eNB->total_system_throughput = eNB->UE_stats[UE_id].total_transmitted_bits + eNB->total_system_throughput; - - for (i=0; i<8; i++) - success = success + (eNB->UE_stats[UE_id].dlsch_trials[i][0] - eNB->UE_stats[UE_id].dlsch_l2_errors[i]); - - - - len += sprintf(&buffer[len],"Total DLSCH %d kbits / %d frames ",(eNB->total_transmitted_bits/1000),proc->frame_tx+1); - len += sprintf(&buffer[len],"Total DLSCH throughput %d kbps ",(eNB->total_dlsch_bitrate/1000)); - len += sprintf(&buffer[len],"Total DLSCH trans %d / %d frames\n",success,proc->frame_tx+1); - //len += sprintf(&buffer[len],"[eNB PROC] FULL MU-MIMO Transmissions/Total Transmissions = %d/%d\n",eNB->FULL_MUMIMO_transmissions,eNB->check_for_total_transmissions); - //len += sprintf(&buffer[len],"[eNB PROC] MU-MIMO Transmissions/Total Transmissions = %d/%d\n",eNB->check_for_MUMIMO_transmissions,eNB->check_for_total_transmissions); - //len += sprintf(&buffer[len],"[eNB PROC] SU-MIMO Transmissions/Total Transmissions = %d/%d\n",eNB->check_for_SUMIMO_transmissions,eNB->check_for_total_transmissions); - - len += sprintf(&buffer[len],"UE %d (%x) Power: (%d,%d) dB, Po_PUSCH: (%d,%d) dBm, Po_PUCCH (%d/%d) dBm, Po_PUCCH1 (%d,%d) dBm, PUCCH1 Thres %d dBm \n", - UE_id, - eNB->UE_stats[UE_id].crnti, - dB_fixed(eNB->pusch_vars[UE_id]->ulsch_power[0]), - dB_fixed(eNB->pusch_vars[UE_id]->ulsch_power[1]), - eNB->UE_stats[UE_id].UL_rssi[0], - eNB->UE_stats[UE_id].UL_rssi[1], - dB_fixed(eNB->UE_stats[UE_id].Po_PUCCH/eNB->frame_parms.N_RB_UL)-eNB->rx_total_gain_dB, - eNB->frame_parms.ul_power_control_config_common.p0_NominalPUCCH, - dB_fixed(eNB->UE_stats[UE_id].Po_PUCCH1_below/eNB->frame_parms.N_RB_UL)-eNB->rx_total_gain_dB, - dB_fixed(eNB->UE_stats[UE_id].Po_PUCCH1_above/eNB->frame_parms.N_RB_UL)-eNB->rx_total_gain_dB, - PUCCH1_THRES+eNB->measurements.n0_power_tot_dBm-dB_fixed(eNB->frame_parms.N_RB_UL)); - - len+= sprintf(&buffer[len],"DL mcs %d, UL mcs %d, UL rb %d, delta_TF %d, ", - eNB->dlsch[(uint8_t)UE_id][0]->harq_processes[0]->mcs, - eNB->ulsch[(uint8_t)UE_id]->harq_processes[0]->mcs, - eNB->ulsch[(uint8_t)UE_id]->harq_processes[0]->nb_rb, - eNB->ulsch[(uint8_t)UE_id]->harq_processes[0]->delta_TF); - - len += sprintf(&buffer[len],"Wideband CQI: (%d,%d) dB\n", - eNB->measurements.wideband_cqi_dB[UE_id][0], - eNB->measurements.wideband_cqi_dB[UE_id][1]); - - len += sprintf(&buffer[len],"DL TM %d, DL_cqi %d, DL_pmi_single %jx ", - eNB->transmission_mode[UE_id], - eNB->UE_stats[UE_id].DL_cqi[0], - pmi2hex_2Ar1(eNB->UE_stats[UE_id].DL_pmi_single)); - - len += sprintf(&buffer[len],"Timing advance %d samples (%d 16Ts), update %d ", - eNB->UE_stats[UE_id].UE_timing_offset, - eNB->UE_stats[UE_id].UE_timing_offset>>2, - eNB->UE_stats[UE_id].timing_advance_update); - - len += sprintf(&buffer[len],"Mode = %s(%d) ", - mode_string[eNB->UE_stats[UE_id].mode], - eNB->UE_stats[UE_id].mode); - UE_id_mac = find_UE_id(eNB->Mod_id,eNB->dlsch[(uint8_t)UE_id][0]->rnti); - - if (UE_id_mac != -1) { - RRC_status = mac_eNB_get_rrc_status(eNB->Mod_id,eNB->dlsch[(uint8_t)UE_id][0]->rnti); - len += sprintf(&buffer[len],"UE_id_mac = %d, RRC status = %d\n",UE_id_mac,RRC_status); - } else - len += sprintf(&buffer[len],"UE_id_mac = -1\n"); - - len += sprintf(&buffer[len],"SR received/total: %d/%d (diff %d)\n", - eNB->UE_stats[UE_id].sr_received, - eNB->UE_stats[UE_id].sr_total, - eNB->UE_stats[UE_id].sr_total-eNB->UE_stats[UE_id].sr_received); - - len += sprintf(&buffer[len],"DL Subband CQI: "); - - int nb_sb; - switch (eNB->frame_parms.N_RB_DL) { - case 6: - nb_sb=0; - break; - case 15: - nb_sb = 4; - case 25: - nb_sb = 7; - break; - case 50: - nb_sb = 9; - break; - case 75: - nb_sb = 10; - break; - case 100: - nb_sb = 13; - break; - default: - nb_sb=0; - break; - } - for (i=0; iUE_stats[UE_id].DL_subband_cqi[0][i]); - len += sprintf(&buffer[len],"\n"); - - - - ulsch_errors = 0; - - for (j=0; j<4; j++) { - ulsch_round_attempts[j]=0; - ulsch_round_errors[j]=0; - } - - len += sprintf(&buffer[len],"ULSCH errors/attempts per harq (per round): \n"); - - for (i=0; i<8; i++) { - len += sprintf(&buffer[len]," harq %d: %d/%d (fer %d) (%d/%d, %d/%d, %d/%d, %d/%d) ", - i, - eNB->UE_stats[UE_id].ulsch_errors[i], - eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][0], - eNB->UE_stats[UE_id].ulsch_round_fer[i][0], - eNB->UE_stats[UE_id].ulsch_round_errors[i][0], - eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][0], - eNB->UE_stats[UE_id].ulsch_round_errors[i][1], - eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][1], - eNB->UE_stats[UE_id].ulsch_round_errors[i][2], - eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][2], - eNB->UE_stats[UE_id].ulsch_round_errors[i][3], - eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][3]); - if ((i&1) == 1) - len += sprintf(&buffer[len],"\n"); - - ulsch_errors+=eNB->UE_stats[UE_id].ulsch_errors[i]; - - for (j=0; j<4; j++) { - ulsch_round_attempts[j]+=eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][j]; - ulsch_round_errors[j]+=eNB->UE_stats[UE_id].ulsch_round_errors[i][j]; - } - } - - len += sprintf(&buffer[len],"ULSCH errors/attempts total %d/%d (%d/%d, %d/%d, %d/%d, %d/%d)\n", - ulsch_errors,ulsch_round_attempts[0], - - ulsch_round_errors[0],ulsch_round_attempts[0], - ulsch_round_errors[1],ulsch_round_attempts[1], - ulsch_round_errors[2],ulsch_round_attempts[2], - ulsch_round_errors[3],ulsch_round_attempts[3]); - - dlsch_errors = 0; - - for (j=0; j<4; j++) { - dlsch_round_attempts[j]=0; - dlsch_round_errors[j]=0; - } - - len += sprintf(&buffer[len],"DLSCH errors/attempts per harq (per round): \n"); - - for (i=0; i<8; i++) { - len += sprintf(&buffer[len]," harq %d: %d/%d (%d/%d/%d, %d/%d/%d, %d/%d/%d, %d/%d/%d) ", - i, - eNB->UE_stats[UE_id].dlsch_l2_errors[i], - eNB->UE_stats[UE_id].dlsch_trials[i][0], - eNB->UE_stats[UE_id].dlsch_ACK[i][0], - eNB->UE_stats[UE_id].dlsch_NAK[i][0], - eNB->UE_stats[UE_id].dlsch_trials[i][0], - eNB->UE_stats[UE_id].dlsch_ACK[i][1], - eNB->UE_stats[UE_id].dlsch_NAK[i][1], - eNB->UE_stats[UE_id].dlsch_trials[i][1], - eNB->UE_stats[UE_id].dlsch_ACK[i][2], - eNB->UE_stats[UE_id].dlsch_NAK[i][2], - eNB->UE_stats[UE_id].dlsch_trials[i][2], - eNB->UE_stats[UE_id].dlsch_ACK[i][3], - eNB->UE_stats[UE_id].dlsch_NAK[i][3], - eNB->UE_stats[UE_id].dlsch_trials[i][3]); - if ((i&1) == 1) - len += sprintf(&buffer[len],"\n"); - - - dlsch_errors+=eNB->UE_stats[UE_id].dlsch_l2_errors[i]; - - for (j=0; j<4; j++) { - dlsch_round_attempts[j]+=eNB->UE_stats[UE_id].dlsch_trials[i][j]; - dlsch_round_errors[j]+=eNB->UE_stats[UE_id].dlsch_NAK[i][j]; - } - } - - len += sprintf(&buffer[len],"DLSCH errors/attempts total %d/%d (%d/%d, %d/%d, %d/%d, %d/%d): \n", - dlsch_errors,dlsch_round_attempts[0], - dlsch_round_errors[0],dlsch_round_attempts[0], - dlsch_round_errors[1],dlsch_round_attempts[1], - dlsch_round_errors[2],dlsch_round_attempts[2], - dlsch_round_errors[3],dlsch_round_attempts[3]); - - - len += sprintf(&buffer[len],"DLSCH total bits from MAC: %dkbit ",(eNB->UE_stats[UE_id].total_TBS_MAC)/1000); - len += sprintf(&buffer[len],"DLSCH total bits ack'ed: %dkbit ",(eNB->UE_stats[UE_id].total_TBS)/1000); - len += sprintf(&buffer[len],"DLSCH Average throughput (100 frames): %dkbps\n",(eNB->UE_stats[UE_id].dlsch_bitrate/1000)); - // len += sprintf(&buffer[len],"[eNB PROC] Transmission Mode %d\n",eNB->transmission_mode[UE_id]); - } - } - - len += sprintf(&buffer[len],"\n"); - } - - len += sprintf(&buffer[len],"EOF\n"); - - return len; -} -*/ diff --git a/openair1/PHY/LTE_TRANSPORT/pss.c b/openair1/PHY/LTE_TRANSPORT/pss.c index 34a7ba7007..8d95001c0e 100644 --- a/openair1/PHY/LTE_TRANSPORT/pss.c +++ b/openair1/PHY/LTE_TRANSPORT/pss.c @@ -48,7 +48,7 @@ int generate_pss(int32_t **txdataF, unsigned int Nsymb; unsigned short k,m,aa,a; uint8_t Nid2; - short *primary_sync; + const short *primary_sync; Nid2 = frame_parms->Nid_cell % 3; switch (Nid2) { diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c index 39d1a86e5b..190e3c47c0 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c @@ -40,8 +40,6 @@ #include "T.h" -//extern char* namepointer_chMag ; -//eren //extern int **ulchmag_eren; //eren @@ -1044,7 +1042,6 @@ void rx_ulsch(PHY_VARS_eNB *eNB, L1_rxtx_proc_t *proc, uint8_t UE_id) { LTE_eNB_ULSCH_t **ulsch = eNB->ulsch; - // flagMag = 0; LTE_eNB_COMMON *common_vars = &eNB->common_vars; LTE_eNB_PUSCH *pusch_vars = eNB->pusch_vars[UE_id]; LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms; diff --git a/openair1/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c index b5e5b490a3..42a83a2cda 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c @@ -37,6 +37,7 @@ #include "PHY/phy_vars.h" #endif #include "assertions.h" +#include "PHY/LTE_TRANSPORT/transport_vars.h" //#define DEBUG_HARQ @@ -60,10 +61,67 @@ #define LOG_I(A,B...) printf(B) */ +int flag_LA=0; + extern uint16_t beta_cqi[16]; extern uint16_t beta_ri[16]; extern uint16_t beta_ack[16]; +static const double p_qpsk[8] = {5982.42405670359, + -21568.1135917693, + 31293.9987036905, + -23394.6795043871, + 9608.34750585489, + -2158.15802349899, + 267.731968719036, + -20.6145324295965}; +static const double p_qam16[8] = {7862.12690694170, + -28510.3207048338, + 41542.2150287122, + -31088.3036957379, + 12690.1982361016, + -2785.66604739984, + 326.595462489375, + -18.9911849872089}; +static const double p_qam64[8] = {8832.57933013696, + -32119.1802555952, + 46914.2578990397, + -35163.8150557183, + 14343.7419388853, + -3126.61025510092, + 360.954930562237, + -18.0358548533343}; +static const double q_qpsk[8] = {1.94491167814437e-09, + 8.40494123817774e-08, + 4.75527131198034e-07, + -2.48946285301621e-05, + -0.000347614016158364, + 0.00209252225437100, + 0.0742986115462510, + 0.488297879889425}; +static const double q_qam16[8] = {3.21151853033897e-10, + 5.55435952230651e-09, + -2.30760065362117e-07, + -6.25587743817859e-06, + 4.62251036452795e-06, + 0.00224150813158937, + 0.0393723140344367, + 0.245486379182639}; +static const double q_qam64[8] = {2.25934026232206e-11, + -1.45992206328306e-10, + -3.70861183071900e-08, + -1.22206071019319e-06, + 6.49115500399637e-06, + 0.00129828997837433, + 0.0259669554914859, + 0.166602901214898}; +static const double sinr_to_cqi[4][16] = { + {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424}, + {-2.2360, -2.2360, -1.3919, -0.0218, 1.5319, 2.9574, 4.3234, 6.3387, 8.9879, 9.5096, 12.6609, 14.0116, 16.4984, 18.1572, 18.1572, 18.1572}, + {-1, -1.0000, -0.4198, -0.0140, 1.0362, 2.3520, 3.5793, 6.1136, 8.4836, 9.0858, 12.4723, 13.9128, 16.2054, 17.7392, 17.7392, 17.7392}, + { -4.1057, -4.1057, -3.3768, -2.2916, -1.1392, 0.1236, 1.2849, 3.1933, 5.9298, 6.4052, 9.6245, 10.9414, 13.5166, 14.9545, 14.9545, 14.9545} +}; + static int errorRB(int rb, char * table, int line) { LOG_E(PHY,"Received %d rb, impossble in table %s, at line %d\n", rb, table, line); return 0; @@ -2926,7 +2984,6 @@ uint16_t quantize_wideband_pmi(PHY_MEASUREMENTS *meas,uint8_t eNB_id) uint8_t sinr2cqi(double sinr,uint8_t trans_mode) { - // int flag_LA=0; uint8_t retValue = 0; diff --git a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c index 096c0fd442..8c0681e162 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c @@ -30,7 +30,7 @@ * \warning */ #include "PHY/defs_UE.h" -#include "PHY/phy_extern_ue.h" +#include "PHY/phy_extern.h" #include "SCHED_UE/sched_UE.h" #include "transport_ue.h" #include "transport_proto_ue.h" diff --git a/openair1/PHY/LTE_UE_TRANSPORT/pbch_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/pbch_ue.c index ad7bb6c8bf..108680c640 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/pbch_ue.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/pbch_ue.c @@ -36,7 +36,7 @@ #include "PHY/CODING/coding_extern.h" #include "PHY/CODING/lte_interleaver_inline.h" #include "transport_ue.h" -#include "PHY/phy_extern_ue.h" +#include "PHY/phy_extern.h" #include "PHY/sse_intrin.h" #include "PHY/LTE_REFSIG/lte_refsig.h" diff --git a/openair1/PHY/LTE_UE_TRANSPORT/pmch_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/pmch_ue.c index ae5a608da1..eb9e3bc742 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/pmch_ue.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/pmch_ue.c @@ -32,7 +32,7 @@ #include "PHY/defs_UE.h" -#include "PHY/phy_extern_ue.h" +#include "PHY/phy_extern.h" #include "PHY/sse_intrin.h" #include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h" diff --git a/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c index 9427ec3a5b..6df56d6c53 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/pucch_ue.c @@ -32,6 +32,7 @@ #include "PHY/defs_UE.h" #include "PHY/phy_extern_ue.h" #include "PHY/LTE_REFSIG/lte_refsig.h" +#include "PHY/LTE_TRANSPORT/transport_vars.h" #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" diff --git a/openair1/PHY/LTE_UE_TRANSPORT/rar_tools_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/rar_tools_ue.c index b4273095ba..b856976638 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/rar_tools_ue.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/rar_tools_ue.c @@ -35,6 +35,7 @@ #include "LAYER2/MAC/mac.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "transport_proto_ue.h" +#include "PHY/LTE_TRANSPORT/transport_vars.h" #include "assertions.h" diff --git a/openair1/PHY/LTE_UE_TRANSPORT/srs_modulation.c b/openair1/PHY/LTE_UE_TRANSPORT/srs_modulation.c index 9c0edb467c..534228a935 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/srs_modulation.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/srs_modulation.c @@ -30,20 +30,22 @@ * \warning */ #include "PHY/defs_UE.h" -#include "PHY/phy_extern_ue.h" +#include "PHY/phy_extern.h" #include "common/utils/LOG/log.h" -unsigned short msrsb_6_40[8][4] = {{36,12,4,4}, - {32,16,8,4}, - {24,4,4,4}, - {20,4,4,4}, - {16,4,4,4}, - {12,4,4,4}, - {8,4,4,4}, - {4,4,4,4} +static unsigned short msrsb_6_40[8][4] = { + {36, 12, 4, 4}, + {32, 16, 8, 4}, + {24, 4, 4, 4}, + {20, 4, 4, 4}, + {16, 4, 4, 4}, + {12, 4, 4, 4}, + {8, 4, 4, 4}, + {4, 4, 4, 4} }; -unsigned short msrsb_41_60[8][4] = {{48,24,12,4}, +static unsigned short msrsb_41_60[8][4] = { + {48,24,12,4}, {48,16,8,4}, {40,20,4,4}, {36,12,4,4}, @@ -53,47 +55,8 @@ unsigned short msrsb_41_60[8][4] = {{48,24,12,4}, {16,4,4,4} }; -unsigned short msrsb_61_80[8][4] = {{72,24,12,4}, - {64,32,16,4}, - {60,20,4,4}, - {48,24,12,4}, - {48,16,8,4}, - {40,20,4,4}, - {36,12,4,4}, - {32,16,8,4} -}; - -unsigned short msrsb_81_110[8][4] = {{96,48,24,4}, - {96,32,16,4}, - {80,40,20,4}, +static unsigned short msrsb_61_80[8][4] = { {72,24,12,4}, - {64,32,16,4}, - {60,20,4,4}, - {48,24,12,4}, - {48,16,8,4} -}; - -unsigned short Nb_6_40[8][4] = {{36,12,4,4}, - {32,16,8,4}, - {24,4,4,4}, - {20,4,4,4}, - {16,4,4,4}, - {12,4,4,4}, - {8,4,4,4}, - {4,4,4,4} -}; - -unsigned short Nb_41_60[8][4] = {{48,24,12,4}, - {48,16,8,4}, - {40,20,4,4}, - {36,12,4,4}, - {32,16,8,4}, - {24,4,4,4}, - {20,4,4,4}, - {16,4,4,4} -}; - -unsigned short Nb_61_80[8][4] = {{72,24,12,4}, {64,32,16,4}, {60,20,4,4}, {48,24,12,4}, @@ -103,7 +66,8 @@ unsigned short Nb_61_80[8][4] = {{72,24,12,4}, {32,16,8,4} }; -unsigned short Nb_81_110[8][4] = {{96,48,24,4}, +static unsigned short msrsb_81_110[8][4] = { + {96,48,24,4}, {96,32,16,4}, {80,40,20,4}, {72,24,12,4}, diff --git a/openair1/PHY/LTE_UE_TRANSPORT/sss_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/sss_ue.c index 7087b83bca..79b20dc10c 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/sss_ue.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/sss_ue.c @@ -31,7 +31,7 @@ */ #include "PHY/defs_UE.h" #include "transport_ue.h" -#include "PHY/phy_extern_ue.h" +#include "PHY/phy_extern.h" #include "PHY/MODULATION/modulation_UE.h" //#define DEBUG_SSS @@ -44,7 +44,7 @@ int pss_ch_est(PHY_VARS_UE *ue, int32_t sss_ext[4][72]) { - int16_t *pss; + const int16_t *pss; int16_t *pss_ext2,*sss_ext2,*sss_ext3,tmp_re,tmp_im,tmp_re2,tmp_im2; uint8_t aarx,i; LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; diff --git a/openair1/PHY/LTE_UE_TRANSPORT/uci_tools_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/uci_tools_ue.c index e687ccfd04..642659f674 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/uci_tools_ue.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/uci_tools_ue.c @@ -56,7 +56,6 @@ void print_CQI(void *o,UCI_format_t uci_format,unsigned char eNB_id,int N_RB_DL) switch(uci_format) { case wideband_cqi_rank1_2A: #ifdef DEBUG_UCI - LOG_D(PHY,"[PRINT CQI] flat_LA %d\n", flag_LA); switch(N_RB_DL) { case 6: LOG_I(PHY,"[PRINT CQI] wideband_cqi rank 1: eNB %d, cqi %d\n",eNB_id, diff --git a/openair1/PHY/LTE_UE_TRANSPORT/ulsch_coding.c b/openair1/PHY/LTE_UE_TRANSPORT/ulsch_coding.c index f7566abebf..293ebc2a4f 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/ulsch_coding.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/ulsch_coding.c @@ -38,6 +38,7 @@ #include "PHY/CODING/lte_interleaver_inline.h" #include "PHY/LTE_UE_TRANSPORT/transport_ue.h" #include "common/utils/LOG/vcd_signal_dumper.h" +#include "PHY/LTE_TRANSPORT/transport_vars.h" //#define DEBUG_ULSCH_CODING //#define DEBUG_ULSCH_FREE 1 diff --git a/openair1/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c b/openair1/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c index 341e1e90b6..838da36289 100644 --- a/openair1/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c +++ b/openair1/PHY/LTE_UE_TRANSPORT/ulsch_modulation.c @@ -38,6 +38,7 @@ #include "PHY/LTE_TRANSPORT/transport_eNB.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "PHY/LTE_REFSIG/lte_refsig.h" +#include "PHY/LTE_TRANSPORT/transport_vars.h" //#define DEBUG_ULSCH_MODULATION diff --git a/openair1/PHY/MODULATION/beamforming.c b/openair1/PHY/MODULATION/beamforming.c index d592aa466e..12517d0a97 100644 --- a/openair1/PHY/MODULATION/beamforming.c +++ b/openair1/PHY/MODULATION/beamforming.c @@ -137,8 +137,8 @@ int beam_precoding_one_eNB(int32_t **txdataF, } -int nr_beam_precoding(int32_t **txdataF, - int32_t **txdataF_BF, +int nr_beam_precoding(c16_t **txdataF, + c16_t **txdataF_BF, NR_DL_FRAME_PARMS *frame_parms, int32_t ***beam_weights, int slot, @@ -152,7 +152,7 @@ int nr_beam_precoding(int32_t **txdataF, uint8_t p; // clear txdata_BF[aa][re] for each call of ue_spec_beamforming - memset(&txdataF_BF[aa][symbol*frame_parms->ofdm_symbol_size],0,sizeof(int32_t)*(frame_parms->ofdm_symbol_size)); + memset(&txdataF_BF[aa][symbol*frame_parms->ofdm_symbol_size], 0, sizeof(c16_t) *(frame_parms->ofdm_symbol_size)); for (p=0; pL_ssb >> (63-p)) & 0x01) { diff --git a/openair1/PHY/MODULATION/gen_75KHz.cpp b/openair1/PHY/MODULATION/gen_75KHz.cpp index 6efa3ddf2f..d3ca7c56aa 100644 --- a/openair1/PHY/MODULATION/gen_75KHz.cpp +++ b/openair1/PHY/MODULATION/gen_75KHz.cpp @@ -13,7 +13,6 @@ extern "C" { double samplerate = 30.72e6*ratio; double ofdm_size = 2048*ratio; double PI = std::acos(-1); - std::complex tt; complex t[len]; int index=0; double cp0 = 160*ratio; diff --git a/openair1/PHY/MODULATION/modulation_common.h b/openair1/PHY/MODULATION/modulation_common.h index 1a19bec78c..7c214fa821 100644 --- a/openair1/PHY/MODULATION/modulation_common.h +++ b/openair1/PHY/MODULATION/modulation_common.h @@ -49,7 +49,7 @@ void PHY_ofdm_mod(int *input, void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRAME_PARMS *frame_parms); -void nr_normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,NR_DL_FRAME_PARMS *frame_parms, uint32_t slot); +void nr_normal_prefix_mod(c16_t *txdataF, c16_t *txdata, uint8_t nsymb, NR_DL_FRAME_PARMS *frame_parms, uint32_t slot); void do_OFDM_mod(int32_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms); diff --git a/openair1/PHY/MODULATION/nr_modulation.c b/openair1/PHY/MODULATION/nr_modulation.c index 5d55cb142d..251955ee99 100644 --- a/openair1/PHY/MODULATION/nr_modulation.c +++ b/openair1/PHY/MODULATION/nr_modulation.c @@ -618,7 +618,7 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp) { for (uint8_t ll = 0; ll < 2; ll++){ double f0 = f[ll]; - LOG_I(PHY, "Doing symbol rotation calculation for gNB TX/RX, f0 %f Hz, Nsymb %d\n", f0, nsymb); + LOG_D(PHY, "Doing symbol rotation calculation for gNB TX/RX, f0 %f Hz, Nsymb %d\n", f0, nsymb); c16_t *symbol_rotation = fp->symbol_rotation[ll]; double tl = 0.0; @@ -641,7 +641,7 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp) { symbol_rotation[l].r = (int16_t)floor(exp_re * 32767); symbol_rotation[l].i = (int16_t)floor(exp_im * 32767); - LOG_I(PHY, "Symbol rotation %d/%d => tl %f (%d,%d) (%f)\n", + LOG_D(PHY, "Symbol rotation %d/%d => tl %f (%d,%d) (%f)\n", l, nsymb, tl, @@ -666,7 +666,7 @@ void init_timeshift_rotation(NR_DL_FRAME_PARMS *fp) fp->timeshift_symbol_rotation[i].i = (int16_t)round(exp_im * 32767); if (i < 10) - LOG_I(PHY,"Timeshift symbol rotation %d => (%d,%d) %f\n",i, + LOG_D(PHY,"Timeshift symbol rotation %d => (%d,%d) %f\n",i, fp->timeshift_symbol_rotation[i].r, fp->timeshift_symbol_rotation[i].i, poff); diff --git a/openair1/PHY/MODULATION/nr_modulation.h b/openair1/PHY/MODULATION/nr_modulation.h index 435251868e..086ad19afc 100644 --- a/openair1/PHY/MODULATION/nr_modulation.h +++ b/openair1/PHY/MODULATION/nr_modulation.h @@ -97,8 +97,8 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms, */ void nr_dft(int32_t *z,int32_t *d, uint32_t Msc_PUSCH); -int nr_beam_precoding(int32_t **txdataF, - int32_t **txdataF_BF, +int nr_beam_precoding(c16_t **txdataF, + c16_t **txdataF_BF, NR_DL_FRAME_PARMS *frame_parms, int32_t ***beam_weights, int slot, @@ -109,7 +109,7 @@ int nr_beam_precoding(int32_t **txdataF, ); void apply_nr_rotation(NR_DL_FRAME_PARMS *fp, - int16_t* txdata, + c16_t* txdata, int slot, int first_symbol, int nsymb); @@ -119,7 +119,7 @@ void init_symbol_rotation(NR_DL_FRAME_PARMS *fp); void init_timeshift_rotation(NR_DL_FRAME_PARMS *fp); void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms, - int32_t *rxdataF, + c16_t *rxdataF, int slot, int first_symbol, int nsymb); diff --git a/openair1/PHY/MODULATION/ofdm_mod.c b/openair1/PHY/MODULATION/ofdm_mod.c index 93994b9ab6..8e17fc0a4a 100644 --- a/openair1/PHY/MODULATION/ofdm_mod.c +++ b/openair1/PHY/MODULATION/ofdm_mod.c @@ -63,60 +63,60 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA } -void nr_normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,NR_DL_FRAME_PARMS *frame_parms, uint32_t slot) +void nr_normal_prefix_mod(c16_t *txdataF, c16_t *txdata, uint8_t nsymb, NR_DL_FRAME_PARMS *frame_parms, uint32_t slot) { // This function works only slot wise. For more generic symbol generation refer nr_feptx0() if (frame_parms->numerology_index != 0) { // case where numerology != 0 if (!(slot%(frame_parms->slots_per_subframe/2))) { - PHY_ofdm_mod(txdataF, - txdata, - frame_parms->ofdm_symbol_size, - 1, - frame_parms->nb_prefix_samples0, - CYCLIC_PREFIX); - PHY_ofdm_mod(txdataF+frame_parms->ofdm_symbol_size, - txdata + frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples0, - frame_parms->ofdm_symbol_size, - nsymb - 1, - frame_parms->nb_prefix_samples, - CYCLIC_PREFIX); + PHY_ofdm_mod((int *)txdataF, + (int *)txdata, + frame_parms->ofdm_symbol_size, + 1, + frame_parms->nb_prefix_samples0, + CYCLIC_PREFIX); + PHY_ofdm_mod((int *)txdataF + frame_parms->ofdm_symbol_size, + (int *)txdata + frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples0, + frame_parms->ofdm_symbol_size, + nsymb - 1, + frame_parms->nb_prefix_samples, + CYCLIC_PREFIX); } else { - PHY_ofdm_mod(txdataF, - txdata, - frame_parms->ofdm_symbol_size, - nsymb, - frame_parms->nb_prefix_samples, - CYCLIC_PREFIX); + PHY_ofdm_mod((int *)txdataF, + (int *)txdata, + frame_parms->ofdm_symbol_size, + nsymb, + frame_parms->nb_prefix_samples, + CYCLIC_PREFIX); } } else { // numerology = 0, longer CP for every 7th symbol - PHY_ofdm_mod(txdataF, - txdata, - frame_parms->ofdm_symbol_size, - 1, - frame_parms->nb_prefix_samples0, - CYCLIC_PREFIX); - PHY_ofdm_mod(txdataF+frame_parms->ofdm_symbol_size, - txdata + frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples0, - frame_parms->ofdm_symbol_size, - 6, - frame_parms->nb_prefix_samples, - CYCLIC_PREFIX); - PHY_ofdm_mod(txdataF + 7*frame_parms->ofdm_symbol_size, - txdata + 6*(frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples) + - frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples0, - frame_parms->ofdm_symbol_size, - 1, - frame_parms->nb_prefix_samples0, - CYCLIC_PREFIX); - PHY_ofdm_mod(txdataF + 8*frame_parms->ofdm_symbol_size, - txdata + 6*(frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples) + - 2*(frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples0), - frame_parms->ofdm_symbol_size, - 6, - frame_parms->nb_prefix_samples, - CYCLIC_PREFIX); + PHY_ofdm_mod((int *)txdataF, + (int *)txdata, + frame_parms->ofdm_symbol_size, + 1, + frame_parms->nb_prefix_samples0, + CYCLIC_PREFIX); + PHY_ofdm_mod((int *)txdataF + frame_parms->ofdm_symbol_size, + (int *)txdata + frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples0, + frame_parms->ofdm_symbol_size, + 6, + frame_parms->nb_prefix_samples, + CYCLIC_PREFIX); + PHY_ofdm_mod((int *)txdataF + 7*frame_parms->ofdm_symbol_size, + (int *)txdata + 6*(frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples) + + frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples0, + frame_parms->ofdm_symbol_size, + 1, + frame_parms->nb_prefix_samples0, + CYCLIC_PREFIX); + PHY_ofdm_mod((int *)txdataF + 8 * frame_parms->ofdm_symbol_size, + (int *)txdata + 6 * (frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples) + + 2*(frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples0), + frame_parms->ofdm_symbol_size, + 6, + frame_parms->nb_prefix_samples, + CYCLIC_PREFIX); } } @@ -334,7 +334,7 @@ void do_OFDM_mod(int32_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t ne } void apply_nr_rotation(NR_DL_FRAME_PARMS *fp, - int16_t* txdataF, + c16_t *txdataF, int slot, int first_symbol, int nsymb) @@ -345,7 +345,7 @@ void apply_nr_rotation(NR_DL_FRAME_PARMS *fp, for (int sidx = first_symbol; sidx < first_symbol + nsymb; sidx++) { c16_t *this_rotation = symbol_rotation + sidx; - c16_t *this_symbol = ((c16_t*) txdataF) + sidx * fp->ofdm_symbol_size; + c16_t *this_symbol = (txdataF) + sidx * fp->ofdm_symbol_size; LOG_D(PHY,"Rotating symbol %d, slot %d, symbol_subframe_index %d (%d,%d)\n", sidx, diff --git a/openair1/PHY/MODULATION/slot_fep_nr.c b/openair1/PHY/MODULATION/slot_fep_nr.c index d902c2af47..dee8253388 100644 --- a/openair1/PHY/MODULATION/slot_fep_nr.c +++ b/openair1/PHY/MODULATION/slot_fep_nr.c @@ -72,7 +72,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue, //#ifdef DEBUG_FEP // if (ue->frame <100) LOG_D(PHY,"slot_fep: slot %d, symbol %d, nb_prefix_samples %u, nb_prefix_samples0 %u, rx_offset %u energy %d\n", - Ns, symbol, nb_prefix_samples, nb_prefix_samples0, rx_offset, dB_fixed(signal_energy(&common_vars->rxdata[0][rx_offset],frame_parms->ofdm_symbol_size))); + Ns, symbol, nb_prefix_samples, nb_prefix_samples0, rx_offset, dB_fixed(signal_energy((int32_t *)&common_vars->rxdata[0][rx_offset],frame_parms->ofdm_symbol_size))); //#endif for (unsigned char aa=0; aanb_antennas_rx; aa++) { @@ -311,7 +311,7 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms, } void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms, - int32_t *rxdataF, + c16_t *rxdataF, int slot, int first_symbol, int nsymb) @@ -326,7 +326,7 @@ void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms, LOG_D(PHY,"slot %d, symb_offset %d rotating by %d.%d\n",slot,symb_offset,rot2.r,rot2.i); c16_t *shift_rot = frame_parms->timeshift_symbol_rotation; - c16_t *this_symbol = (c16_t *)&rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)]; + c16_t *this_symbol = &rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)]; if (frame_parms->N_RB_UL & 1) { rotate_cpx_vector(this_symbol, &rot2, this_symbol, diff --git a/openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c b/openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c index 0c73d3cd1d..ddd5d33a86 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c +++ b/openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c @@ -38,34 +38,27 @@ extern openair0_config_t openair0_cfg[MAX_CARDS]; -int nr_est_timing_advance_pusch(PHY_VARS_gNB* gNB, int UE_id) +void nr_est_timing_advance_pusch(const NR_DL_FRAME_PARMS *frame_parms, const int32_t *ul_ch_estimates_time, struct delay_s *delay) { - int max_pos = 0, max_val = 0; - - NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms; - NR_gNB_PUSCH *gNB_pusch_vars = gNB->pusch_vars[UE_id]; - int32_t **ul_ch_estimates_time = gNB_pusch_vars->ul_ch_estimates_time; - + int max_pos = delay->pusch_delay_max_pos; + int max_val = delay->pusch_delay_max_val; const int sync_pos = 0; for (int i = 0; i < frame_parms->ofdm_symbol_size; i++) { - int temp = 0; - - for (int aa = 0; aa < frame_parms->nb_antennas_rx; aa++) { - int Re = ((int16_t*)ul_ch_estimates_time[aa])[(i<<1)]; - int Im = ((int16_t*)ul_ch_estimates_time[aa])[1+(i<<1)]; - temp += (Re*Re/2) + (Im*Im/2); - } + c16_t *sample = (c16_t *)&ul_ch_estimates_time[i]; + int temp = (sample->r * sample->r / 2) + (sample->i * sample->i / 2); if (temp > max_val) { max_pos = i; max_val = temp; } } - if (max_pos > frame_parms->ofdm_symbol_size/2) + if (max_pos > frame_parms->ofdm_symbol_size / 2) max_pos = max_pos - frame_parms->ofdm_symbol_size; - return max_pos - sync_pos; + delay->pusch_delay_max_pos = max_pos; + delay->pusch_delay_max_val = max_val; + delay->pusch_est_delay = max_pos - sync_pos; } int nr_est_timing_advance_srs(const NR_DL_FRAME_PARMS *frame_parms, @@ -163,12 +156,12 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int slot, int first_symb,int num_symb int offset = offset0 + (frame_parms->first_carrier_offset + (rb*12))%frame_parms->ofdm_symbol_size; nb_symb[rb]++; for (int aarx=0; aarxnb_antennas_rx; aarx++) { - int32_t *ul_ch = &common_vars->rxdataF[aarx][offset]; + int32_t *ul_ch = (int32_t *)&common_vars->rxdataF[aarx][offset]; int32_t signal_energy; if (((frame_parms->N_RB_UL&1) == 1) && (rb==(frame_parms->N_RB_UL>>1))) { signal_energy = signal_energy_nodc(ul_ch, 6); - ul_ch = &common_vars->rxdataF[aarx][offset0]; + ul_ch = (int32_t *)&common_vars->rxdataF[aarx][offset0]; signal_energy += signal_energy_nodc(ul_ch, 6); } else { signal_energy = signal_energy_nodc(ul_ch, 12); diff --git a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c index ebc225d82b..fd2ed4f675 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c +++ b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c @@ -100,6 +100,19 @@ __attribute__((always_inline)) inline c16_t c32x16cumulVectVectWithSteps(c16_t * return c16x32div(cumul, N); } +int get_delay_idx(int delay) { + int delay_idx = MAX_UL_DELAY_COMP + delay; + // If the measured delay is less than -MAX_UL_DELAY_COMP, a -MAX_UL_DELAY_COMP delay is compensated. + if (delay_idx < 0) { + delay_idx = 0; + } + // If the measured delay is greater than +MAX_UL_DELAY_COMP, a +MAX_UL_DELAY_COMP delay is compensated. + if (delay_idx > MAX_UL_DELAY_COMP<<1) { + delay_idx = MAX_UL_DELAY_COMP<<1; + } + return delay_idx; +} + int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, unsigned char Ns, unsigned short p, @@ -109,7 +122,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, nfapi_nr_pusch_pdu_t *pusch_pdu, int *max_ch) { - c16_t pilot[3280] __attribute__((aligned(16))); + c16_t pilot[3280] __attribute__((aligned(32))); const int chest_freq = gNB->chest_freq; #ifdef DEBUG_CH @@ -153,9 +166,9 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, const uint8_t u = pusch_pdu->dfts_ofdm.low_papr_group_number; const uint8_t v = pusch_pdu->dfts_ofdm.low_papr_sequence_number; int16_t *dmrs_seq = gNB_dmrs_lowpaprtype1_sequence[u][v][index]; + LOG_D(PHY,"Transform Precoding params. u: %d, v: %d, index for dmrsseq: %d\n", u, v, index); AssertFatal(index >= 0, "Num RBs not configured according to 3GPP 38.211 section 6.3.1.4. For PUSCH with transform precoding, num RBs cannot be multiple of any other primenumber other than 2,3,5\n"); AssertFatal(dmrs_seq != NULL, "DMRS low PAPR seq not found, check if DMRS sequences are generated"); - LOG_D(PHY,"Transform Precoding params. u: %d, v: %d, index for dmrsseq: %d\n", u, v, index); nr_pusch_lowpaprtype1_dmrs_rx(gNB, Ns, dmrs_seq, (int32_t *)pilot, 1000, 0, nb_rb_pusch, 0, pusch_pdu->dmrs_config_type); #ifdef DEBUG_PUSCH printf ("NR_UL_CHANNEL_EST: index %d, u %d,v %d\n", index, u, v); @@ -172,6 +185,10 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, #endif + c16_t ul_ls_est[symbolSize] __attribute__((aligned(32))); + memset(ul_ls_est, 0, sizeof(c16_t) * symbolSize); + memset(&gNB->measurements.delay[ul_id], 0, sizeof(gNB->measurements.delay[ul_id])); + for (int aarx=0; aarxframe_parms.nb_antennas_rx; aarx++) { c16_t *rxdataF = (c16_t *)&gNB->common_vars.rxdataF[aarx][symbol_offset]; c16_t *ul_ch = &ul_ch_estimates[p*gNB->frame_parms.nb_antennas_rx+aarx][ch_offset]; @@ -193,29 +210,51 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, int pilot_cnt = 0; int delta = nr_pusch_dmrs_delta(pusch_dmrs_type1, p); - for (int n = 0; n < 3*nb_rb_pusch; n++) { + for (int n = 0; n < 3 * nb_rb_pusch; n++) { // LS estimation c32_t ch = {0}; for (int k_line = 0; k_line <= 1; k_line++) { re_offset = (k0 + (n << 2) + (k_line << 1) + delta) % symbolSize; - ch=c32x16maddShift(*pil, - rxdataF[soffset + re_offset], - ch, - 16); + ch = c32x16maddShift(*pil, rxdataF[soffset + re_offset], ch, 16); pil++; } - c16_t ch16= {.r=(int16_t)ch.r, .i=(int16_t)ch.i}; + c16_t ch16 = {.r = (int16_t)ch.r, .i = (int16_t)ch.i}; *max_ch = max(*max_ch, max(abs(ch.r), abs(ch.i))); + for (int k = pilot_cnt << 1; k < (pilot_cnt << 1) + 4; k++) { + ul_ls_est[k] = ch16; + } + pilot_cnt += 2; + } + + freq2time(symbolSize, + (int16_t *) ul_ls_est, + (int16_t *) gNB->pusch_vars[ul_id]->ul_ch_estimates_time[aarx]); + + nr_est_timing_advance_pusch(&gNB->frame_parms, gNB->pusch_vars[ul_id]->ul_ch_estimates_time[aarx], &gNB->measurements.delay[ul_id]); + int delay = gNB->measurements.delay[ul_id].pusch_est_delay; + int delay_idx = get_delay_idx(delay); + c16_t *ul_delay_table = gNB->frame_parms.ul_delay_table[delay_idx]; + +#ifdef DEBUG_PUSCH + printf("Estimated delay = %i\n", delay >> 1); +#endif + + pilot_cnt = 0; + for (int n = 0; n < 3*nb_rb_pusch; n++) { // Channel interpolation for (int k_line = 0; k_line <= 1; k_line++) { + + // Apply delay + int k = pilot_cnt << 1; + c16_t ch16 = c16mulShift(ul_ls_est[k], ul_delay_table[k], 8); + #ifdef DEBUG_PUSCH re_offset = (k0 + (n << 2) + (k_line << 1)) % symbolSize; c16_t *rxF = &rxdataF[soffset + re_offset]; - printf("pilot %4u: pil -> (%6d,%6d), rxF -> (%4d,%4d), ch -> (%4d,%4d)\n", - pilot_cnt, pil->r, pil->i, rxF->r, rxF->i, ch.r, ch.i); + printf("ch -> (%4d,%4d), ch_delay_comp -> (%4d,%4d)\n", ul_ls_est[k].r, ul_ls_est[k].i, ch16.r, ch16.i); #endif if (pilot_cnt == 0) { @@ -235,19 +274,24 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, } } + // Revert delay + pilot_cnt = 0; + ul_ch = &ul_ch_estimates[p * gNB->frame_parms.nb_antennas_rx + aarx][ch_offset]; + int inv_delay_idx = get_delay_idx(-delay); + c16_t *ul_inv_delay_table = gNB->frame_parms.ul_delay_table[inv_delay_idx]; + for (int n = 0; n < 3 * nb_rb_pusch; n++) { + for (int k_line = 0; k_line <= 1; k_line++) { + int k = pilot_cnt << 1; + ul_ch[k] = c16mulShift(ul_ch[k], ul_inv_delay_table[k], 8); + ul_ch[k + 1] = c16mulShift(ul_ch[k + 1], ul_inv_delay_table[k + 1], 8); #ifdef DEBUG_PUSCH - ul_ch = &ul_ch_estimates[p*gNB->frame_parms.nb_antennas_rx+aarx][ch_offset]; - - for(uint16_t idxP=0; idxP (%4d,%4d), ch_inter -> (%4d,%4d)\n", ul_ls_est[k].r, ul_ls_est[k].i, ul_ch[k].r, ul_ch[k].i); #endif + pilot_cnt++; + } + } } else if (pusch_pdu->dmrs_config_type == pusch_dmrs_type2 && chest_freq == 0) { // pusch_dmrs_type2 |p_r,p_l,d,d,d,d,p_r,p_l,d,d,d,d| LOG_D(PHY, "PUSCH estimation DMRS type 2, Freq-domain interpolation\n"); @@ -260,10 +304,21 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, pil++; c16_t ch = c16addShift(ch0, ch1, 1); *max_ch = max(*max_ch, max(abs(ch.r), abs(ch.i))); - multadd_real_four_symbols_vector_complex_scalar(filt8_rep4, &ch, &ul_ch[n]); - ul_ch[n + 4] = ch; - ul_ch[n + 5] = ch; + multadd_real_four_symbols_vector_complex_scalar(filt8_rep4, &ch, &ul_ls_est[n]); + ul_ls_est[n + 4] = ch; + ul_ls_est[n + 5] = ch; } + + // Delay compensation + freq2time(symbolSize, (int16_t *)ul_ls_est, (int16_t *)gNB->pusch_vars[ul_id]->ul_ch_estimates_time[aarx]); + nr_est_timing_advance_pusch(&gNB->frame_parms, gNB->pusch_vars[ul_id]->ul_ch_estimates_time[aarx], &gNB->measurements.delay[ul_id]); + int delay = gNB->measurements.delay[ul_id].pusch_est_delay; + int delay_idx = get_delay_idx(-delay); + c16_t *ul_delay_table = gNB->frame_parms.ul_delay_table[delay_idx]; + for (int n = 0; n < nb_rb_pusch * NR_NB_SC_PER_RB; n++) { + ul_ch[n] = c16mulShift(ul_ls_est[n], ul_delay_table[n % 6], 8); + } + } else if (pusch_pdu->dmrs_config_type == pusch_dmrs_type1) { // this is case without frequency-domain linear interpolation, just take average of LS channel estimates of 6 DMRS REs and use a common value for the whole PRB @@ -432,21 +487,15 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, } #ifdef DEBUG_PUSCH - ul_ch = &ul_ch_estimates[p*gNB->frame_parms.nb_antennas_rx+aarx][ch_offset]; - - for(int idxP=0; idxPframe_parms.nb_antennas_rx + aarx][ch_offset]; + for (int idxP = 0; idxP < ceil((float)nb_rb_pusch * 12 / 8); idxP++) { + for (int idxI = 0; idxI < 8; idxI++) { + printf("%d\t%d\t", ul_ch[idxP * 8 + idxI].r, ul_ch[idxP * 8 + idxI].i); } - - printf("%d\n",idxP); + printf("%d\n", idxP); } #endif - // Convert to time domain - freq2time(symbolSize, - (int16_t *) &ul_ch_estimates[aarx][symbol_offset], - (int16_t *) gNB->pusch_vars[ul_id]->ul_ch_estimates_time[aarx]); } #ifdef DEBUG_CH diff --git a/openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h b/openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h index 9801e72e87..fb43e83827 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h +++ b/openair1/PHY/NR_ESTIMATION/nr_ul_estimation.h @@ -55,7 +55,7 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB,int slot,int first_symb,int num_symb) void nr_gnb_measurements(PHY_VARS_gNB *gNB, uint8_t ulsch_id, unsigned char harq_pid, unsigned char symbol, uint8_t nrOfLayers); -int nr_est_timing_advance_pusch(PHY_VARS_gNB* phy_vars_gNB, int UE_id); +void nr_est_timing_advance_pusch(const NR_DL_FRAME_PARMS *frame_parms, const int32_t *ul_ch_estimates_time, struct delay_s *delay); int nr_est_timing_advance_srs(const NR_DL_FRAME_PARMS *frame_parms, const int32_t srs_estimated_channel_time[][frame_parms->ofdm_symbol_size]); diff --git a/openair1/PHY/NR_REFSIG/pss_nr.h b/openair1/PHY/NR_REFSIG/pss_nr.h index b78a89b12c..3b0e87109e 100644 --- a/openair1/PHY/NR_REFSIG/pss_nr.h +++ b/openair1/PHY/NR_REFSIG/pss_nr.h @@ -126,7 +126,7 @@ void init_context_pss_nr(NR_DL_FRAME_PARMS *frame_parms_ue); void free_context_pss_nr(void); int set_pss_nr(int ofdm_symbol_size); int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change); -int pss_search_time_nr(int **rxdata, ///rx data in time domain +int pss_search_time_nr(c16_t **rxdata, ///rx data in time domain NR_DL_FRAME_PARMS *frame_parms, int fo_flag, int is, diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c index b98263bbf7..c361c61f27 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c @@ -59,7 +59,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx, PHY_VARS_gNB *gNB = msgTx->gNB; NR_gNB_DLSCH_t *dlsch; - int32_t** txdataF = gNB->common_vars.txdataF; + c16_t** txdataF = gNB->common_vars.txdataF; int16_t amp = AMP; int xOverhead = 0; NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms; diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c index 61249369e2..63fbf20d0d 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c @@ -108,7 +108,7 @@ NR_gNB_DLSCH_t *new_gNB_dlsch(NR_DL_FRAME_PARMS *frame_parms, a_segments = a_segments/273 +1; } - LOG_I(PHY,"Allocating %d segments (MAX %d, N_PRB %d)\n",a_segments,MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER,N_RB); + LOG_D(PHY,"Allocating %d segments (MAX %d, N_PRB %d)\n",a_segments,MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER,N_RB); uint32_t dlsch_bytes = a_segments*1056; // allocated bytes per segment NR_gNB_DLSCH_t *dlsch = malloc16(sizeof(NR_gNB_DLSCH_t)); AssertFatal(dlsch, "cannot allocate dlsch\n"); diff --git a/openair1/PHY/NR_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_TRANSPORT/nr_pbch.c index 64c1d31902..e34102e0c7 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_pbch.c @@ -48,7 +48,7 @@ const uint8_t nr_pbch_payload_interleaving_pattern[32] = {16, 23, 18, 17, 8, 30, }; int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs, - int32_t *txdataF, + c16_t *txdataF, int16_t amp, uint8_t ssb_start_symbol, nfapi_nr_config_request_scf_t *config, @@ -222,7 +222,7 @@ void nr_init_pbch_interleaver(uint8_t *interleaver) { int nr_generate_pbch(nfapi_nr_dl_tti_ssb_pdu *ssb_pdu, uint8_t *interleaver, - int32_t *txdataF, + c16_t *txdataF, int16_t amp, uint8_t ssb_start_symbol, uint8_t n_hf, diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach.c b/openair1/PHY/NR_TRANSPORT/nr_prach.c index 461f012687..e6afbb51e7 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prach.c @@ -322,8 +322,6 @@ void rx_nr_prach_ru(RU_t *ru, case 30720: // 20, 25, 30 MHz @ 30.72 Ms/s - Ncp = Ncp; - dftlen = dftlen; break; case 46080: @@ -354,7 +352,7 @@ void rx_nr_prach_ru(RU_t *ru, AssertFatal(1==0,"sample rate %f MHz not supported for numerology %d\n", fp->samples_per_subframe / 1000.0, mu); } - const idft_size_idx_t dftsize = get_dft(dftlen); + const dft_size_idx_t dftsize = get_dft(dftlen); // Do forward transform if (LOG_DEBUGFLAG(PRACH)) { diff --git a/openair1/PHY/NR_TRANSPORT/nr_prs.c b/openair1/PHY/NR_TRANSPORT/nr_prs.c index 2167990abf..4a93e4d66a 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prs.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prs.c @@ -10,7 +10,7 @@ extern short nr_qpsk_mod_table[8]; int nr_generate_prs(uint32_t **nr_gold_prs, - int32_t *txdataF, + c16_t *txdataF, int16_t amp, prs_config_t *prs_cfg, nfapi_nr_config_request_scf_t *config, diff --git a/openair1/PHY/NR_TRANSPORT/nr_pss.c b/openair1/PHY/NR_TRANSPORT/nr_pss.c index 8564efe3de..965ac51c21 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_pss.c +++ b/openair1/PHY/NR_TRANSPORT/nr_pss.c @@ -24,7 +24,7 @@ //#define NR_PSS_DEBUG -int nr_generate_pss( int32_t *txdataF, +int nr_generate_pss( c16_t *txdataF, int16_t amp, uint8_t ssb_start_symbol, nfapi_nr_config_request_scf_t* config, diff --git a/openair1/PHY/NR_TRANSPORT/nr_sss.c b/openair1/PHY/NR_TRANSPORT/nr_sss.c index 5181f6bac1..45835f8206 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_sss.c +++ b/openair1/PHY/NR_TRANSPORT/nr_sss.c @@ -23,7 +23,7 @@ //#define NR_SSS_DEBUG -int nr_generate_sss( int32_t *txdataF, +int nr_generate_sss( c16_t *txdataF, int16_t amp, uint8_t ssb_start_symbol, nfapi_nr_config_request_scf_t* config, diff --git a/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h b/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h index 75bf46d243..2f0e46a13f 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h +++ b/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h @@ -40,7 +40,7 @@ int nr_generate_prs(uint32_t **nr_gold_prs, - int32_t *txdataF, + c16_t *txdataF, int16_t amp, prs_config_t *prs_cfg, nfapi_nr_config_request_scf_t *config, @@ -52,7 +52,7 @@ int nr_generate_prs(uint32_t **nr_gold_prs, @param @returns 0 on success */ -int nr_generate_pss(int32_t *txdataF, +int nr_generate_pss(c16_t *txdataF, int16_t amp, uint8_t ssb_start_symbol, nfapi_nr_config_request_scf_t *config, @@ -64,7 +64,7 @@ int nr_generate_pss(int32_t *txdataF, @param @returns 0 on success */ -int nr_generate_sss(int32_t *txdataF, +int nr_generate_sss(c16_t *txdataF, int16_t amp, uint8_t ssb_start_symbol, nfapi_nr_config_request_scf_t *config, @@ -77,7 +77,7 @@ int nr_generate_sss(int32_t *txdataF, @returns 0 on success */ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs, - int32_t *txdataF, + c16_t *txdataF, int16_t amp, uint8_t ssb_start_symbol, nfapi_nr_config_request_scf_t *config, @@ -91,7 +91,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs, */ int nr_generate_pbch(nfapi_nr_dl_tti_ssb_pdu *ssb_pdu, uint8_t *interleaver, - int32_t *txdataF, + c16_t *txdataF, int16_t amp, uint8_t ssb_start_symbol, uint8_t n_hf, @@ -140,7 +140,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB, @param nb_rb_pusch The number of RBs allocated (used for Resource Allocation Type 1 in NR) @param frame_parms, Pointer to frame descriptor structure */ -void nr_ulsch_extract_rbs(int32_t **rxdataF, +void nr_ulsch_extract_rbs(c16_t **rxdataF, NR_gNB_PUSCH *pusch_vars, int slot, unsigned char symbol, @@ -359,7 +359,7 @@ void nr_generate_csi_rs(const NR_DL_FRAME_PARMS *frame_parms, void free_nr_prach_entry(PHY_VARS_gNB *gNB, int prach_id); -void nr_decode_pucch1(int32_t **rxdataF, +void nr_decode_pucch1(c16_t **rxdataF, pucch_GroupHopping_t pucch_GroupHopping, uint32_t n_id, // hoppingID higher layer parameter uint64_t *payload, diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c index ab951c36bd..0bb872852b 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c @@ -592,9 +592,9 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_ULSCH_DECODING, 0); - if ((harq_process->processedSegments == (harq_process->C))) { + if (harq_process->processedSegments == (harq_process->C)) { LOG_D(PHY, "[gNB %d] ULSCH: Setting ACK for slot %d TBS %d\n", phy_vars_gNB->Mod_id, harq_process->slot, harq_process->TBS); - harq_process->status = SCH_IDLE; + harq_process->status = NR_SCH_IDLE; harq_process->round = 0; ulsch->harq_mask &= ~(1 << harq_pid); diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c index 1244f09e93..47d778903e 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c @@ -302,7 +302,7 @@ void nr_idft(int32_t *z, uint32_t Msc_PUSCH) } -void nr_ulsch_extract_rbs(int32_t **rxdataF, +void nr_ulsch_extract_rbs(c16_t **rxdataF, NR_gNB_PUSCH *pusch_vars, int slot, unsigned char symbol, @@ -547,7 +547,19 @@ void nr_ulsch_channel_level(int **ul_ch_estimates_ext, #endif } - +__m128i a_mult_conjb(__m128i a, __m128i b, unsigned char output_shift) +{ + __m128i mmtmpD0 = _mm_madd_epi16(b, a); + __m128i mmtmpD1 = _mm_shufflelo_epi16(b, _MM_SHUFFLE(2, 3, 0, 1)); + mmtmpD1 = _mm_shufflehi_epi16(mmtmpD1, _MM_SHUFFLE(2, 3, 0, 1)); + mmtmpD1 = _mm_sign_epi16(mmtmpD1, *(__m128i *)&conjugate[0]); + mmtmpD1 = _mm_madd_epi16(mmtmpD1, a); + mmtmpD0 = _mm_srai_epi32(mmtmpD0, output_shift); + mmtmpD1 = _mm_srai_epi32(mmtmpD1, output_shift); + __m128i mmtmpD2 = _mm_unpacklo_epi32(mmtmpD0, mmtmpD1); + __m128i mmtmpD3 = _mm_unpackhi_epi32(mmtmpD0, mmtmpD1); + return _mm_packs_epi32(mmtmpD2, mmtmpD3); +} //============================================================================================== // Pre-processing for LLR computation @@ -689,71 +701,16 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext, } - // multiply by conjugated channel - mmtmpD0 = _mm_madd_epi16(ul_ch128[0],rxdataF128[0]); - // print_ints("re",&mmtmpD0); + // Multiply received data by conjugated channel + rxdataF_comp128[0] = a_mult_conjb(rxdataF128[0], ul_ch128[0], output_shift); + rxdataF_comp128[1] = a_mult_conjb(rxdataF128[1], ul_ch128[1], output_shift); + rxdataF_comp128[2] = a_mult_conjb(rxdataF128[2], ul_ch128[2], output_shift); - // mmtmpD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpD1 = _mm_shufflelo_epi16(ul_ch128[0],_MM_SHUFFLE(2,3,0,1)); - mmtmpD1 = _mm_shufflehi_epi16(mmtmpD1,_MM_SHUFFLE(2,3,0,1)); - mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i*)&conjugate[0]); - // print_ints("im",&mmtmpD1); - mmtmpD1 = _mm_madd_epi16(mmtmpD1,rxdataF128[0]); - // mmtmpD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpD0 = _mm_srai_epi32(mmtmpD0,output_shift); - // print_ints("re(shift)",&mmtmpD0); - mmtmpD1 = _mm_srai_epi32(mmtmpD1,output_shift); - // print_ints("im(shift)",&mmtmpD1); - mmtmpD2 = _mm_unpacklo_epi32(mmtmpD0,mmtmpD1); - mmtmpD3 = _mm_unpackhi_epi32(mmtmpD0,mmtmpD1); - // print_ints("c0",&mmtmpD2); - // print_ints("c1",&mmtmpD3); - rxdataF_comp128[0] = _mm_packs_epi32(mmtmpD2,mmtmpD3); - // print_shorts("rx:",rxdataF128); - // print_shorts("ch:",ul_ch128); - // print_shorts("pack:",rxdataF_comp128); - - // multiply by conjugated channel - mmtmpD0 = _mm_madd_epi16(ul_ch128[1],rxdataF128[1]); - // mmtmpD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpD1 = _mm_shufflelo_epi16(ul_ch128[1],_MM_SHUFFLE(2,3,0,1)); - mmtmpD1 = _mm_shufflehi_epi16(mmtmpD1,_MM_SHUFFLE(2,3,0,1)); - mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i*)conjugate); - mmtmpD1 = _mm_madd_epi16(mmtmpD1,rxdataF128[1]); - // mmtmpD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpD0 = _mm_srai_epi32(mmtmpD0,output_shift); - mmtmpD1 = _mm_srai_epi32(mmtmpD1,output_shift); - mmtmpD2 = _mm_unpacklo_epi32(mmtmpD0,mmtmpD1); - mmtmpD3 = _mm_unpackhi_epi32(mmtmpD0,mmtmpD1); - - rxdataF_comp128[1] = _mm_packs_epi32(mmtmpD2,mmtmpD3); - // print_shorts("rx:",rxdataF128+1); - // print_shorts("ch:",ul_ch128+1); - // print_shorts("pack:",rxdataF_comp128+1); - - // multiply by conjugated channel - mmtmpD0 = _mm_madd_epi16(ul_ch128[2],rxdataF128[2]); - // mmtmpD0 contains real part of 4 consecutive outputs (32-bit) - mmtmpD1 = _mm_shufflelo_epi16(ul_ch128[2],_MM_SHUFFLE(2,3,0,1)); - mmtmpD1 = _mm_shufflehi_epi16(mmtmpD1,_MM_SHUFFLE(2,3,0,1)); - mmtmpD1 = _mm_sign_epi16(mmtmpD1,*(__m128i*)conjugate); - mmtmpD1 = _mm_madd_epi16(mmtmpD1,rxdataF128[2]); - // mmtmpD1 contains imag part of 4 consecutive outputs (32-bit) - mmtmpD0 = _mm_srai_epi32(mmtmpD0,output_shift); - mmtmpD1 = _mm_srai_epi32(mmtmpD1,output_shift); - mmtmpD2 = _mm_unpacklo_epi32(mmtmpD0,mmtmpD1); - mmtmpD3 = _mm_unpackhi_epi32(mmtmpD0,mmtmpD1); - - rxdataF_comp128[2] = _mm_packs_epi32(mmtmpD2,mmtmpD3); - //print_shorts("rx:",rxdataF128+2); - //print_shorts("ch:",ul_ch128+2); - //print_shorts("pack:",rxdataF_comp128+2); - - ul_ch128+=3; - ul_ch_mag128+=3; - ul_ch_mag128b+=3; - rxdataF128+=3; - rxdataF_comp128+=3; + ul_ch128 += 3; + ul_ch_mag128 += 3; + ul_ch_mag128b += 3; + rxdataF128 += 3; + rxdataF_comp128 += 3; } } } @@ -1371,17 +1328,18 @@ __m128i nr_ulsch_comp_muli_sum(__m128i input_x, //divide by matrix det and convert back to Q15 before packing int sum_det =0; for (int k=0; k<4;k++) { - sum_det += ((((int *)&det[0])[k])>>2); + sum_det += ((((int *)&det)[k])>>2); //printf("det_%d = %d log2 =%d \n",k,(((int *)&det[0])[k]),log2_approx(((int *)&det[0])[k])); } - xy_re_128 = _mm_slli_epi32(xy_re_128,5); - xy_re_128 = _mm_srai_epi32(xy_re_128,log2_approx(sum_det)); - xy_re_128 = _mm_slli_epi32(xy_re_128,5); - - xy_im_128 = _mm_slli_epi32(xy_im_128,5); - xy_im_128 = _mm_srai_epi32(xy_im_128,log2_approx(sum_det)); - xy_im_128 = _mm_slli_epi32(xy_im_128,5); + int b = log2_approx(sum_det) - 8; + if (b > 0) { + xy_re_128 = _mm_srai_epi32(xy_re_128, b); + xy_im_128 = _mm_srai_epi32(xy_im_128, b); + } else { + xy_re_128 = _mm_slli_epi32(xy_re_128, -b); + xy_im_128 = _mm_slli_epi32(xy_im_128, -b); + } tmp_z0 = _mm_unpacklo_epi32(xy_re_128,xy_im_128); //print_ints("unpack lo:",&tmp_z0[0]); @@ -1514,16 +1472,17 @@ void nr_ulsch_construct_HhH_elements(int *conjch00_ch00, * * * */ -uint8_t nr_ulsch_zero_forcing_rx_2layers(int **rxdataF_comp, - int **ul_ch_mag, - int **ul_ch_magb, - int **ul_ch_estimates_ext, - unsigned short nb_rb, - unsigned char n_rx, - unsigned char mod_order, - int shift, - unsigned char symbol, - int length) +uint8_t nr_ulsch_zero_forcing_rx_2layers(NR_DL_FRAME_PARMS *frame_parms, + int **rxdataF_comp, + int **ul_ch_mag, + int **ul_ch_magb, + int **ul_ch_estimates_ext, + unsigned short nb_rb, + unsigned char n_rx, + unsigned char mod_order, + int shift, + unsigned char symbol, + int length) { int *ch00, *ch01, *ch10, *ch11; int *ch20, *ch30, *ch21, *ch31; @@ -1765,10 +1724,10 @@ uint8_t nr_ulsch_zero_forcing_rx_2layers(int **rxdataF_comp, * * **************************************************************************/ - __m128i *rxdataF_comp128_0,*rxdataF_comp128_1,*ul_ch_mag128_0=NULL,*ul_ch_mag128b_0=NULL,*determ_fin_128;//*dl_ch_mag128_1,*dl_ch_mag128b_1,*dl_ch_mag128r_1 - __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3; - __m128i *after_mf_a_128,*after_mf_b_128, *after_mf_c_128, *after_mf_d_128; - __m128i QAM_amp128={0},QAM_amp128b={0}; + __m128i *rxdataF_comp128_0, *rxdataF_comp128_1, *ul_ch_mag128_0 = NULL, *ul_ch_mag128b_0 = NULL, *ul_ch_mag128_1 = NULL, *ul_ch_mag128b_1 = NULL, *determ_fin_128; + __m128i mmtmpD0, mmtmpD1, mmtmpD2, mmtmpD3; + __m128i *after_mf_a_128, *after_mf_b_128, *after_mf_c_128, *after_mf_d_128; + __m128i QAM_amp128 = {0}, QAM_amp128b = {0}; determ_fin_128 = (__m128i *)&determ_fin[0]; @@ -1787,45 +1746,50 @@ uint8_t nr_ulsch_zero_forcing_rx_2layers(int **rxdataF_comp, } else if (mod_order == 6) { QAM_amp128 = _mm_set1_epi16(QAM64_n1); //4/sqrt{42} QAM_amp128b = _mm_set1_epi16(QAM64_n2); //2/sqrt{42} - } - ul_ch_mag128_0 = (__m128i *)&ul_ch_mag[0][symbol*(off+nb_rb*12)]; - ul_ch_mag128b_0 = (__m128i *)&ul_ch_magb[0][symbol*(off+nb_rb*12)]; + } + ul_ch_mag128_0 = (__m128i *)&ul_ch_mag[0][symbol * (off + nb_rb * 12)]; + ul_ch_mag128b_0 = (__m128i *)&ul_ch_magb[0][symbol * (off + nb_rb * 12)]; + ul_ch_mag128_1 = (__m128i *)&ul_ch_mag[frame_parms->nb_antennas_rx][symbol * (off + nb_rb * 12)]; + ul_ch_mag128b_1 = (__m128i *)&ul_ch_magb[frame_parms->nb_antennas_rx][symbol * (off + nb_rb * 12)]; } - for (int rb=0; rb<3*nb_rb_0; rb++) { - if (mod_order>2) { - int sum_det =0; - for (int k=0; k<4;k++) { - sum_det += ((((int *)&determ_fin_128[0])[k])>>2); - //printf("det_%d = %d\n",k,sum_det); - } + for (int rb = 0; rb < 3 * nb_rb_0; rb++) { - mmtmpD2 = _mm_slli_epi32(determ_fin_128[0],5); - mmtmpD2 = _mm_srai_epi32(mmtmpD2,log2_approx(sum_det)); - mmtmpD2 = _mm_slli_epi32(mmtmpD2,5); + // Magnitude computation + if (mod_order > 2) { - mmtmpD3 = _mm_unpacklo_epi32(mmtmpD2,mmtmpD2); + int sum_det = 0; + for (int k = 0; k < 4; k++) { + sum_det += ((((int *)&determ_fin_128[0])[k]) >> 2); + } - mmtmpD2 = _mm_unpackhi_epi32(mmtmpD2,mmtmpD2); - - mmtmpD2 = _mm_packs_epi32(mmtmpD3,mmtmpD2); + int b = log2_approx(sum_det) - 8; + if (b > 0) { + mmtmpD2 = _mm_srai_epi32(determ_fin_128[0], b); + } else { + mmtmpD2 = _mm_slli_epi32(determ_fin_128[0], -b); + } + mmtmpD3 = _mm_unpacklo_epi32(mmtmpD2, mmtmpD2); + mmtmpD2 = _mm_unpackhi_epi32(mmtmpD2, mmtmpD2); + mmtmpD2 = _mm_packs_epi32(mmtmpD3, mmtmpD2); + // Layer 0 ul_ch_mag128_0[0] = mmtmpD2; ul_ch_mag128b_0[0] = mmtmpD2; + ul_ch_mag128_0[0] = _mm_mulhi_epi16(ul_ch_mag128_0[0], QAM_amp128); + ul_ch_mag128_0[0] = _mm_slli_epi16(ul_ch_mag128_0[0], 1); + ul_ch_mag128b_0[0] = _mm_mulhi_epi16(ul_ch_mag128b_0[0], QAM_amp128b); + ul_ch_mag128b_0[0] = _mm_slli_epi16(ul_ch_mag128b_0[0], 1); - ul_ch_mag128_0[0] = _mm_mulhi_epi16(ul_ch_mag128_0[0],QAM_amp128); - ul_ch_mag128_0[0] = _mm_slli_epi16(ul_ch_mag128_0[0],1); - - ul_ch_mag128b_0[0] = _mm_mulhi_epi16(ul_ch_mag128b_0[0],QAM_amp128b); - ul_ch_mag128b_0[0] = _mm_slli_epi16(ul_ch_mag128b_0[0],1); - - //print_shorts("mag layer 1:",(int16_t*)&dl_ch_mag128_0[0]); - //print_shorts("mag layer 2:",(int16_t*)&dl_ch_mag128_1[0]); - //print_shorts("magb layer 1:",(int16_t*)&dl_ch_mag128b_0[0]); - //print_shorts("magb layer 2:",(int16_t*)&dl_ch_mag128b_1[0]); - //print_shorts("magr layer 1:",(int16_t*)&dl_ch_mag128r_0[0]); - //print_shorts("magr layer 2:",(int16_t*)&dl_ch_mag128r_1[0]); + // Layer 1 + ul_ch_mag128_1[0] = mmtmpD2; + ul_ch_mag128b_1[0] = mmtmpD2; + ul_ch_mag128_1[0] = _mm_mulhi_epi16(ul_ch_mag128_1[0], QAM_amp128); + ul_ch_mag128_1[0] = _mm_slli_epi16(ul_ch_mag128_1[0], 1); + ul_ch_mag128b_1[0] = _mm_mulhi_epi16(ul_ch_mag128b_1[0], QAM_amp128b); + ul_ch_mag128b_1[0] = _mm_slli_epi16(ul_ch_mag128b_1[0], 1); } + // multiply by channel Inv //rxdataF_zf128_0 = rxdataF_comp128_0*d - b*rxdataF_comp128_1 //rxdataF_zf128_1 = rxdataF_comp128_1*a - c*rxdataF_comp128_0 @@ -1844,12 +1808,7 @@ uint8_t nr_ulsch_zero_forcing_rx_2layers(int **rxdataF_comp, determ_fin_128[0]); rxdataF_comp128_0[0] = mmtmpD0; - if (mod_order > 2) { - // We need to check why it is a shift of 3 - rxdataF_comp128_1[0] = simde_mm_srai_epi16(mmtmpD1, 3); - } else { - rxdataF_comp128_1[0] = mmtmpD1; - } + rxdataF_comp128_1[0] = mmtmpD1; #ifdef DEBUG_DLSCH_DEMOD printf("\n Rx signal after ZF l%d rb%d\n",symbol,rb); @@ -1858,7 +1817,9 @@ uint8_t nr_ulsch_zero_forcing_rx_2layers(int **rxdataF_comp, #endif determ_fin_128 += 1; ul_ch_mag128_0 += 1; - ul_ch_mag128b_0 += 1; + ul_ch_mag128_1 += 1; + ul_ch_mag128b_0 += 1; + ul_ch_mag128b_1 += 1; rxdataF_comp128_0 += 1; rxdataF_comp128_1 += 1; after_mf_a_128 += 1; @@ -1964,7 +1925,13 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB, int off = ((rel15_ul->rb_size&1) == 1)? 4:0; uint32_t rxdataF_ext_offset = 0; uint8_t shift_ch_ext = rel15_ul->nrOfLayers > 1 ? log2_approx(max_ch >> 11) : 0; - uint8_t ad_shift = 1 + log2_approx(frame_parms->nb_antennas_rx >> 2) + (rel15_ul->nrOfLayers == 2); + + int ad_shift = 0; + if (rel15_ul->nrOfLayers == 1) { + ad_shift = 1 + log2_approx(frame_parms->nb_antennas_rx >> 2); + } else { + ad_shift = -3; // For 2-layers, we are already doing a bit shift in the nr_ulsch_zero_forcing_rx_2layers() function, so we can use more bits + } for(uint8_t symbol = rel15_ul->start_symbol_index; symbol < (rel15_ul->start_symbol_index + rel15_ul->nr_of_symbols); symbol++) { uint8_t dmrs_symbol_flag = (rel15_ul->ul_dmrs_symb_pos >> symbol) & 0x01; @@ -2033,7 +2000,10 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB, for (aarx=0;aarxnb_antennas_rx;aarx++) avgs = cmax(avgs,avg[aatx*frame_parms->nb_antennas_rx+aarx]); - gNB->pusch_vars[ulsch_id]->log2_maxh = (log2_approx(avgs) / 2) + ad_shift; + gNB->pusch_vars[ulsch_id]->log2_maxh = (log2_approx(avgs) >> 1) + ad_shift; + if (gNB->pusch_vars[ulsch_id]->log2_maxh < 0) { + gNB->pusch_vars[ulsch_id]->log2_maxh = 0; + } gNB->pusch_vars[ulsch_id]->cl_done = 1; } @@ -2071,7 +2041,8 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB, //Apply zero forcing for 2 Tx layers if (rel15_ul->nrOfLayers == 2) { - nr_ulsch_zero_forcing_rx_2layers(gNB->pusch_vars[ulsch_id]->rxdataF_comp, + nr_ulsch_zero_forcing_rx_2layers(frame_parms, + gNB->pusch_vars[ulsch_id]->rxdataF_comp, gNB->pusch_vars[ulsch_id]->ul_ch_mag0, gNB->pusch_vars[ulsch_id]->ul_ch_magb0, gNB->pusch_vars[ulsch_id]->ul_ch_estimates_ext, diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index 03ed927c37..99a3439420 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -183,7 +183,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, nfapi_nr_uci_pucch_pdu_format_0_1_t* uci_pdu, nfapi_nr_pucch_pdu_t* pucch_pdu) { - int32_t **rxdataF = gNB->common_vars.rxdataF; + c16_t **rxdataF = gNB->common_vars.rxdataF; NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms; int soffset=(slot&3)*frame_parms->symbols_per_slot*frame_parms->ofdm_symbol_size; int nr_sequences; @@ -295,7 +295,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, re_offset[l]-=frame_parms->ofdm_symbol_size; for (int aa=0;aanb_antennas_rx;aa++) { - tmp_rp = &rxdataF[aa][soffset + l2*frame_parms->ofdm_symbol_size]; + tmp_rp = (int32_t *)&rxdataF[aa][soffset + l2*frame_parms->ofdm_symbol_size]; if(re_offset[l] + nb_re_pucch > frame_parms->ofdm_symbol_size) { int neg_length = frame_parms->ofdm_symbol_size-re_offset[l]; int pos_length = nb_re_pucch-neg_length; @@ -502,7 +502,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, -void nr_decode_pucch1( int32_t **rxdataF, +void nr_decode_pucch1( c16_t **rxdataF, pucch_GroupHopping_t pucch_GroupHopping, uint32_t n_id, // hoppingID higher layer parameter uint64_t *payload, @@ -1148,7 +1148,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, nfapi_nr_uci_pucch_pdu_format_2_3_4_t* uci_pdu, nfapi_nr_pucch_pdu_t* pucch_pdu) { - int32_t **rxdataF = gNB->common_vars.rxdataF; + c16_t **rxdataF = gNB->common_vars.rxdataF; NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms; //pucch_GroupHopping_t pucch_GroupHopping = pucch_pdu->group_hop_flag + (pucch_pdu->sequence_hop_flag<<1); @@ -1720,7 +1720,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, // estimate CQI for MAC (from antenna port 0 only) // TODO this computation is wrong -> to be ignored at MAC for now - int SNRtimes10 = dB_fixed_times10(signal_energy_nodc(&rxdataF[0][soffset+(l2*frame_parms->ofdm_symbol_size)+re_offset[0]], + int SNRtimes10 = dB_fixed_times10(signal_energy_nodc((int32_t *)&rxdataF[0][soffset+(l2*frame_parms->ofdm_symbol_size)+re_offset[0]], 12*pucch_pdu->prb_size)) - (10*gNB->measurements.n0_power_tot_dB); int cqi,bit_left; @@ -1735,7 +1735,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, uci_pdu->pucch_format=0; uci_pdu->ul_cqi=cqi; uci_pdu->timing_advance=0xffff; // currently not valid - uci_pdu->rssi=1280 - (10*dB_fixed(32767*32767)-dB_fixed_times10(signal_energy_nodc(&rxdataF[0][soffset+(l2*frame_parms->ofdm_symbol_size)+re_offset[0]],12*pucch_pdu->prb_size))); + uci_pdu->rssi=1280 - (10*dB_fixed(32767*32767)-dB_fixed_times10(signal_energy_nodc((int32_t *)&rxdataF[0][soffset+(l2*frame_parms->ofdm_symbol_size)+re_offset[0]],12*pucch_pdu->prb_size))); if (pucch_pdu->bit_len_harq>0) { int harq_bytes=pucch_pdu->bit_len_harq>>3; if ((pucch_pdu->bit_len_harq&7) > 0) harq_bytes++; diff --git a/openair1/PHY/NR_TRANSPORT/srs_rx.c b/openair1/PHY/NR_TRANSPORT/srs_rx.c index 7c0e241af8..5521619a8f 100644 --- a/openair1/PHY/NR_TRANSPORT/srs_rx.c +++ b/openair1/PHY/NR_TRANSPORT/srs_rx.c @@ -30,7 +30,7 @@ #include #include -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "PHY/impl_defs_nr.h" #include "PHY/defs_nr_common.h" #include "PHY/defs_gNB.h" @@ -106,7 +106,7 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB, LOG_I(NR_PHY,"Calling %s function\n", __FUNCTION__); #endif - int32_t **rxdataF = gNB->common_vars.rxdataF; + c16_t **rxdataF = gNB->common_vars.rxdataF; const NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms; const uint16_t n_symbols = (slot&3)*frame_parms->symbols_per_slot; // number of symbols until this slot @@ -124,7 +124,7 @@ int nr_get_srs_signal(PHY_VARS_gNB *gNB, for (int ant = 0; ant < frame_parms->nb_antennas_rx; ant++) { memset(srs_received_signal[ant], 0, frame_parms->ofdm_symbol_size*sizeof(int32_t)); - rx_signal = &rxdataF[ant][symbol_offset]; + rx_signal = (int32_t *)&rxdataF[ant][symbol_offset]; for (int p_index = 0; p_index < N_ap; p_index++) { diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c b/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c index eaa1f5be7b..78dc616d07 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c @@ -33,7 +33,7 @@ #include "executables/softmodem-common.h" #include "executables/nr-softmodem-common.h" #include "PHY/defs_nr_UE.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "PHY/phy_extern_nr_ue.h" #include "common/utils/LOG/log.h" #include "PHY/sse_intrin.h" diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index d4ffb66b65..5a7bd8a020 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -38,7 +38,7 @@ #include "executables/softmodem-common.h" #include "nr_transport_proto_ue.h" #include "PHY/CODING/nrPolar_tools/nr_polar_dci_defs.h" -#include "PHY/phy_extern_nr_ue.h" +#include "PHY/phy_extern.h" #include "PHY/CODING/coding_extern.h" #include "PHY/sse_intrin.h" #include "common/utils/nr/nr_common.h" diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c index d568172153..942c6befdf 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c @@ -29,7 +29,7 @@ * \warning */ #include "PHY/defs_nr_UE.h" -#include "PHY/phy_extern_nr_ue.h" +#include "PHY/phy_extern.h" #include "PHY/NR_TRANSPORT/nr_transport_proto.h" #include "nr_transport_proto_ue.h" #include "PHY/sse_intrin.h" @@ -197,7 +197,7 @@ void nr_dlsch_channel_compensation(uint32_t rx_size_symbol, int32_t rxdataF_comp[][nbRx][rx_size_symbol * NR_SYMBOLS_PER_SLOT], int ***rho, NR_DL_FRAME_PARMS *frame_parms, - uint8_t nb_aatx, + uint8_t n_layers, unsigned char symbol, int length, uint8_t first_symbol_flag, @@ -263,17 +263,18 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, c16_t ptrs_phase_per_slot[][NR_SYMBOLS_PER_SLOT], int32_t ptrs_re_per_slot[][NR_SYMBOLS_PER_SLOT]) { - const int matrixSz = ue->frame_parms.nb_antennas_rx * ue->frame_parms.nb_antennas_tx; + const int nl = dlsch[0].Nl; + const int matrixSz = ue->frame_parms.nb_antennas_rx * nl; __attribute__((aligned(32))) int32_t dl_ch_estimates_ext[matrixSz][rx_size_symbol]; memset(dl_ch_estimates_ext, 0, sizeof(dl_ch_estimates_ext)); - __attribute__((aligned(32))) int32_t dl_ch_mag[ue->frame_parms.nb_antennas_tx][ue->frame_parms.nb_antennas_rx][rx_size_symbol]; + __attribute__((aligned(32))) int32_t dl_ch_mag[nl][ue->frame_parms.nb_antennas_rx][rx_size_symbol]; memset(dl_ch_mag, 0, sizeof(dl_ch_mag)); - __attribute__((aligned(32))) int32_t dl_ch_magb[ue->frame_parms.nb_antennas_tx][nbRx][rx_size_symbol]; + __attribute__((aligned(32))) int32_t dl_ch_magb[nl][nbRx][rx_size_symbol]; memset(dl_ch_magb, 0, sizeof(dl_ch_magb)); - __attribute__((aligned(32))) int32_t dl_ch_magr[ue->frame_parms.nb_antennas_tx][nbRx][rx_size_symbol]; + __attribute__((aligned(32))) int32_t dl_ch_magr[nl][nbRx][rx_size_symbol]; memset(dl_ch_magr, 0, sizeof(dl_ch_magr)); NR_UE_COMMON *common_vars = &ue->common_vars; NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; @@ -405,7 +406,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, //--------------------- RBs extraction --------------------- //---------------------------------------------------------- const int n_rx = frame_parms->nb_antennas_rx; - const int nl = dlsch[0].Nl; start_meas(&ue->generic_stat_bis[slot]); { @@ -425,7 +425,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, start_rb + dlsch[0].dlsch_config.BWPStart, nb_rb_pdsch, dlsch[0].dlsch_config.n_dmrs_cdm_groups, - dlsch[0].Nl, + nl, frame_parms, dlsch[0].dlsch_config.dlDmrsSymbPos, ue->chest_time); @@ -465,7 +465,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, //LOG_I(PHY, "avgs Power per SC is %d\n", avgs); median[(aatx*n_rx)+aarx] = avg[(aatx*n_rx)+aarx]; } - if (dlsch[0].Nl > 1) { + if (nl > 1) { nr_dlsch_channel_level_median(rx_size_symbol, dl_ch_estimates_ext, median, nl, n_rx, nb_re_pdsch); for (aatx = 0; aatx < nl; aatx++) { for (aarx = 0; aarx < n_rx; aarx++) { @@ -743,7 +743,7 @@ void nr_dlsch_channel_compensation(uint32_t rx_size_symbol, int32_t rxdataF_comp[][nbRx][rx_size_symbol * NR_SYMBOLS_PER_SLOT], int ***rho, NR_DL_FRAME_PARMS *frame_parms, - uint8_t nb_aatx, + uint8_t n_layers, unsigned char symbol, int length, uint8_t first_symbol_flag, @@ -756,12 +756,12 @@ void nr_dlsch_channel_compensation(uint32_t rx_size_symbol, #if defined(__i386) || defined(__x86_64) unsigned short rb; - unsigned char aatx,aarx,atx; + unsigned char aarx,atx; __m128i *dl_ch128,*dl_ch128_2,*dl_ch_mag128,*dl_ch_mag128b,*dl_ch_mag128r,*rxdataF128,*rxdataF_comp128,*rho128; __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128={0},QAM_amp128b={0},QAM_amp128r={0}; - uint32_t nb_rb_0 = length/12 + ((length%12)?1:0); - for (aatx=0; aatxnb_antennas_rx; aarx++) { - dl_ch128 = (__m128i *)dl_ch_estimates_ext[(aatx*frame_parms->nb_antennas_rx)+aarx]; - dl_ch_mag128 = (__m128i *)dl_ch_mag[aatx][aarx]; - dl_ch_mag128b = (__m128i *)dl_ch_magb[aatx][aarx]; - dl_ch_mag128r = (__m128i *)dl_ch_magr[aatx][aarx]; + dl_ch128 = (__m128i *)dl_ch_estimates_ext[(l * frame_parms->nb_antennas_rx) + aarx]; + dl_ch_mag128 = (__m128i *)dl_ch_mag[l][aarx]; + dl_ch_mag128b = (__m128i *)dl_ch_magb[l][aarx]; + dl_ch_mag128r = (__m128i *)dl_ch_magr[l][aarx]; rxdataF128 = (__m128i *)rxdataF_ext[aarx]; - rxdataF_comp128 = (__m128i *)(rxdataF_comp[aatx][aarx] + symbol * nb_rb * 12); + rxdataF_comp128 = (__m128i *)(rxdataF_comp[l][aarx] + symbol * nb_rb * 12); for (rb=0; rb2) { @@ -868,12 +868,12 @@ void nr_dlsch_channel_compensation(uint32_t rx_size_symbol, rxdataF_comp128[0] = _mm_packs_epi32(mmtmpD2,mmtmpD3); #ifdef DEBUG_DLSCH_DEMOD - printf("%%arx%d atx%d rb_index %d symbol %d shift %d\n",aarx,aatx,rb,symbol,output_shift); + printf("%%arx%d atx%d rb_index %d symbol %d shift %d\n",aarx,l,rb,symbol,output_shift); printf("rx_%d(%d,:)",aarx+1,rb+1); print_shorts(" ",(int16_t *)&rxdataF128[0]); - printf("ch_%d%d(%d,:)",aarx+1,aatx+1,rb+1); + printf("ch_%d%d(%d,:)",aarx+1,l+1,rb+1); print_shorts(" ",(int16_t *)&dl_ch128[0]); - printf("rx_comp_%d%d(%d,:)",aarx+1,aatx+1,rb+1); + printf("rx_comp_%d%d(%d,:)",aarx+1,l+1,rb+1); print_shorts(" ",(int16_t *)&rxdataF_comp128[0]); #endif @@ -929,22 +929,22 @@ void nr_dlsch_channel_compensation(uint32_t rx_size_symbol, if (rho) { //we compute the Tx correlation matrix for each Rx antenna //As an example the 2x2 MIMO case requires - //rho[aarx][nb_aatx*nb_aatx] = [cov(H_aarx_0,H_aarx_0) cov(H_aarx_0,H_aarx_1) + //rho[aarx][nl*nl] = [cov(H_aarx_0,H_aarx_0) cov(H_aarx_0,H_aarx_1) // cov(H_aarx_1,H_aarx_0) cov(H_aarx_1,H_aarx_1)], aarx=0,...,nb_antennas_rx-1 - //int avg_rho_re[frame_parms->nb_antennas_rx][nb_aatx*nb_aatx]; - //int avg_rho_im[frame_parms->nb_antennas_rx][nb_aatx*nb_aatx]; + //int avg_rho_re[frame_parms->nb_antennas_rx][nl*nl]; + //int avg_rho_im[frame_parms->nb_antennas_rx][nl*nl]; for (aarx=0; aarxnb_antennas_rx; aarx++) { - for (aatx=0; aatxnb_antennas_rx+aarx]; - dl_ch128_2 = (__m128i *)dl_ch_estimates_ext[atx*frame_parms->nb_antennas_rx+aarx]; + for (atx = 0; atx < n_layers; atx++) { + //avg_rho_re[aarx][l*n_layers+atx] = 0; + //avg_rho_im[aarx][l*n_layers+atx] = 0; + rho128 = (__m128i *)&rho[aarx][l * n_layers + atx][symbol * nb_rb * 12]; + dl_ch128 = (__m128i *)dl_ch_estimates_ext[l * frame_parms->nb_antennas_rx + aarx]; + dl_ch128_2 = (__m128i *)dl_ch_estimates_ext[atx * frame_parms->nb_antennas_rx + aarx]; for (rb=0; rbrx_correlation[0][aarx][aatx*nb_aatx+atx] = signal_energy(&rho[aarx][aatx*nb_aatx+atx][symbol*nb_rb*12],length); - //avg_rho_re[aarx][aatx*nb_aatx+atx] = 16*avg_rho_re[aarx][aatx*nb_aatx+atx]/length; - //avg_rho_im[aarx][aatx*nb_aatx+atx] = 16*avg_rho_im[aarx][aatx*nb_aatx+atx]/length; - //printf("rho[rx]%d tx%d tx%d = Re: %d Im: %d\n",aarx, aatx,atx, avg_rho_re[aarx][aatx*nb_aatx+atx], avg_rho_im[aarx][aatx*nb_aatx+atx]); - //printf("rho_corr[rx]%d tx%d tx%d = %d ...\n",aarx, aatx,atx, measurements->rx_correlation[0][aarx][aatx*nb_aatx+atx]); + //rho_rx_corr[arx][nm] = |H_arx_n|^2.|H_arx_m|^2 &rho[aarx][l*n_layers+atx][symbol*nb_rb*12] + measurements->rx_correlation[0][aarx][l * n_layers + atx] = signal_energy(&rho[aarx][l * n_layers + atx][symbol * nb_rb * 12],length); + //avg_rho_re[aarx][l*n_layers+atx] = 16*avg_rho_re[aarx][l*n_layers+atx]/length; + //avg_rho_im[aarx][l*n_layers+atx] = 16*avg_rho_im[aarx][l*n_layers+atx]/length; + //printf("rho[rx]%d tx%d tx%d = Re: %d Im: %d\n",aarx, l,atx, avg_rho_re[aarx][l*n_layers+atx], avg_rho_im[aarx][l*n_layers+atx]); + //printf("rho_corr[rx]%d tx%d tx%d = %d ...\n",aarx, l,atx, measurements->rx_correlation[0][aarx][l*n_layers+atx]); } } } @@ -1055,7 +1055,6 @@ void nr_dlsch_channel_compensation(uint32_t rx_size_symbol, #elif defined(__arm__) || defined(__aarch64__) unsigned short rb; - unsigned char aatx,aarx,symbol_mod; int16x4_t *dl_ch128,*dl_ch128_2,*rxdataF128; int32x4_t mmtmpD0,mmtmpD1,mmtmpD0b,mmtmpD1b; @@ -1066,11 +1065,11 @@ void nr_dlsch_channel_compensation(uint32_t rx_size_symbol, int16_t conj[4]__attribute__((aligned(16))) = {1,-1,1,-1}; int32x4_t output_shift128 = vmovq_n_s32(-(int32_t)output_shift); - symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; + unsigned char symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; uint32_t nb_rb_0 = length/12 + ((length%12)?1:0); - for (aatx=0; aatxnb_antenna_ports_gNB; aatx++) { + for (int l = 0; l < n_layers; l++) { if (mod_order == 4) { QAM_amp128 = vmovq_n_s16(QAM16_n1); // 2/sqrt(10) QAM_amp128b = vmovq_n_s16(0); @@ -1080,12 +1079,12 @@ void nr_dlsch_channel_compensation(uint32_t rx_size_symbol, } // printf("comp: rxdataF_comp %p, symbol %d\n",rxdataF_comp[0],symbol); - for (aarx=0; aarxnb_antennas_rx; aarx++) { - dl_ch128 = (int16x4_t*)dl_ch_estimates_ext[(aatx<<1)+aarx]; - dl_ch_mag128 = (int16x8_t *)dl_ch_mag[aatx][aarx]; - dl_ch_mag128b = (int16x8_t *)dl_ch_magb[aatx][aarx]; + for (int aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) { + dl_ch128 = (int16x4_t*)dl_ch_estimates_ext[(l << 1) + aarx]; + dl_ch_mag128 = (int16x8_t *)dl_ch_mag[l][aarx]; + dl_ch_mag128b = (int16x8_t *)dl_ch_magb[l][aarx]; rxdataF128 = (int16x4_t *)rxdataF_ext[aarx]; - rxdataF_comp128 = (int16x4x2_t *)(rxdataF_comp[aatx][aarx] + symbol * nb_rb * 12); + rxdataF_comp128 = (int16x4x2_t *)(rxdataF_comp[l][aarx] + symbol * nb_rb * 12); for (rb=0; rb2) { @@ -1238,13 +1237,13 @@ void nr_dlsch_channel_compensation(uint32_t rx_size_symbol, void nr_dlsch_scale_channel(uint32_t rx_size_symbol, int32_t dl_ch_estimates_ext[][rx_size_symbol], - NR_DL_FRAME_PARMS *frame_parms, - uint8_t n_tx, - uint8_t n_rx, - uint8_t symbol, - uint8_t pilots, - uint32_t len, - unsigned short nb_rb) + NR_DL_FRAME_PARMS *frame_parms, + uint8_t n_tx, + uint8_t n_rx, + uint8_t symbol, + uint8_t pilots, + uint32_t len, + unsigned short nb_rb) { #if defined(__x86_64__)||defined(__i386__) @@ -1530,13 +1529,13 @@ static void nr_dlsch_extract_rbs(uint32_t rxdataF_sz, c16_t *rxF_ext = rxdataF_ext[aarx]; c16_t *rxF = &rxdataF[aarx][symbol * frame_parms->ofdm_symbol_size]; - for (unsigned char aatx = 0; aatx < Nl; aatx++) { + for (unsigned char l = 0; l < Nl; l++) { - int32_t *dl_ch0 = &dl_ch_estimates[(aatx*frame_parms->nb_antennas_rx)+aarx][validDmrsEst * frame_parms->ofdm_symbol_size]; - int32_t *dl_ch0_ext = dl_ch_estimates_ext[(aatx*frame_parms->nb_antennas_rx)+aarx]; + int32_t *dl_ch0 = &dl_ch_estimates[(l * frame_parms->nb_antennas_rx) + aarx][validDmrsEst * frame_parms->ofdm_symbol_size]; + int32_t *dl_ch0_ext = dl_ch_estimates_ext[(l * frame_parms->nb_antennas_rx) + aarx]; if (pilots == 0) { //data symbol only - if (aatx == 0) { + if (l == 0) { if (start_re + nb_rb_pdsch * NR_NB_SC_PER_RB <= frame_parms->ofdm_symbol_size) { memcpy(rxF_ext, &rxF[start_re], nb_rb_pdsch * NR_NB_SC_PER_RB * sizeof(int32_t)); } else { @@ -1550,7 +1549,7 @@ static void nr_dlsch_extract_rbs(uint32_t rxdataF_sz, } else if (config_type == NFAPI_NR_DMRS_TYPE1){ if (n_dmrs_cdm_groups == 1) { //data is multiplexed - if (aatx == 0) { + if (l == 0) { unsigned short k = start_re; for (unsigned short j = 0; j < 6*nb_rb_pdsch; j += 3) { rxF_ext[j] = rxF[k+1]; @@ -1571,7 +1570,7 @@ static void nr_dlsch_extract_rbs(uint32_t rxdataF_sz, } else {//NFAPI_NR_DMRS_TYPE2 if (n_dmrs_cdm_groups == 1) { //data is multiplexed - if (aatx == 0) { + if (l == 0) { unsigned short k = start_re; for (unsigned short j = 0; j < 8*nb_rb_pdsch; j += 4) { rxF_ext[j] = rxF[k+2]; @@ -1592,7 +1591,7 @@ static void nr_dlsch_extract_rbs(uint32_t rxdataF_sz, } } else if (n_dmrs_cdm_groups == 2) { //data is multiplexed - if (aatx == 0) { + if (l == 0) { unsigned short k = start_re; for (unsigned short j = 0; j < 4*nb_rb_pdsch; j += 2) { rxF_ext[j] = rxF[k+4]; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index 1d9d30ec33..0c2149e997 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -34,7 +34,7 @@ #include "PHY/phy_extern_nr_ue.h" #include "PHY/sse_intrin.h" #include "PHY/LTE_REFSIG/lte_refsig.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "openair1/SCHED_NR_UE/defs.h" #include #include diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c index e5e0e44b6b..3ac927658d 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_prach.c @@ -340,8 +340,6 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, int frame, uint8_t case 30720: // 20, 25, 30 MHz @ 30.72 Ms/s - Ncp = Ncp; - dftlen = dftlen; break; case 46080: diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c index 6b62fe4f84..9d0982689b 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c @@ -122,7 +122,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, int sample_offsetF, N_RE_prime; NR_DL_FRAME_PARMS *frame_parms = &UE->frame_parms; - int32_t **txdataF = UE->common_vars.txdataF; + c16_t **txdataF = UE->common_vars.txdataF; int N_PRB_oh = 0; // higher layer (RRC) parameter xOverhead in PUSCH-ServingCellConfig uint16_t number_dmrs_symbols = 0; @@ -595,8 +595,8 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE, uint8_t n_antenna_ports) { int tx_offset, ap; - int32_t **txdata; - int32_t **txdataF; + c16_t **txdata; + c16_t **txdataF; /////////////////////////IFFT/////////////////////// /////////// @@ -616,7 +616,7 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE, int symb_offset = (slot%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot; for(ap = 0; ap < n_antenna_ports; ap++) { for (int s=0;sofdm_symbol_size * s]; + c16_t *this_symbol = &txdataF[ap][frame_parms->ofdm_symbol_size * s]; c16_t rot=frame_parms->symbol_rotation[1][s + symb_offset]; LOG_D(PHY,"rotating txdataF symbol %d (%d) => (%d.%d)\n", s, @@ -643,8 +643,8 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE, for (ap = 0; ap < n_antenna_ports; ap++) { if (frame_parms->Ncp == 1) { // extended cyclic prefix - PHY_ofdm_mod(txdataF[ap], - &txdata[ap][tx_offset], + PHY_ofdm_mod((int *)txdataF[ap], + (int *)&txdata[ap][tx_offset], frame_parms->ofdm_symbol_size, 12, frame_parms->nb_prefix_samples, diff --git a/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c b/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c index e67adafe3f..fbb4a8a625 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/pss_nr.c @@ -512,7 +512,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change) { NR_DL_FRAME_PARMS *frame_parms = &(PHY_vars_UE->frame_parms); int synchro_position; - int **rxdata = NULL; + c16_t **rxdata = NULL; int fo_flag = PHY_vars_UE->UE_fo_compensation; // flag to enable freq offset estimation and compensation VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SYNCHRO_NR, VCD_FUNCTION_IN); @@ -524,10 +524,10 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change) if (rate_change != 1) { - rxdata = (int32_t**)malloc16(frame_parms->nb_antennas_rx*sizeof(int32_t*)); + rxdata = (c16_t**)malloc16(frame_parms->nb_antennas_rx * sizeof(c16_t*)); - for (int aa=0; aa < frame_parms->nb_antennas_rx; aa++) { - rxdata[aa] = (int32_t*) malloc16_clear( (frame_parms->samples_per_frame+8192)*sizeof(int32_t)); + for (int aa = 0; aa < frame_parms->nb_antennas_rx; aa++) { + rxdata[aa] = (c16_t*)malloc16_clear((frame_parms->samples_per_frame + 8192) * sizeof(c16_t)); } #ifdef SYNCHRO_DECIMAT @@ -572,7 +572,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change) #ifndef NR_UNIT_TEST - printf("PSS execution duration %4d microseconds \n", duration_ms); + LOG_I(PHY,"PSS execution duration %4d microseconds \n", duration_ms); #endif @@ -651,7 +651,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change) * *********************************************************************/ -int pss_search_time_nr(int **rxdata, ///rx data in time domain +int pss_search_time_nr(c16_t **rxdata, ///rx data in time domain NR_DL_FRAME_PARMS *frame_parms, int fo_flag, int is, @@ -701,7 +701,7 @@ int pss_search_time_nr(int **rxdata, ///rx data in time domain for (ar=0; arnb_antennas_rx; ar++) { /* perform correlation of rx data and pss sequence ie it is a dot product */ - const c32_t result = dot_product((c16_t *)primary_synchro_time_nr[pss_index], (c16_t *)&(rxdata[ar][n + is * frame_parms->samples_per_frame]), frame_parms->ofdm_symbol_size, shift); + const c32_t result = dot_product((c16_t *)primary_synchro_time_nr[pss_index], &(rxdata[ar][n + is * frame_parms->samples_per_frame]), frame_parms->ofdm_symbol_size, shift); const c64_t r64 = {.r = result.r, .i = result.i}; pss_corr_ue += squaredMod(r64); //((short*)pss_corr_ue[pss_index])[2*n] += ((short*) &result)[0]; /* real part */ @@ -731,11 +731,11 @@ int pss_search_time_nr(int **rxdata, ///rx data in time domain // Shoujun Huang, Yongtao Su, Ying He and Shan Tang, "Joint time and frequency offset estimation in LTE downlink," 7th International Conference on Communications and Networking in China, 2012. // Computing cross-correlation at peak on half the symbol size for first half of data - c32_t r1 = dot_product((c16_t *)primary_synchro_time_nr[pss_source], (c16_t *)&(rxdata[0][peak_position + is * frame_parms->samples_per_frame]), frame_parms->ofdm_symbol_size >> 1, shift); + c32_t r1 = dot_product((c16_t *)primary_synchro_time_nr[pss_source], &(rxdata[0][peak_position + is * frame_parms->samples_per_frame]), frame_parms->ofdm_symbol_size >> 1, shift); // Computing cross-correlation at peak on half the symbol size for data shifted by half symbol size // as it is real and complex it is necessary to shift by a value equal to symbol size to obtain such shift c32_t r2 = dot_product((c16_t *)primary_synchro_time_nr[pss_source] + (frame_parms->ofdm_symbol_size >> 1), - (c16_t *)&(rxdata[0][peak_position + is * frame_parms->samples_per_frame]) + (frame_parms->ofdm_symbol_size >> 1), + &(rxdata[0][peak_position + is * frame_parms->samples_per_frame]) + (frame_parms->ofdm_symbol_size >> 1), frame_parms->ofdm_symbol_size >> 1, shift); cd_t r1d = {r1.r, r1.i}, r2d = {r2.r, r2.i}; diff --git a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c index 10d7b7d98d..b443c4dfbf 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c @@ -51,7 +51,7 @@ //#define ONE_OVER_SQRT2 23170 // 32767/sqrt(2) = 23170 (ONE_OVER_SQRT2) void nr_generate_pucch0(PHY_VARS_NR_UE *ue, - int32_t **txdataF, + c16_t **txdataF, NR_DL_FRAME_PARMS *frame_parms, int16_t amp, int nr_slot_tx, @@ -169,7 +169,7 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue, } void nr_generate_pucch1(PHY_VARS_NR_UE *ue, - int32_t **txdataF, + c16_t **txdataF, NR_DL_FRAME_PARMS *frame_parms, int16_t amp, int nr_slot_tx, @@ -955,7 +955,7 @@ static void nr_uci_encoding(uint64_t payload, } //#if 0 void nr_generate_pucch2(PHY_VARS_NR_UE *ue, - int32_t **txdataF, + c16_t **txdataF, NR_DL_FRAME_PARMS *frame_parms, int16_t amp, int nr_slot_tx, @@ -1125,7 +1125,7 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue, } //#if 0 void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue, - int32_t **txdataF, + c16_t **txdataF, NR_DL_FRAME_PARMS *frame_parms, int16_t amp, int nr_slot_tx, diff --git a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h index 078a95605f..7eb836505e 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h +++ b/openair1/PHY/NR_UE_TRANSPORT/pucch_nr.h @@ -46,28 +46,28 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue, - int32_t **txdataF, + c16_t **txdataF, NR_DL_FRAME_PARMS *frame_parms, int16_t amp, int nr_slot_tx, fapi_nr_ul_config_pucch_pdu *pucch_pdu); void nr_generate_pucch1(PHY_VARS_NR_UE *ue, - int32_t **txdataF, + c16_t **txdataF, NR_DL_FRAME_PARMS *frame_parms, int16_t amp, int nr_slot_tx, fapi_nr_ul_config_pucch_pdu *pucch_pdu); void nr_generate_pucch2(PHY_VARS_NR_UE *ue, - int32_t **txdataF, + c16_t **txdataF, NR_DL_FRAME_PARMS *frame_parms, int16_t amp, int nr_slot_tx, fapi_nr_ul_config_pucch_pdu *pucch_pdu); void nr_generate_pucch3_4(PHY_VARS_NR_UE *ue, - int32_t **txdataF, + c16_t **txdataF, NR_DL_FRAME_PARMS *frame_parms, int16_t amp, int nr_slot_tx, diff --git a/openair1/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c b/openair1/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c index 5e60ae2940..7b602c2e81 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/srs_modulation_nr.c @@ -471,7 +471,7 @@ int ue_srs_procedures_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc) NR_DL_FRAME_PARMS *frame_parms = &(ue->frame_parms); uint16_t symbol_offset = (frame_parms->symbols_per_slot - 1 - srs_config_pdu->time_start_position)*frame_parms->ofdm_symbol_size; - if (generate_srs_nr(srs_config_pdu, frame_parms, ue->common_vars.txdataF, symbol_offset, ue->nr_srs_info, + if (generate_srs_nr(srs_config_pdu, frame_parms, (int32_t **)ue->common_vars.txdataF, symbol_offset, ue->nr_srs_info, AMP, proc->frame_tx, proc->nr_slot_tx) == 0) { return 0; } else { diff --git a/openair1/PHY/NR_UE_TRANSPORT/srs_modulation_nr.h b/openair1/PHY/NR_UE_TRANSPORT/srs_modulation_nr.h index 5feea8d9ce..803aada84a 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/srs_modulation_nr.h +++ b/openair1/PHY/NR_UE_TRANSPORT/srs_modulation_nr.h @@ -33,6 +33,8 @@ #ifndef SRS_MODULATION_NR_H #define SRS_MODULATION_NR_H +#include "PHY/defs_nr_UE.h" + #ifdef DEFINE_VARIABLES_SRS_MODULATION_NR_H #define EXTERN #define INIT_VARIABLES_SRS_MODULATION_NR_H diff --git a/openair1/PHY/NR_UE_TRANSPORT/sss_nr.c b/openair1/PHY/NR_UE_TRANSPORT/sss_nr.c index 41829b68f2..3056315999 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/sss_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/sss_nr.c @@ -541,7 +541,7 @@ int rx_sss_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int32_t *tot_metric, #ifdef DEBUG_SSS_NR - printf("(phase,Nid1) (%d,%d), metric_phase %d tot_metric %d, phase_max %d \n",phase, Nid1, metric, *tot_metric, *phase_max); + LOG_D(PHY,"(phase,Nid1) (%d,%d), metric_phase %d tot_metric %d, phase_max %d \n",phase, Nid1, metric, *tot_metric, *phase_max); #endif } @@ -554,7 +554,7 @@ int rx_sss_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int32_t *tot_metric, if (*tot_metric > SSS_METRIC_FLOOR_NR) { Nid2 = GET_NID2(frame_parms->Nid_cell); Nid1 = GET_NID1(frame_parms->Nid_cell); - printf("Nid2 %d Nid1 %d tot_metric %d, phase_max %d \n", Nid2, Nid1, *tot_metric, *phase_max); + LOG_D(PHY,"Nid2 %d Nid1 %d tot_metric %d, phase_max %d \n", Nid2, Nid1, *tot_metric, *phase_max); } //#endif @@ -564,7 +564,7 @@ int rx_sss_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int32_t *tot_metric, int re = 0; int im = 0; if (Nid1 == N_ID_1_NUMBER) { - LOG_I(PHY,"Failled to detect SSS after PSS\n"); + LOG_I(PHY,"Failed to detect SSS after PSS\n"); return -1; } d = (int16_t *)&d_sss[Nid2][Nid1]; diff --git a/openair1/PHY/TOOLS/CMakeLists.txt b/openair1/PHY/TOOLS/CMakeLists.txt index 0a6026fb25..0def967792 100644 --- a/openair1/PHY/TOOLS/CMakeLists.txt +++ b/openair1/PHY/TOOLS/CMakeLists.txt @@ -33,16 +33,16 @@ include_directories ("/usr/include/X11") add_library(xforms_common OBJECT lte_phy_scope.c ../../../executables/stats.c) -target_link_libraries(xforms_common PRIVATE asn1_nr_rrc PRIVATE asn1_lte_rrc) +target_link_libraries(xforms_common PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_library(enbscope MODULE lte_enb_scope.c $) -target_link_libraries(enbscope PUBLIC forms PRIVATE asn1_nr_rrc PRIVATE asn1_lte_rrc) +target_link_libraries(enbscope PUBLIC forms PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_library(uescope MODULE lte_ue_scope.c $) -target_link_libraries(uescope PUBLIC forms PRIVATE asn1_nr_rrc PRIVATE asn1_lte_rrc) +target_link_libraries(uescope PUBLIC forms PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) add_library(nrscope MODULE nr_phy_scope.c) -target_link_libraries(nrscope PUBLIC forms PRIVATE asn1_nr_rrc PRIVATE asn1_lte_rrc) +target_link_libraries(nrscope PUBLIC forms PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) # all libraries should be written to root build dir (default creates the same hierarchie under build as existing for sources) set_target_properties(enbscope uescope nrscope diff --git a/openair1/PHY/TOOLS/oai_dfts.c b/openair1/PHY/TOOLS/oai_dfts.c index 56787efd6f..51ddd336e3 100644 --- a/openair1/PHY/TOOLS/oai_dfts.c +++ b/openair1/PHY/TOOLS/oai_dfts.c @@ -9068,7 +9068,7 @@ void idft(uint8_t sizeidx, int16_t *input,int16_t *output,unsigned char scale_fl int sz=idft_ftab[sizeidx].size; int16_t tmp[sz*2] __attribute__ ((aligned(32))); // input and output are not in right type (int16_t instead of c16_t) memcpy(tmp, input, sizeof tmp); - dft_ftab[sizeidx].func(tmp,output,scale_flag); + idft_ftab[sizeidx].func(tmp,output,scale_flag); } else idft_ftab[sizeidx].func(input,output,scale_flag); }; diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h index c3dd0caa0b..13977c562f 100644 --- a/openair1/PHY/defs_gNB.h +++ b/openair1/PHY/defs_gNB.h @@ -265,13 +265,13 @@ typedef struct { /// \brief Pointers (dynamic) to the received data in the frequency domain. /// - first index: rx antenna [0..nb_antennas_rx[ /// - second index: ? [0..2*ofdm_symbol_size*frame_parms->symbols_per_tti[ - int32_t **rxdataF; + c16_t **rxdataF; /// \brief holds the transmit data in the frequency domain. /// For IFFT_FPGA this points to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER. //? /// - first index: eNB id [0..2] (hard coded) /// - second index: tx antenna [0..14[ where 14 is the total supported antenna ports. /// - third index: sample [0..samples_per_frame_woCP] - int32_t **txdataF; + c16_t **txdataF; /// \brief Anaglogue beam ID for each OFDM symbol (used when beamforming not done in RU) /// - first index: antenna port /// - second index: beam_id [0.. symbols_per_frame[ @@ -545,6 +545,16 @@ typedef struct { int subband_cqi_tot_dB[NUMBER_OF_NR_ULSCH_MAX][275]; /// PRACH background noise level int prach_I0; + + struct delay_s { + /// Time shift in number of samples estimated based on DMRS-PUSCH + int pusch_est_delay; + /// Max position in OFDM symbol related to time shift estimation based on DMRS-PUSCH + int pusch_delay_max_pos; + /// Max value related to time shift estimation based on DMRS-PUSCH + int pusch_delay_max_val; + } delay[NUMBER_OF_NR_ULSCH_MAX]; + } PHY_MEASUREMENTS_gNB; diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index e8259b5dae..79e75ee325 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -217,18 +217,24 @@ typedef struct { /// For IFFT_FPGA this points to the same memory as PHY_vars->tx_vars[a].TX_DMA_BUFFER. /// - first index: tx antenna [0..nb_antennas_tx[ /// - second index: sample [0..FRAME_LENGTH_COMPLEX_SAMPLES[ - int32_t **txdata; + c16_t **txdata; /// \brief Holds the transmit data in the frequency domain. /// For IFFT_FPGA this points to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER. /// - first index: tx antenna [0..nb_antennas_tx[ /// - second index: sample [0..FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX[ - int32_t **txdataF; + c16_t **txdataF; /// \brief Holds the received data in time domain. /// Should point to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER. /// - first index: rx antenna [0..nb_antennas_rx[ /// - second index: sample [0..2*FRAME_LENGTH_COMPLEX_SAMPLES+2048[ - int32_t **rxdata; + c16_t **rxdata; + + /// \brief Holds the received data in time domain. + /// Should point to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER. + /// - first index: rx antenna [0..nb_antennas_rx[ + /// - second index: sample [0..2*FRAME_LENGTH_COMPLEX_SAMPLES+2048[ + c16_t **rxdataF; /// holds output of the sync correlator int32_t *sync_corr; diff --git a/openair1/PHY/defs_nr_common.h b/openair1/PHY/defs_nr_common.h index 9e87116a4a..8d9de8976d 100644 --- a/openair1/PHY/defs_nr_common.h +++ b/openair1/PHY/defs_nr_common.h @@ -95,6 +95,8 @@ #define NR_NB_NSCID 2 +#define MAX_UL_DELAY_COMP 20 + typedef enum { NR_MU_0=0, NR_MU_1, @@ -219,6 +221,8 @@ struct NR_DL_FRAME_PARMS { /// sequence used to compensate the phase rotation due to timeshifted OFDM symbols /// First dimenstion is for different CP lengths c16_t timeshift_symbol_rotation[4096*2] __attribute__ ((aligned (16))); + /// Table used to apply the delay compensation in UL + c16_t ul_delay_table[2 * MAX_UL_DELAY_COMP + 1][NR_MAX_OFDM_SYMBOL_SIZE * 2]; /// shift of pilot position in one RB uint8_t nushift; /// SRS configuration from TS 38.331 RRC diff --git a/openair1/PHY/impl_defs_lte_NB_IoT.h b/openair1/PHY/impl_defs_lte_NB_IoT.h index a23100f509..4389d51d78 100644 --- a/openair1/PHY/impl_defs_lte_NB_IoT.h +++ b/openair1/PHY/impl_defs_lte_NB_IoT.h @@ -33,6 +33,7 @@ #ifndef __PHY_IMPL_DEFS_NB_IOT__H__ #define __PHY_IMPL_DEFS_NB_IOT__H__ +#include #include "types_NB_IoT.h" //#include "defs.h" @@ -40,17 +41,6 @@ typedef enum {TDD_NB_IoT=1,FDD_NB_IoT=0} NB_IoT_frame_type_t; typedef enum {EXTENDED_NB_IoT=1,NORMAL_NB_IoT=0} NB_IoT_prefix_type_t; typedef enum {SF_DL_NB_IoT, SF_UL_NB_IoT, SF_S_NB_IoT} NB_IoT_subframe_t; -#define A_SEQUENCE_OF(type) A_SET_OF(type) - -#define A_SET_OF(type) \ - struct { \ - type **array; \ - int count; /* Meaningful size */ \ - int size; /* Allocated size */ \ - void (*free)(type *); \ - } - - ///////////////////////// /// Union for \ref TPC_PDCCH_CONFIG::tpc_Index. typedef union { diff --git a/openair1/PHY/phy_extern.h b/openair1/PHY/phy_extern.h index 71db7df2bd..97a0046bc4 100644 --- a/openair1/PHY/phy_extern.h +++ b/openair1/PHY/phy_extern.h @@ -24,80 +24,107 @@ #include "PHY/defs_common.h" -extern char* namepointer_chMag ; -extern char* namepointer_log2; -extern char fmageren_name2[512]; - -extern unsigned int RX_DMA_BUFFER[4][NB_ANTENNAS_RX]; -extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX]; - #include "PHY/LTE_TRANSPORT/transport_vars.h" #include "PHY/defs_RU.h" -extern unsigned int DAQ_MBOX; extern int number_of_cards; -extern const short conjugate[8],conjugate2[8]; +static const short conjugate[8] __attribute__((aligned(16))) = {-1, 1, -1, 1, -1, 1, -1, 1}; +static const short conjugate2[8] __attribute__((aligned(16))) = {1, -1, 1, -1, 1, -1, 1, -1}; - -extern short primary_synch0[144]; -extern short primary_synch1[144]; -extern short primary_synch2[144]; -extern unsigned char primary_synch0_tab[72]; -extern unsigned char primary_synch1_tab[72]; -extern unsigned char primary_synch2_tab[72]; - -extern int flagMag; -//extern short **txdataF_rep_tmp; - -extern char mode_string[4][20]; +static const short primary_synch0[144] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, -26120, -19785, 11971, -30502, + -24020, -22288, 32117, 6492, 31311, 9658, -16384, -28378, 25100, -21063, -7292, -31946, 20429, 25618, 14948, 29158, + 11971, -30502, 31311, 9658, 25100, -21063, -16384, 28377, -24020, 22287, 32117, 6492, -7292, 31945, 20429, 25618, + -26120, -19785, -16384, -28378, -16384, 28377, -26120, -19785, -32402, 4883, 31311, -9659, 32117, 6492, -7292, -31946, + 32767, -1, 25100, -21063, -24020, 22287, -32402, 4883, -32402, 4883, -24020, 22287, 25100, -21063, 32767, -1, + -7292, -31946, 32117, 6492, 31311, -9659, -32402, 4883, -26120, -19785, -16384, 28377, -16384, -28378, -26120, -19785, + 20429, 25618, -7292, 31945, 32117, 6492, -24020, 22287, -16384, 28377, 25100, -21063, 31311, 9658, 11971, -30502, + 14948, 29158, 20429, 25618, -7292, -31946, 25100, -21063, -16384, -28378, 31311, 9658, 32117, 6492, -24020, -22288, + 11971, -30502, -26120, -19785, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +static const short primary_synch1[144] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, -31754, -8086, -24020, -22288, + 2448, 32675, -26120, 19784, 27073, 18458, -16384, 28377, 25100, 21062, -29523, 14217, -7292, 31945, -13477, -29868, + -24020, -22288, 27073, 18458, 25100, 21062, -16384, -28378, 2448, -32676, -26120, 19784, -29523, -14218, -7292, 31945, + -31754, -8086, -16384, 28377, -16384, -28378, -31754, -8086, 31311, -9659, 27073, -18459, -26120, 19784, -29523, 14217, + 32767, -1, 25100, 21062, 2448, -32676, 31311, -9659, 31311, -9659, 2448, -32676, 25100, 21062, 32767, 0, + -29523, 14217, -26120, 19784, 27073, -18459, 31311, -9659, -31754, -8086, -16384, -28378, -16384, 28377, -31754, -8086, + -7292, 31945, -29523, -14218, -26120, 19784, 2448, -32676, -16384, -28378, 25100, 21062, 27073, 18458, -24020, -22288, + -13477, -29868, -7292, 31945, -29523, 14217, 25100, 21062, -16384, 28377, 27073, 18458, -26120, 19784, 2448, 32675, + -24020, -22288, -31754, -8086, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +static const short primary_synch2[144] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, -31754, 8085, -24020, 22287, + 2448, -32676, -26120, -19785, 27073, -18459, -16384, -28378, 25100, -21063, -29523, -14218, -7292, -31946, -13477, 29867, + -24020, 22287, 27073, -18459, 25100, -21063, -16384, 28377, 2448, 32675, -26120, -19785, -29523, 14217, -7292, -31946, + -31754, 8085, -16384, -28378, -16384, 28377, -31754, 8085, 31311, 9658, 27073, 18458, -26120, -19785, -29523, -14218, + 32767, 0, 25100, -21063, 2448, 32675, 31311, 9658, 31311, 9658, 2448, 32675, 25100, -21063, 32767, 0, + -29523, -14218, -26120, -19785, 27073, 18458, 31311, 9658, -31754, 8085, -16384, 28377, -16384, -28378, -31754, 8085, + -7292, -31946, -29523, 14217, -26120, -19785, 2448, 32675, -16384, 28377, 25100, -21063, 27073, -18459, -24020, 22287, + -13477, 29867, -7292, -31946, -29523, -14218, 25100, -21063, -16384, -28378, 27073, -18459, -26120, -19785, 2448, -32676, + -24020, 22287, -31754, 8085, 32767, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; extern unsigned char NB_RU; -extern int flag_LA; -extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX]; -extern double sinr_bler_map_up[MCS_COUNT][2][16]; -extern int table_length[MCS_COUNT]; -extern const double sinr_to_cqi[4][16]; -extern const int cqi_to_mcs[16]; - -//for MU-MIMO abstraction using MIESM -//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively -extern double MI_map_4qam[3][162]; -extern double MI_map_16qam[3][197]; -extern double MI_map_64qam[3][227]; - -extern const double beta1_dlsch_MI[6][MCS_COUNT]; -extern const double beta2_dlsch_MI[6][MCS_COUNT]; - -extern const double q_qpsk[8]; -extern const double q_qam16[8]; -extern const double q_qam64[8]; -extern const double p_qpsk[8]; -extern const double p_qam16[8]; -extern const double p_qam64[8]; - -extern const double beta1_dlsch[6][MCS_COUNT]; -extern const double beta2_dlsch[6][MCS_COUNT]; - -extern const char NB_functions[7][20]; -extern const char NB_timing[2][20]; -extern const char ru_if_types[MAX_RU_IF_TYPES][20]; +static const char NB_functions[7][20] = { + "eNodeB_3GPP", + "eNodeB_3GPP_BBU", + "NGFI_RAU_IF4p5", + "NGFI_RRU_IF5", + "NGFI_RRU_IF4p5", + "gNodeB_3GPP", +}; +static const char NB_timing[2][20] = {"synch_to_ext_device", "synch_to_other"}; +static const char ru_if_types[MAX_RU_IF_TYPES][20] = {"local RF", "IF5 RRU", "IF5 Mobipass", "IF4p5 RRU", "IF1pp RRU"}; extern int16_t unscrambling_lut[65536*16]; extern uint8_t scrambling_lut[65536*16]; -extern unsigned short msrsb_6_40[8][4]; -extern unsigned short msrsb_41_60[8][4]; -extern unsigned short msrsb_61_80[8][4]; -extern unsigned short msrsb_81_110[8][4]; -extern unsigned short Nb_6_40[8][4]; -extern unsigned short Nb_41_60[8][4]; -extern unsigned short Nb_61_80[8][4]; -extern unsigned short Nb_81_110[8][4]; +static const unsigned short Nb_6_40[8][4] = { + {36,12,4,4}, + {32,16,8,4}, + {24,4,4,4}, + {20,4,4,4}, + {16,4,4,4}, + {12,4,4,4}, + {8,4,4,4}, + {4,4,4,4} +}; +static const unsigned short Nb_41_60[8][4] = { + {48,24,12,4}, + {48,16,8,4}, + {40,20,4,4}, + {36,12,4,4}, + {32,16,8,4}, + {24,4,4,4}, + {20,4,4,4}, + {16,4,4,4} +}; +static const unsigned short Nb_61_80[8][4] = { + {72,24,12,4}, + {64,32,16,4}, + {60,20,4,4}, + {48,24,12,4}, + {48,16,8,4}, + {40,20,4,4}, + {36,12,4,4}, + {32,16,8,4} +}; +static const unsigned short Nb_81_110[8][4] = { + {96,48,24,4}, + {96,32,16,4}, + {80,40,20,4}, + {72,24,12,4}, + {64,32,16,4}, + {60,20,4,4}, + {48,24,12,4}, + {48,16,8,4} +}; + +static const uint8_t alpha_lut[8] = {0, 40, 50, 60, 70, 80, 90, 100}; -extern uint8_t alpha_lut[8]; extern uint8_t max_turbo_iterations; +extern double cpuf; + #endif /*__PHY_EXTERN_H__ */ diff --git a/openair1/PHY/phy_extern_nr_ue.h b/openair1/PHY/phy_extern_nr_ue.h index 4701a16012..98765730bb 100644 --- a/openair1/PHY/phy_extern_nr_ue.h +++ b/openair1/PHY/phy_extern_nr_ue.h @@ -23,90 +23,7 @@ #define __PHY_EXTERN_NR_UE__H__ #include "PHY/defs_nr_UE.h" -//#include "common/ran_context.h" - -#ifdef XFORMS - #include "PHY/TOOLS/nr_phy_scope.h" - extern uint32_t do_forms; -#endif - -extern char* namepointer_chMag ; -extern char* namepointer_log2; -extern char fmageren_name2[512]; - -extern unsigned int RX_DMA_BUFFER[4][NB_ANTENNAS_RX]; -extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX]; - -extern uint64_t downlink_frequency[MAX_NUM_CCs][4]; -extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; - -extern const short conjugate[8],conjugate2[8]; -extern int number_of_cards; - - extern PHY_VARS_NR_UE ***PHY_vars_UE_g; -extern short primary_synch0[144]; -extern short primary_synch1[144]; -extern short primary_synch2[144]; -extern unsigned char primary_synch0_tab[72]; -extern unsigned char primary_synch1_tab[72]; -extern unsigned char primary_synch2_tab[72]; -extern int16_t *primary_synch0_time; //!< index: [0..ofdm_symbol_size*2[ -extern int16_t *primary_synch1_time; //!< index: [0..ofdm_symbol_size*2[ -extern int16_t *primary_synch2_time; //!< index: [0..ofdm_symbol_size*2[ - -extern int flagMag; -//extern short **txdataF_rep_tmp; - -extern char mode_string[4][20]; - -extern unsigned char NB_RU; - -extern int flag_LA; -extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX]; -extern double sinr_bler_map_up[MCS_COUNT][2][16]; -extern int table_length[MCS_COUNT]; -extern const double sinr_to_cqi[4][16]; -extern const int cqi_to_mcs[16]; - -//for MU-MIMO abstraction using MIESM -//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively -extern double MI_map_4qam[3][162]; -extern double MI_map_16qam[3][197]; -extern double MI_map_64qam[3][227]; - -extern const double beta1_dlsch_MI[6][MCS_COUNT]; -extern const double beta2_dlsch_MI[6][MCS_COUNT]; - -extern const double q_qpsk[8]; -extern const double q_qam16[8]; -extern const double q_qam64[8]; - -extern const double beta1_dlsch[6][MCS_COUNT]; -extern const double beta2_dlsch[6][MCS_COUNT]; - -extern const char NB_functions[7][20]; -extern const char NB_timing[2][20]; -extern const char ru_if_types[MAX_RU_IF_TYPES][20]; - -extern int16_t unscrambling_lut[65536*16]; -extern uint8_t scrambling_lut[65536*16]; - -extern unsigned short msrsb_6_40[8][4]; -extern unsigned short msrsb_41_60[8][4]; -extern unsigned short msrsb_61_80[8][4]; -extern unsigned short msrsb_81_110[8][4]; -extern unsigned short Nb_6_40[8][4]; -extern unsigned short Nb_41_60[8][4]; -extern unsigned short Nb_61_80[8][4]; -extern unsigned short Nb_81_110[8][4]; - -extern uint16_t hundred_times_log10_NPRB[100]; -extern uint8_t alpha_lut[8]; -extern uint8_t max_turbo_iterations; - -extern double cpuf; - #endif /*__PHY_EXTERN_H__ */ diff --git a/openair1/PHY/phy_extern_ue.h b/openair1/PHY/phy_extern_ue.h index 0249ed0147..dd4740e27a 100644 --- a/openair1/PHY/phy_extern_ue.h +++ b/openair1/PHY/phy_extern_ue.h @@ -24,79 +24,9 @@ #include "PHY/defs_UE.h" -extern char* namepointer_chMag ; -extern char* namepointer_log2; -extern char fmageren_name2[512]; - -extern unsigned int RX_DMA_BUFFER[4][NB_ANTENNAS_RX]; -extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX]; - -#include "PHY/LTE_TRANSPORT/transport_vars.h" - -extern int number_of_cards; - -extern const short conjugate[8],conjugate2[8]; - - extern PHY_VARS_UE ***PHY_vars_UE_g; -extern short primary_synch0[144]; -extern short primary_synch1[144]; -extern short primary_synch2[144]; -extern unsigned char primary_synch0_tab[72]; -extern unsigned char primary_synch1_tab[72]; -extern unsigned char primary_synch2_tab[72]; - -extern int flagMag; -//extern short **txdataF_rep_tmp; - -extern char mode_string[4][20]; - - -extern int flag_LA; -extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX]; -extern double sinr_bler_map_up[MCS_COUNT][2][16]; -extern int table_length[MCS_COUNT]; -extern const double sinr_to_cqi[4][16]; -extern const int cqi_to_mcs[16]; - -//for MU-MIMO abstraction using MIESM -//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively -extern double MI_map_4qam[3][162]; -extern double MI_map_16qam[3][197]; -extern double MI_map_64qam[3][227]; - -extern const double beta1_dlsch_MI[6][MCS_COUNT]; -extern const double beta2_dlsch_MI[6][MCS_COUNT]; - -extern const double q_qpsk[8]; -extern const double q_qam16[8]; -extern const double q_qam64[8]; - -extern const double p_qpsk[8]; -extern const double p_qam16[8]; -extern const double p_qam64[8]; - -extern const double beta1_dlsch[6][MCS_COUNT]; -extern const double beta2_dlsch[6][MCS_COUNT]; - -extern const char NB_functions[7][20]; -extern const char NB_timing[2][20]; -extern const char ru_if_types[MAX_RU_IF_TYPES][20]; - -extern int16_t unscrambling_lut[65536*16]; -extern uint8_t scrambling_lut[65536*16]; - -extern unsigned short msrsb_6_40[8][4]; -extern unsigned short msrsb_41_60[8][4]; -extern unsigned short msrsb_61_80[8][4]; -extern unsigned short msrsb_81_110[8][4]; -extern unsigned short Nb_6_40[8][4]; -extern unsigned short Nb_41_60[8][4]; -extern unsigned short Nb_61_80[8][4]; -extern unsigned short Nb_81_110[8][4]; - -extern uint8_t alpha_lut[8]; extern uint8_t max_turbo_iterations; + #endif /*__PHY_EXTERN_H__ */ diff --git a/openair1/PHY/phy_vars.h b/openair1/PHY/phy_vars.h index b1899639fb..89063c5be2 100644 --- a/openair1/PHY/phy_vars.h +++ b/openair1/PHY/phy_vars.h @@ -22,104 +22,18 @@ #ifndef __PHY_VARS_H__ #define __PHY_VARS_H__ -#include "PHY/types.h" -#include "PHY/defs_eNB.h" -#include "PHY/defs_gNB.h" #include "PHY/defs_UE.h" -char* namepointer_chMag ; -char fmageren_name2[512]; -char* namepointer_log2; - - -#include "PHY/LTE_REFSIG/primary_synch.h" - -#include "PHY/LTE_TRANSPORT/transport_vars.h" - -#include "nfapi/oai_integration/vendor_ext.h" +#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h" +#include "openair2/PHY_INTERFACE/IF_Module.h" PHY_VARS_UE ***PHY_vars_UE_g; UL_RCC_IND_t UL_RCC_INFO; NR_UL_IND_t UL_INFO; -unsigned short rev[2048],rev_times4[8192],rev_half[1024]; -unsigned short rev256[256],rev512[512],rev1024[1024],rev4096[4096],rev2048[2048],rev8192[8192]; - - -const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1}; -const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1}; - unsigned char NB_RU=0; - int number_of_cards; - - -int flag_LA=0; -int flagMag; -//extern channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX]; -//extern double ABS_SINR_eff_BLER_table[MCS_COUNT][9][9]; -//extern double ABS_beta[MCS_COUNT];odi -double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX]; -int table_length[MCS_COUNT]; -//double sinr_bler_map_up[MCS_COUNT][2][16]; - -//for MU-MIMO abstraction using MIESM -//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively -double MI_map_4qam[3][162]; -double MI_map_16qam[3][197]; -double MI_map_64qam[3][227]; - -// here the first index is for transmission mode 1, 2, 5 and 6 whereas the second index is for the 16 sinr vaues corresponding to 16 CQIs -const double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424}, - {-2.2360, -2.2360, -1.3919, -0.0218, 1.5319, 2.9574, 4.3234, 6.3387, 8.9879, 9.5096, 12.6609, 14.0116, 16.4984, 18.1572, 18.1572, 18.1572}, - {-1, -1.0000, -0.4198, -0.0140, 1.0362, 2.3520, 3.5793, 6.1136, 8.4836, 9.0858, 12.4723, 13.9128, 16.2054, 17.7392, 17.7392, 17.7392}, - { -4.1057, -4.1057, -3.3768, -2.2916, -1.1392, 0.1236, 1.2849, 3.1933, 5.9298, 6.4052, 9.6245, 10.9414, 13.5166, 14.9545, 14.9545, 14.9545} -}; - -const int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28}; - -//for SNR to MI conversion 7 th order Polynomial coeff -const double q_qam16[8]= {3.21151853033897e-10,5.55435952230651e-09,-2.30760065362117e-07,-6.25587743817859e-06,4.62251036452795e-06,0.00224150813158937,0.0393723140344367,0.245486379182639}; -const double q_qpsk[8]= {1.94491167814437e-09,8.40494123817774e-08,4.75527131198034e-07,-2.48946285301621e-05,-0.000347614016158364,0.00209252225437100,0.0742986115462510,0.488297879889425}; -const double q_qam64[8]= {2.25934026232206e-11,-1.45992206328306e-10,-3.70861183071900e-08,-1.22206071019319e-06,6.49115500399637e-06,0.00129828997837433,0.0259669554914859,0.166602901214898}; - -//for MI to SNR conversion 7 th order Polynomial coeff -const double p_qpsk[8]= {5982.42405670359,-21568.1135917693,31293.9987036905,-23394.6795043871,9608.34750585489,-2158.15802349899,267.731968719036,-20.6145324295965}; -const double p_qam16[8]= {7862.12690694170,-28510.3207048338,41542.2150287122,-31088.3036957379,12690.1982361016,-2785.66604739984,326.595462489375,-18.9911849872089}; -const double p_qam64[8]= {8832.57933013696,-32119.1802555952,46914.2578990397,-35163.8150557183,14343.7419388853,-3126.61025510092,360.954930562237,-18.0358548533343}; - -// ideal CE MIESM - -const double beta1_dlsch_MI[6][MCS_COUNT] = { {1.1188, 0.3720, 0.3755, 0.9453, 0.5799, 0.5256, 0.5485, 0.5340, 0.5165, 0.5300, 0.6594, 0.5962, 0.4884, 0.4927, 0.3687, 0.4614, 0.4081, 0.2639,0.2935,0.2520,0.3709,0.2906,0.2612,0.2390}, {0.7138, 0.5533, 0.5533, 0.4828, 0.4998, 0.4843, 0.4942, 0.5323, 0.5142, 0.4756, 0.5792, 0.4167, 0.4445, 0.3942, 0.3789, 0.2756, 0.4456, 0.1650, 0.2254, 0.2353, 0.2097,0.2517,0.3242,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.7146, 0.4789, 0.5392, 0.5556, 0.4975, 0.4847, 0.4691, 0.5261, 0.5278, 0.4962, 0.4468, 0.4113, 0.4622, 0.4609, 0.3946, 0.3991, 0.3532, 0.2439, 0.1898, 0.2929, 0.2712, 0.3367, 0.3591, 0.2571}}; -const double beta2_dlsch_MI[6][MCS_COUNT] = { {1.1293, 0.3707, 0.3722, 0.9310, 0.5808, 0.5265, 0.5404, 0.5279, 0.5210, 0.5226, 0.6438, 0.5827, 0.4804, 0.4830, 0.3638, 0.4506, 0.4107, 0.2547, 0.2797, 0.2413, 0.3351, 0.2750, 0.2568, 0.2273}, {0.7028, 0.5503, 0.5503, 0.4815, 0.5006, 0.4764, 0.4810, 0.5124, 0.4964, 0.4485, 0.5497, 0.3971, 0.4239, 0.3701, 0.3494, 0.2630, 0.4053, 0.1505, 0.2001,0.2024,0.1788,0.2124,0.2668,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.6980, 0.4694, 0.5379, 0.5483, 0.4982, 0.4737, 0.4611, 0.5051, 0.5020, 0.4672, 0.4357, 0.3957, 0.4389, 0.4344, 0.3645, 0.3661, 0.3301, 0.2179, 0.1730, 0.2536, 0.2389,0.2884,0.2936,0.2226}}; - -//real CE MIESM -/* -double beta1_dlsch_MI[6][MCS_COUNT] = { {1.32955, 0.59522, 0.54024, 0.98698, 0.81305, 0.76976, 0.69258, 0.69713, 0.70546, 0.69111, 0.81904, 0.72664, 0.79491, 0.72562, 0.53980, 0.33134, 0.50550, 0.40602,0.40281,0.47012,0.50510,0.23540,0.32045,1}, {0.59632, 1.08475, 1.02431, 1.07020, 0.90170, 0.97719, 0.95464, 0.92764, 0.86721, 0.85986, 0.64558, 0.80631, 0.82673, 0.82888, 0.87122, 0.77245, 0.29771, 0.43477, 0.55321, 0.61027, 0.56111, 0.57292, 0.39737,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.77532, 1.07544, 1.10571, 1.04099, 0.91638, 0.88644, 0.96405, 0.86709, 0.94066, 0.84430, 1.24478, 1.09665, 1.42604, 0.79541, 0.71847, 0.71604, 0.74561, 0.36431, 0.41536, 0.52175, 0.47096, 0.49977, 0.59728,1}}; -double beta2_dlsch_MI[6][MCS_COUNT] = { {1.36875, 0.59304, 0.53870, 0.98239, 0.81637, 0.76847, 0.69842, 0.69885, 0.69967, 0.69826, 0.82660, 0.70559, 0.78404, 0.70670, 0.55393, 0.36893, 0.52225, 0.39752, 0.40494, 0.46239, 0.49247,0.26900,0.34504,1}, {0.43775, 0.78208, 0.72875, 0.77458, 0.64485, 0.69174, 0.66097, 0.63289, 0.59652, 0.61175, 0.44551, 0.56047, 0.57314, 0.57553, 0.58849, 0.52159, 0.21241, 0.30139, 0.37373, 0.32029, 0.37067, 0.36706, 0.27118,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.54448, 0.73731, 0.79165, 0.74407, 0.68042, 0.64906, 0.71349, 0.62109, 0.65815, 0.60940, 0.90549, 0.78708, 1.03176, 0.58431, 0.53379, 0.51224, 0.52767, 0.26848, 0.29642, 0.36879, 0.34148, 0.35279,0.40633,1}}; -*/ -//ideal channel estimation values -//double beta1_dlsch[6][MCS_COUNT] = { {2.3814, 0.4956, 0.5273, 1.1708, 0.8014, 0.7889, 0.8111, 0.8139, 0.8124, 0.8479, 1.9280, 1.9664, 2.3857, 2.5147, 2.4511, 3.0158, 2.8643, 5.3013, 5.8594, 6.5372, 7.8073, 7.8030, 7.5295, 7.1320}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}}; -//double beta2_dlsch[6][MCS_COUNT] = { {2.3639, 0.4952, 0.5207, 1.1572, 0.8026, 0.7864, 0.7996, 0.8034, 0.8200, 0.8367, 1.8701, 1.9212, 2.2947, 2.4472, 2.4091, 2.9479, 2.8973, 5.0591, 5.5134, 6.1483, 7.2166, 7.5177, 7.5704, 7.2248}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}}; -const double beta1_dlsch[6][MCS_COUNT] = { {1.199175, 1.085656, 0.983872, 0.843789, 0.816093, 0.853078, 0.899236, 0.919665, 0.888673, 0.924181, 0.814176, 0.794108, 0.770653, 0.826266, 0.982043, 0.979621, 0.985176, 0.901741, 0.870311, 0.911303, 0.898923, 1.003359, 0.988535, 1.030639, 1.151038, 1.116939, 1.214118, 1.219148}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}}; -const double beta2_dlsch[6][MCS_COUNT] = { {0.534622, 0.596561, 0.500838, 0.471721, 0.548218, 0.547974, 0.924245, 0.836484, 0.776917, 0.879691, 0.875722, 0.666933, 0.666393, 0.755377, 1.074985, 1.080290, 1.010914, 0.790892, 0.793435, 0.860249, 0.901508, 0.967060, 0.951372, 1.011493, 1.106151, 1.117076, 1.209397, 1.227790}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}}; - -//real channel estimation valus -/* -double beta1_dlsch[6][MCS_COUNT] = { {2.50200, 0.84047, 0.78195, 1.37929, 1.16871, 1.11906, 1.06303, 1.07447, 1.11403, 1.09223, 2.82502, 2.87556, 3.51254, 3.62920, 3.53638, 2.35980, 3.74126, 8.66532, 7.31772, 9.86882, 10.64939, 6.75208, 9.50664, 13.63057}, {0.92257, 1, 1.80445, 1.43175, 1.42093, 1.37381, 1.45392, 1.47255, 1.47451, 1.41235, 3.9079, 3.38557, 4.13059, 4.93355, 4.97277, 6.04951, 5.88896, 8.68076, 10.23746, 12.37069, 5.50538, 17.29612, 17.95050, 13.27095}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79255, 1.88213, 4.44226, 2.25150, 1.93710, 2.18504, 2.57389, 1.94322, 1.78515, 2.09265, 2.37459, 1.74442, 1.74346, 1.19705, 1.56149, 1.59604, 1.6, 1,1,1,1,1,1,1}, {0.93374, 1.40389, 1.36670, 1.38679, 1.35707, 1.26353, 1.32360, 1.40164, 1.51843, 1.34863, 3.45839, 3.13726, 3.94768, 4.21966, 4.60750, 4.97894, 5.40755, 8.12814, 10.59221, 12.96427, 13.37323, 14.27206, 16.61779, 17.19656}}; -double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.16829, 1.11186, 1.06287, 1.07292, 1.09946, 1.10650, 2.79174, 2.75655, 3.36651, 3.49011, 3.60903, 2.73517, 3.84009, 8.20312, 7.41739, 9.64081, 10.40911, 8.11765, 10.41923, 9.34300}, {0.67252, 0.8600, 1.28633, 1.01624, 1.03066, 0.97590, 1.02560, 1.01840, 1.00547, 0.97093, 2.72573, 2.33283, 2.86181, 3.40452, 3.47957, 4.08916, 3.97628, 6.14541, 7.11017, 8.42369, 4.04812, 11.42082, 11.57171, 9.28462}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.85784, 0.90361, 2.09766, 1.08385, 0.96300, 1.04432, 1.22763, 0.99249, 0.95544, 1.12333, 1.37924, 1.12913, 1.30644, 1.19253, 1.75488, 2.13813, 2.10636, 1,1,1,1,1,1,1}, {0.66288, 0.96402, 0.98545, 0.99386, 0.99981, 0.92678, 0.98978, 0.99600, 1.05538, 0.97777, 2.52504, 2.29338, 2.89631, 3.10812, 3.41916, 3.58671, 3.84166, 6.05254, 7.45821, 9.15812, 9.66330, 10.17852, 11.50519, 11.16299}}; - -*/ - -const char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",}; -const char NB_timing[2][20]={"synch_to_ext_device","synch_to_other"}; -const char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"}; - -/// lookup table for unscrambling in RX -int16_t unscrambling_lut[65536*16] __attribute__((aligned(32))); -/// lookup table for scrambling in TX -uint8_t scrambling_lut[65536*16] __attribute__((aligned(32))); - uint8_t max_turbo_iterations=4; + #endif /*__PHY_VARS_H__ */ diff --git a/openair1/PHY/phy_vars_nr_ue.h b/openair1/PHY/phy_vars_nr_ue.h index 99b22ab69d..2201091270 100644 --- a/openair1/PHY/phy_vars_nr_ue.h +++ b/openair1/PHY/phy_vars_nr_ue.h @@ -22,16 +22,8 @@ #ifndef __PHY_VARS_NR_UE_H__ #define __PHY_VARS_NR_UE_H__ -#include "PHY/types.h" #include "PHY/defs_nr_UE.h" -#include "common/ran_context.h" - PHY_VARS_NR_UE ***PHY_vars_UE_g; -const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1}; -const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1}; - -const char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"}; - #endif diff --git a/openair1/PHY/phy_vars_ue.h b/openair1/PHY/phy_vars_ue.h index 92a135b44e..12f49d6b0a 100644 --- a/openair1/PHY/phy_vars_ue.h +++ b/openair1/PHY/phy_vars_ue.h @@ -22,95 +22,11 @@ #ifndef __PHY_VARS_UE__H__ #define __PHY_VARS_UE__H__ -#include "PHY/types.h" #include "PHY/defs_UE.h" -#include "common/ran_context.h" - -char *namepointer_chMag ; -char fmageren_name2[512]; -char *namepointer_log2; - - -#include "PHY/LTE_REFSIG/primary_synch.h" - PHY_VARS_UE ***PHY_vars_UE_g; -unsigned short rev[2048],rev_times4[8192],rev_half[1024]; -unsigned short rev256[256],rev512[512],rev1024[1024],rev4096[4096],rev2048[2048],rev8192[8192]; - - -const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1}; -const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1}; - int number_of_cards; - - -int flag_LA=0; -int flagMag; -//extern channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX]; -//extern double ABS_SINR_eff_BLER_table[MCS_COUNT][9][9]; -//extern double ABS_beta[MCS_COUNT];odi -double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX]; -int table_length[MCS_COUNT]; -//double sinr_bler_map_up[MCS_COUNT][2][16]; - -//for MU-MIMO abstraction using MIESM -//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively -double MI_map_4qam[3][162]; -double MI_map_16qam[3][197]; -double MI_map_64qam[3][227]; - -// here the first index is for transmission mode 1, 2, 5 and 6 whereas the second index is for the 16 sinr vaues corresponding to 16 CQIs -const double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424}, - {-2.2360, -2.2360, -1.3919, -0.0218, 1.5319, 2.9574, 4.3234, 6.3387, 8.9879, 9.5096, 12.6609, 14.0116, 16.4984, 18.1572, 18.1572, 18.1572}, - {-1, -1.0000, -0.4198, -0.0140, 1.0362, 2.3520, 3.5793, 6.1136, 8.4836, 9.0858, 12.4723, 13.9128, 16.2054, 17.7392, 17.7392, 17.7392}, - { -4.1057, -4.1057, -3.3768, -2.2916, -1.1392, 0.1236, 1.2849, 3.1933, 5.9298, 6.4052, 9.6245, 10.9414, 13.5166, 14.9545, 14.9545, 14.9545} -}; - -const int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28}; - -//for SNR to MI conversion 7 th order Polynomial coeff -const double q_qam16[8]= {3.21151853033897e-10,5.55435952230651e-09,-2.30760065362117e-07,-6.25587743817859e-06,4.62251036452795e-06,0.00224150813158937,0.0393723140344367,0.245486379182639}; -const double q_qpsk[8]= {1.94491167814437e-09,8.40494123817774e-08,4.75527131198034e-07,-2.48946285301621e-05,-0.000347614016158364,0.00209252225437100,0.0742986115462510,0.488297879889425}; -const double q_qam64[8]= {2.25934026232206e-11,-1.45992206328306e-10,-3.70861183071900e-08,-1.22206071019319e-06,6.49115500399637e-06,0.00129828997837433,0.0259669554914859,0.166602901214898}; - -//for MI to SNR conversion 7 th order Polynomial coeff -const double p_qpsk[8]= {5982.42405670359,-21568.1135917693,31293.9987036905,-23394.6795043871,9608.34750585489,-2158.15802349899,267.731968719036,-20.6145324295965}; -const double p_qam16[8]= {7862.12690694170,-28510.3207048338,41542.2150287122,-31088.3036957379,12690.1982361016,-2785.66604739984,326.595462489375,-18.9911849872089}; -const double p_qam64[8]= {8832.57933013696,-32119.1802555952,46914.2578990397,-35163.8150557183,14343.7419388853,-3126.61025510092,360.954930562237,-18.0358548533343}; - -// ideal CE MIESM - -const double beta1_dlsch_MI[6][MCS_COUNT] = { {1.1188, 0.3720, 0.3755, 0.9453, 0.5799, 0.5256, 0.5485, 0.5340, 0.5165, 0.5300, 0.6594, 0.5962, 0.4884, 0.4927, 0.3687, 0.4614, 0.4081, 0.2639,0.2935,0.2520,0.3709,0.2906,0.2612,0.2390}, {0.7138, 0.5533, 0.5533, 0.4828, 0.4998, 0.4843, 0.4942, 0.5323, 0.5142, 0.4756, 0.5792, 0.4167, 0.4445, 0.3942, 0.3789, 0.2756, 0.4456, 0.1650, 0.2254, 0.2353, 0.2097,0.2517,0.3242,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.7146, 0.4789, 0.5392, 0.5556, 0.4975, 0.4847, 0.4691, 0.5261, 0.5278, 0.4962, 0.4468, 0.4113, 0.4622, 0.4609, 0.3946, 0.3991, 0.3532, 0.2439, 0.1898, 0.2929, 0.2712, 0.3367, 0.3591, 0.2571}}; -const double beta2_dlsch_MI[6][MCS_COUNT] = { {1.1293, 0.3707, 0.3722, 0.9310, 0.5808, 0.5265, 0.5404, 0.5279, 0.5210, 0.5226, 0.6438, 0.5827, 0.4804, 0.4830, 0.3638, 0.4506, 0.4107, 0.2547, 0.2797, 0.2413, 0.3351, 0.2750, 0.2568, 0.2273}, {0.7028, 0.5503, 0.5503, 0.4815, 0.5006, 0.4764, 0.4810, 0.5124, 0.4964, 0.4485, 0.5497, 0.3971, 0.4239, 0.3701, 0.3494, 0.2630, 0.4053, 0.1505, 0.2001,0.2024,0.1788,0.2124,0.2668,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.6980, 0.4694, 0.5379, 0.5483, 0.4982, 0.4737, 0.4611, 0.5051, 0.5020, 0.4672, 0.4357, 0.3957, 0.4389, 0.4344, 0.3645, 0.3661, 0.3301, 0.2179, 0.1730, 0.2536, 0.2389,0.2884,0.2936,0.2226}}; - -//real CE MIESM -/* -double beta1_dlsch_MI[6][MCS_COUNT] = { {1.32955, 0.59522, 0.54024, 0.98698, 0.81305, 0.76976, 0.69258, 0.69713, 0.70546, 0.69111, 0.81904, 0.72664, 0.79491, 0.72562, 0.53980, 0.33134, 0.50550, 0.40602,0.40281,0.47012,0.50510,0.23540,0.32045,1}, {0.59632, 1.08475, 1.02431, 1.07020, 0.90170, 0.97719, 0.95464, 0.92764, 0.86721, 0.85986, 0.64558, 0.80631, 0.82673, 0.82888, 0.87122, 0.77245, 0.29771, 0.43477, 0.55321, 0.61027, 0.56111, 0.57292, 0.39737,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.77532, 1.07544, 1.10571, 1.04099, 0.91638, 0.88644, 0.96405, 0.86709, 0.94066, 0.84430, 1.24478, 1.09665, 1.42604, 0.79541, 0.71847, 0.71604, 0.74561, 0.36431, 0.41536, 0.52175, 0.47096, 0.49977, 0.59728,1}}; -double beta2_dlsch_MI[6][MCS_COUNT] = { {1.36875, 0.59304, 0.53870, 0.98239, 0.81637, 0.76847, 0.69842, 0.69885, 0.69967, 0.69826, 0.82660, 0.70559, 0.78404, 0.70670, 0.55393, 0.36893, 0.52225, 0.39752, 0.40494, 0.46239, 0.49247,0.26900,0.34504,1}, {0.43775, 0.78208, 0.72875, 0.77458, 0.64485, 0.69174, 0.66097, 0.63289, 0.59652, 0.61175, 0.44551, 0.56047, 0.57314, 0.57553, 0.58849, 0.52159, 0.21241, 0.30139, 0.37373, 0.32029, 0.37067, 0.36706, 0.27118,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.54448, 0.73731, 0.79165, 0.74407, 0.68042, 0.64906, 0.71349, 0.62109, 0.65815, 0.60940, 0.90549, 0.78708, 1.03176, 0.58431, 0.53379, 0.51224, 0.52767, 0.26848, 0.29642, 0.36879, 0.34148, 0.35279,0.40633,1}}; -*/ -//ideal channel estimation values -//double beta1_dlsch[6][MCS_COUNT] = { {2.3814, 0.4956, 0.5273, 1.1708, 0.8014, 0.7889, 0.8111, 0.8139, 0.8124, 0.8479, 1.9280, 1.9664, 2.3857, 2.5147, 2.4511, 3.0158, 2.8643, 5.3013, 5.8594, 6.5372, 7.8073, 7.8030, 7.5295, 7.1320}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}}; -//double beta2_dlsch[6][MCS_COUNT] = { {2.3639, 0.4952, 0.5207, 1.1572, 0.8026, 0.7864, 0.7996, 0.8034, 0.8200, 0.8367, 1.8701, 1.9212, 2.2947, 2.4472, 2.4091, 2.9479, 2.8973, 5.0591, 5.5134, 6.1483, 7.2166, 7.5177, 7.5704, 7.2248}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}}; -const double beta1_dlsch[6][MCS_COUNT] = { {1.199175, 1.085656, 0.983872, 0.843789, 0.816093, 0.853078, 0.899236, 0.919665, 0.888673, 0.924181, 0.814176, 0.794108, 0.770653, 0.826266, 0.982043, 0.979621, 0.985176, 0.901741, 0.870311, 0.911303, 0.898923, 1.003359, 0.988535, 1.030639, 1.151038, 1.116939, 1.214118, 1.219148}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}}; -const double beta2_dlsch[6][MCS_COUNT] = { {0.534622, 0.596561, 0.500838, 0.471721, 0.548218, 0.547974, 0.924245, 0.836484, 0.776917, 0.879691, 0.875722, 0.666933, 0.666393, 0.755377, 1.074985, 1.080290, 1.010914, 0.790892, 0.793435, 0.860249, 0.901508, 0.967060, 0.951372, 1.011493, 1.106151, 1.117076, 1.209397, 1.227790}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}}; - -//real channel estimation valus -/* -double beta1_dlsch[6][MCS_COUNT] = { {2.50200, 0.84047, 0.78195, 1.37929, 1.16871, 1.11906, 1.06303, 1.07447, 1.11403, 1.09223, 2.82502, 2.87556, 3.51254, 3.62920, 3.53638, 2.35980, 3.74126, 8.66532, 7.31772, 9.86882, 10.64939, 6.75208, 9.50664, 13.63057}, {0.92257, 1, 1.80445, 1.43175, 1.42093, 1.37381, 1.45392, 1.47255, 1.47451, 1.41235, 3.9079, 3.38557, 4.13059, 4.93355, 4.97277, 6.04951, 5.88896, 8.68076, 10.23746, 12.37069, 5.50538, 17.29612, 17.95050, 13.27095}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79255, 1.88213, 4.44226, 2.25150, 1.93710, 2.18504, 2.57389, 1.94322, 1.78515, 2.09265, 2.37459, 1.74442, 1.74346, 1.19705, 1.56149, 1.59604, 1.6, 1,1,1,1,1,1,1}, {0.93374, 1.40389, 1.36670, 1.38679, 1.35707, 1.26353, 1.32360, 1.40164, 1.51843, 1.34863, 3.45839, 3.13726, 3.94768, 4.21966, 4.60750, 4.97894, 5.40755, 8.12814, 10.59221, 12.96427, 13.37323, 14.27206, 16.61779, 17.19656}}; -double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.16829, 1.11186, 1.06287, 1.07292, 1.09946, 1.10650, 2.79174, 2.75655, 3.36651, 3.49011, 3.60903, 2.73517, 3.84009, 8.20312, 7.41739, 9.64081, 10.40911, 8.11765, 10.41923, 9.34300}, {0.67252, 0.8600, 1.28633, 1.01624, 1.03066, 0.97590, 1.02560, 1.01840, 1.00547, 0.97093, 2.72573, 2.33283, 2.86181, 3.40452, 3.47957, 4.08916, 3.97628, 6.14541, 7.11017, 8.42369, 4.04812, 11.42082, 11.57171, 9.28462}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.85784, 0.90361, 2.09766, 1.08385, 0.96300, 1.04432, 1.22763, 0.99249, 0.95544, 1.12333, 1.37924, 1.12913, 1.30644, 1.19253, 1.75488, 2.13813, 2.10636, 1,1,1,1,1,1,1}, {0.66288, 0.96402, 0.98545, 0.99386, 0.99981, 0.92678, 0.98978, 0.99600, 1.05538, 0.97777, 2.52504, 2.29338, 2.89631, 3.10812, 3.41916, 3.58671, 3.84166, 6.05254, 7.45821, 9.15812, 9.66330, 10.17852, 11.50519, 11.16299}}; - -*/ - -const char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",}; -const char NB_timing[2][20]={"synch_to_ext_device","synch_to_other"}; -const char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"}; - -/// lookup table for unscrambling in RX -int16_t unscrambling_lut[65536*16] __attribute__((aligned(32))); -/// lookup table for scrambling in TX -uint8_t scrambling_lut[65536*16] __attribute__((aligned(32))); - uint8_t max_turbo_iterations=4; + #endif /* __PHY_VARS_UE__H__ */ diff --git a/openair1/SCHED/fapi_l1.c b/openair1/SCHED/fapi_l1.c index f7aa81c199..b21c0a8ec4 100644 --- a/openair1/SCHED/fapi_l1.c +++ b/openair1/SCHED/fapi_l1.c @@ -860,7 +860,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO, void *arg) { // handle_nfapi_mch_dl_pdu(eNB,dl_config_pdu); //AssertFatal(1==0,"OK\n"); nfapi_dl_config_mch_pdu_rel8_t *mch_pdu_rel8 = &dl_config_pdu->mch_pdu.mch_pdu_rel8; - uint16_t pdu_index = mch_pdu_rel8->pdu_index; + int16_t pdu_index = mch_pdu_rel8->pdu_index; uint16_t tx_pdus = TX_req->tx_request_body.number_of_pdus; uint16_t invalid_pdu = pdu_index == -1; uint8_t *sdu = invalid_pdu ? NULL : pdu_index >= tx_pdus ? NULL : TX_req->tx_request_body.tx_pdu_list[pdu_index].segments[0].segment_data; @@ -884,7 +884,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO, void *arg) { case NFAPI_DL_CONFIG_DLSCH_PDU_TYPE: { nfapi_dl_config_dlsch_pdu_rel8_t *dlsch_pdu_rel8 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8; - uint16_t pdu_index = dlsch_pdu_rel8->pdu_index; + int16_t pdu_index = dlsch_pdu_rel8->pdu_index; uint16_t tx_pdus = TX_req->tx_request_body.number_of_pdus; uint16_t invalid_pdu = pdu_index == -1; uint8_t *sdu = invalid_pdu ? NULL : pdu_index >= tx_pdus ? NULL : TX_req->tx_request_body.tx_pdu_list[pdu_index].segments[0].segment_data; @@ -1014,7 +1014,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO, void *arg) { UL_req->ul_config_request_body.number_of_pdus=0; number_ul_pdu=0; }else if (RC.mac[Mod_id]->scheduler_mode == SCHED_MODE_FAIR_RR) { - if(ulsch_pdu_num <= RC.rrc[Mod_id]->configuration.radioresourceconfig[CC_id].ue_multiple_max){ + if(ulsch_pdu_num <= fp->ue_multiple_max){ UL_req->sfn_sf = frame << 4 | subframe; oai_nfapi_ul_config_req(UL_req); UL_req->ul_config_request_body.number_of_pdus=0; diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index ebc3b76ec7..e48d9f30a4 100644 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -46,10 +46,6 @@ #include -#include "intertask_interface.h" - -#define MBMS_NFAPI_SCHEDULER - #include "common/ran_context.h" extern RAN_CONTEXT_t RC; @@ -122,7 +118,6 @@ lte_subframe_t get_subframe_direction(uint8_t Mod_id,uint8_t CC_id,uint8_t subfr return(subframe_select(&RC.eNB[Mod_id][CC_id]->frame_parms,subframe)); } -#ifdef MBMS_NFAPI_SCHEDULER void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, int fembms_flag) { int subframe = proc->subframe_tx; // This is DL-Cell spec pilots in Control region @@ -151,46 +146,6 @@ void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, int fembms_flag) { } eNB->dlsch_MCH->active = 0; } -#else -void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { - MCH_PDU *mch_pduP=NULL; - // uint8_t sync_area=255; - int subframe = proc->subframe_tx; - AssertFatal (1 == 1, "pmch not tested for the moment, exiting\n"); - // This is DL-Cell spec pilots in Control region - generate_pilots_slot (eNB, eNB->common_vars.txdataF, AMP, subframe << 1, 1); - - // if mcch is active, send regardless of the node type: eNB or RN - // when mcch is active, MAC sched does not allow MCCH and MTCH multiplexing - /* - mch_pduP = mac_xface->get_mch_sdu(eNB->Mod_id, - eNB->CC_id, - proc->frame_tx, - subframe); - */ - mch_pduP= &RC.mac[eNB->Mod_id]->common_channels[eNB->CC_id].MCH_pdu; - if ((mch_pduP->Pdu_size > 0) && (mch_pduP->sync_area == 0)) // TEST: only transmit mcch for sync area 0 - LOG_D(PHY,"[eNB%"PRIu8"] Frame %d subframe %d : Got MCH pdu for MBSFN (MCS %"PRIu8", TBS %d) \n", - eNB->Mod_id,proc->frame_tx,subframe,mch_pduP->mcs, - eNB->dlsch_MCH->harq_processes[0]->TBS>>3); - else { - LOG_D(PHY,"[DeNB %"PRIu8"] Frame %d subframe %d : Do not transmit MCH pdu for MBSFN sync area %"PRIu8" (%s)\n", - eNB->Mod_id,proc->frame_tx,subframe,mch_pduP->sync_area, - (mch_pduP->Pdu_size == 0)? "Empty MCH PDU":"Let RN transmit for the moment"); - mch_pduP = NULL; - } - - if (mch_pduP) { - fill_eNB_dlsch_MCH (eNB, mch_pduP->mcs, 1, 0); - eNB->dlsch_MCH->harq_ids[proc->frame_tx%2][subframe] = 0; - eNB->dlsch_MCH->harq_processes[0]->pdu=(uint8_t *) mch_pduP->payload; - // Generate PMCH - generate_mch (eNB, proc, NULL/*(uint8_t *) mch_pduP->payload*/); - } else { - LOG_D (PHY, "[eNB/RN] Frame %d subframe %d: MCH not generated \n", proc->frame_tx, subframe); - } -} -#endif void common_signal_procedures_fembms (PHY_VARS_eNB *eNB,int frame, int subframe) { LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms; @@ -507,11 +462,9 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, if (NFAPI_MODE==NFAPI_MONOLITHIC || NFAPI_MODE==NFAPI_MODE_PNF) { if (is_fembms_pmch_subframe(frame,subframe,fp)) { -#ifdef MBMS_NFAPI_SCHEDULER pmch_procedures(eNB,proc,1); LOG_D(MAC,"frame %d, subframe %d -> PMCH\n",frame,subframe); return; -#endif }else if(is_fembms_cas_subframe(frame,subframe,fp) || is_fembms_nonMBSFN_subframe(frame,subframe,fp)){ LOG_D(MAC,"frame %d, subframe %d -> CAS\n",frame,subframe); common_signal_procedures_fembms(eNB,proc->frame_tx, proc->subframe_tx); @@ -520,11 +473,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, if((!is_fembms_cas_subframe(frame,subframe,fp)) && (!is_fembms_nonMBSFN_subframe(frame,subframe,fp))){ if (is_pmch_subframe(frame,subframe,fp)) { -#ifdef MBMS_NFAPI_SCHEDULER pmch_procedures(eNB,proc,0); -#else - pmch_procedures(eNB,proc); -#endif } else { // this is not a pmch subframe, so generate PSS/SSS/PBCH common_signal_procedures(eNB,proc->frame_tx, proc->subframe_tx); @@ -617,10 +566,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB, if (NFAPI_MODE==NFAPI_MONOLITHIC || NFAPI_MODE==NFAPI_MODE_PNF) { if (is_fembms_pmch_subframe(frame,subframe,fp)) { -#ifdef MBMS_NFAPI_SCHEDULER pmch_procedures(eNB,proc,1); return; -#endif }else if(is_fembms_cas_subframe(frame,subframe,fp)){ common_signal_procedures_fembms(eNB,proc->frame_tx, proc->subframe_tx); } diff --git a/openair1/SCHED_NR/nr_prach_procedures.c b/openair1/SCHED_NR/nr_prach_procedures.c index 9aca5b48e1..b0167dce9e 100644 --- a/openair1/SCHED_NR/nr_prach_procedures.c +++ b/openair1/SCHED_NR/nr_prach_procedures.c @@ -43,8 +43,6 @@ #include -#include "intertask_interface.h" - extern uint8_t nfapi_mode; uint8_t get_nr_prach_duration(uint8_t prach_format){ diff --git a/openair1/SCHED_NR/nr_ru_procedures.c b/openair1/SCHED_NR/nr_ru_procedures.c index 551bc60d95..08ed56db8d 100644 --- a/openair1/SCHED_NR/nr_ru_procedures.c +++ b/openair1/SCHED_NR/nr_ru_procedures.c @@ -212,8 +212,8 @@ void nr_feptx_prec(RU_t *ru,int frame_tx,int tti_tx) { bw = ru->beam_weights[0]; for (l=0;lsymbols_per_slot;l++) { for (aa=0;aanb_tx;aa++) { - nr_beam_precoding(ru->common.txdataF, - ru->common.txdataF_BF, + nr_beam_precoding((c16_t **)ru->common.txdataF, + (c16_t **)ru->common.txdataF_BF, fp, bw, tti_tx, @@ -307,8 +307,8 @@ void nr_feptx(void *arg) { AssertFatal(1==0,"This needs to be fixed, do not use beamforming.\n"); int32_t ***bw = ru->beam_weights[0]; for(int i=0; isymbols_per_slot; ++i){ - nr_beam_precoding(ru->gNB_list[0]->common_vars.txdataF, - ru->common.txdataF_BF, + nr_beam_precoding((c16_t **)ru->gNB_list[0]->common_vars.txdataF, + (c16_t **)ru->common.txdataF_BF, fp, bw, slot, diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index f5d2cc47a6..5d419a2a45 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -31,20 +31,19 @@ #include "fapi_nr_l1.h" #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "PHY/MODULATION/nr_modulation.h" #include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h" #include "T.h" #include "executables/nr-softmodem.h" #include "executables/softmodem-common.h" #include "nfapi/oai_integration/vendor_ext.h" +#include "NR_SRS-ResourceSet.h" #include "assertions.h" #include -#include "intertask_interface.h" - //#define DEBUG_RXDATA //#define SRS_IND_DEBUG @@ -56,7 +55,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame,int slot,nfapi_nr_ NR_DL_FRAME_PARMS *fp=&gNB->frame_parms; nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config; - int **txdataF = gNB->common_vars.txdataF; + c16_t **txdataF = gNB->common_vars.txdataF; uint8_t ssb_index, n_hf; uint16_t ssb_start_symbol; int txdataF_offset = slot*fp->samples_per_slot_wCP; @@ -171,7 +170,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx, VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_PDCCH_TX,1); nr_generate_dci_top(msgTx, slot, - &gNB->common_vars.txdataF[0][txdataF_offset], + (int32_t *)&gNB->common_vars.txdataF[0][txdataF_offset], AMP, fp); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_PDCCH_TX,0); @@ -189,7 +188,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx, if (csirs->active == 1) { LOG_D(PHY, "CSI-RS generation started in frame %d.%d\n",frame,slot); nfapi_nr_dl_tti_csi_rs_pdu_rel15_t *csi_params = &csirs->csirs_pdu.csi_rs_pdu_rel15; - nr_generate_csi_rs(&gNB->frame_parms, gNB->common_vars.txdataF, AMP, gNB->nr_csi_info, csi_params, slot, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + nr_generate_csi_rs(&gNB->frame_parms, (int32_t **)gNB->common_vars.txdataF, AMP, gNB->nr_csi_info, csi_params, slot, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); csirs->active = 0; } } @@ -198,7 +197,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx, //apply the OFDM symbol rotation here for (aa=0; aacarrier_config.num_tx_ant.value; aa++) { - apply_nr_rotation(fp,(int16_t*) &gNB->common_vars.txdataF[aa][txdataF_offset],slot,0,fp->Ncp==EXTENDED?12:14); + apply_nr_rotation(fp, &gNB->common_vars.txdataF[aa][txdataF_offset], slot, 0, fp->Ncp == EXTENDED ? 12 : 14); T(T_GNB_PHY_DL_OUTPUT_SIGNAL, T_INT(0), T_INT(frame), T_INT(slot), @@ -244,7 +243,7 @@ void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) { if (decodeSuccess && !gNB->pusch_vars[rdata->ulsch_id]->DTX) { LOG_D(PHY,"[gNB %d] ULSCH: Setting ACK for SFN/SF %d.%d (pid %d, ndi %d, status %d, round %d, TBS %d, Max interation (all seg) %d)\n", gNB->Mod_id,ulsch_harq->frame,ulsch_harq->slot,rdata->harq_pid,pusch_pdu->pusch_data.new_data_indicator,ulsch_harq->status,ulsch_harq->round,ulsch_harq->TBS,rdata->decodeIterations); - ulsch_harq->status = SCH_IDLE; + ulsch_harq->status = NR_SCH_IDLE; ulsch_harq->round = 0; ulsch->harq_mask &= ~(1 << rdata->harq_pid); @@ -403,8 +402,8 @@ void nr_fill_indication(PHY_VARS_gNB *gNB, int frame, int slot_rx, int ULSCH_id, nfapi_nr_pusch_pdu_t *pusch_pdu = &harq_process->ulsch_pdu; - // pdu->data = gNB->ulsch[ULSCH_id+1]->harq_processes[harq_pid]->b; - int sync_pos = nr_est_timing_advance_pusch(gNB, ULSCH_id); // estimate timing advance for MAC + // Get estimated timing advance for MAC + int sync_pos = gNB->measurements.delay[ULSCH_id].pusch_est_delay; // scale the 16 factor in N_TA calculation in 38.213 section 4.2 according to the used FFT size uint16_t bw_scaling = 16 * gNB->frame_parms.ofdm_symbol_size / 2048; @@ -711,7 +710,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) { const int soffset = (slot_rx&3) * gNB->frame_parms.symbols_per_slot * gNB->frame_parms.ofdm_symbol_size; int offset = 10*gNB->frame_parms.ofdm_symbol_size + gNB->frame_parms.first_carrier_offset; - int power_rxF = signal_energy_nodc(&gNB->common_vars.rxdataF[0][soffset+offset+(47*12)],12*18); + int power_rxF = signal_energy_nodc((int32_t *)&gNB->common_vars.rxdataF[0][soffset+offset+(47*12)],12*18); LOG_D(PHY,"frame %d, slot %d: UL signal energy %d\n",frame_rx,slot_rx,power_rxF); start_meas(&gNB->phy_proc_rx); @@ -740,7 +739,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) { nfapi_nr_uci_pucch_pdu_format_0_1_t *uci_pdu_format0 = &gNB->uci_pdu_list[num_ucis].pucch_pdu_format_0_1; offset = pucch_pdu->start_symbol_index*gNB->frame_parms.ofdm_symbol_size + (gNB->frame_parms.first_carrier_offset+pucch_pdu->prb_start*12); - power_rxF = signal_energy_nodc(&gNB->common_vars.rxdataF[0][soffset+offset],12); + power_rxF = signal_energy_nodc((int32_t *)&gNB->common_vars.rxdataF[0][soffset+offset],12); LOG_D(PHY,"frame %d, slot %d: PUCCH signal energy %d\n",frame_rx,slot_rx,power_rxF); nr_decode_pucch0(gNB, @@ -889,7 +888,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) { int32_t srs_estimated_channel_time[frame_parms->nb_antennas_rx][1 << srs_pdu->num_ant_ports][frame_parms->ofdm_symbol_size] __attribute__((aligned(32))); int32_t srs_estimated_channel_time_shifted[frame_parms->nb_antennas_rx][1 << srs_pdu->num_ant_ports][frame_parms->ofdm_symbol_size]; int8_t snr_per_rb[srs_pdu->bwp_size]; - int8_t snr; + int8_t snr = 0; start_meas(&gNB->generate_srs_stats); if (check_srs_pdu(srs_pdu, &gNB->nr_srs_info[i]->srs_pdu) == 0) { diff --git a/openair1/SCHED_NR/sched_nr.h b/openair1/SCHED_NR/sched_nr.h index 909459f652..eb9a790e45 100644 --- a/openair1/SCHED_NR/sched_nr.h +++ b/openair1/SCHED_NR/sched_nr.h @@ -29,7 +29,6 @@ #define __openair_SCHED_NR_DEFS_H__ #include "PHY/defs_gNB.h" -#include "PHY_INTERFACE/phy_interface.h" #include "PHY/NR_TRANSPORT/nr_dci.h" #include "phy_frame_config_nr.h" diff --git a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c index e3134c24f6..b64be34f6e 100644 --- a/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c +++ b/openair1/SCHED_NR_UE/fapi_nr_ue_l1.c @@ -421,7 +421,8 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ for (int i = 0; i < ul_config->number_pdus; ++i){ AssertFatal(ul_config->ul_config_list[i].pdu_type <= FAPI_NR_UL_CONFIG_TYPES,"pdu_type %d out of bounds\n",ul_config->ul_config_list[i].pdu_type); - LOG_D(PHY, "In %s i %d: processing %s PDU of %d total UL PDUs (ul_config %p) \n", __FUNCTION__, i, ul_pdu_type[ul_config->ul_config_list[i].pdu_type - 1], ul_config->number_pdus, ul_config); + LOG_D(PHY, "[%d.%d] i %d: processing %s PDU of %d total UL PDUs (ul_config %p) \n", + scheduled_response->frame, slot, i, ul_pdu_type[ul_config->ul_config_list[i].pdu_type - 1], ul_config->number_pdus, ul_config); uint8_t pdu_type = ul_config->ul_config_list[i].pdu_type, current_harq_pid, gNB_id = 0; /* PRACH */ @@ -447,7 +448,6 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ LOG_D(PHY, "In %s i %d: copy pusch_config_pdu nrOfLayers:%d, num_dmrs_cdm_grps_no_data:%d \n", __FUNCTION__, i, pusch_config_pdu->nrOfLayers,pusch_config_pdu->num_dmrs_cdm_grps_no_data); memcpy(pusch_pdu, pusch_config_pdu, sizeof(nfapi_nr_ue_pusch_pdu_t)); - if (scheduled_response->tx_request) { for (int j=0; jtx_request->number_of_pdus; j++) { fapi_nr_tx_request_body_t *tx_req_body = &scheduled_response->tx_request->tx_request_body[j]; @@ -541,17 +541,10 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ return 0; } - - - -int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config){ - +int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config) +{ fapi_nr_config_request_t *nrUE_config = &PHY_vars_UE_g[phy_config->Mod_id][phy_config->CC_id]->nrUE_config; - if(phy_config != NULL) memcpy(nrUE_config,&phy_config->config_req,sizeof(fapi_nr_config_request_t)); - return 0; } - - diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 57b3dff776..f88b81ad52 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -39,7 +39,7 @@ #include "PHY/NR_REFSIG/dmrs_nr.h" #include "PHY/phy_extern_nr_ue.h" #include "PHY/MODULATION/modulation_UE.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h" #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" #include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h" @@ -588,7 +588,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, memset(ptrs_re_per_slot, 0, sizeof(ptrs_re_per_slot)); const uint32_t rx_size_symbol = dlsch[0].dlsch_config.number_rbs * NR_NB_SC_PER_RB; - __attribute__((aligned(32))) int32_t rxdataF_comp[ue->frame_parms.nb_antennas_tx][ue->frame_parms.nb_antennas_rx][rx_size_symbol * NR_SYMBOLS_PER_SLOT]; + __attribute__((aligned(32))) int32_t rxdataF_comp[dlsch[0].Nl][ue->frame_parms.nb_antennas_rx][rx_size_symbol * NR_SYMBOLS_PER_SLOT]; memset(rxdataF_comp, 0, sizeof(rxdataF_comp)); for (m = s0; m < (s0 +s1); m++) { diff --git a/openair1/SCHED_UE/phy_procedures_lte_ue.c b/openair1/SCHED_UE/phy_procedures_lte_ue.c index 7cff63b4bb..47ab3c7a91 100644 --- a/openair1/SCHED_UE/phy_procedures_lte_ue.c +++ b/openair1/SCHED_UE/phy_procedures_lte_ue.c @@ -68,7 +68,7 @@ #define NS_PER_SLOT 500000 -char mode_string[4][20] = {"NOT SYNCHED","PRACH","RAR","PUSCH"}; +static const char mode_string[4][20] = {"NOT SYNCHED","PRACH","RAR","PUSCH"}; extern double cpuf; diff --git a/openair1/SCHED_UE/pusch_pc.c b/openair1/SCHED_UE/pusch_pc.c index 55c8c7c547..831007c138 100644 --- a/openair1/SCHED_UE/pusch_pc.c +++ b/openair1/SCHED_UE/pusch_pc.c @@ -35,6 +35,7 @@ #include "PHY/defs_UE.h" #include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h" #include "PHY/phy_extern_ue.h" +#include "PHY/phy_extern.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h" #include "nfapi/oai_integration/vendor_ext.h" @@ -62,8 +63,6 @@ int16_t get_hundred_times_delta_IF(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t harq_p -uint8_t alpha_lut[8] = {0,40,50,60,70,80,90,100}; - void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t j, uint8_t abstraction_flag) { uint8_t harq_pid = subframe2harq_pid(&ue->frame_parms, proc->frame_tx, diff --git a/openair1/SCHED_UE/srs_pc.c b/openair1/SCHED_UE/srs_pc.c index 8026eb8307..ad3cde7609 100644 --- a/openair1/SCHED_UE/srs_pc.c +++ b/openair1/SCHED_UE/srs_pc.c @@ -33,6 +33,7 @@ #include "PHY/defs_UE.h" #include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h" #include "PHY/phy_extern_ue.h" +#include "PHY/phy_extern.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h" #include "openair1/SCHED/sched_common_extern.h" diff --git a/openair1/SIMULATION/ETH_TRANSPORT/bypass_session_layer.c b/openair1/SIMULATION/ETH_TRANSPORT/bypass_session_layer.c deleted file mode 100644 index a64e02abf7..0000000000 --- a/openair1/SIMULATION/ETH_TRANSPORT/bypass_session_layer.c +++ /dev/null @@ -1,580 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file bypass_session_layer.h - * \brief implementation of emultor tx and rx - * \author Navid Nikaein and Raymond Knopp - * \date 2011 - 2014 - * \version 1.0 - * \company Eurecom - * \email: navid.nikaein@eurecom.fr - */ - -#include "PHY/defs.h" -#include "defs.h" -#include "proto.h" -#include "extern.h" - -#include "assertions.h" -#include "UTIL/OCG/OCG.h" -#include "UTIL/OCG/OCG_extern.h" -#include "UTIL/LOG/log.h" - -#include "multicast_link.h" -#include "openair1/SIMULATION/ETH_TRANSPORT/extern.h" -char rx_bufferP[BYPASS_RX_BUFFER_SIZE]; -unsigned int num_bytesP = 0; -int N_P = 0, N_R = 0; -char bypass_tx_buffer[BYPASS_TX_BUFFER_SIZE]; -static unsigned int byte_tx_count; -unsigned int Master_list_rx; -static uint64_t seq_num_tx = 0; - -mapping transport_names[] = { - {"WAIT PM TRANSPORT INFO", EMU_TRANSPORT_INFO_WAIT_PM}, - {"WAIT SM TRANSPORT INFO", EMU_TRANSPORT_INFO_WAIT_SM}, - {"SYNC TRANSPORT INFO", EMU_TRANSPORT_INFO_SYNC}, - {"ENB_TRANSPORT INFO", EMU_TRANSPORT_INFO_ENB}, - {"UE TRANSPORT INFO", EMU_TRANSPORT_INFO_UE}, - {"RELEASE TRANSPORT INFO", EMU_TRANSPORT_INFO_RELEASE}, - {NULL, -1} -}; -static pthread_mutex_t emul_low_mutex; -static pthread_mutex_t emul_low_mutex; -static pthread_cond_t emul_low_cond; -static char emul_low_mutex_var; - -void init_bypass (void) -{ - LOG_I(EMU, "[PHYSIM] INIT BYPASS\n"); - -#if !defined(ENABLE_NEW_MULTICAST) - pthread_mutex_init (&Tx_mutex, NULL); - pthread_cond_init (&Tx_cond, NULL); - Tx_mutex_var = 1; - pthread_mutex_init (&emul_low_mutex, NULL); - pthread_cond_init (&emul_low_cond, NULL); - emul_low_mutex_var = 1; -#endif - bypass_init (emul_tx_handler, emul_rx_handler); -} - -/***************************************************************************/ -void bypass_init (tx_handler_t tx_handlerP, rx_handler_t rx_handlerP) -{ - /***************************************************************************/ - multicast_link_start (bypass_rx_handler, oai_emulation.info.multicast_group, - oai_emulation.info.multicast_ifname); - tx_handler = tx_handlerP; - rx_handler = rx_handlerP; - Master_list_rx=0; - emu_tx_status = WAIT_SYNC_TRANSPORT; - emu_rx_status = WAIT_SYNC_TRANSPORT; -} - -int emu_transport_handle_sync(bypass_msg_header_t *messg) -{ - int m_id; - - DevAssert(messg != NULL); - - // determite the total number of remote enb & ue - oai_emulation.info.nb_enb_remote += messg->nb_enb; - oai_emulation.info.nb_ue_remote += messg->nb_ue; - - // determine the index of local enb and ue wrt the remote ones - if (messg->master_id < oai_emulation.info.master_id) { - oai_emulation.info.first_enb_local +=messg->nb_enb; - oai_emulation.info.first_ue_local +=messg->nb_ue; - } - - // store param for enb per master - if ((oai_emulation.info.master[messg->master_id].nb_enb = messg->nb_enb) > 0) { - for (m_id=0; m_id < messg->master_id; m_id++ ) { - oai_emulation.info.master[messg->master_id].first_enb+=oai_emulation.info.master[m_id].nb_enb; - } - - LOG_I(EMU, - "[ENB] WAIT_SYNC_TRANSPORT state: for master %d (first enb %d, totan enb %d)\n", - messg->master_id, - oai_emulation.info.master[messg->master_id].first_enb, - oai_emulation.info.master[messg->master_id].nb_enb); - } - - // store param for ue per master - if ((oai_emulation.info.master[messg->master_id].nb_ue = messg->nb_ue) > 0) { - for (m_id=0; m_id < messg->master_id; m_id++ ) { - oai_emulation.info.master[messg->master_id].first_ue+=oai_emulation.info.master[m_id].nb_ue; - } - - LOG_I(EMU, - "[UE] WAIT_SYNC_TRANSPORT state: for master %d (first ue %d, total ue%d)\n", - messg->master_id, - oai_emulation.info.master[messg->master_id].first_ue, - oai_emulation.info.master[messg->master_id].nb_ue ); - } - - Master_list_rx=((Master_list_rx) |(1<< messg->master_id)); - - if (Master_list_rx == oai_emulation.info.master_list) { - emu_rx_status = SYNCED_TRANSPORT; - } - - LOG_I(EMU, - "WAIT_SYNC_TRANSPORT state: m_id %d total enb remote %d total ue remote %d \n", - messg->master_id,oai_emulation.info.nb_enb_remote, - oai_emulation.info.nb_ue_remote ); - return 0; -} - -int emu_transport_handle_wait_sm(bypass_msg_header_t *messg) -{ - DevAssert(messg != NULL); - Master_list_rx = ((Master_list_rx) | (1 << messg->master_id)); - - return 0; -} - -int emu_transport_handle_wait_pm(bypass_msg_header_t *messg) -{ - DevAssert(messg != NULL); - - if (messg->master_id == 0) { - Master_list_rx = ((Master_list_rx) | (1 << messg->master_id)); - } - - return 0; -} - -static -int emu_transport_handle_enb_info(bypass_msg_header_t *messg, - unsigned int next_slot, - int bytes_read) -{ - eNB_transport_info_t *eNB_info; - int total_header = 0, total_tbs = 0; - int n_dci, n_enb, enb_info_ix = 0,CC_id; - - DevAssert(bytes_read >= 0); - DevAssert(messg != NULL); - -#ifdef DEBUG_EMU - LOG_D(EMU," RX ENB_TRANSPORT INFO from master %d \n",messg->master_id); -#endif - clear_eNB_transport_info(oai_emulation.info.nb_enb_local+ - oai_emulation.info.nb_enb_remote); - - if (oai_emulation.info.master[messg->master_id].nb_enb > 0 ) { - total_header += sizeof(eNB_transport_info_t)-MAX_TRANSPORT_BLOCKS_BUFFER_SIZE; - - eNB_info = (eNB_transport_info_t *) (&rx_bufferP[bytes_read]); - - for (n_enb = oai_emulation.info.master[messg->master_id].first_enb; - n_enb < oai_emulation.info.master[messg->master_id].first_enb+ - oai_emulation.info.master[messg->master_id].nb_enb; - n_enb ++) { - for (n_dci = 0; n_dci < (eNB_info[enb_info_ix].num_ue_spec_dci + eNB_info[enb_info_ix].num_common_dci); n_dci ++) { - total_tbs += eNB_info[enb_info_ix].tbs[n_dci]; - } - - enb_info_ix++; - - if ((total_tbs + total_header) > MAX_TRANSPORT_BLOCKS_BUFFER_SIZE ) { - LOG_W(EMU,"RX eNB Transport buffer total size %d (header%d,tbs %d) \n", - total_header+total_tbs, total_header,total_tbs); - } - - memcpy(&eNB_transport_info[n_enb], eNB_info, total_header + total_tbs); - - /* Go to the next eNB info */ - eNB_info = (eNB_transport_info_t *)((uintptr_t)eNB_info + total_header+ - total_tbs); - bytes_read += (total_header + total_tbs); - } - - for (n_enb = oai_emulation.info.master[messg->master_id].first_enb; - n_enb < oai_emulation.info.master[messg->master_id].first_enb + - oai_emulation.info.master[messg->master_id].nb_enb; n_enb ++) - for (CC_id=0; CC_idmaster_id); - } - - Master_list_rx=((Master_list_rx) |(1<< messg->master_id)); - - if (Master_list_rx == oai_emulation.info.master_list) { - emu_rx_status = SYNCED_TRANSPORT; - } - - return 0; -} - -static -int emu_transport_handle_ue_info(bypass_msg_header_t *messg, - unsigned int last_slot, - int bytes_read) -{ - UE_transport_info_t *UE_info; - int n_ue, n_enb,CC_id=0; - int total_tbs = 0, total_header = 0, ue_info_ix =0; - - DevAssert(bytes_read >= 0); - DevAssert(messg != NULL); - -#ifdef DEBUG_EMU - LOG_D(EMU," RX UE TRANSPORT INFO from master %d\n",messg->master_id); -#endif - clear_UE_transport_info(oai_emulation.info.nb_ue_local+ - oai_emulation.info.nb_ue_remote); - - if (oai_emulation.info.master[messg->master_id].nb_ue > 0 ) { - total_header += sizeof(UE_transport_info_t)-MAX_TRANSPORT_BLOCKS_BUFFER_SIZE; - - UE_info = (UE_transport_info_t *) (&rx_bufferP[bytes_read]); - - // get the total size of the transport blocks - for (n_ue = oai_emulation.info.master[messg->master_id].first_ue; - n_ue < oai_emulation.info.master[messg->master_id].first_ue + - oai_emulation.info.master[messg->master_id].nb_ue; n_ue ++) { - total_tbs = 0; - - for (n_enb = 0; n_enb < UE_info[ue_info_ix].num_eNB; n_enb ++) { - total_tbs += UE_info[ue_info_ix].tbs[n_enb]; - } - - ue_info_ix++; - - if (total_tbs + total_header > MAX_TRANSPORT_BLOCKS_BUFFER_SIZE ) { - LOG_W(EMU,"RX [UE %d] Total size of buffer is %d (header%d,tbs %d) \n", - n_ue, total_header+total_tbs,total_header,total_tbs); - } - -//#warning "CC id should be adjusted, set to zero for the moment" - memcpy(&UE_transport_info[n_ue][CC_id], UE_info, total_header + total_tbs); - - /* Go to the next UE info */ - UE_info = (UE_transport_info_t *)((uintptr_t)UE_info + total_header+ - total_tbs); - bytes_read += (total_header + total_tbs); - } - - for (n_ue = oai_emulation.info.master[messg->master_id].first_ue; - n_ue < oai_emulation.info.master[messg->master_id].first_ue + - oai_emulation.info.master[messg->master_id].nb_ue; - n_ue ++) - for (CC_id=0; CC_idmaster_id); - } - - Master_list_rx=((Master_list_rx) |(1<< messg->master_id)); - - if (Master_list_rx == oai_emulation.info.master_list) { - emu_rx_status = SYNCED_TRANSPORT; - } - - return 0; -} - -int bypass_rx_data(unsigned int frame, unsigned int last_slot, - unsigned int next_slot, uint8_t is_master) -{ - bypass_msg_header_t *messg; - bypass_proto2multicast_header_t *bypass_read_header; - int bytes_read = 0; - - LOG_D(EMU, "Entering bypass_rx for frame %d next_slot %d is_master %u\n", - frame, next_slot, is_master); - -#if defined(ENABLE_NEW_MULTICAST) - - if (multicast_link_read_data_from_sock(is_master) == 1) { - /* We got a timeout */ - return -1; - } - -#else - pthread_mutex_lock(&emul_low_mutex); - - if(emul_low_mutex_var) { - pthread_cond_wait(&emul_low_cond, &emul_low_mutex); - } - - if(num_bytesP==0) { - pthread_mutex_unlock(&emul_low_mutex); - } else { -#endif - bypass_read_header = (bypass_proto2multicast_header_t *) ( - &rx_bufferP[bytes_read]); - bytes_read += sizeof (bypass_proto2multicast_header_t); - - if (num_bytesP != bytes_read + bypass_read_header->size) { - LOG_W(EMU, "WARNINIG BYTES2READ # DELIVERED BYTES!!! (%d != %d)\n", - num_bytesP, bytes_read + bypass_read_header->size); - exit(EXIT_FAILURE); - } else { - messg = (bypass_msg_header_t *) (&rx_bufferP[bytes_read]); - bytes_read += sizeof (bypass_msg_header_t); -#if defined(ENABLE_NEW_MULTICAST) - LOG_D(EMU, "Received %d bytes [%s] from master_id %d with seq %"PRIuMAX"\n", - num_bytesP, map_int_to_str(transport_names, messg->Message_type), - messg->master_id, - messg->seq_num); - DevCheck4((messg->frame == frame) && (messg->subframe == (next_slot>>1)), - messg->frame, frame, messg->subframe, next_slot>>1); - -#else - - if ((messg->frame != frame) || (messg->subframe != next_slot>>1)) - LOG_W(EMU, - "Received %s from master %d for (frame %d,subframe %d) " - "currently (frame %d,subframe %d)\n", - map_int_to_str(transport_names,messg->Message_type), - messg->master_id, - messg->frame, messg->subframe, - frame, next_slot>>1); - -#endif - - //chek if MASTER in my List - switch(messg->Message_type) { - case EMU_TRANSPORT_INFO_WAIT_PM: - emu_transport_handle_wait_pm(messg); - break; - - case EMU_TRANSPORT_INFO_WAIT_SM: - emu_transport_handle_wait_sm(messg); - break; - - case EMU_TRANSPORT_INFO_SYNC: - emu_transport_handle_sync(messg); - break; - - case EMU_TRANSPORT_INFO_ENB: - emu_transport_handle_enb_info(messg, next_slot, bytes_read); - break; - - case EMU_TRANSPORT_INFO_UE: - emu_transport_handle_ue_info(messg, last_slot, bytes_read); - break; - - case EMU_TRANSPORT_INFO_RELEASE : - Master_list_rx = oai_emulation.info.master_list; - LOG_E(EMU, "RX EMU_TRANSPORT_INFO_RELEASE\n"); - break; - - default: - LOG_E(EMU, "[MAC][BYPASS] ERROR RX UNKNOWN MESSAGE\n"); - //mac_xface->macphy_exit(""); - break; - } - } - - num_bytesP=0; - -#if !defined(ENABLE_NEW_MULTICAST) - emul_low_mutex_var=1; - - pthread_cond_signal(&emul_low_cond); - pthread_mutex_unlock(&emul_low_mutex); -#endif - bypass_signal_mac_phy(frame, last_slot, next_slot, is_master); -#if !defined(ENABLE_NEW_MULTICAST) -} - -#endif - -return bytes_read; -} - -/******************************************************************************************************/ -void bypass_rx_handler(unsigned int Num_bytes,char *Rx_buffer) -{ - /******************************************************************************************************/ - if(Num_bytes >0) { -#if !defined(ENABLE_NEW_MULTICAST) - pthread_mutex_lock(&emul_low_mutex); - - while(!emul_low_mutex_var) { - pthread_cond_wait(&emul_low_cond, &emul_low_mutex); - } - -#endif - num_bytesP=Num_bytes; - memcpy(rx_bufferP, Rx_buffer, Num_bytes); -#if !defined(ENABLE_NEW_MULTICAST) - emul_low_mutex_var=0; - - /* on ne peut que signaler depuis un context linux - * (rtf_handler); pas de wait, jamais!!!!!! - */ - pthread_cond_signal(&emul_low_cond); - pthread_mutex_unlock(&emul_low_mutex); -#endif - } -} - -/******************************************************************************************************/ -void bypass_signal_mac_phy(unsigned int frame, unsigned int last_slot, - unsigned int next_slot, uint8_t is_master) -{ - /******************************************************************************************************/ - if (Master_list_rx != oai_emulation.info.master_list) { - bypass_rx_data(frame, last_slot, next_slot, is_master); - } else { - Master_list_rx = 0; - } -} - -/***************************************************************************/ -void bypass_tx_data(emu_transport_info_t Type, unsigned int frame, unsigned int next_slot) -{ - /***************************************************************************/ - unsigned int num_flows; - bypass_msg_header_t *messg; - - LOG_D(EMU, "Entering bypass_tx [%s] for frame %d next_slot %d\n", - map_int_to_str(transport_names, Type), frame, next_slot); - - int n_enb,n_ue, CC_id,n_dci,total_tbs=0,total_size=0; - messg = (bypass_msg_header_t *) ( - &bypass_tx_buffer[sizeof (bypass_proto2multicast_header_t)]); - num_flows = 0; - messg->master_id = oai_emulation.info.master_id; //Master_id; - - messg->nb_enb = oai_emulation.info.nb_enb_local; //Master_id; - messg->nb_ue = oai_emulation.info.nb_ue_local; //Master_id; - messg->nb_flow = num_flows; - messg->frame = frame; - messg->subframe = next_slot>>1; - messg->seq_num = seq_num_tx; - messg->failing_master_id = 0; - - seq_num_tx++; - - byte_tx_count = sizeof (bypass_msg_header_t) + sizeof ( - bypass_proto2multicast_header_t); - - if (Type == WAIT_PM_TRANSPORT) { - messg->Message_type = EMU_TRANSPORT_INFO_WAIT_PM; - LOG_T(EMU,"[TX_DATA] WAIT SYNC PM TRANSPORT\n"); - } else if (Type == WAIT_SM_TRANSPORT) { - messg->Message_type = EMU_TRANSPORT_INFO_WAIT_SM; - LOG_T(EMU,"[TX_DATA] WAIT SYNC SM TRANSPORT\n"); - } else if (Type == SYNC_TRANSPORT) { - messg->Message_type = EMU_TRANSPORT_INFO_SYNC; - /* make sure that sync messages from the masters are received in - * increasing order of master id - */ - sleep(oai_emulation.info.master_id+1); - LOG_T(EMU,"[TX_DATA] SYNC TRANSPORT\n"); - } else if(Type==ENB_TRANSPORT) { - - messg->Message_type = EMU_TRANSPORT_INFO_ENB; - total_size=0; - total_tbs=0; - - for (n_enb=oai_emulation.info.first_enb_local; - n_enb<(oai_emulation.info.first_enb_local+oai_emulation.info.nb_enb_local); - n_enb++) - for (CC_id=0; CC_id>1, CC_id, - eNB_transport_info[n_enb][CC_id].num_pmch + - eNB_transport_info[n_enb][CC_id].num_ue_spec_dci + - eNB_transport_info[n_enb][CC_id].num_common_dci ); - - for (n_dci = 0; n_dci < (eNB_transport_info[n_enb][CC_id].num_pmch + - eNB_transport_info[n_enb][CC_id].num_ue_spec_dci + - eNB_transport_info[n_enb][CC_id].num_common_dci); - n_dci++) { - total_tbs +=eNB_transport_info[n_enb][CC_id].tbs[n_dci]; - } - - if (total_tbs <= MAX_TRANSPORT_BLOCKS_BUFFER_SIZE) { - total_size = sizeof(eNB_transport_info_t) + total_tbs - - MAX_TRANSPORT_BLOCKS_BUFFER_SIZE; - } else { - LOG_E(EMU, - "[eNB]running out of memory for the eNB emulation transport buffer of size %d\n", - MAX_TRANSPORT_BLOCKS_BUFFER_SIZE); - } - - memcpy(&bypass_tx_buffer[byte_tx_count], (char *)&eNB_transport_info[n_enb][CC_id], - total_size); - byte_tx_count += total_size; - } - } else if (Type == UE_TRANSPORT) { - LOG_D(EMU,"[TX_DATA] UE TRANSPORT\n"); - messg->Message_type = EMU_TRANSPORT_INFO_UE; - total_size=0; - total_tbs=0; // compute the actual size of transport_blocks - - for (n_ue = oai_emulation.info.first_ue_local; - n_ue < (oai_emulation.info.first_ue_local+oai_emulation.info.nb_ue_local); - n_ue++) { - for (CC_id=0; CC_idMessage_type = EMU_TRANSPORT_INFO_RELEASE; - } else { - LOG_E(EMU,"[TX_DATA] UNKNOWN MSG \n"); - } - - ((bypass_proto2multicast_header_t *) bypass_tx_buffer)->size = byte_tx_count - - sizeof (bypass_proto2multicast_header_t); - - multicast_link_write_sock(oai_emulation.info.multicast_group, - bypass_tx_buffer, byte_tx_count); - - LOG_D(EMU, "Frame %d, subframe %d (%d): Sent %d bytes [%s] with master_id %d and seq %"PRIuMAX"\n", - frame, next_slot>>1, next_slot,byte_tx_count, map_int_to_str(transport_names, Type), - messg->master_id, messg->seq_num); -} - diff --git a/openair1/SIMULATION/ETH_TRANSPORT/emu_transport.c b/openair1/SIMULATION/ETH_TRANSPORT/emu_transport.c index 9d209043fd..d0f0eab4a6 100644 --- a/openair1/SIMULATION/ETH_TRANSPORT/emu_transport.c +++ b/openair1/SIMULATION/ETH_TRANSPORT/emu_transport.c @@ -35,8 +35,6 @@ #include "defs.h" #include "extern.h" #include "proto.h" -#include "UTIL/OCG/OCG.h" -#include "UTIL/OCG/OCG_extern.h" #include "UTIL/LOG/log.h" #include "UTIL/LOG/vcd_signal_dumper.h" #include "openair1/SIMULATION/ETH_TRANSPORT/extern.h" diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index 307b127e1a..f8b1e359e5 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -52,7 +52,6 @@ #include "SCHED/sched_eNB.h" #include "SCHED_UE/sched_UE.h" #include "SIMULATION/TOOLS/sim.h" -#include "OCG_vars.h" #include "unitary_defs.h" #include "dummy_functions.c" #include "executables/thread-common.h" @@ -629,51 +628,51 @@ int main(int argc, char **argv) { // num_layers = 1; perfect_ce = 0; static paramdef_t options[] = { - { "awgn", "Use AWGN channel and not multipath", PARAMFLAG_BOOL, iptr:&awgn_flag, defintval:0, TYPE_INT, 0, NULL, NULL }, - { "Abstx", "Turns on calibration mode for abstraction.", PARAMFLAG_BOOL, iptr:&abstx, defintval:0, TYPE_INT, 0 }, - { "bTDD", "Set the tdd configuration mode",0, iptr:&tdd_config, defintval:3, TYPE_INT, 0 }, - { "BnbRBs", "The LTE bandwith in RBs (100 is 20MHz)",0, iptr:&N_RB_DL, defintval:25, TYPE_INT, 0 }, - { "cPdcch", "Number of PDCCH symbols",0, iptr:&num_pdcch_symbols, defintval:1, TYPE_INT, 0 }, - { "CnidCell", "The cell id ",0, iptr:&Nid_cell, defintval:0, TYPE_INT, 0 }, - { "dciFlag", "Transmit the DCI and compute its error statistics", PARAMFLAG_BOOL, iptr:&dci_flag, defintval:0, TYPE_INT, 0 }, - { "Dtdd", "Enable tdd", PARAMFLAG_BOOL, strptr:NULL, defintval:0, TYPE_INT, 0, NULL, NULL }, - { "eRounds", "Number of rounds",0, iptr:NULL, defintval:25, TYPE_INT, 0 }, - { "EsubSampling","three quarters sub-sampling",PARAMFLAG_BOOL, iptr:&threequarter_fs, defintval:0, TYPE_INT, 0 }, - { "f_snr_step", "step size of SNR, default value is 1.",0, dblptr:&input_snr_step, defdblval:1, TYPE_DOUBLE, 0 }, - { "Forgetting", "forgetting factor (0 new channel every trial, 1 channel constant)",0, dblptr:&forgetting_factor, defdblval:0.0, TYPE_DOUBLE, 0 }, - { "input_file", "input IQ data file",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "Input_file_trch", " Input filename for TrCH data (binary)",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "WtwoThreads", "two_thread_flag", PARAMFLAG_BOOL, iptr:&two_thread_flag, defintval:0, TYPE_INT, 0 }, - { "lMuMimo", "offset_mumimo_llr_drange_fix",0, u8ptr:&offset_mumimo_llr_drange_fix, defintval:0, TYPE_UINT8, 0 }, - { "mcs1", "The MCS for TB 1", 0, iptr:&mcs1, defintval:0, TYPE_INT, 0 }, - { "Mcs2", "The MCS for TB 2", 0, iptr:&mcs2, defintval:0, TYPE_INT, 0 }, - { "Operf", "Set the percenatge of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, iptr:&test_perf, defintval:0, TYPE_INT, 0 }, - { "tmcs_i", "MCS of interfering UE",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "nb_frame", "number of frame in a test",0, iptr:&n_frames, defintval:1, TYPE_INT, 0 }, - { "offsetRxSample", "Sample offset for receiver", 0, iptr:&rx_sample_offset, defintval:0, TYPE_INT, 0 }, - { "rballocset", "ressource block allocation (see section 7.1.6.3 in 36.213)",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "snr", "Starting SNR, runs from SNR to SNR+%.1fdB in steps of %.1fdB. If n_frames is 1 then just SNR is simulated and MATLAB/OCTAVE output is generated", dblptr:&snr0, defdblval:-2.0, TYPE_DOUBLE, 0 }, - { "wsnrInterrupt", "snr int ?", 0, dblptr:&snr_int, defdblval:30, TYPE_DOUBLE, 0 }, - { "N_ch_rlzN0", "Determines the number of Channel Realizations in Abstraction mode. Default value is 1",0, iptr:&n_ch_rlz, defintval:1, TYPE_INT, 0 }, - { "prefix_extended","Enable extended prefix", PARAMFLAG_BOOL, iptr:&extended_prefix_flag, defintval:0, TYPE_INT, 0 }, - { "RNumRound", "Number of HARQ rounds (fixed)",0, iptr:&num_rounds, defintval:4, TYPE_INT, 0 }, - { "Subframe", "subframe ",0, iptr:&subframe, defintval:7, TYPE_INT, 0 }, - { "Trnti", "rnti",0, u16ptr:&n_rnti, defuintval:0x1234, TYPE_UINT16, 0 }, - { "vi_mod", "i_mod",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "Qparallel", "Enable parallel execution",0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0 }, - { "Performance", "Display CPU perfomance of each L1 piece", PARAMFLAG_BOOL, iptr:&print_perf, defintval:0, TYPE_INT, 0 }, - { "q_tx_port", "Number of TX antennas ports used in eNB",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "uEdual", "Enables the Interference Aware Receiver for TM5 (default is normal receiver)",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "xTransmission","Transmission mode (1,2,6,7 for the moment)",0, iptr:NULL, defintval:25, TYPE_INT, 0 }, - { "yn_tx_phy","Number of TX antennas used in eNB",0, iptr:NULL, defintval:25, TYPE_INT, 0 }, - { "Yperfect_ce","Perfect CE", PARAMFLAG_BOOL, iptr:&perfect_ce, defintval:0, TYPE_INT, 0 }, - { "Zdump", "dump table",PARAMFLAG_BOOL, iptr:&dump_table, defintval:0, TYPE_INT, 0 }, - { "Loglvl", "log level",0, iptr:&loglvl, defintval:OAILOG_INFO, TYPE_INT, 0 }, - { "zn_rx", "Number of RX antennas used in UE",0, iptr:NULL, defintval:2, TYPE_INT, 0 }, - { "gchannel", "[A:M] Use 3GPP 25.814 SCM-A/B/C/D('A','B','C','D') or 36-101 EPA('E'), EVA ('F'),ETU('G') models (ignores delay spread and Ricean factor), Rayghleigh8 ('H'), Rayleigh1('I'), Rayleigh1_corr('J'), Rayleigh1_anticorr ('K'), Rice8('L'), Rice1('M')",0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0 }, - { "verbose", "display debug text", PARAMFLAG_BOOL, iptr:&verbose, defintval:0, TYPE_INT, 0 }, - { "help", "display help and exit", PARAMFLAG_BOOL, iptr:&help, defintval:0, TYPE_INT, 0 }, - { "", "",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, + { "awgn", "Use AWGN channel and not multipath", PARAMFLAG_BOOL, .iptr=&awgn_flag, .defintval=0, TYPE_INT, 0, NULL, NULL }, + { "Abstx", "Turns on calibration mode for abstraction.", PARAMFLAG_BOOL, .iptr=&abstx, .defintval=0, TYPE_INT, 0 }, + { "bTDD", "Set the tdd configuration mode",0, .iptr=&tdd_config, .defintval=3, TYPE_INT, 0 }, + { "BnbRBs", "The LTE bandwith in RBs (100 is 20MHz)",0, .iptr=&N_RB_DL, .defintval=25, TYPE_INT, 0 }, + { "cPdcch", "Number of PDCCH symbols",0, .iptr=&num_pdcch_symbols, .defintval=1, TYPE_INT, 0 }, + { "CnidCell", "The cell id ",0, .iptr=&Nid_cell, .defintval=0, TYPE_INT, 0 }, + { "dciFlag", "Transmit the DCI and compute its error statistics", PARAMFLAG_BOOL, .iptr=&dci_flag, .defintval=0, TYPE_INT, 0 }, + { "Dtdd", "Enable tdd", PARAMFLAG_BOOL, .strptr=NULL, .defintval=0, TYPE_INT, 0, NULL, NULL }, + { "eRounds", "Number of rounds",0, .iptr=NULL, .defintval=25, TYPE_INT, 0 }, + { "EsubSampling","three quarters sub-sampling",PARAMFLAG_BOOL, .iptr=&threequarter_fs, .defintval=0, TYPE_INT, 0 }, + { "f_snr_step", "step size of SNR, default value is 1.",0, .dblptr=&input_snr_step, .defdblval=1, TYPE_DOUBLE, 0 }, + { "Forgetting", "forgetting factor (0 new channel every trial, 1 channel constant)",0, .dblptr=&forgetting_factor, .defdblval=0.0, TYPE_DOUBLE, 0 }, + { "input_file", "input IQ data file",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "Input_file_trch", " Input filename for TrCH data (binary)",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "WtwoThreads", "two_thread_flag", PARAMFLAG_BOOL, .iptr=&two_thread_flag, .defintval=0, TYPE_INT, 0 }, + { "lMuMimo", "offset_mumimo_llr_drange_fix",0, .u8ptr=&offset_mumimo_llr_drange_fix, .defintval=0, TYPE_UINT8, 0 }, + { "mcs1", "The MCS for TB 1", 0, .iptr=&mcs1, .defintval=0, TYPE_INT, 0 }, + { "Mcs2", "The MCS for TB 2", 0, .iptr=&mcs2, .defintval=0, TYPE_INT, 0 }, + { "Operf", "Set the percenatge of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, .iptr=&test_perf, .defintval=0, TYPE_INT, 0 }, + { "tmcs_i", "MCS of interfering UE",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "nb_frame", "number of frame in a test",0, .iptr=&n_frames, .defintval=1, TYPE_INT, 0 }, + { "offsetRxSample", "Sample offset for receiver", 0, .iptr=&rx_sample_offset, .defintval=0, TYPE_INT, 0 }, + { "rballocset", "ressource block allocation (see section 7.1.6.3 in 36.213)",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "snr", "Starting SNR, runs from SNR to SNR+%.1fdB in steps of %.1fdB. If n_frames is 1 then just SNR is simulated and MATLAB/OCTAVE output is generated", .dblptr=&snr0, .defdblval=-2.0, TYPE_DOUBLE, 0 }, + { "wsnrInterrupt", "snr int ?", 0, .dblptr=&snr_int, .defdblval=30, TYPE_DOUBLE, 0 }, + { "N_ch_rlzN0", "Determines the number of Channel Realizations in Abstraction mode. Default value is 1",0, .iptr=&n_ch_rlz, .defintval=1, TYPE_INT, 0 }, + { "prefix_extended","Enable extended prefix", PARAMFLAG_BOOL, .iptr=&extended_prefix_flag, .defintval=0, TYPE_INT, 0 }, + { "RNumRound", "Number of HARQ rounds (fixed)",0, .iptr=&num_rounds, .defintval=4, TYPE_INT, 0 }, + { "Subframe", "subframe ",0, .iptr=&subframe, .defintval=7, TYPE_INT, 0 }, + { "Trnti", "rnti",0, .u16ptr=&n_rnti, .defuintval=0x1234, TYPE_UINT16, 0 }, + { "vi_mod", "i_mod",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "Qparallel", "Enable parallel execution",0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0 }, + { "Performance", "Display CPU perfomance of each L1 piece", PARAMFLAG_BOOL, .iptr=&print_perf, .defintval=0, TYPE_INT, 0 }, + { "q_tx_port", "Number of TX antennas ports used in eNB",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "uEdual", "Enables the Interference Aware Receiver for TM5 (default is normal receiver)",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "xTransmission","Transmission mode (1,2,6,7 for the moment)",0, .iptr=NULL, .defintval=25, TYPE_INT, 0 }, + { "yn_tx_phy","Number of TX antennas used in eNB",0, .iptr=NULL, .defintval=25, TYPE_INT, 0 }, + { "Yperfect_ce","Perfect CE", PARAMFLAG_BOOL, .iptr=&perfect_ce, .defintval=0, TYPE_INT, 0 }, + { "Zdump", "dump table",PARAMFLAG_BOOL, .iptr=&dump_table, .defintval=0, TYPE_INT, 0 }, + { "Loglvl", "log level",0, .iptr=&loglvl, .defintval=OAILOG_INFO, TYPE_INT, 0 }, + { "zn_rx", "Number of RX antennas used in UE",0, .iptr=NULL, .defintval=2, TYPE_INT, 0 }, + { "gchannel", "[A:M] Use 3GPP 25.814 SCM-A/B/C/D('A','B','C','D') or 36-101 EPA('E'), EVA ('F'),ETU('G') models (ignores delay spread and Ricean factor), Rayghleigh8 ('H'), Rayleigh1('I'), Rayleigh1_corr('J'), Rayleigh1_anticorr ('K'), Rice8('L'), Rice1('M')",0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0 }, + { "verbose", "display debug text", PARAMFLAG_BOOL, .iptr=&verbose, .defintval=0, TYPE_INT, 0 }, + { "help", "display help and exit", PARAMFLAG_BOOL, .iptr=&help, .defintval=0, TYPE_INT, 0 }, + { "", "",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, }; struct option *long_options = parse_oai_options(options); int option_index; diff --git a/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c b/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c index d6a248059c..9a086e1a7f 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim_tm4.c @@ -48,7 +48,6 @@ #include "SCHED/defs.h" #include "SCHED/vars.h" #include "LAYER2/MAC/vars.h" -#include "OCG_vars.h" #include "UTIL/LOG/log.h" #include "UTIL/LISTS/list.h" diff --git a/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c b/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c index 547d2cfa28..7092fd9d1e 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim_tm7.c @@ -45,7 +45,6 @@ #include "SCHED/vars.h" #include "LAYER2/MAC/vars.h" -#include "OCG_vars.h" #include "UTIL/LOG/log.h" #include "UTIL/LISTS/list.h" diff --git a/openair1/SIMULATION/LTE_PHY/framegen.c b/openair1/SIMULATION/LTE_PHY/framegen.c index 9203f0a095..74f76e56b9 100644 --- a/openair1/SIMULATION/LTE_PHY/framegen.c +++ b/openair1/SIMULATION/LTE_PHY/framegen.c @@ -28,7 +28,6 @@ #include "PHY/defs.h" #include "PHY/vars.h" #include "SCHED/extern.h" -#include "OCG_vars.h" #include "MAC_INTERFACE/vars.h" #ifdef IFFT_FPGA #include "PHY/LTE_REFSIG/mod_table.h" diff --git a/openair1/SIMULATION/LTE_PHY/mbmssim.c b/openair1/SIMULATION/LTE_PHY/mbmssim.c index 33d9a58def..accb6004f8 100644 --- a/openair1/SIMULATION/LTE_PHY/mbmssim.c +++ b/openair1/SIMULATION/LTE_PHY/mbmssim.c @@ -45,7 +45,6 @@ #include "SCHED/sched_eNB.h" #include "LAYER2/MAC/mac_vars.h" -#include "OCG_vars.h" #include "common/utils/LOG/log.h" #include "UTIL/LISTS/list.h" diff --git a/openair1/SIMULATION/LTE_PHY/pbchsim.c b/openair1/SIMULATION/LTE_PHY/pbchsim.c index 71286faafb..7d8d8e88f5 100644 --- a/openair1/SIMULATION/LTE_PHY/pbchsim.c +++ b/openair1/SIMULATION/LTE_PHY/pbchsim.c @@ -40,8 +40,6 @@ #include "PHY/TOOLS/lte_phy_scope.h" #endif -#include "OCG_vars.h" - #include "unitary_defs.h" PHY_VARS_eNB *eNB,*eNB1,*eNB2; diff --git a/openair1/SIMULATION/LTE_PHY/pdcchsim.c b/openair1/SIMULATION/LTE_PHY/pdcchsim.c index 50910290c3..494c9bbde6 100644 --- a/openair1/SIMULATION/LTE_PHY/pdcchsim.c +++ b/openair1/SIMULATION/LTE_PHY/pdcchsim.c @@ -31,7 +31,6 @@ #include "SCHED/defs.h" #include "SCHED/vars.h" #include "LAYER2/MAC/vars.h" -#include "OCG_vars.h" #ifdef XFORMS #include "PHY/TOOLS/lte_phy_scope.h" diff --git a/openair1/SIMULATION/LTE_PHY/prachsim.c b/openair1/SIMULATION/LTE_PHY/prachsim.c index 229764a893..0619facf3e 100644 --- a/openair1/SIMULATION/LTE_PHY/prachsim.c +++ b/openair1/SIMULATION/LTE_PHY/prachsim.c @@ -31,8 +31,6 @@ #include "SCHED/vars.h" #include "LAYER2/MAC/vars.h" -#include "OCG_vars.h" - #include "unitary_defs.h" int current_dlsch_cqi; //FIXME! diff --git a/openair1/SIMULATION/LTE_PHY/pucchsim.c b/openair1/SIMULATION/LTE_PHY/pucchsim.c index 083a756afb..fd0e0e44aa 100644 --- a/openair1/SIMULATION/LTE_PHY/pucchsim.c +++ b/openair1/SIMULATION/LTE_PHY/pucchsim.c @@ -31,7 +31,6 @@ #include "SCHED/vars.h" #include "LAYER2/MAC/vars.h" -#include "OCG_vars.h" #include "UTIL/LOG/log_extern.h" #include "unitary_defs.h" diff --git a/openair1/SIMULATION/LTE_PHY/scansim.c b/openair1/SIMULATION/LTE_PHY/scansim.c index 839d30a8de..9660e2343e 100644 --- a/openair1/SIMULATION/LTE_PHY/scansim.c +++ b/openair1/SIMULATION/LTE_PHY/scansim.c @@ -41,8 +41,6 @@ #include "PHY/TOOLS/lte_phy_scope.h" #endif -#include "OCG_vars.h" - #define BW 20.0 diff --git a/openair1/SIMULATION/LTE_PHY/syncsim.c b/openair1/SIMULATION/LTE_PHY/syncsim.c index 97336c509d..02f6f0a63b 100644 --- a/openair1/SIMULATION/LTE_PHY/syncsim.c +++ b/openair1/SIMULATION/LTE_PHY/syncsim.c @@ -50,7 +50,6 @@ #endif //XFORMS -#include "OCG_vars.h" #include "openair_hw.h" #define BW 5.0 diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 05e4273577..a0286ad719 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -45,7 +45,6 @@ #include "SCHED/sched_eNB.h" #include "SCHED_UE/sched_UE.h" #include "SIMULATION/TOOLS/sim.h" -#include "OCG_vars.h" #include "unitary_defs.h" #include "dummy_functions.c" #include "nfapi/oai_integration/vendor_ext.h" @@ -54,6 +53,7 @@ #include "executables/lte-softmodem.h" #include "common/ran_context.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h" +#include "openair1/PHY/LTE_TRANSPORT/dlsch_tbs.h" const char *__asan_default_options() { @@ -69,10 +69,8 @@ channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX]; channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX]; node_desc_t *enb_data[NUMBER_OF_eNB_MAX]; node_desc_t *ue_data[NUMBER_OF_UE_MAX]; -//double sinr_bler_map[MCS_COUNT][2][16]; extern uint16_t beta_ack[16],beta_ri[16],beta_cqi[16]; -//extern char* namepointer_chMag ; THREAD_STRUCT thread_struct; nfapi_ue_release_request_body_t release_rntis; @@ -408,42 +406,42 @@ int main(int argc, char **argv) { // set_glog(LOG_DEBUG,LOG_HIGH); //hapZEbm:n:Y:X:x:s:w:e:q:d:D:O:c:r:i:f:y:c:oA:C:R:g:N:l:S:T:QB:PI:LF static paramdef_t options[] = { - { "awgn", "Use AWGN channel and not multipath", PARAMFLAG_BOOL, strptr:NULL, defintval:0, TYPE_INT, 0, NULL, NULL }, - { "BnbRBs", "The LTE bandwith in RBs (100 is 20MHz)",0, iptr:&N_RB_DL, defintval:25, TYPE_INT, 0 }, - { "mcs", "The MCS to use", 0, iptr:&mcs, defintval:10, TYPE_INT, 0 }, - { "nb_frame", "number of frame in a test",0, iptr:&n_frames, defintval:1, TYPE_INT, 0 }, - { "snr", "starting snr", 0, dblptr:&snr0, defdblval:-2.9, TYPE_DOUBLE, 0 }, - { "wsnrInterrupt", "snr int ?", 0, dblptr:&snr_int, defdblval:30, TYPE_DOUBLE, 0 }, - { "e_snr_step", "step increasing snr",0, dblptr:&input_snr_step, defdblval:0.2, TYPE_DOUBLE, 0 }, - { "rb_dynamic", "number of rb in dynamic allocation",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "first_rb", "first rb used in dynamic allocation",0, iptr:&first_rb, defintval:0, TYPE_INT, 0 }, - { "osrs", "enable srs generation",PARAMFLAG_BOOL, iptr:&srs_flag, defintval:0, TYPE_INT, 0 }, - { "gchannel", "[A:M] Use 3GPP 25.814 SCM-A/B/C/D('A','B','C','D') or 36-101 EPA('E'), EVA ('F'),ETU('G') models (ignores delay spread and Ricean factor), Rayghleigh8 ('H'), Rayleigh1('I'), Rayleigh1_corr('J'), Rayleigh1_anticorr ('K'), Rice8('L'), Rice1('M')",0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0 }, - { "delay_chan", "Channel delay",0, iptr:&delay, defintval:0, TYPE_INT, 0 }, - { "Doppler", "Maximum doppler shift",0, dblptr:&maxDoppler, defdblval:0.0, TYPE_DOUBLE, 0 }, - { "Zdump", "dump table",PARAMFLAG_BOOL, iptr:&dump_table, defintval:0, TYPE_INT, 0 }, - { "Lparallel", "Enable parallel execution",0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0 }, - { "Iterations", "Number of iterations of turbo decoder", 0, iptr:&max_turbo_iterations, defintval:4, TYPE_INT, 0 }, - { "Performance", "Display CPU perfomance of each L1 piece", PARAMFLAG_BOOL, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "Q_cqi", "Enable CQI", PARAMFLAG_BOOL, iptr:&cqi_flag, defintval:0, TYPE_INT, 0 }, - { "prefix_extended","Extended prefix", PARAMFLAG_BOOL, iptr:&extended_prefix_flag, defintval:0, TYPE_INT, 0 }, - { "RI_beta", "TBD", 0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "CQI_beta", "TBD",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "ACK_beta", "TBD",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "input_file", "input IQ data file",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "N0", "N0",0, iptr:&N0, defintval:30, TYPE_INT, 0 }, - { "EsubSampling","three quarters sub-sampling",PARAMFLAG_BOOL, iptr:&threequarter_fs, defintval:0, TYPE_INT, 0 }, - { "TDD", "Enable TDD and set the tdd configuration mode",0, iptr:NULL, defintval:25, TYPE_INT, 0 }, - { "Subframe", "subframe to use",0, iptr:&subframe, defintval:3, TYPE_INT, 0 }, - { "xTransmission","transmission mode (1 or 2 are supported)",0, iptr:NULL, defintval:25, TYPE_INT, 0 }, - { "yN_rx", "TBD: n_rx",0, iptr:&n_rx, defintval:1, TYPE_INT, 0 }, - { "bundling_disable", "bundling disable",PARAMFLAG_BOOL, iptr:&disable_bundling, defintval:0, TYPE_INT, 0 }, - { "Y", "n_ch_rlz",0, iptr:&n_ch_rlz, defintval:1, TYPE_INT, 0 }, - { "X", "abstx", PARAMFLAG_BOOL, iptr:&abstx, defintval:0, TYPE_INT, 0 }, - { "Operf", "Set the percentage of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, iptr:&test_perf, defintval:0, TYPE_INT, 0 }, - { "verbose", "display debug text", PARAMFLAG_BOOL, iptr:&verbose, defintval:0, TYPE_INT, 0 }, - { "help", "display help and exit", PARAMFLAG_BOOL, iptr:&help, defintval:0, TYPE_INT, 0 }, - { "", "",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, + { "awgn", "Use AWGN channel and not multipath", PARAMFLAG_BOOL, .strptr=NULL, .defintval=0, TYPE_INT, 0, NULL, NULL }, + { "BnbRBs", "The LTE bandwith in RBs (100 is 20MHz)",0, .iptr=&N_RB_DL, .defintval=25, TYPE_INT, 0 }, + { "mcs", "The MCS to use", 0, .iptr=&mcs, .defintval=10, TYPE_INT, 0 }, + { "nb_frame", "number of frame in a test",0, .iptr=&n_frames, .defintval=1, TYPE_INT, 0 }, + { "snr", "starting snr", 0, .dblptr=&snr0, .defdblval=-2.9, TYPE_DOUBLE, 0 }, + { "wsnrInterrupt", "snr int ?", 0, .dblptr=&snr_int, .defdblval=30, TYPE_DOUBLE, 0 }, + { "e_snr_step", "step increasing snr",0, .dblptr=&input_snr_step, .defdblval=0.2, TYPE_DOUBLE, 0 }, + { "rb_dynamic", "number of rb in dynamic allocation",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "first_rb", "first rb used in dynamic allocation",0, .iptr=&first_rb, .defintval=0, TYPE_INT, 0 }, + { "osrs", "enable srs generation",PARAMFLAG_BOOL, .iptr=&srs_flag, .defintval=0, TYPE_INT, 0 }, + { "gchannel", "[A:M] Use 3GPP 25.814 SCM-A/B/C/D('A','B','C','D') or 36-101 EPA('E'), EVA ('F'),ETU('G') models (ignores delay spread and Ricean factor), Rayghleigh8 ('H'), Rayleigh1('I'), Rayleigh1_corr('J'), Rayleigh1_anticorr ('K'), Rice8('L'), Rice1('M')",0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0 }, + { "delay_chan", "Channel delay",0, .iptr=&delay, .defintval=0, TYPE_INT, 0 }, + { "Doppler", "Maximum doppler shift",0, .dblptr=&maxDoppler, .defdblval=0.0, TYPE_DOUBLE, 0 }, + { "Zdump", "dump table",PARAMFLAG_BOOL, .iptr=&dump_table, .defintval=0, TYPE_INT, 0 }, + { "Lparallel", "Enable parallel execution",0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0 }, + { "Iterations", "Number of iterations of turbo decoder", 0, .iptr=&max_turbo_iterations, .defintval=4, TYPE_INT, 0 }, + { "Performance", "Display CPU perfomance of each L1 piece", PARAMFLAG_BOOL, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "Q_cqi", "Enable CQI", PARAMFLAG_BOOL, .iptr=&cqi_flag, .defintval=0, TYPE_INT, 0 }, + { "prefix_extended","Extended prefix", PARAMFLAG_BOOL, .iptr=&extended_prefix_flag, .defintval=0, TYPE_INT, 0 }, + { "RI_beta", "TBD", 0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "CQI_beta", "TBD",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "ACK_beta", "TBD",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "input_file", "input IQ data file",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "N0", "N0",0, .iptr=&N0, .defintval=30, TYPE_INT, 0 }, + { "EsubSampling","three quarters sub-sampling",PARAMFLAG_BOOL, .iptr=&threequarter_fs, .defintval=0, TYPE_INT, 0 }, + { "TDD", "Enable TDD and set the tdd configuration mode",0, .iptr=NULL, .defintval=25, TYPE_INT, 0 }, + { "Subframe", "subframe to use",0, .iptr=&subframe, .defintval=3, TYPE_INT, 0 }, + { "xTransmission","transmission mode (1 or 2 are supported)",0, .iptr=NULL, .defintval=25, TYPE_INT, 0 }, + { "yN_rx", "TBD: n_rx",0, .iptr=&n_rx, .defintval=1, TYPE_INT, 0 }, + { "bundling_disable", "bundling disable",PARAMFLAG_BOOL, .iptr=&disable_bundling, .defintval=0, TYPE_INT, 0 }, + { "Y", "n_ch_rlz",0, .iptr=&n_ch_rlz, .defintval=1, TYPE_INT, 0 }, + { "X", "abstx", PARAMFLAG_BOOL, .iptr=&abstx, .defintval=0, TYPE_INT, 0 }, + { "Operf", "Set the percentage of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, .iptr=&test_perf, .defintval=0, TYPE_INT, 0 }, + { "verbose", "display debug text", PARAMFLAG_BOOL, .iptr=&verbose, .defintval=0, TYPE_INT, 0 }, + { "help", "display help and exit", PARAMFLAG_BOOL, .iptr=&help, .defintval=0, TYPE_INT, 0 }, + { "", "",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, }; struct option *long_options = parse_oai_options(options); int option_index; @@ -1005,14 +1003,11 @@ int main(int argc, char **argv) { if (abstx) { if (trials==0 && round==0 && SNR==snr0) { //generate a new channel hold_channel = 0; - flagMag=0; } else { hold_channel = 1; - flagMag = 1; } } else { hold_channel = 0; - flagMag=1; } /////////////////////////////////////// diff --git a/openair1/SIMULATION/LTE_PHY/unitary_defs.h b/openair1/SIMULATION/LTE_PHY/unitary_defs.h index d77682c89e..f0c3f32b1b 100644 --- a/openair1/SIMULATION/LTE_PHY/unitary_defs.h +++ b/openair1/SIMULATION/LTE_PHY/unitary_defs.h @@ -22,7 +22,7 @@ openair0_device openair0; int oai_exit=0; -void exit_function(const char* file, const char* function, const int line,const char *s) { +void exit_function(const char* file, const char* function, const int line,const char* s, const int assert) { const char * msg= s==NULL ? "no comment": s; printf("Exiting at: %s:%d %s(), %s\n", file, line, function, msg); exit(-1); diff --git a/openair1/SIMULATION/NR_PHY/dlschsim.c b/openair1/SIMULATION/NR_PHY/dlschsim.c index f5de60a297..42a5fc2dcc 100644 --- a/openair1/SIMULATION/NR_PHY/dlschsim.c +++ b/openair1/SIMULATION/NR_PHY/dlschsim.c @@ -35,7 +35,7 @@ #include "PHY/defs_nr_common.h" #include "PHY/defs_nr_UE.h" #include "PHY/types.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "PHY/MODULATION/modulation_eNB.h" #include "PHY/MODULATION/modulation_UE.h" #include "PHY/NR_REFSIG/refsig_defs_ue.h" @@ -46,10 +46,9 @@ #include "openair1/SIMULATION/TOOLS/sim.h" #include "openair1/SIMULATION/RF/rf.h" #include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" -#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c" #include "openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h" #include "executables/nr-uesoftmodem.h" - +#include "nfapi/oai_integration/vendor_ext.h" //#define DEBUG_NR_DLSCHSIM @@ -73,8 +72,14 @@ PHY_VARS_NR_UE *PHY_vars_UE_g[1][1] = { { NULL } }; uint16_t n_rnti = 0x1234; openair0_config_t openair0_cfg[MAX_CARDS]; +uint64_t get_softmodem_optmask(void) {return 0;} +static softmodem_params_t softmodem_params; +softmodem_params_t *get_softmodem_params(void) { + return &softmodem_params; +} void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {} - +NR_IF_Module_t *NR_IF_Module_init(int Mod_id) { return (NULL); } +nfapi_mode_t nfapi_getmode(void) { return NFAPI_MODE_UNKNOWN; } nrUE_params_t nrUE_params={0}; diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index ed171523de..80ff799ab0 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -38,7 +38,7 @@ #include "PHY/defs_nr_UE.h" #include "PHY/phy_vars_nr_ue.h" #include "PHY/types.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "PHY/MODULATION/modulation_eNB.h" #include "PHY/MODULATION/nr_modulation.h" #include "PHY/MODULATION/modulation_UE.h" @@ -89,7 +89,6 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; double cpuf; char *uecap_file; -uint16_t sf_ahead=4 ; uint16_t sl_ahead=0; //uint8_t nfapi_mode = 0; uint64_t downlink_frequency[MAX_NUM_CCs][4]; @@ -104,21 +103,7 @@ int nr_derive_key_ng_ran_star(uint16_t pci, uint64_t nr_arfcn_dl, const uint8_t return 0; } -// dummy functions -int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); } - -int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, - const int CC_id, - const uint8_t gNB_index, - const frame_t frame, - const sub_frame_t sub_frame, - const rnti_t rnti, - const channel_t channel, - const uint8_t* pduP, - const sdu_size_t pdu_len) -{ - return 0; -} +int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); } void nr_rrc_ue_generate_RRCSetupRequest(module_id_t module_id, const uint8_t gNB_index) { @@ -135,70 +120,16 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP, return 0; } -void -rrc_data_ind( - const protocol_ctxt_t *const ctxt_pP, - const rb_id_t Srb_id, - const sdu_size_t sdu_sizeP, - const uint8_t *const buffer_pP -) -{ -} - int nr_derive_key(int alg_type, uint8_t alg_id, const uint8_t key[32], uint8_t **out) { return 0; } -void config_common(int Mod_idP, - int pdsch_AntennaPorts, - int pusch_AntennaPorts, - NR_ServingCellConfigCommon_t *scc); - -int generate_dlsch_header(unsigned char *mac_header, - unsigned char num_sdus, - unsigned short *sdu_lengths, - unsigned char *sdu_lcids, - unsigned char drx_cmd, - unsigned short timing_advance_cmd, - unsigned char *ue_cont_res_id, - unsigned char short_padding, - unsigned short post_padding){return 0;} - -// Dummy function to avoid linking error at compilation of nr-dlsim -int is_x2ap_enabled(void) -{ - return 0; -} - -int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, - int CC_idP, - int UE_id, - rnti_t rntiP, - const uint8_t *sduP, - sdu_size_t sdu_lenP, - const uint8_t *sdu2P, - sdu_size_t sdu2_lenP) { - return 0; -} - void processSlotTX(void *arg) {} nr_bler_struct nr_bler_data[NR_NUM_MCS]; -//nFAPI P7 dummy functions to avoid linking errors - -int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); } -int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req){ return(0); } -int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req){ return(0); } -int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req){ return(0); } -int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) { return(0); } -int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind) { return(0); } -int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind) { return(0); } -int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { return(0); } -int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { return(0); } - // needed for some functions openair0_config_t openair0_cfg[MAX_CARDS]; void update_ptrs_config(NR_CellGroupConfig_t *secondaryCellGroup, uint16_t *rbSize, uint8_t *mcsIndex,int8_t *ptrs_arg); @@ -206,7 +137,7 @@ void update_dmrs_config(NR_CellGroupConfig_t *scg, int8_t* dmrs_arg); extern void fix_scd(NR_ServingCellConfig_t *scd);// forward declaration /* specific dlsim DL preprocessor: uses rbStart/rbSize/mcs/nrOfLayers from command line of dlsim */ -int g_mcsIndex = -1, g_mcsTableIdx = 0, g_rbStart = -1, g_rbSize = -1, g_nrOfLayers = 1; +int g_mcsIndex = -1, g_mcsTableIdx = 0, g_rbStart = -1, g_rbSize = -1, g_nrOfLayers = 1, g_pmi = 0; void nr_dlsim_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t slot) { @@ -252,6 +183,7 @@ void nr_dlsim_preprocessor(module_id_t module_id, sched_pdsch->rbSize = g_rbSize; sched_pdsch->mcs = g_mcsIndex; sched_pdsch->nrOfLayers = g_nrOfLayers; + sched_pdsch->pm_index = g_pmi; /* the following might override the table that is mandated by RRC * configuration */ current_BWP->mcsTableIdx = g_mcsTableIdx; @@ -304,8 +236,39 @@ nrUE_params_t *get_nrUE_params(void) { return &nrUE_params; } -void do_nothing(void *args) { + +void validate_input_pmi(rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts, int nrOfLayers, int pmi) +{ + if (pmi == 0) + return; + + int num_antenna_ports = pdsch_AntennaPorts.N1 * pdsch_AntennaPorts.N2 * pdsch_AntennaPorts.XP; + int N1 = pdsch_AntennaPorts.N1; + int N2 = pdsch_AntennaPorts.N2; + int O1 = N1 > 1 ? 4 : 1; + int O2 = N2 > 1 ? 4 : 1; + int K1, K2; + if (num_antenna_ports > 2) + get_K1_K2(N1, N2, &K1, &K2); + else { + K1 = 1; K2 = 1; + } + int num_pmi = 1; // pmi = 0 is the identity matrix + switch (nrOfLayers) { + case 1 : + num_pmi += N1 * O1 * N2 * O2 * 4; + AssertFatal(pmi < num_pmi, "Input PMI index %d exceeds the limit of configured matrices %d for %d layers\n", pmi, num_pmi, nrOfLayers); + return; + case 2 : + num_pmi += N1 * O1 * N2 * O2 * K1 * K2 * 2; + AssertFatal(pmi < num_pmi, "Input PMI index %d exceeds the limit of conigured matrices %d for %d layers\n", pmi, num_pmi, nrOfLayers); + break; + default : + AssertFatal(false, "Precoding with more than 2 nrOfLayers not yet supported\n"); + } } + + int NB_UE_INST = 1; int main(int argc, char **argv) @@ -319,7 +282,7 @@ int main(int argc, char **argv) //float psnr; float eff_tp_check = 0.7; uint32_t TBS = 0; - int **txdata; + c16_t **txdata; double **s_re,**s_im,**r_re,**r_im; //double iqim = 0.0; //unsigned char pbch_pdu[6]; @@ -396,7 +359,7 @@ int main(int argc, char **argv) FILE *scg_fd=NULL; - while ((c = getopt(argc, argv, "f:hA:pf:g:i:n:s:S:t:v:x:y:z:M:N:F:GR:d:PI:L:a:b:e:m:w:T:U:q:X:Y")) != -1) { + while ((c = getopt(argc, argv, "f:hA:p:f:g:i:n:s:S:t:v:x:y:z:M:N:F:GR:d:PI:L:a:b:e:m:w:T:U:q:X:Y")) != -1) { switch (c) { case 'f': scg_fd = fopen(optarg,"r"); @@ -473,35 +436,19 @@ int main(int argc, char **argv) printf("Setting SNR1 to %f\n",snr1); break; - /* - case 't': - Td= atof(optarg); - break; - */ - /*case 'p': - extended_prefix_flag=1; - break;*/ - - /* - case 'r': - ricean_factor = pow(10,-.1*atof(optarg)); - if (ricean_factor>1) { - printf("Ricean factor must be between 0 and 1\n"); - exit(-1); - } - break; - */ case 'x': - g_nrOfLayers=atoi(optarg); + g_nrOfLayers = atoi(optarg); - if ((g_nrOfLayers==0) || - (g_nrOfLayers>4)) { - printf("Unsupported nr Of Layers %d\n",g_nrOfLayers); + if ((g_nrOfLayers == 0) || (g_nrOfLayers > 4)) { + printf("Unsupported nr Of Layers %d\n", g_nrOfLayers); exit(-1); } - break; + case 'p': + g_pmi = atoi(optarg); + break; + case 'v': num_rounds = atoi(optarg); @@ -628,6 +575,7 @@ int main(int argc, char **argv) printf("-y Number of TX antennas used in gNB\n"); printf("-z Number of RX antennas used in UE\n"); printf("-x Num of layer for PDSCH\n"); + printf("-p Precoding matrix index\n"); printf("-i Change channel estimation technique. Arguments list: Frequency domain {0:Linear interpolation, 1:PRB based averaging}, Time domain {0:Estimates of last DMRS symbol, 1:Average of DMRS symbols}\n"); //printf("-j Relative strength of second intefering gNB (in dB) - cell_id mod 3 = 2\n"); printf("-R N_RB_DL\n"); @@ -757,6 +705,8 @@ int main(int argc, char **argv) gNB->ap_N2 = pdsch_AntennaPorts.N2; gNB->ap_XP = pdsch_AntennaPorts.XP; + validate_input_pmi(pdsch_AntennaPorts, g_nrOfLayers, g_pmi); + NR_UE_NR_Capability_t* UE_Capability_nr = CALLOC(1,sizeof(NR_UE_NR_Capability_t)); prepare_sim_uecap(UE_Capability_nr,scc,mu, N_RB_DL,g_mcsTableIdx); @@ -789,23 +739,23 @@ int main(int argc, char **argv) gNB->if_inst->NR_PHY_config_req = nr_phy_config_request; // common configuration - rrc_mac_config_req_gNB(0, pdsch_AntennaPorts, n_tx, 0, 6, scc, NULL, NULL, 0, 0, NULL); + nr_mac_config_scc(RC.nrmac[0], pdsch_AntennaPorts, n_tx, 0, 6, scc); // UE dedicated configuration - rrc_mac_config_req_gNB(0, pdsch_AntennaPorts, n_tx, 0, 6, scc, NULL, NULL, 1, secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity,secondaryCellGroup); + nr_mac_add_test_ue(RC.nrmac[0], secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity, secondaryCellGroup); // reset preprocessor to the one of DLSIM after it has been set during - // rrc_mac_config_req_gNB + // nr_mac_config_scc() gNB_mac->pre_processor_dl = nr_dlsim_preprocessor; phy_init_nr_gNB(gNB); N_RB_DL = gNB->frame_parms.N_RB_DL; NR_UE_info_t *UE_info = RC.nrmac[0]->UE_info.list[0]; - configure_UE_BWP(RC.nrmac[0], scc, &UE_info->UE_sched_ctrl, NULL, UE_info); + configure_UE_BWP(RC.nrmac[0], scc, &UE_info->UE_sched_ctrl, NULL, UE_info, -1, -1); // stub to configure frame_parms // nr_phy_config_request_sim(gNB,N_RB_DL,N_RB_DL,mu,Nid_cell,SSB_positions); // call MAC to configure common parameters - /* rrc_mac_config_req_gNB() has created one user, so set the scheduling + /* nr_mac_add_test_ue() has created one user, so set the scheduling * parameters from command line in global variables that will be picked up by * scheduling preprocessor */ if (g_mcsIndex < 0) g_mcsIndex = 9; @@ -921,6 +871,7 @@ int main(int argc, char **argv) UE->chest_time = chest_type[1]; UE_mac->if_module = nr_ue_if_module_init(0); + UE_mac->state = UE_CONNECTED; unsigned int available_bits=0; unsigned char *estimated_output_bit; @@ -1099,8 +1050,8 @@ int main(int argc, char **argv) for (aa=0; aaframe_parms.nb_antennas_tx; aa++) { if (cyclic_prefix_type == 1) { - PHY_ofdm_mod(&gNB->common_vars.txdataF[aa][txdataF_offset], - &txdata[aa][tx_offset], + PHY_ofdm_mod((int *)&gNB->common_vars.txdataF[aa][txdataF_offset], + (int *)&txdata[aa][tx_offset], frame_parms->ofdm_symbol_size, 12, frame_parms->nb_prefix_samples, @@ -1130,7 +1081,7 @@ int main(int argc, char **argv) int txlev_sum = 0; int l_ofdm = 6; for (aa=0; aaofdm_symbol_size + (l_ofdm-1)*frame_parms->nb_prefix_samples + frame_parms->nb_prefix_samples0], + txlev[aa] = signal_energy((int32_t *)&txdata[aa][tx_offset+l_ofdm*frame_parms->ofdm_symbol_size + (l_ofdm-1)*frame_parms->nb_prefix_samples + frame_parms->nb_prefix_samples0], frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples); txlev_sum += txlev[aa]; if (n_trials==1) printf("txlev[%d] = %d (%f dB) txlev_sum %d\n",aa,txlev[aa],10*log10((double)txlev[aa]),txlev_sum); diff --git a/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c b/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c index dd5082d756..5a1c2be6e8 100644 --- a/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c +++ b/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c @@ -1,89 +1,45 @@ #include "nfapi/oai_integration/vendor_ext.h" +#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h" +#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h" +#include "openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h" +#include "openair1/PHY/defs_nr_UE.h" -int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { return(0); } -int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { return(0); } -int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return(0); } -//int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return(0); } -int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) -{ - return (0); -} -int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req) -{ - return (0); -} -int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req) -{ - return (0); -} -int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req) -{ - return (0); -} -int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) -{ - return (0); -} -int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind) -{ - return (0); -} -int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind) -{ - return (0); -} -int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) -{ - return (0); -} -int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) -{ - return (0); -} +int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return (0); } +int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req) { return (0); } +int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req) { return (0); } +int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req) { return (0); } +int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind) { return (0); } +int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind) { return (0); } +int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { return (0); } +int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { return (0); } +int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) { return 0; } -int pack_nr_srs_beamforming_report(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen) -{ - return 0; -} -int pack_nr_srs_normalized_channel_iq_matrix(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen) -{ - return 0; -} +int pack_nr_srs_beamforming_report(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen) { return 0; } +int unpack_nr_srs_beamforming_report(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen) { return 0; } +int pack_nr_srs_normalized_channel_iq_matrix(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen) { return 0; } +int unpack_nr_srs_normalized_channel_iq_matrix(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen) { return 0; } -int32_t get_uldl_offset(int nr_bandP) -{ - return (0); -} -NR_IF_Module_t *NR_IF_Module_init(int Mod_id) -{ - return (NULL); -} -nfapi_mode_t nfapi_mod; -nfapi_mode_t nfapi_getmode(void) -{ - return nfapi_mod; -} -void nfapi_setmode(nfapi_mode_t nfapi_mode) -{ -} +int32_t get_uldl_offset(int nr_bandP) { return (0); } -int dummy_nr_ue_dl_indication(nr_downlink_indication_t *dl_info) -{ - return (0); -} -int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); } -void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind, - fapi_nr_dci_indication_t *dci_ind, - fapi_nr_rx_indication_t *rx_ind, - UE_nr_rxtx_proc_t *proc, - PHY_VARS_NR_UE *ue, - void *phy_data) {} -void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind, - uint8_t pdu_type, - PHY_VARS_NR_UE *ue, - NR_UE_DLSCH_t *dlsch0, - NR_UE_DLSCH_t *dlsch1, - uint16_t n_pdus, - UE_nr_rxtx_proc_t *proc, - void *typeSpecific ) {} +void configure_nr_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) {} +void configure_nr_nfapi_vnf(char *vnf_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) {} +int nfapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen, nfapi_p7_codec_config_t* config) { return 0; } +int nfapi_nr_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen, nfapi_p7_codec_config_t* config) { return 0; } +int nfapi_p7_message_header_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen, nfapi_p7_codec_config_t *config) { return 0; } + +void rrc_data_ind(const protocol_ctxt_t *const ctxt_pP, + const rb_id_t Srb_id, + const sdu_size_t sdu_sizeP, + const uint8_t *const buffer_pP) { } + +typedef uint32_t channel_t; +int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, + const int CC_id, + const uint8_t gNB_index, + const frame_t frame, + const sub_frame_t sub_frame, + const rnti_t rnti, + const channel_t channel, + const uint8_t* pduP, + const sdu_size_t pdu_len) { return 0; } diff --git a/openair1/SIMULATION/NR_PHY/nr_dummy_functions_prach.c b/openair1/SIMULATION/NR_PHY/nr_dummy_functions_prach.c deleted file mode 100644 index 71e2577ec3..0000000000 --- a/openair1/SIMULATION/NR_PHY/nr_dummy_functions_prach.c +++ /dev/null @@ -1,20 +0,0 @@ -int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { return(0); } -int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { return(0); } -int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return(0); } -int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return(0); } -int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); } -int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req){ return(0); } -int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req){ return(0); } -int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req){ return(0); } -int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) { return(0); } -int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind) { return(0); } -int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind) { return(0); } -int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { return(0); } -int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { return(0); } - -int32_t get_uldl_offset(int nr_bandP) { return(0); } -NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {return(NULL);} -int dummy_nr_ue_dl_indication(nr_downlink_indication_t *dl_info) { return(0); } -int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); } - - diff --git a/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h b/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h index c556f66361..e5ed3aaf00 100644 --- a/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h +++ b/openair1/SIMULATION/NR_PHY/nr_unitary_defs.h @@ -33,9 +33,12 @@ #ifndef __NR_UNITARY_DEFS__H__ #define __NR_UNITARY_DEFS__H__ +#include "NR_ServingCellConfigCommon.h" +#include "NR_ServingCellConfig.h" + int oai_exit=0; -void exit_function(const char* file, const char* function, const int line, const char *s) { +void exit_function(const char* file, const char* function, const int line, const char *s, const int assert) { const char * msg= s==NULL ? "no comment": s; printf("Exiting at: %s:%d %s(), %s\n", file, line, function, msg); exit(-1); @@ -64,9 +67,5 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap); void prepare_scc(NR_ServingCellConfigCommon_t *scc); void prepare_scd(NR_ServingCellConfig_t *scd); uint32_t ngap_generate_gNB_id(void) {return 0;} -void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) { return;} -void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port) { return;} -void configure_nr_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) { return;} -void configure_nr_nfapi_vnf(char *vnf_addr, int vnf_p5_port) { return;} #endif diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index 42fa279018..ee67e8d52e 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -38,7 +38,7 @@ #include "PHY/MODULATION/modulation_eNB.h" #include "PHY/MODULATION/modulation_UE.h" #include "PHY/MODULATION/nr_modulation.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "PHY/NR_TRANSPORT/nr_transport_proto.h" #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" #include "PHY/NR_UE_ESTIMATION/nr_estimation.h" @@ -47,10 +47,10 @@ #include "openair1/SIMULATION/TOOLS/sim.h" #include "openair1/SIMULATION/RF/rf.h" #include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" -#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c" #include "openair1/PHY/MODULATION/nr_modulation.h" #include #include +#include "nfapi/oai_integration/vendor_ext.h" //#define DEBUG_NR_PBCHSIM PHY_VARS_gNB *gNB; @@ -80,6 +80,23 @@ nrUE_params_t *get_nrUE_params(void) { } void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {} +NR_IF_Module_t *NR_IF_Module_init(int Mod_id) { return (NULL); } +nfapi_mode_t nfapi_getmode(void) { return NFAPI_MODE_UNKNOWN; } + +void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind, + fapi_nr_dci_indication_t *dci_ind, + fapi_nr_rx_indication_t *rx_ind, + UE_nr_rxtx_proc_t *proc, + PHY_VARS_NR_UE *ue, + void *phy_data) {} +void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind, + uint8_t pdu_type, + PHY_VARS_NR_UE *ue, + NR_UE_DLSCH_t *dlsch0, + NR_UE_DLSCH_t *dlsch1, + uint16_t n_pdus, + UE_nr_rxtx_proc_t *proc, + void *typeSpecific ) {} int nr_ue_pdcch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, @@ -619,12 +636,12 @@ int main(int argc, char **argv) for (aa=0; aaframe_parms.nb_antennas_tx; aa++) { if (cyclic_prefix_type == 1) { apply_nr_rotation(frame_parms, - (int16_t*)gNB->common_vars.txdataF[aa], + gNB->common_vars.txdataF[aa], slot, 0, 12); - PHY_ofdm_mod(gNB->common_vars.txdataF[aa], + PHY_ofdm_mod((int *)gNB->common_vars.txdataF[aa], &txdata[aa][frame_parms->get_samples_slot_timestamp(slot,frame_parms,0)], frame_parms->ofdm_symbol_size, 12, @@ -632,7 +649,7 @@ int main(int argc, char **argv) CYCLIC_PREFIX); } else { apply_nr_rotation(frame_parms, - (int16_t*)gNB->common_vars.txdataF[aa], + gNB->common_vars.txdataF[aa], slot, 0, 14); @@ -642,14 +659,14 @@ int main(int argc, char **argv) 14, frame_parms);*/ - PHY_ofdm_mod(gNB->common_vars.txdataF[aa], + PHY_ofdm_mod((int *)gNB->common_vars.txdataF[aa], (int*)&txdata[aa][frame_parms->get_samples_slot_timestamp(slot,frame_parms,0)], frame_parms->ofdm_symbol_size, 1, frame_parms->nb_prefix_samples0, CYCLIC_PREFIX); - PHY_ofdm_mod(&gNB->common_vars.txdataF[aa][frame_parms->ofdm_symbol_size], + PHY_ofdm_mod((int *)&gNB->common_vars.txdataF[aa][frame_parms->ofdm_symbol_size], (int*)&txdata[aa][frame_parms->get_samples_slot_timestamp(slot,frame_parms,0)+frame_parms->nb_prefix_samples0+frame_parms->ofdm_symbol_size], frame_parms->ofdm_symbol_size, 13, diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index cb7094fe77..d72bf2ed4f 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -41,19 +41,18 @@ #include "PHY/MODULATION/nr_modulation.h" #include "PHY/MODULATION/modulation_eNB.h" #include "PHY/MODULATION/modulation_UE.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "PHY/NR_TRANSPORT/nr_transport_proto.h" #include "PHY/NR_TRANSPORT/nr_transport_common_proto.h" #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" #include "nr_unitary_defs.h" -#include "OCG_vars.h" #include #include #include #include -//#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c" #include #include "executables/nr-uesoftmodem.h" +#include "nfapi/oai_integration/vendor_ext.h" #define NR_PRACH_DEBUG 1 #define PRACH_WRITE_OUTPUT_DEBUG 1 @@ -76,20 +75,13 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; uint16_t sl_ahead = 0; uint32_t N_RB_DL = 106; -//void dump_nr_prach_config(NR_DL_FRAME_PARMS *frame_parms,uint8_t subframe); +NR_IF_Module_t *NR_IF_Module_init(int Mod_id) { return (NULL); } +nfapi_mode_t nfapi_getmode(void) { return NFAPI_MODE_UNKNOWN; } +void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) { } /* temporary dummy implem of get_softmodem_optmask, till basic simulators implemented as device */ uint64_t get_softmodem_optmask(void) {return 0;} softmodem_params_t *get_softmodem_params(void) {return 0;} -int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); } -int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req){ return(0); } -int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req){ return(0); } -int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req){ return(0); } -int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) { return(0); } -int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind) { return(0); } -int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind) { return(0); } -int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { return(0); } -int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { return(0); } //Fixme: Uniq dirty DU instance, by global var, datamodel need better management instance_t DUuniqInstance=0; instance_t CUuniqInstance=0; @@ -99,29 +91,6 @@ int nr_derive_key_ng_ran_star(uint16_t pci, uint64_t nr_arfcn_dl, const uint8_t return 0; } -void -rrc_data_ind( - const protocol_ctxt_t *const ctxt_pP, - const rb_id_t Srb_id, - const sdu_size_t sdu_sizeP, - const uint8_t *const buffer_pP -) -{ -} - -int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, - const int CC_id, - const uint8_t gNB_index, - const frame_t frame, - const sub_frame_t sub_frame, - const rnti_t rnti, - const channel_t channel, - const uint8_t* pduP, - const sdu_size_t pdu_len) -{ - return 0; -} - void nr_rrc_ue_generate_RRCSetupRequest(module_id_t module_id, const uint8_t gNB_index) { return; @@ -137,29 +106,12 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP, return 0; } -// Dummy function to avoid linking error at compilation of nr-prachsim -int is_x2ap_enabled(void) -{ - return 0; -} - int nr_derive_key(int alg_type, uint8_t alg_id, const uint8_t key[32], uint8_t **out) { return 0; } -int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, - int CC_idP, - int UE_id, - rnti_t rntiP, - const uint8_t *sduP, - sdu_size_t sdu_lenP, - const uint8_t *sdu2P, - sdu_size_t sdu2_lenP) { - return 0; -} - nrUE_params_t nrUE_params; nrUE_params_t *get_nrUE_params(void) { @@ -177,7 +129,8 @@ int main(int argc, char **argv){ double sigma2, sigma2_dB = 0, SNR, snr0 = -2.0, snr1 = 0.0, ue_speed0 = 0.0, ue_speed1 = 0.0; double **s_re, **s_im, **r_re, **r_im, iqim = 0.0, delay_avg = 0, ue_speed = 0, fs=-1, bw; - int i, l, aa, aarx, **txdata, trial, n_frames = 1, prach_start, rx_prach_start; //, ntrials=1; + int i, l, aa, aarx, trial, n_frames = 1, prach_start, rx_prach_start; //, ntrials=1; + c16_t **txdata; int N_RB_UL = 106, delay = 0, NCS_config = 13, rootSequenceIndex = 1, threequarter_fs = 0, mu = 1, fd_occasion = 0, loglvl = OAILOG_INFO, numRA = 0, prachStartSymbol = 0; uint8_t snr1set = 0, ue_speed1set = 0, transmission_mode = 1, n_tx = 1, n_rx = 1, awgn_flag = 0, msg1_frequencystart = 0, num_prach_fd_occasions = 1, prach_format=0; uint8_t config_index = 98, prach_sequence_length = 1, restrictedSetConfig = 0, N_dur, N_t_slot, start_symbol; @@ -807,8 +760,8 @@ int main(int argc, char **argv){ for (l = 0; l < frame_parms->symbols_per_slot; l++) { for (aa = 0; aa < frame_parms->nb_antennas_rx; aa++) { nr_slot_fep_ul(frame_parms, - ru->common.rxdata[aa], - ru->common.rxdataF[aa], + (int32_t *)ru->common.rxdata[aa], + (int32_t *)ru->common.rxdataF[aa], l, slot, ru->N_TA_offset); diff --git a/openair1/SIMULATION/NR_PHY/pucchsim.c b/openair1/SIMULATION/NR_PHY/pucchsim.c index 498b31ec8f..68ba96ab88 100644 --- a/openair1/SIMULATION/NR_PHY/pucchsim.c +++ b/openair1/SIMULATION/NR_PHY/pucchsim.c @@ -38,7 +38,7 @@ #include "PHY/MODULATION/modulation_eNB.h" #include "PHY/MODULATION/modulation_UE.h" #include "PHY/NR_ESTIMATION/nr_ul_estimation.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "PHY/NR_TRANSPORT/nr_transport_proto.h" #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" #include "PHY/NR_UE_TRANSPORT/pucch_nr.h" @@ -46,8 +46,8 @@ #include "openair1/SIMULATION/TOOLS/sim.h" #include "openair1/SIMULATION/RF/rf.h" #include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" -#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c" #include "executables/nr-uesoftmodem.h" +#include "nfapi/oai_integration/vendor_ext.h" THREAD_STRUCT thread_struct; PHY_VARS_gNB *gNB; @@ -66,7 +66,12 @@ const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1}; // needed for some functions PHY_VARS_NR_UE * PHY_vars_UE_g[1][1]={{NULL}}; +uint64_t get_softmodem_optmask(void) {return 0;} +softmodem_params_t *get_softmodem_params(void) {return 0;} + void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {} +NR_IF_Module_t *NR_IF_Module_init(int Mod_id) { return (NULL); } +nfapi_mode_t nfapi_getmode(void) { return NFAPI_MODE_UNKNOWN; } nrUE_params_t nrUE_params={0}; @@ -410,7 +415,7 @@ int main(int argc, char **argv) /* RU handles rxdataF, and gNB just has a pointer. Here, we don't have an RU, * so we need to allocate that memory as well. */ for (i = 0; i < n_rx; i++) - gNB->common_vars.rxdataF[i] = malloc16_clear(gNB->frame_parms.samples_per_frame_wCP*sizeof(int32_t)); + gNB->common_vars.rxdataF[i] = malloc16_clear(gNB->frame_parms.samples_per_frame_wCP*sizeof(c16_t)); double fs,txbw,rxbw; uint32_t samples; @@ -518,7 +523,7 @@ int main(int argc, char **argv) ack_nack_errors=0; sr_errors=0; n_errors = 0; - int **txdataF = gNB->common_vars.txdataF; + c16_t **txdataF = gNB->common_vars.txdataF; for (trial=0; trialofdm_symbol_size*sizeof(int)); @@ -533,7 +538,7 @@ int main(int argc, char **argv) // SNR Computation // standard says: SNR = S / N, where S is the total signal energy, N is the noise energy in the transmission bandwidth (i.e. N_RB_DL resource blocks) // txlev = S. - int txlev = signal_energy(&txdataF[0][startingSymbolIndex*frame_parms->ofdm_symbol_size], frame_parms->ofdm_symbol_size); + int txlev = signal_energy((int32_t *)&txdataF[0][startingSymbolIndex*frame_parms->ofdm_symbol_size], frame_parms->ofdm_symbol_size); // sigma2 is variance per dimension, so N/(N_RB*12) // so, sigma2 = N/(N_RB_DL*12) => (S/SNR)/(N_RB*12) @@ -543,7 +548,7 @@ int main(int argc, char **argv) if (n_trials==1) printf("txlev %d (%f dB), offset %d, sigma2 %f ( %f dB)\n",txlev,10*log10(txlev),startingSymbolIndex*frame_parms->ofdm_symbol_size,sigma2,sigma2_dB); - c16_t **rxdataF = (struct complex16 **)gNB->common_vars.rxdataF; + c16_t **rxdataF = gNB->common_vars.rxdataF; for (int symb=0; symbframe_parms.symbols_per_slot;symb++) { if (symb= startingSymbolIndex+nrofSymbols) { int i0 = symb*gNB->frame_parms.ofdm_symbol_size; @@ -584,7 +589,7 @@ int main(int argc, char **argv) rxdataF[aarx][i].r = (int16_t)(100.0*(rxr + nr)/sqrt((double)txlev)); rxdataF[aarx][i].i=(int16_t)(100.0*(rxi + ni)/sqrt((double)txlev)); - if (n_trials==1 && abs(txr) > 0) printf("symb %d, re %d , aarx %d : txr %f, txi %f, chr %f, chi %f, nr %f, ni %f, rxr %f, rxi %f => %d,%d\n", + if (n_trials==1 && fabs(txr) > 0) printf("symb %d, re %d , aarx %d : txr %f, txi %f, chr %f, chi %f, nr %f, ni %f, rxr %f, rxi %f => %d,%d\n", symb, re, aarx, txr,txi, UE2gNB->chF[aarx][re].r,UE2gNB->chF[aarx][re].i, nr,ni, rxr,rxi, @@ -664,7 +669,7 @@ int main(int argc, char **argv) free(uci_pdu.harq); } else if (format==1) { - nr_decode_pucch1((int32_t **)rxdataF,PUCCH_GroupHopping,hopping_id, + nr_decode_pucch1((c16_t **)rxdataF,PUCCH_GroupHopping,hopping_id, &(payload_received),frame_parms,amp,nr_slot_tx, m0,nrofSymbols,startingSymbolIndex,startingPRB, startingPRB_intraSlotHopping,timeDomainOCC,nr_bit); diff --git a/openair1/SIMULATION/NR_PHY/ulschsim.c b/openair1/SIMULATION/NR_PHY/ulschsim.c index 0227788877..325611d68d 100644 --- a/openair1/SIMULATION/NR_PHY/ulschsim.c +++ b/openair1/SIMULATION/NR_PHY/ulschsim.c @@ -33,7 +33,7 @@ #include "PHY/defs_nr_common.h" #include "PHY/defs_nr_UE.h" #include "PHY/defs_gNB.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "PHY/NR_REFSIG/refsig_defs_ue.h" #include "PHY/MODULATION/modulation_eNB.h" #include "PHY/MODULATION/modulation_UE.h" @@ -45,10 +45,10 @@ #include "openair1/SIMULATION/TOOLS/sim.h" #include "openair1/SIMULATION/RF/rf.h" #include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" -#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c" #include "common/utils/threadPool/thread-pool.h" #include "openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h" #include "executables/nr-uesoftmodem.h" +#include "nfapi/oai_integration/vendor_ext.h" //#define DEBUG_NR_ULSCHSIM @@ -59,7 +59,14 @@ RAN_CONTEXT_t RC; int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; uint64_t downlink_frequency[MAX_NUM_CCs][4]; +uint64_t get_softmodem_optmask(void) {return 0;} +static softmodem_params_t softmodem_params; +softmodem_params_t *get_softmodem_params(void) { + return &softmodem_params; +} void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {} +NR_IF_Module_t *NR_IF_Module_init(int Mod_id) { return (NULL); } +nfapi_mode_t nfapi_getmode(void) { return NFAPI_MODE_UNKNOWN; } uint8_t const nr_rv_round_map[4] = {0, 2, 3, 1}; const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1}; diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 8685626284..4ec8fc3cca 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -35,7 +35,7 @@ #include "PHY/defs_nr_UE.h" #include "PHY/phy_vars_nr_ue.h" #include "PHY/types.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "PHY/MODULATION/modulation_UE.h" #include "PHY/MODULATION/nr_modulation.h" #include "PHY/NR_REFSIG/dmrs_nr.h" @@ -54,7 +54,6 @@ #include "openair1/SIMULATION/RF/rf.h" #include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h" #include "openair2/RRC/NR/MESSAGES/asn1_msg.h" -//#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c" #include "openair2/LAYER2/NR_MAC_UE/mac_proto.h" #include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h" #include "common/utils/threadPool/thread-pool.h" @@ -102,46 +101,6 @@ int nr_derive_key_ng_ran_star(uint16_t pci, uint64_t nr_arfcn_dl, const uint8_t extern void fix_scd(NR_ServingCellConfig_t *scd);// forward declaration -int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, - const int CC_id, - const uint8_t gNB_index, - const frame_t frame, - const sub_frame_t sub_frame, - const rnti_t rnti, - const channel_t channel, - const uint8_t* pduP, - const sdu_size_t pdu_len) -{ - return 0; -} - -int generate_dlsch_header(unsigned char *mac_header, - unsigned char num_sdus, - unsigned short *sdu_lengths, - unsigned char *sdu_lcids, - unsigned char drx_cmd, - unsigned short timing_advance_cmd, - unsigned char *ue_cont_res_id, - unsigned char short_padding, - unsigned short post_padding){return 0;} - -void -rrc_data_ind( - const protocol_ctxt_t *const ctxt_pP, - const rb_id_t Srb_id, - const sdu_size_t sdu_sizeP, - const uint8_t *const buffer_pP -) -{ -} - - -// Dummy function to avoid linking error at compilation of nr-ulsim -int is_x2ap_enabled(void) -{ - return 0; -} - void nr_rrc_ue_generate_RRCSetupRequest(module_id_t module_id, const uint8_t gNB_index) { return; @@ -170,18 +129,6 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP, nr_bler_struct nr_bler_data[NR_NUM_MCS]; -//nFAPI P7 dummy functions - -int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); } -int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req){ return(0); } -int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req){ return(0); } -int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req){ return(0); } -int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) { return(0); } -int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind) { return(0); } -int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind) { return(0); } -int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { return(0); } -int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { return(0); } - int nr_derive_key(int alg_type, uint8_t alg_id, const uint8_t key[32], uint8_t **out) { @@ -707,10 +654,10 @@ int main(int argc, char **argv) gNB->if_inst->NR_PHY_config_req = nr_phy_config_request; // common configuration - rrc_mac_config_req_gNB(0, conf.pdsch_AntennaPorts, n_rx, 0, 6, scc, &rrc.carrier.mib, rrc.carrier.siblock1, 0, 0, NULL); + nr_mac_config_scc(RC.nrmac[0], conf.pdsch_AntennaPorts, n_tx, 0, 6, scc); + nr_mac_config_mib(RC.nrmac[0], &rrc.carrier.mib); // UE dedicated configuration - rrc_mac_config_req_gNB(0, conf.pdsch_AntennaPorts, n_rx, 0, 6, scc, &rrc.carrier.mib, rrc.carrier.siblock1, 1, - secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity, secondaryCellGroup); + nr_mac_add_test_ue(RC.nrmac[0], secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity, secondaryCellGroup); frame_parms->nb_antennas_tx = 1; frame_parms->nb_antennas_rx = n_rx; nfapi_nr_config_request_scf_t *cfg = &gNB->gNB_config; @@ -1040,6 +987,12 @@ int main(int argc, char **argv) double berStats[16] = {0}; clear_pusch_stats(gNB); + + uint64_t sum_pusch_delay = 0; + int min_pusch_delay = INT_MAX; + int max_pusch_delay = INT_MIN; + int delay_pusch_est_count = 0; + for (trial = 0; trial < n_trials; trial++) { uint8_t round = 0; @@ -1319,8 +1272,8 @@ int main(int argc, char **argv) for(uint8_t symbol = 0; symbol < (gNB->frame_parms.Ncp == EXTENDED ? 12 : 14); symbol++) { for (int aa = 0; aa < gNB->frame_parms.nb_antennas_rx; aa++) nr_slot_fep_ul(&gNB->frame_parms, - (int32_t*) rxdata[aa], - gNB->common_vars.rxdataF[aa], + (int32_t *)rxdata[aa], + (int32_t *)gNB->common_vars.rxdataF[aa], symbol, slot, 0); @@ -1552,6 +1505,12 @@ int main(int argc, char **argv) roundStats += ((float)round); if (!crc_status) effRate += ((double)TBS) / (double)round; + + sum_pusch_delay += gNB->measurements.delay[UE_id].pusch_est_delay; + min_pusch_delay = gNB->measurements.delay[UE_id].pusch_est_delay < min_pusch_delay ? gNB->measurements.delay[UE_id].pusch_est_delay : min_pusch_delay; + max_pusch_delay = gNB->measurements.delay[UE_id].pusch_est_delay > max_pusch_delay ? gNB->measurements.delay[UE_id].pusch_est_delay : max_pusch_delay; + delay_pusch_est_count++; + } // trial loop roundStats/=((float)n_trials); @@ -1581,6 +1540,12 @@ int main(int argc, char **argv) printf(",%e", berStats[r]); printf(") Avg round %.2f, Eff Rate %.4f bits/slot, Eff Throughput %.2f, TBS %u bits/slot\n", roundStats,effRate,effTP,TBS); + printf("DMRS-PUSCH delay estimation: min %i, max %i, average %f\n", + min_pusch_delay >> 1, max_pusch_delay >> 1, (double)sum_pusch_delay / (2 * delay_pusch_est_count)); + + printf("*****************************************\n"); + printf("\n"); + FILE *fd=fopen("nr_ulsim.log","w"); if (fd == NULL) { printf("Problem with filename %s\n", "nr_ulsim.log"); @@ -1589,9 +1554,6 @@ int main(int argc, char **argv) dump_pusch_stats(fd,gNB); fclose(fd); - printf("*****************************************\n"); - printf("\n"); - if (print_perf==1) { printDistribution(&gNB->phy_proc_rx,table_rx,"Total PHY proc rx"); printStatIndent(&gNB->rx_pusch_stats,"RX PUSCH time"); diff --git a/openair1/SIMULATION/TOOLS/channel_sim.c b/openair1/SIMULATION/TOOLS/channel_sim.c index 7a1a77d3e1..048cf5de64 100644 --- a/openair1/SIMULATION/TOOLS/channel_sim.c +++ b/openair1/SIMULATION/TOOLS/channel_sim.c @@ -33,13 +33,10 @@ #include "PHY/phy_extern.h" #include "PHY/phy_extern_ue.h" -#include "LAYER2/MAC/mac.h" -#include "LAYER2/MAC/mac_extern.h" #include "common/utils/LOG/log.h" -#include "RRC/LTE/rrc_extern.h" #include "PHY_INTERFACE/phy_interface_extern.h" -#include "UTIL/OCG/OCG.h" #include "UTIL/OPT/opt.h" // to test OPT +#include "common/ran_context.h" #define RF diff --git a/openair1/SIMULATION/TOOLS/multipath_channel.c b/openair1/SIMULATION/TOOLS/multipath_channel.c index 4330219706..22cd5ce01c 100644 --- a/openair1/SIMULATION/TOOLS/multipath_channel.c +++ b/openair1/SIMULATION/TOOLS/multipath_channel.c @@ -220,15 +220,18 @@ void __attribute__ ((no_sanitize_address)) multipath_channel(channel_desc_t *des rx_tmp.r += (tx.r * chan[l].r) - (tx.i * chan[l].i); rx_tmp.i += (tx.i * chan[l].r) + (tx.r * chan[l].i); } + #if 0 if (i==0 && log_channel == 1) { printf("channel[%d][%d][%d] = %f dB \t(%e, %e)\n", ii, j, l, 10 * log10(pow(chan[l].r, 2.0) + pow(chan[l].i, 2.0)), chan[l].r, chan[l].i); } + #endif } //l } // j - +#if 0 if (desc->max_Doppler != 0.0) rx_tmp = cdMul(rx_tmp, cexp_doppler[i]); +#endif #ifdef DOPPLER_DEBUG printf("[k %2i] cexp_doppler = (%7.4f, %7.4f), abs(cexp_doppler) = %.4f\n", diff --git a/openair1/SIMULATION/TOOLS/random_channel.c b/openair1/SIMULATION/TOOLS/random_channel.c index 4fe1d8a84b..1aa39a3ef9 100644 --- a/openair1/SIMULATION/TOOLS/random_channel.c +++ b/openair1/SIMULATION/TOOLS/random_channel.c @@ -61,11 +61,11 @@ static telnetshell_cmddef_t channelmod_cmdarray[] = { {"show predef", "", channelmod_show_cmd, {NULL}, TELNETSRV_CMDFLAG_WEBSRVONLY, NULL}, {"show current", "", channelmod_show_cmd, {NULL}, TELNETSRV_CMDFLAG_WEBSRVONLY, NULL}, {"modify", " ", channelmod_modify_cmd, {NULL}, TELNETSRV_CMDFLAG_TELNETONLY, NULL}, - {"show params", " ", channelmod_modify_cmd, {webfunc_getdata : get_currentchannels_type}, TELNETSRV_CMDFLAG_GETWEBTBLDATA | TELNETSRV_CMDFLAG_WEBSRV_SETRETURNTBL, NULL}, + {"show params", " ", channelmod_modify_cmd, {.webfunc_getdata = get_currentchannels_type}, TELNETSRV_CMDFLAG_GETWEBTBLDATA | TELNETSRV_CMDFLAG_WEBSRV_SETRETURNTBL, NULL}, {"show channelid", HELP_WEBIF_MODIFCHAN_STRING, channelmod_modify_cmd, - {webfunc_getdata : get_channel_params}, + {.webfunc_getdata = get_channel_params}, TELNETSRV_CMDFLAG_NEEDPARAM | TELNETSRV_CMDFLAG_WEBSRVONLY | TELNETSRV_CMDFLAG_GETWEBTBLDATA, NULL}, {"", "", NULL, {NULL}, 0, NULL}, diff --git a/openair1/SIMULATION/TOOLS/sim.h b/openair1/SIMULATION/TOOLS/sim.h index e530a3a3d0..47cb7fe066 100644 --- a/openair1/SIMULATION/TOOLS/sim.h +++ b/openair1/SIMULATION/TOOLS/sim.h @@ -262,12 +262,14 @@ typedef enum { #define CHANNELMOD_MODELLIST_PARANAME "modellist" #define CHANNELMOD_HELP_MODELLIST " channel list name in config file describing the model type and its parameters\n" +// clang-format off #define CHANNELMOD_PARAMS_DESC { \ - {"s" , CONFIG_HLP_SNR, PARAMFLAG_CMDLINE_NOPREFIXENABLED, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0},\ - {"sinr_dB", NULL, 0, dblptr:&sinr_dB, defdblval:0 , TYPE_DOUBLE, 0},\ - {"max_chan", "Max number of runtime models", 0, uptr:&max_chan, defintval:10, TYPE_UINT, 0},\ - {CHANNELMOD_MODELLIST_PARANAME, CHANNELMOD_HELP_MODELLIST, 0, strptr:&modellist_name, defstrval:"DefaultChannelList", TYPE_STRING, 0},\ - } + {"s" , CONFIG_HLP_SNR, PARAMFLAG_CMDLINE_NOPREFIXENABLED, .dblptr=&snr_dB, .defdblval=25, TYPE_DOUBLE, 0}, \ + {"sinr_dB", NULL, 0, .dblptr=&sinr_dB, .defdblval=0 , TYPE_DOUBLE, 0}, \ + {"max_chan", "Max number of runtime models", 0, .uptr=&max_chan, .defintval=10, TYPE_UINT, 0}, \ + {CHANNELMOD_MODELLIST_PARANAME, CHANNELMOD_HELP_MODELLIST, 0, .strptr=&modellist_name, .defstrval="DefaultChannelList", TYPE_STRING, 0}, \ +} +// clang-format on /* parameters for one model */ #define CHANNELMOD_MODEL_NAME_PNAME "model_name" @@ -278,15 +280,17 @@ typedef enum { #define CHANNELMOD_MODEL_CO_PNAME "offset" #define CHANNELMOD_MODEL_DT_PNAME "ds_tdl" +// clang-format off #define CHANNELMOD_MODEL_PARAMS_DESC { \ - {CHANNELMOD_MODEL_NAME_PNAME, "name of the model\n", 0, strptr:NULL , defstrval:"", TYPE_STRING, 0 },\ - {CHANNELMOD_MODEL_TYPE_PNAME, "name of the model type\n", 0, strptr:NULL , defstrval:"AWGN", TYPE_STRING, 0 },\ - {CHANNELMOD_MODEL_PL_PNAME, "channel path loss in dB\n", 0, dblptr:NULL, defdblval:0, TYPE_DOUBLE, 0 },\ - {CHANNELMOD_MODEL_NP_PNAME, "channel noise in dB\n", 0, dblptr:NULL, defdblval:-50, TYPE_DOUBLE, 0 },\ - {CHANNELMOD_MODEL_FF_PNAME, "channel forget factor ((0 to 1)\n", 0, dblptr:NULL, defdblval:0, TYPE_DOUBLE, 0 },\ - {CHANNELMOD_MODEL_CO_PNAME, "channel offset in samps\n", 0, iptr:NULL, defintval:0, TYPE_INT, 0 },\ - {CHANNELMOD_MODEL_DT_PNAME, "delay spread for TDL models\n", 0, dblptr:NULL, defdblval:0, TYPE_DOUBLE, 0 }\ + {CHANNELMOD_MODEL_NAME_PNAME, "name of the model\n", 0, .strptr=NULL , .defstrval="", TYPE_STRING, 0 }, \ + {CHANNELMOD_MODEL_TYPE_PNAME, "name of the model type\n", 0, .strptr=NULL , .defstrval="AWGN", TYPE_STRING, 0 }, \ + {CHANNELMOD_MODEL_PL_PNAME, "channel path loss in dB\n", 0, .dblptr=NULL, .defdblval=0, TYPE_DOUBLE, 0 }, \ + {CHANNELMOD_MODEL_NP_PNAME, "channel noise in dB\n", 0, .dblptr=NULL, .defdblval=-50, TYPE_DOUBLE, 0 }, \ + {CHANNELMOD_MODEL_FF_PNAME, "channel forget factor ((0 to 1)\n", 0, .dblptr=NULL, .defdblval=0, TYPE_DOUBLE, 0 }, \ + {CHANNELMOD_MODEL_CO_PNAME, "channel offset in samps\n", 0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, \ + {CHANNELMOD_MODEL_DT_PNAME, "delay spread for TDL models\n", 0, .dblptr=NULL, .defdblval=0, TYPE_DOUBLE, 0 }, \ } +// clang-format on #include "common/platform_constants.h" diff --git a/openair2/COMMON/e1ap_messages_types.h b/openair2/COMMON/e1ap_messages_types.h index 941d95b044..7a88344efc 100644 --- a/openair2/COMMON/e1ap_messages_types.h +++ b/openair2/COMMON/e1ap_messages_types.h @@ -24,6 +24,7 @@ #ifndef E1AP_MESSAGES_TYPES_H #define E1AP_MESSAGES_TYPES_H +#include "common/ngran_types.h" #include "f1ap_messages_types.h" #include "ngap_messages_types.h" diff --git a/openair2/COMMON/ngap_messages_types.h b/openair2/COMMON/ngap_messages_types.h index 70412e8368..87426eff98 100644 --- a/openair2/COMMON/ngap_messages_types.h +++ b/openair2/COMMON/ngap_messages_types.h @@ -29,7 +29,7 @@ #ifndef NGAP_MESSAGES_TYPES_H_ #define NGAP_MESSAGES_TYPES_H_ - +#include "common/ngran_types.h" #include "LTE_asn_constant.h" //-------------------------------------------------------------------------------------------// // Defines to access message fields. @@ -49,7 +49,7 @@ #define NGAP_UE_CTXT_MODIFICATION_RESP(mSGpTR) (mSGpTR)->ittiMsg.ngap_ue_ctxt_modification_resp #define NGAP_UE_CTXT_MODIFICATION_FAIL(mSGpTR) (mSGpTR)->ittiMsg.ngap_ue_ctxt_modification_fail #define NGAP_PDUSESSION_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.ngap_pdusession_setup_resp -#define NGAP_PDUSESSION_SETUP_FAIL(mSGpTR) (mSGpTR)->ittiMsg.ngap_pdusession_setup_req_fail +#define NGAP_PDUSESSION_SETUP_FAIL(mSGpTR) (mSGpTR)->ittiMsg.ngap_pdusession_setup_request_fail #define NGAP_PDUSESSION_MODIFY_RESP(mSGpTR) (mSGpTR)->ittiMsg.ngap_pdusession_modify_resp #define NGAP_PATH_SWITCH_REQ(mSGpTR) (mSGpTR)->ittiMsg.ngap_path_switch_req #define NGAP_PATH_SWITCH_REQ_ACK(mSGpTR) (mSGpTR)->ittiMsg.ngap_path_switch_req_ack @@ -194,6 +194,13 @@ typedef enum ngap_rrc_establishment_cause_e { NGAP_RRC_CAUSE_LAST } ngap_rrc_establishment_cause_t; +typedef struct pdusession_level_qos_parameter_s { + uint8_t qfi; + uint64_t fiveQI; + fiveQI_type_t fiveQI_type; + ngap_allocation_retention_priority_t allocation_retention_priority; +} pdusession_level_qos_parameter_t; + typedef struct ngap_guami_s { uint16_t mcc; uint16_t mnc; @@ -242,7 +249,7 @@ typedef struct ngap_nas_pdu_s { uint8_t *buffer; /* Length of the octet string */ uint32_t length; -} ngap_nas_pdu_t, ngap_ue_radio_cap_t; +} ngap_pdu_t; typedef struct ngap_mobility_restriction_s{ ngap_plmn_identity_t serving_plmn; @@ -267,43 +274,22 @@ typedef struct ngap_transport_layer_addr_s { uint8_t buffer[20]; // in network byte order } ngap_transport_layer_addr_t; -#define TRANSPORT_LAYER_ADDR_COPY(dEST,sOURCE) \ - do { \ - AssertFatal(sOURCE.len <= 20); \ - memcpy(dEST.buffer, sOURCE.buffer, sOURCE.len); \ - dEST.length = sOURCE.length; \ - } while (0) - -typedef enum { - non_dynamic, - dynamic -} fiveQI_type_t; - -typedef struct pdusession_level_qos_parameter_s { - uint8_t qfi; - uint64_t fiveQI; - fiveQI_type_t fiveQI_type; - ngap_allocation_retention_priority_t allocation_retention_priority; -} pdusession_level_qos_parameter_t; - typedef struct pdusession_s { /* Unique pdusession_id for the UE. */ - uint8_t pdusession_id; - - uint8_t nb_qos; + int pdusession_id; + ngap_pdu_t nas_pdu; + ngap_pdu_t pdusessionTransfer; + uint8_t nb_qos; /* Quality of service for this pdusession */ pdusession_level_qos_parameter_t qos[QOSFLOW_MAX_VALUE]; - /* The NAS PDU should be forwarded by the RRC layer to the NAS layer */ - ngap_nas_pdu_t nas_pdu; /* The transport layer address for the IP packets */ - ngap_transport_layer_addr_t upf_addr; + ngap_transport_layer_addr_t upf_addr; /* S-GW Tunnel endpoint identifier */ - uint32_t gtp_teid; + uint32_t gtp_teid; /* Stores the DRB ID of the DRBs used by this PDU Session */ - uint8_t used_drbs[NGAP_MAX_DRBS_PER_UE]; + uint8_t used_drbs[NGAP_MAX_DRBS_PER_UE]; } pdusession_t; - typedef enum pdusession_qosflow_mapping_ind_e{ QOSFLOW_MAPPING_INDICATION_UL = 0, QOSFLOW_MAPPING_INDICATION_DL = 1, @@ -313,7 +299,7 @@ typedef enum pdusession_qosflow_mapping_ind_e{ typedef struct pdusession_associate_qosflow_s{ uint8_t qfi; pdusession_qosflow_mapping_ind_t qos_flow_mapping_ind; -}pdusession_associate_qosflow_t; +} pdusession_associate_qosflow_t; typedef struct pdusession_setup_s { /* Unique pdusession_id for the UE. */ @@ -332,36 +318,6 @@ typedef struct pdusession_setup_s { pdusession_associate_qosflow_t associated_qos_flows[QOSFLOW_MAX_VALUE]; } pdusession_setup_t; -typedef struct pdusession_tobe_added_s { - /* Unique pdusession_id for the UE. */ - uint8_t pdusession_id; - - /* Unique drb_ID for the UE. */ - uint8_t drb_ID; - - /* The transport layer address for the IP packets */ - ngap_transport_layer_addr_t upf_addr; - - /* S-GW Tunnel endpoint identifier */ - uint32_t gtp_teid; -} pdusession_tobe_added_t; - -typedef struct pdusession_admitted_tobe_added_s { - /* Unique pdusession_id for the UE. */ - uint8_t pdusession_id; - - /* Unique drb_ID for the UE. */ - uint8_t drb_ID; - - /* The transport layer address for the IP packets */ - ngap_transport_layer_addr_t gnb_addr; - - /* S-GW Tunnel endpoint identifier */ - uint32_t gtp_teid; -} pdusession_admitted_tobe_added_t; - - - typedef struct pdusession_tobeswitched_s { /* Unique pdusession_id for the UE. */ uint8_t pdusession_id; @@ -394,9 +350,12 @@ typedef enum ngap_Cause_e { NGAP_CAUSE_NAS, NGAP_CAUSE_PROTOCOL, NGAP_CAUSE_MISC, - /* Extensions may appear below */ - -} ngap_Cause_t; + NGAP_Cause_PR_choice_ExtensionS, + //Evilish manual duplicate of asn.1 grammar + //because it is human work, whereas it can be generated by machine + //and because humans manual copy creates bugs + //and we create multiple names for the same thing, that is a source of confusion +} ngap_Cause_t; typedef enum ngap_Cause_radio_network_e { NGAP_CAUSE_RADIO_NETWORK_UNSPECIFIED, @@ -453,7 +412,6 @@ typedef struct pdusession_failed_s { /* Unique pdusession_id for the UE. */ uint8_t pdusession_id; /* Cause of the failure */ - // cause_t cause; ngap_Cause_t cause; uint8_t cause_value; } pdusession_failed_t; @@ -541,7 +499,7 @@ typedef struct ngap_deregistered_gnb_ind_s { */ typedef struct ngap_nas_first_req_s { /* UE id for initial connection to NGAP */ - uint16_t ue_initial_id; + uint32_t gNB_ue_ngap_id; /* the chosen PLMN identity as index, see TS 36.331 6.2.2 RRC Connection * Setup Complete. This index here is zero-based, unlike the standard! */ @@ -551,7 +509,7 @@ typedef struct ngap_nas_first_req_s { ngap_rrc_establishment_cause_t establishment_cause; /* NAS PDU */ - ngap_nas_pdu_t nas_pdu; + ngap_pdu_t nas_pdu; /* If this flag is set NGAP layer is expecting the GUAMI. If = 0, * the temporary s-tmsi is used. @@ -561,15 +519,14 @@ typedef struct ngap_nas_first_req_s { typedef struct ngap_uplink_nas_s { /* Unique UE identifier within an gNB */ - uint32_t gNB_ue_ngap_id; - + uint32_t gNB_ue_ngap_id; /* NAS pdu */ - ngap_nas_pdu_t nas_pdu; + ngap_pdu_t nas_pdu; } ngap_uplink_nas_t; typedef struct ngap_ue_cap_info_ind_s { uint32_t gNB_ue_ngap_id; - ngap_ue_radio_cap_t ue_radio_cap; + ngap_pdu_t ue_radio_cap; } ngap_ue_cap_info_ind_t; typedef struct ngap_initial_context_setup_resp_s { @@ -594,7 +551,7 @@ typedef struct ngap_initial_context_setup_fail_s { typedef struct ngap_nas_non_delivery_ind_s { uint32_t gNB_ue_ngap_id; - ngap_nas_pdu_t nas_pdu; + ngap_pdu_t nas_pdu; /* TODO: add cause */ } ngap_nas_non_delivery_ind_t; @@ -621,33 +578,24 @@ typedef struct ngap_ue_ctxt_modification_resp_s { } ngap_ue_ctxt_modification_resp_t; typedef struct ngap_ue_release_complete_s { - uint32_t gNB_ue_ngap_id; - } ngap_ue_release_complete_t; //-------------------------------------------------------------------------------------------// // NGAP -> RRC messages typedef struct ngap_downlink_nas_s { /* UE id for initial connection to NGAP */ - uint16_t ue_initial_id; - - /* Unique UE identifier within an gNB */ - uint32_t gNB_ue_ngap_id; - + uint32_t gNB_ue_ngap_id; /* NAS pdu */ - ngap_nas_pdu_t nas_pdu; + ngap_pdu_t nas_pdu; } ngap_downlink_nas_t; typedef struct ngap_initial_context_setup_req_s { /* UE id for initial connection to NGAP */ - uint16_t ue_initial_id; - - /* gNB ue ngap id as initialized by NGAP layer */ uint32_t gNB_ue_ngap_id; - uint64_t amf_ue_ngap_id:40; + uint64_t amf_ue_ngap_id; /* UE aggregate maximum bitrate */ ngap_ambr_t ue_ambr; @@ -676,7 +624,7 @@ typedef struct ngap_initial_context_setup_req_s { /* Nas Pdu */ uint8_t nas_pdu_flag; - ngap_nas_pdu_t nas_pdu; + ngap_pdu_t nas_pdu; } ngap_initial_context_setup_req_t; @@ -702,17 +650,22 @@ typedef struct ngap_paging_ind_s { ngap_paging_priority_t paging_priority; } ngap_paging_ind_t; +typedef struct { + /* Unique pdusession_id for the UE. */ + int pdusession_id; + ngap_pdu_t nas_pdu; + ngap_pdu_t pdusessionTransfer; +} pdusession_setup_req_t; + typedef struct ngap_pdusession_setup_req_s { /* UE id for initial connection to NGAP */ - uint16_t ue_initial_id; + uint32_t gNB_ue_ngap_id; /* AMF UE id */ - uint64_t amf_ue_ngap_id:40; - - /* gNB ue ngap id as initialized by NGAP layer */ - uint32_t gNB_ue_ngap_id; + uint64_t amf_ue_ngap_id; /* S-NSSAI */ + // Fixme: illogical, nssai is part of each pdu session ngap_allowed_NSSAI_t allowed_nssai[8]; /* Number of pdusession to be setup in the list */ @@ -730,8 +683,7 @@ typedef struct ngap_pdusession_setup_req_s { } ngap_pdusession_setup_req_t; typedef struct ngap_pdusession_setup_resp_s { - uint32_t gNB_ue_ngap_id; - + uint32_t gNB_ue_ngap_id; /* Number of pdusession setup-ed in the list */ uint8_t nb_of_pdusessions; /* list of pdusession setup-ed by RRC layers */ @@ -744,7 +696,6 @@ typedef struct ngap_pdusession_setup_resp_s { } ngap_pdusession_setup_resp_t; typedef struct ngap_path_switch_req_s { - uint32_t gNB_ue_ngap_id; /* Number of pdusession setup-ed in the list */ @@ -754,13 +705,12 @@ typedef struct ngap_path_switch_req_s { pdusession_setup_t pdusessions_tobeswitched[NGAP_MAX_PDUSESSION]; /* AMF UE id */ - uint64_t amf_ue_ngap_id:40; + uint64_t amf_ue_ngap_id; ngap_guami_t ue_guami; uint16_t ue_initial_id; - - /* Security algorithms */ + /* Security algorithms */ ngap_security_capabilities_t security_capabilities; } ngap_path_switch_req_t; @@ -773,7 +723,7 @@ typedef struct ngap_path_switch_req_ack_s { uint32_t gNB_ue_ngap_id; /* AMF UE id */ - uint64_t amf_ue_ngap_id:40; + uint64_t amf_ue_ngap_id; /* UE aggregate maximum bitrate */ ngap_ambr_t ue_ambr; @@ -801,7 +751,7 @@ typedef struct ngap_pdusession_modification_ind_s { uint32_t gNB_ue_ngap_id; /* AMF UE id */ - uint64_t amf_ue_ngap_id:40; + uint64_t amf_ue_ngap_id; /* Number of pdusession setup-ed in the list */ uint8_t nb_of_pdusessions_tobemodified; @@ -830,10 +780,7 @@ typedef struct ngap_ue_release_command_s { typedef struct pdusession_release_s { /* Unique pdusession_id for the UE. */ uint8_t pdusession_id; - /* Octet string data */ - uint8_t *transfer_buffer; - /* Length of the octet string */ - uint32_t transfer_length; + ngap_pdu_t data; } pdusession_release_t; typedef struct ngap_ue_release_req_s { @@ -842,16 +789,13 @@ typedef struct ngap_ue_release_req_s { uint8_t nb_of_pdusessions; /* list of pdusession resource by RRC layers */ pdusession_release_t pdusessions[NGAP_MAX_PDUSESSION]; - ngap_Cause_t cause; + ngap_Cause_t cause; long cause_value; } ngap_ue_release_req_t, ngap_ue_release_resp_t; typedef struct ngap_pdusession_modify_req_s { - /* UE id for initial connection to NGAP */ - uint16_t ue_initial_id; - /* AMF UE id */ - uint64_t amf_ue_ngap_id:40; + uint64_t amf_ue_ngap_id; /* gNB ue ngap id as initialized by NGAP layer */ uint32_t gNB_ue_ngap_id; @@ -879,13 +823,13 @@ typedef struct ngap_pdusession_modify_resp_s { typedef struct ngap_pdusession_release_command_s { /* AMF UE id */ - uint64_t amf_ue_ngap_id:40; + uint64_t amf_ue_ngap_id; /* gNB ue ngap id as initialized by NGAP layer */ uint32_t gNB_ue_ngap_id; /* The NAS PDU should be forwarded by the RRC layer to the NAS layer */ - ngap_nas_pdu_t nas_pdu; + ngap_pdu_t nas_pdu; /* Number of pdusession to be released in the list */ uint8_t nb_pdusessions_torelease; @@ -897,7 +841,7 @@ typedef struct ngap_pdusession_release_command_s { typedef struct ngap_pdusession_release_resp_s { /* AMF UE id */ - uint64_t amf_ue_ngap_id:40; + uint64_t amf_ue_ngap_id; /* gNB ue ngap id as initialized by NGAP layer */ uint32_t gNB_ue_ngap_id; diff --git a/openair2/COMMON/platform_types.h b/openair2/COMMON/platform_types.h index 43c313ce0c..c3d5999b62 100644 --- a/openair2/COMMON/platform_types.h +++ b/openair2/COMMON/platform_types.h @@ -230,8 +230,7 @@ typedef struct protocol_ctxt_s { #define ENB_INSTANCE_TO_MODULE_ID( iNSTANCE )iNSTANCE //NR -#define GNB_MODULE_ID_TO_INSTANCE( mODULE_iD ) mODULE_iD -#define GNB_INSTANCE_TO_MODULE_ID( iNSTANCE )iNSTANCE +#define GNB_MODULE_ID_TO_INSTANCE(mODULE_iD) mODULE_iD #define MODULE_ID_TO_INSTANCE(mODULE_iD, iNSTANCE, eNB_fLAG) \ do { \ @@ -281,12 +280,12 @@ typedef struct protocol_ctxt_s { #define CHECK_CTXT_ARGS(CTXT_Pp) -#define exit_fun(msg) exit_function(__FILE__,__FUNCTION__,__LINE__,msg) +#define exit_fun(msg) exit_function(__FILE__, __FUNCTION__, __LINE__, "exit_fun", OAI_EXIT_NORMAL) #ifdef __cplusplus extern "C" { #endif -void exit_function(const char *file, const char *function, const int line, const char *s); +void exit_function(const char *file, const char *function, const int line, const char *s, const int assert); #ifdef __cplusplus } #endif diff --git a/openair2/COMMON/prs_nr_paramdef.h b/openair2/COMMON/prs_nr_paramdef.h index fe16b01fb2..a96e408673 100644 --- a/openair2/COMMON/prs_nr_paramdef.h +++ b/openair2/COMMON/prs_nr_paramdef.h @@ -47,9 +47,11 @@ /* PRS configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*----------------------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define PRS_GLOBAL_PARAMS_DESC { \ -{CONFIG_STRING_ACTIVE_GNBs, HELP_STRING_ACTIVE_GNBs, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0} \ + {CONFIG_STRING_ACTIVE_GNBs, HELP_STRING_ACTIVE_GNBs, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0} \ } +// clang-format on #define PRS_ACTIVE_GNBS_IDX 0 /*----------------------------------------------------------------------------------------------------------------------------------------------------*/ @@ -95,24 +97,26 @@ /* PRS configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*----------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define PRS_PARAMS_DESC { \ -{CONFIG_STRING_GNB_ID, HELP_STRING_GNB_ID, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{CONFIG_STRING_NUM_PRS_RESOURCES, HELP_STRING_NUM_PRS_RESOURCES, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{CONFIG_STRING_PRS_RESOURCE_SET_PERIOD_LIST, HELP_STRING_PRS_RESOURCE_SET_PERIOD_LIST, 0, uptr:NULL, defintarrayval:0, TYPE_UINTARRAY, 0}, \ -{CONFIG_STRING_PRS_SYMBOL_START_LIST, HELP_STRING_PRS_SYMBOL_START_LIST, 0, uptr:NULL, defintarrayval:0, TYPE_UINTARRAY, 0}, \ -{CONFIG_STRING_PRS_NUM_SYMBOLS_LIST, HELP_STRING_PRS_NUM_SYMBOLS_LIST, 0, uptr:NULL, defintarrayval:0, TYPE_UINTARRAY, 0}, \ -{CONFIG_STRING_PRS_NUM_RB, HELP_STRING_PRS_NUM_RB, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{CONFIG_STRING_PRS_RB_OFFSET, HELP_STRING_PRS_RB_OFFSET, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{CONFIG_STRING_PRS_COMB_SIZE, HELP_STRING_PRS_COMB_SIZE, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{CONFIG_STRING_PRS_RE_OFFSET_LIST, HELP_STRING_PRS_RE_OFFSET_LIST, 0, uptr:NULL, defintarrayval:0, TYPE_UINTARRAY, 0}, \ -{CONFIG_STRING_PRS_RESOURCE_OFFSET_LIST, HELP_STRING_PRS_RESOURCE_OFFSET_LIST, 0, uptr:NULL, defintarrayval:0, TYPE_UINTARRAY, 0}, \ -{CONFIG_STRING_PRS_RESOURCE_REPETITION, HELP_STRING_PRS_RESOURCE_REPETITION, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{CONFIG_STRING_PRS_RESOURCE_TIME_GAP, HELP_STRING_PRS_RESOURCE_TIME_GAP, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{CONFIG_STRING_PRS_ID_LIST, HELP_STRING_PRS_ID_LIST, 0, uptr:NULL, defintarrayval:0, TYPE_UINTARRAY, 0}, \ -{CONFIG_STRING_PRS_MUTING_PATTERN1_LIST, HELP_STRING_PRS_MUTING_PATTERN1_LIST, 0, uptr:NULL, defintarrayval:0, TYPE_UINTARRAY, 0}, \ -{CONFIG_STRING_PRS_MUTING_PATTERN2_LIST, HELP_STRING_PRS_MUTING_PATTERN2_LIST, 0, uptr:NULL, defintarrayval:0, TYPE_UINTARRAY, 0}, \ -{CONFIG_STRING_PRS_MUTING_BIT_REPETITION, HELP_STRING_PRS_MUTING_BIT_REPETITION, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0} \ + {CONFIG_STRING_GNB_ID, HELP_STRING_GNB_ID, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ + {CONFIG_STRING_NUM_PRS_RESOURCES, HELP_STRING_NUM_PRS_RESOURCES, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ + {CONFIG_STRING_PRS_RESOURCE_SET_PERIOD_LIST, HELP_STRING_PRS_RESOURCE_SET_PERIOD_LIST, 0, .uptr=NULL, .defintarrayval=0, TYPE_UINTARRAY, 0}, \ + {CONFIG_STRING_PRS_SYMBOL_START_LIST, HELP_STRING_PRS_SYMBOL_START_LIST, 0, .uptr=NULL, .defintarrayval=0, TYPE_UINTARRAY, 0}, \ + {CONFIG_STRING_PRS_NUM_SYMBOLS_LIST, HELP_STRING_PRS_NUM_SYMBOLS_LIST, 0, .uptr=NULL, .defintarrayval=0, TYPE_UINTARRAY, 0}, \ + {CONFIG_STRING_PRS_NUM_RB, HELP_STRING_PRS_NUM_RB, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ + {CONFIG_STRING_PRS_RB_OFFSET, HELP_STRING_PRS_RB_OFFSET, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ + {CONFIG_STRING_PRS_COMB_SIZE, HELP_STRING_PRS_COMB_SIZE, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ + {CONFIG_STRING_PRS_RE_OFFSET_LIST, HELP_STRING_PRS_RE_OFFSET_LIST, 0, .uptr=NULL, .defintarrayval=0, TYPE_UINTARRAY, 0}, \ + {CONFIG_STRING_PRS_RESOURCE_OFFSET_LIST, HELP_STRING_PRS_RESOURCE_OFFSET_LIST, 0, .uptr=NULL, .defintarrayval=0, TYPE_UINTARRAY, 0}, \ + {CONFIG_STRING_PRS_RESOURCE_REPETITION, HELP_STRING_PRS_RESOURCE_REPETITION, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ + {CONFIG_STRING_PRS_RESOURCE_TIME_GAP, HELP_STRING_PRS_RESOURCE_TIME_GAP, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ + {CONFIG_STRING_PRS_ID_LIST, HELP_STRING_PRS_ID_LIST, 0, .uptr=NULL, .defintarrayval=0, TYPE_UINTARRAY, 0}, \ + {CONFIG_STRING_PRS_MUTING_PATTERN1_LIST, HELP_STRING_PRS_MUTING_PATTERN1_LIST, 0, .uptr=NULL, .defintarrayval=0, TYPE_UINTARRAY, 0}, \ + {CONFIG_STRING_PRS_MUTING_PATTERN2_LIST, HELP_STRING_PRS_MUTING_PATTERN2_LIST, 0, .uptr=NULL, .defintarrayval=0, TYPE_UINTARRAY, 0}, \ + {CONFIG_STRING_PRS_MUTING_BIT_REPETITION, HELP_STRING_PRS_MUTING_BIT_REPETITION, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0} \ } +// clang-format on #define PRS_GNB_ID 0 #define NUM_PRS_RESOURCES 1 diff --git a/openair2/COMMON/rrc_messages_def.h b/openair2/COMMON/rrc_messages_def.h index 35caf3c342..d93f07d8f8 100644 --- a/openair2/COMMON/rrc_messages_def.h +++ b/openair2/COMMON/rrc_messages_def.h @@ -81,5 +81,3 @@ MESSAGE_DEF(RRC_SUBFRAME_PROCESS, MESSAGE_PRIORITY_MED, RrcSubframeP // eNB: RLC -> RRC messages MESSAGE_DEF(RLC_SDU_INDICATION, MESSAGE_PRIORITY_MED, RlcSduIndication, rlc_sdu_indication) - -MESSAGE_DEF(NR_DU_RRC_DL_INDICATION, MESSAGE_PRIORITY_MED, NRDuDlReq_t, nr_du_dl_req) diff --git a/openair2/E1AP/CMakeLists.txt b/openair2/E1AP/CMakeLists.txt index a8bacdd3fa..01a969de7e 100644 --- a/openair2/E1AP/CMakeLists.txt +++ b/openair2/E1AP/CMakeLists.txt @@ -3,5 +3,5 @@ add_subdirectory(MESSAGES) add_library(e1ap e1ap.c e1ap_common.c e1ap_api.c) target_link_libraries(e1ap PUBLIC asn1_e1ap f1ap - PRIVATE asn1_nr_rrc asn1_lte_rrc asn1_f1ap UTIL e1_pdcp_if e1_if) + PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs asn1_f1ap UTIL e1_pdcp_if e1_if) target_include_directories(e1ap PUBLIC ${CMAKE_CURRENT_DIR}) diff --git a/openair2/E1AP/e1ap.c b/openair2/E1AP/e1ap.c index 52043602e2..d0e09feebd 100644 --- a/openair2/E1AP/e1ap.c +++ b/openair2/E1AP/e1ap.c @@ -32,6 +32,7 @@ #include "common/utils/LOG/log.h" #include "openair2/F1AP/f1ap_common.h" #include "e1ap_default_values.h" +#include "gtp_itf.h" #define E1AP_NUM_MSG_HANDLERS 14 typedef int (*e1ap_message_processing_t)(e1ap_upcp_inst_t *inst, const E1AP_E1AP_PDU_t *message_p); @@ -254,7 +255,7 @@ static void fill_SETUP_FAILURE(long transac_id, E1AP_E1AP_PDU_t *pdu) asn1cSequenceAdd(out->protocolIEs.list, E1AP_GNB_CU_UP_E1SetupFailureIEs_t, ieC1); ieC1->id = E1AP_ProtocolIE_ID_id_TransactionID; ieC1->criticality = E1AP_Criticality_reject; - ieC1->value.present = E1AP_GNB_CU_UP_E1SetupResponseIEs__value_PR_TransactionID; + ieC1->value.present = E1AP_GNB_CU_UP_E1SetupFailureIEs__value_PR_TransactionID; ieC1->value.choice.TransactionID = transac_id; /* mandatory */ /* c2. cause (integer value) */ diff --git a/openair2/E1AP/e1ap_common.c b/openair2/E1AP/e1ap_common.c index 2db1ecef65..caf97b680d 100644 --- a/openair2/E1AP/e1ap_common.c +++ b/openair2/E1AP/e1ap_common.c @@ -220,16 +220,15 @@ int e1ap_encode_send(E1_t type, e1ap_setup_req_t *setupReq, E1AP_E1AP_PDU_t *pdu if (encoded < 0) { LOG_E(E1AP, "%s: Failed to encode E1AP message\n", func); return -1; - } else { - MessageDef *message = itti_alloc_new_message((type==CPtype)?TASK_CUCP_E1:TASK_CUUP_E1, 0, SCTP_DATA_REQ); - sctp_data_req_t *s = &message->ittiMsg.sctp_data_req; - s->assoc_id = setupReq->assoc_id; - s->buffer = buffer; - s->buffer_length = encoded; - s->stream = stream; - LOG_I(E1AP, "%s: Sending ITTI message to SCTP Task\n", func); - itti_send_msg_to_task(TASK_SCTP, 0 /*unused by callee*/, message); } + MessageDef *message = itti_alloc_new_message((type == CPtype) ? TASK_CUCP_E1 : TASK_CUUP_E1, 0, SCTP_DATA_REQ); + sctp_data_req_t *s = &message->ittiMsg.sctp_data_req; + s->assoc_id = setupReq->assoc_id; + s->buffer = buffer; + s->buffer_length = encoded; + s->stream = stream; + LOG_I(E1AP, "%s: Sending ITTI message to SCTP Task\n", func); + itti_send_msg_to_task(TASK_SCTP, 0 /*unused by callee*/, message); return encoded; } diff --git a/openair2/E1AP/e1ap_setup.c b/openair2/E1AP/e1ap_setup.c index 349e3dcab5..76f8029b64 100644 --- a/openair2/E1AP/e1ap_setup.c +++ b/openair2/E1AP/e1ap_setup.c @@ -111,7 +111,7 @@ MessageDef *RCconfig_NR_CU_E1(bool separate_CUUP_process) e1Setup->localAddressF1U = strdup(*(GNBParamList.paramarray[0][GNB_LOCAL_S_ADDRESS_IDX].strptr)); e1Setup->localPortF1U = *(GNBParamList.paramarray[0][GNB_LOCAL_S_PORTD_IDX].uptr); get_NGU_S1U_addr(&e1Setup->localAddressN3, &e1Setup->localPortN3); - e1Setup->remotePortN3 = GTPV1_U_PORT_NUMBER; + e1Setup->remotePortN3 = e1Setup->localPortN3 ; if (separate_CUUP_process) { paramlist_def_t GNBE1ParamList = {GNB_CONFIG_STRING_E1_PARAMETERS, NULL, 0}; diff --git a/openair2/ENB_APP/L1_paramdef.h b/openair2/ENB_APP/L1_paramdef.h index c4e6670ea3..5e0ac8a43b 100644 --- a/openair2/ENB_APP/L1_paramdef.h +++ b/openair2/ENB_APP/L1_paramdef.h @@ -66,33 +66,36 @@ /* L1 configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*----------------------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define L1PARAMS_DESC { \ -{CONFIG_STRING_L1_CC, NULL, 0, uptr:NULL, defintval:1, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_TRANSPORT_N_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_mac", TYPE_STRING, 0}, \ -{CONFIG_STRING_L1_LOCAL_N_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ -{CONFIG_STRING_L1_LOCAL_N_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ -{CONFIG_STRING_L1_REMOTE_N_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ -{CONFIG_STRING_L1_LOCAL_N_PORTC, NULL, 0, uptr:NULL, defintval:50030, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_REMOTE_N_PORTC, NULL, 0, uptr:NULL, defintval:50030, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_LOCAL_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, iptr:NULL, defintval:100, TYPE_INT, 0}, \ -{CONFIG_STRING_L1_PUCCH1_DTX_THRESHOLD, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \ -{CONFIG_STRING_L1_PUCCH1AB_DTX_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \ -{CONFIG_STRING_L1_PRACH_DTX_EMTC0_THRESHOLD, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \ -{CONFIG_STRING_L1_PUCCH1_DTX_EMTC0_THRESHOLD, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \ -{CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC0_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \ -{CONFIG_STRING_L1_PRACH_DTX_EMTC1_THRESHOLD, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \ -{CONFIG_STRING_L1_PUCCH1_DTX_EMTC1_THRESHOLD, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \ -{CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC1_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \ -{CONFIG_STRING_L1_PRACH_DTX_EMTC2_THRESHOLD, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \ -{CONFIG_STRING_L1_PUCCH1_DTX_EMTC2_THRESHOLD, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \ -{CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC2_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \ -{CONFIG_STRING_L1_PRACH_DTX_EMTC3_THRESHOLD, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \ -{CONFIG_STRING_L1_PUCCH1_DTX_EMTC3_THRESHOLD, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \ -{CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC3_THRESHOLD, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \ -{CONFIG_STRING_L1_PUSCH_SIGNAL_THRESHOLD, NULL, 0, iptr:NULL, defintval:635, TYPE_INT, 0} \ - } + {CONFIG_STRING_L1_CC, NULL, 0, .uptr=NULL, .defintval=1, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_TRANSPORT_N_PREFERENCE, NULL, 0, .strptr=NULL, .defstrval="local_mac", TYPE_STRING, 0}, \ + {CONFIG_STRING_L1_LOCAL_N_IF_NAME, NULL, 0, .strptr=NULL, .defstrval="lo", TYPE_STRING, 0}, \ + {CONFIG_STRING_L1_LOCAL_N_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ + {CONFIG_STRING_L1_REMOTE_N_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.2", TYPE_STRING, 0}, \ + {CONFIG_STRING_L1_LOCAL_N_PORTC, NULL, 0, .uptr=NULL, .defintval=50030, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_REMOTE_N_PORTC, NULL, 0, .uptr=NULL, .defintval=50030, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_LOCAL_N_PORTD, NULL, 0, .uptr=NULL, .defintval=50031, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_REMOTE_N_PORTD, NULL, 0, .uptr=NULL, .defintval=50031, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, .iptr=NULL, .defintval=100, TYPE_INT, 0}, \ + {CONFIG_STRING_L1_PUCCH1_DTX_THRESHOLD, NULL, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \ + {CONFIG_STRING_L1_PUCCH1AB_DTX_THRESHOLD, NULL, 0, .iptr=NULL, .defintval=4, TYPE_INT, 0}, \ + {CONFIG_STRING_L1_PRACH_DTX_EMTC0_THRESHOLD, NULL, 0, .iptr=NULL, .defintval=200, TYPE_INT, 0}, \ + {CONFIG_STRING_L1_PUCCH1_DTX_EMTC0_THRESHOLD, NULL, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \ + {CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC0_THRESHOLD, NULL, 0, .iptr=NULL, .defintval=4, TYPE_INT, 0}, \ + {CONFIG_STRING_L1_PRACH_DTX_EMTC1_THRESHOLD, NULL, 0, .iptr=NULL, .defintval=200, TYPE_INT, 0}, \ + {CONFIG_STRING_L1_PUCCH1_DTX_EMTC1_THRESHOLD, NULL, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \ + {CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC1_THRESHOLD, NULL, 0, .iptr=NULL, .defintval=4, TYPE_INT, 0}, \ + {CONFIG_STRING_L1_PRACH_DTX_EMTC2_THRESHOLD, NULL, 0, .iptr=NULL, .defintval=200, TYPE_INT, 0}, \ + {CONFIG_STRING_L1_PUCCH1_DTX_EMTC2_THRESHOLD, NULL, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \ + {CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC2_THRESHOLD, NULL, 0, .iptr=NULL, .defintval=4, TYPE_INT, 0}, \ + {CONFIG_STRING_L1_PRACH_DTX_EMTC3_THRESHOLD, NULL, 0, .iptr=NULL, .defintval=200, TYPE_INT, 0}, \ + {CONFIG_STRING_L1_PUCCH1_DTX_EMTC3_THRESHOLD, NULL, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \ + {CONFIG_STRING_L1_PUCCH1AB_DTX_EMTC3_THRESHOLD, NULL, 0, .iptr=NULL, .defintval=4, TYPE_INT, 0}, \ + {CONFIG_STRING_L1_PUSCH_SIGNAL_THRESHOLD, NULL, 0, .iptr=NULL, .defintval=635, TYPE_INT, 0}, \ +} +// clang-format on + #define L1_CC_IDX 0 #define L1_TRANSPORT_N_PREFERENCE_IDX 1 #define L1_LOCAL_N_IF_NAME_IDX 2 diff --git a/openair2/ENB_APP/MACRLC_paramdef.h b/openair2/ENB_APP/MACRLC_paramdef.h index 11cbe445b8..298215c21a 100644 --- a/openair2/ENB_APP/MACRLC_paramdef.h +++ b/openair2/ENB_APP/MACRLC_paramdef.h @@ -68,33 +68,36 @@ /* MacRLC configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-------------------------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define MACRLCPARAMS_DESC { \ -{CONFIG_STRING_MACRLC_CC, NULL, 0, uptr:NULL, defintval:50011, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_TRANSPORT_N_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_L1", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_N_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_N_ADDRESS, NULL, 0, uptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_N_PORTC, NULL, 0, uptr:NULL, defintval:50010, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_N_PORTC, NULL, 0, uptr:NULL, defintval:50010, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_N_PORTD, NULL, 0, uptr:NULL, defintval:50011, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50011, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_TRANSPORT_S_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_RRC", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_S_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_S_ADDRESS, NULL, 0, uptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_S_ADDRESS, NULL, 0, uptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_S_PORTC, NULL, 0, uptr:NULL, defintval:50020, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defintval:50020, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_SCHED_MODE, NULL, 0, strptr:NULL, defstrval:"default", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_PUSCH10xSNR, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \ -{CONFIG_STRING_MACRLC_PUCCH10xSNR, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \ -{CONFIG_STRING_MACRLC_DEFAULT_SCHED_DL_ALGO, NULL, 0, strptr:NULL, defstrval:"round_robin_dl", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_UE_MULTIPLE_MAX, NULL, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \ -{CONFIG_STRING_MACRLC_USE_MCS_OFFSET, NULL, 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \ -{CONFIG_STRING_MACRLC_BLER_TARGET_LOWER, NULL, 0, dblptr:NULL, defdblval:.5, TYPE_DOUBLE, 0}, \ -{CONFIG_STRING_MACRLC_BLER_TARGET_UPPER, NULL, 0, dblptr:NULL, defdblval:2, TYPE_DOUBLE, 0}, \ -{CONFIG_STRING_MACRLC_MAX_UL_RB_INDEX, NULL, 0, iptr:NULL, defintval:22, TYPE_INT, 0}} + {CONFIG_STRING_MACRLC_CC, NULL, 0, .uptr=NULL, .defintval=50011, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_TRANSPORT_N_PREFERENCE, NULL, 0, .strptr=NULL, .defstrval="local_L1", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_LOCAL_N_IF_NAME, NULL, 0, .strptr=NULL, .defstrval="lo", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_REMOTE_N_ADDRESS, NULL, 0, .uptr=NULL, .defstrval="127.0.0.2", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_LOCAL_N_PORTC, NULL, 0, .uptr=NULL, .defintval=50010, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_REMOTE_N_PORTC, NULL, 0, .uptr=NULL, .defintval=50010, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_LOCAL_N_PORTD, NULL, 0, .uptr=NULL, .defintval=50011, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_REMOTE_N_PORTD, NULL, 0, .uptr=NULL, .defintval=50011, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_TRANSPORT_S_PREFERENCE, NULL, 0, .strptr=NULL, .defstrval="local_RRC", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_LOCAL_S_IF_NAME, NULL, 0, .strptr=NULL, .defstrval="lo", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_LOCAL_S_ADDRESS, NULL, 0, .uptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_REMOTE_S_ADDRESS, NULL, 0, .uptr=NULL, .defstrval="127.0.0.2", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_LOCAL_S_PORTC, NULL, 0, .uptr=NULL, .defintval=50020, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_REMOTE_S_PORTC, NULL, 0, .uptr=NULL, .defintval=50020, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_LOCAL_S_PORTD, NULL, 0, .uptr=NULL, .defintval=50021, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_REMOTE_S_PORTD, NULL, 0, .uptr=NULL, .defintval=50021, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_SCHED_MODE, NULL, 0, .strptr=NULL, .defstrval="default", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_PUSCH10xSNR, NULL, 0, .iptr=NULL, .defintval=200, TYPE_INT, 0}, \ + {CONFIG_STRING_MACRLC_PUCCH10xSNR, NULL, 0, .iptr=NULL, .defintval=200, TYPE_INT, 0}, \ + {CONFIG_STRING_MACRLC_DEFAULT_SCHED_DL_ALGO, NULL, 0, .strptr=NULL, .defstrval="round_robin_dl", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_UE_MULTIPLE_MAX, NULL, 0, .iptr=NULL, .defintval=4, TYPE_INT, 0}, \ + {CONFIG_STRING_MACRLC_USE_MCS_OFFSET, NULL, 0, .iptr=NULL, .defintval=1, TYPE_INT, 0}, \ + {CONFIG_STRING_MACRLC_BLER_TARGET_LOWER, NULL, 0, .dblptr=NULL, .defdblval=.5, TYPE_DOUBLE, 0}, \ + {CONFIG_STRING_MACRLC_BLER_TARGET_UPPER, NULL, 0, .dblptr=NULL, .defdblval=2, TYPE_DOUBLE, 0}, \ + {CONFIG_STRING_MACRLC_MAX_UL_RB_INDEX, NULL, 0, .iptr=NULL, .defintval=22, TYPE_INT, 0}, \ +} +// clang-format on #define MACRLC_CC_IDX 0 #define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1 diff --git a/openair2/ENB_APP/RRC_config_tools.c b/openair2/ENB_APP/RRC_config_tools.c index c0cd1b5a6f..210266ca3a 100644 --- a/openair2/ENB_APP/RRC_config_tools.c +++ b/openair2/ENB_APP/RRC_config_tools.c @@ -73,6 +73,12 @@ static const eutra_band_t eutra_bands[] = { {42, 3400 * MHz, 3600 * MHz, 3400 * MHz, 3600 * MHz, TDD}, {43, 3600 * MHz, 3800 * MHz, 3600 * MHz, 3800 * MHz, TDD}, {44, 703 * MHz, 803 * MHz, 703 * MHz, 803 * MHz, TDD}, + // ... + {65, 1920 * MHz, 2010 * MHz, 2110 * MHz, 2200 * MHz, FDD}, + {66, 1710 * MHz, 1780 * MHz, 2110 * MHz, 2200 * MHz, FDD}, + {71, 663 * MHz, 698 * MHz, 617 * MHz, 652 * MHz, FDD}, + {72, 451 * MHz, 456 * MHz, 461 * MHz, 466 * MHz, FDD}, + {73, 450 * MHz, 455 * MHz, 460 * MHz, 465 * MHz, FDD}, }; diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 2cdc24152b..888c567fc4 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -2590,10 +2590,10 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) { int t_dc_prep = 0; int t_dc_overall = 0; paramdef_t p[] = { - { "t_reloc_prep", "t_reloc_prep", 0, iptr:&t_reloc_prep, defintval:0, TYPE_INT, 0 }, - { "tx2_reloc_overall", "tx2_reloc_overall", 0, iptr:&tx2_reloc_overall, defintval:0, TYPE_INT, 0 }, - { "t_dc_prep", "t_dc_prep", 0, iptr:&t_dc_prep, defintval:0, TYPE_INT, 0 }, - { "t_dc_overall", "t_dc_overall", 0, iptr:&t_dc_overall, defintval:0, TYPE_INT, 0 } + { "t_reloc_prep", "t_reloc_prep", 0, .iptr=&t_reloc_prep, .defintval=0, TYPE_INT, 0 }, + { "tx2_reloc_overall", "tx2_reloc_overall", 0, .iptr=&tx2_reloc_overall, .defintval=0, TYPE_INT, 0 }, + { "t_dc_prep", "t_dc_prep", 0, .iptr=&t_dc_prep, .defintval=0, TYPE_INT, 0 }, + { "t_dc_overall", "t_dc_overall", 0, .iptr=&t_dc_overall, .defintval=0, TYPE_INT, 0 } }; config_get(p, sizeof(p)/sizeof(paramdef_t), aprefix); diff --git a/openair2/ENB_APP/enb_paramdef.h b/openair2/ENB_APP/enb_paramdef.h index 2070e9e2a1..2f6bf04f58 100644 --- a/openair2/ENB_APP/enb_paramdef.h +++ b/openair2/ENB_APP/enb_paramdef.h @@ -171,50 +171,52 @@ typedef enum { /* RU configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-----------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define RUPARAMS_DESC { \ - {CONFIG_STRING_RU_LOCAL_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ - {CONFIG_STRING_RU_LOCAL_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ - {CONFIG_STRING_RU_REMOTE_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ - {CONFIG_STRING_RU_LOCAL_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \ - {CONFIG_STRING_RU_REMOTE_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \ - {CONFIG_STRING_RU_LOCAL_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \ - {CONFIG_STRING_RU_REMOTE_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \ - {CONFIG_STRING_RU_TRANSPORT_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"udp_if5", TYPE_STRING, 0}, \ - {CONFIG_STRING_RU_LOCAL_RF, NULL, 0, strptr:NULL, defstrval:"yes", TYPE_STRING, 0}, \ - {CONFIG_STRING_RU_NB_TX, NULL, 0, uptr:NULL, defuintval:1, TYPE_UINT, 0}, \ - {CONFIG_STRING_RU_NB_RX, NULL, 0, uptr:NULL, defuintval:1, TYPE_UINT, 0}, \ - {CONFIG_STRING_RU_MAX_RS_EPRE, NULL, 0, iptr:NULL, defintval:-29, TYPE_INT, 0}, \ - {CONFIG_STRING_RU_MAX_RXGAIN, NULL, 0, iptr:NULL, defintval:120, TYPE_INT, 0}, \ - {CONFIG_STRING_RU_BAND_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFBANDS, TYPE_INTARRAY, 1}, \ - {CONFIG_STRING_RU_ENB_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \ - {CONFIG_STRING_RU_ATT_TX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ - {CONFIG_STRING_RU_ATT_RX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ - {CONFIG_STRING_RU_IS_SLAVE, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \ - {CONFIG_STRING_RU_NBIOTRRC_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \ - {CONFIG_STRING_RU_SDR_ADDRS, NULL, 0, strptr:NULL, defstrval:"type=b200", TYPE_STRING, 0}, \ - {CONFIG_STRING_RU_SDR_CLK_SRC, NULL, 0, strptr:NULL, defstrval:"internal", TYPE_STRING, 0}, \ - {CONFIG_STRING_RU_SDR_TME_SRC, NULL, 0, strptr:NULL, defstrval:"internal", TYPE_STRING, 0}, \ - {CONFIG_STRING_RU_SF_EXTENSION, NULL, 0, uptr:NULL, defuintval:320, TYPE_UINT, 0}, \ - {CONFIG_STRING_RU_END_OF_BURST_DELAY, NULL, 0, uptr:NULL, defuintval:400, TYPE_UINT, 0}, \ - {CONFIG_STRING_RU_OTA_SYNC_ENABLE, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \ - {CONFIG_STRING_RU_BF_WEIGHTS_LIST, NULL, 0, iptr:NULL, defintarrayval:DEFBFW, TYPE_INTARRAY, 0}, \ - {CONFIG_STRING_RU_IF_FREQUENCY, NULL, 0, u64ptr:NULL, defuintval:0, TYPE_UINT64, 0}, \ - {CONFIG_STRING_RU_IF_FREQ_OFFSET, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \ - {CONFIG_STRING_RU_DO_PRECODING, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \ - {CONFIG_STRING_RU_SF_AHEAD, HLP_RU_SF_AHEAD, 0, iptr:NULL, defintval:4, TYPE_INT, 0}, \ - {CONFIG_STRING_RU_SL_AHEAD, HLP_RU_SL_AHEAD, 0, iptr:NULL, defintval:6, TYPE_INT, 0}, \ - {CONFIG_STRING_RU_NR_FLAG, HLP_RU_NR_FLAG, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \ - {CONFIG_STRING_RU_NR_SCS_FOR_RASTER, HLP_RU_NR_SCS_FOR_RASTER, 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \ - {CONFIG_STRING_RU_TX_SUBDEV, NULL, 0, strptr:NULL, defstrval:"", TYPE_STRING, 0}, \ - {CONFIG_STRING_RU_RX_SUBDEV, NULL, 0, strptr:NULL, defstrval:"", TYPE_STRING, 0}, \ - {CONFIG_STRING_RU_RXFH_CORE_ID, HLP_RU_RXFH_CORE_ID, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ - {CONFIG_STRING_RU_TXFH_CORE_ID, HLP_RU_TXFH_CORE_ID, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ - {CONFIG_STRING_RU_TP_CORES, HLP_RU_TP_CORES, 0, uptr:NULL, defintarrayval:DEFRUTPCORES, TYPE_INTARRAY, 8}, \ - {CONFIG_STRING_RU_NUM_TP_CORES, HLP_RU_NUM_TP_CORES, 0, uptr:NULL, defintval:2, TYPE_UINT, 0}, \ - {CONFIG_STRING_RU_NUM_INTERFACES, HLP_RU_NUM_INTERFACES, 0, uptr:NULL, defintval:1, TYPE_UINT, 0}, \ - {CONFIG_STRING_RU_HALF_SLOT_PARALLELIZATION, HLP_RU_HALF_SLOT_PARALLELIZATION, 0, uptr:NULL, defintval:1, TYPE_UINT, 0}, \ - {CONFIG_STRING_RU_RU_THREAD_CORE, HLP_RU_RU_THREAD_CORE, 0, uptr:NULL, defintval:-1, TYPE_INT, 0}, \ - } + {CONFIG_STRING_RU_LOCAL_IF_NAME, NULL, 0, .strptr=NULL, .defstrval="lo", TYPE_STRING, 0}, \ + {CONFIG_STRING_RU_LOCAL_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.2", TYPE_STRING, 0}, \ + {CONFIG_STRING_RU_REMOTE_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ + {CONFIG_STRING_RU_LOCAL_PORTC, NULL, 0, .uptr=NULL, .defuintval=50000, TYPE_UINT, 0}, \ + {CONFIG_STRING_RU_REMOTE_PORTC, NULL, 0, .uptr=NULL, .defuintval=50000, TYPE_UINT, 0}, \ + {CONFIG_STRING_RU_LOCAL_PORTD, NULL, 0, .uptr=NULL, .defuintval=50001, TYPE_UINT, 0}, \ + {CONFIG_STRING_RU_REMOTE_PORTD, NULL, 0, .uptr=NULL, .defuintval=50001, TYPE_UINT, 0}, \ + {CONFIG_STRING_RU_TRANSPORT_PREFERENCE, NULL, 0, .strptr=NULL, .defstrval="udp_if5", TYPE_STRING, 0}, \ + {CONFIG_STRING_RU_LOCAL_RF, NULL, 0, .strptr=NULL, .defstrval="yes", TYPE_STRING, 0}, \ + {CONFIG_STRING_RU_NB_TX, NULL, 0, .uptr=NULL, .defuintval=1, TYPE_UINT, 0}, \ + {CONFIG_STRING_RU_NB_RX, NULL, 0, .uptr=NULL, .defuintval=1, TYPE_UINT, 0}, \ + {CONFIG_STRING_RU_MAX_RS_EPRE, NULL, 0, .iptr=NULL, .defintval=-29, TYPE_INT, 0}, \ + {CONFIG_STRING_RU_MAX_RXGAIN, NULL, 0, .iptr=NULL, .defintval=120, TYPE_INT, 0}, \ + {CONFIG_STRING_RU_BAND_LIST, NULL, 0, .uptr=NULL, .defintarrayval=DEFBANDS, TYPE_INTARRAY, 1}, \ + {CONFIG_STRING_RU_ENB_LIST, NULL, 0, .uptr=NULL, .defintarrayval=DEFENBS, TYPE_INTARRAY, 1}, \ + {CONFIG_STRING_RU_ATT_TX, NULL, 0, .uptr=NULL, .defintval=0, TYPE_UINT, 0}, \ + {CONFIG_STRING_RU_ATT_RX, NULL, 0, .uptr=NULL, .defintval=0, TYPE_UINT, 0}, \ + {CONFIG_STRING_RU_IS_SLAVE, NULL, 0, .strptr=NULL, .defstrval="no", TYPE_STRING, 0}, \ + {CONFIG_STRING_RU_NBIOTRRC_LIST, NULL, 0, .uptr=NULL, .defintarrayval=DEFENBS, TYPE_INTARRAY, 1}, \ + {CONFIG_STRING_RU_SDR_ADDRS, NULL, 0, .strptr=NULL, .defstrval="type=b200", TYPE_STRING, 0}, \ + {CONFIG_STRING_RU_SDR_CLK_SRC, NULL, 0, .strptr=NULL, .defstrval="internal", TYPE_STRING, 0}, \ + {CONFIG_STRING_RU_SDR_TME_SRC, NULL, 0, .strptr=NULL, .defstrval="internal", TYPE_STRING, 0}, \ + {CONFIG_STRING_RU_SF_EXTENSION, NULL, 0, .uptr=NULL, .defuintval=320, TYPE_UINT, 0}, \ + {CONFIG_STRING_RU_END_OF_BURST_DELAY, NULL, 0, .uptr=NULL, .defuintval=400, TYPE_UINT, 0}, \ + {CONFIG_STRING_RU_OTA_SYNC_ENABLE, NULL, 0, .strptr=NULL, .defstrval="no", TYPE_STRING, 0}, \ + {CONFIG_STRING_RU_BF_WEIGHTS_LIST, NULL, 0, .iptr=NULL, .defintarrayval=DEFBFW, TYPE_INTARRAY, 0}, \ + {CONFIG_STRING_RU_IF_FREQUENCY, NULL, 0, .u64ptr=NULL, .defuintval=0, TYPE_UINT64, 0}, \ + {CONFIG_STRING_RU_IF_FREQ_OFFSET, NULL, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \ + {CONFIG_STRING_RU_DO_PRECODING, NULL, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \ + {CONFIG_STRING_RU_SF_AHEAD, HLP_RU_SF_AHEAD, 0, .iptr=NULL, .defintval=4, TYPE_INT, 0}, \ + {CONFIG_STRING_RU_SL_AHEAD, HLP_RU_SL_AHEAD, 0, .iptr=NULL, .defintval=6, TYPE_INT, 0}, \ + {CONFIG_STRING_RU_NR_FLAG, HLP_RU_NR_FLAG, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \ + {CONFIG_STRING_RU_NR_SCS_FOR_RASTER, HLP_RU_NR_SCS_FOR_RASTER, 0, .iptr=NULL, .defintval=1, TYPE_INT, 0}, \ + {CONFIG_STRING_RU_TX_SUBDEV, NULL, 0, .strptr=NULL, .defstrval="", TYPE_STRING, 0}, \ + {CONFIG_STRING_RU_RX_SUBDEV, NULL, 0, .strptr=NULL, .defstrval="", TYPE_STRING, 0}, \ + {CONFIG_STRING_RU_RXFH_CORE_ID, HLP_RU_RXFH_CORE_ID, 0, .uptr=NULL, .defintval=0, TYPE_UINT, 0}, \ + {CONFIG_STRING_RU_TXFH_CORE_ID, HLP_RU_TXFH_CORE_ID, 0, .uptr=NULL, .defintval=0, TYPE_UINT, 0}, \ + {CONFIG_STRING_RU_TP_CORES, HLP_RU_TP_CORES, 0, .uptr=NULL, .defintarrayval=DEFRUTPCORES, TYPE_INTARRAY, 8}, \ + {CONFIG_STRING_RU_NUM_TP_CORES, HLP_RU_NUM_TP_CORES, 0, .uptr=NULL, .defintval=2, TYPE_UINT, 0}, \ + {CONFIG_STRING_RU_NUM_INTERFACES, HLP_RU_NUM_INTERFACES, 0, .uptr=NULL, .defintval=1, TYPE_UINT, 0}, \ + {CONFIG_STRING_RU_HALF_SLOT_PARALLELIZATION, HLP_RU_HALF_SLOT_PARALLELIZATION, 0, .uptr=NULL, .defintval=1, TYPE_UINT, 0}, \ + {CONFIG_STRING_RU_RU_THREAD_CORE, HLP_RU_RU_THREAD_CORE, 0, .uptr:NULL, .defintval:-1, TYPE_UINT, 0}, \ +} +// clang-format on /*---------------------------------------------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------------------------------------------*/ @@ -232,11 +234,13 @@ typedef enum { /* global configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define ENBSPARAMS_DESC { \ - {ENB_CONFIG_STRING_ASN1_VERBOSITY, NULL, 0, uptr:NULL, defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_ACTIVE_ENBS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRINGLIST, 0}, \ - {ENB_CONFIG_STRING_NOS1, NULL, PARAMFLAG_BOOL, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ - } + {ENB_CONFIG_STRING_ASN1_VERBOSITY, NULL, 0, .uptr=NULL, .defstrval=ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_ACTIVE_ENBS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRINGLIST, 0}, \ + {ENB_CONFIG_STRING_NOS1, NULL, PARAMFLAG_BOOL, .uptr=NULL, .defintval=0, TYPE_UINT, 0}, \ +} +// clang-format on #define ENB_ASN1_VERBOSITY_IDX 0 #define ENB_ACTIVE_ENBS_IDX 1 #define ENB_NOS1_IDX 2 @@ -276,33 +280,35 @@ typedef enum { /* cell configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-----------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define ENBPARAMS_DESC {\ - {ENB_CONFIG_STRING_ENB_ID, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_CELL_TYPE, NULL, 0, strptr:NULL, defstrval:"CELL_MACRO_ENB", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_ENB_NAME, NULL, 0, strptr:NULL, defstrval:"OAIeNodeB", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_TRACKING_AREA_CODE, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE_OLD, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_MOBILE_NETWORK_CODE_OLD, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_TRANSPORT_S_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_mac", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_LOCAL_S_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_LOCAL_S_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_REMOTE_S_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_LOCAL_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_NR_CELLID, NULL, 0, u64ptr:NULL, defint64val:0, TYPE_UINT64, 0}, \ - {ENB_CONFIG_STRING_RRC_INACTIVITY_THRESHOLD, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_MEASUREMENT_REPORTS, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_X2, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_ENB_M2, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_MCE_M2, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_S1SETUP_RSP_TIMER, NULL, 0, uptr:NULL, defuintval:5, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_S1SETUP_REQ_TIMER, NULL, 0, uptr:NULL, defuintval:5, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_S1SETUP_REQ_COUNT, NULL, 0, uptr:NULL, defuintval:65535, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_SCTP_REQ_TIMER, NULL, 0, uptr:NULL, defuintval:180, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_SCTP_REQ_COUNT, NULL, 0, uptr:NULL, defuintval:65535, TYPE_UINT, 0}, \ - } + {ENB_CONFIG_STRING_ENB_ID, NULL, 0, .uptr=NULL, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_CELL_TYPE, NULL, 0, .strptr=NULL, .defstrval="CELL_MACRO_ENB", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_ENB_NAME, NULL, 0, .strptr=NULL, .defstrval="OAIeNodeB", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_TRACKING_AREA_CODE, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE_OLD, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_MOBILE_NETWORK_CODE_OLD, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_TRANSPORT_S_PREFERENCE, NULL, 0, .strptr=NULL, .defstrval="local_mac", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_LOCAL_S_IF_NAME, NULL, 0, .strptr=NULL, .defstrval="lo", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_LOCAL_S_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_REMOTE_S_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.2", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_LOCAL_S_PORTC, NULL, 0, .uptr=NULL, .defuintval=50000, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_REMOTE_S_PORTC, NULL, 0, .uptr=NULL, .defuintval=50000, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_LOCAL_S_PORTD, NULL, 0, .uptr=NULL, .defuintval=50001, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, .uptr=NULL, .defuintval=50001, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_NR_CELLID, NULL, 0, .u64ptr=NULL, .defint64val=0, TYPE_UINT64, 0}, \ + {ENB_CONFIG_STRING_RRC_INACTIVITY_THRESHOLD, NULL, 0, .uptr=NULL, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_MEASUREMENT_REPORTS, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_X2, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_ENB_M2, NULL, 0, .strptr=NULL, .defstrval="no", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_MCE_M2, NULL, 0, .strptr=NULL, .defstrval="no", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_S1SETUP_RSP_TIMER, NULL, 0, .uptr=NULL, .defuintval=5, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_S1SETUP_REQ_TIMER, NULL, 0, .uptr=NULL, .defuintval=5, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_S1SETUP_REQ_COUNT, NULL, 0, .uptr=NULL, .defuintval=65535, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_SCTP_REQ_TIMER, NULL, 0, .uptr=NULL, .defuintval=180, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_SCTP_REQ_COUNT, NULL, 0, .uptr=NULL, .defuintval=65535, TYPE_UINT, 0}, \ +} +// clang-format on #define ENB_ENB_ID_IDX 0 #define ENB_CELL_TYPE_IDX 1 @@ -331,6 +337,7 @@ typedef enum { #define ENB_SCTP_REQ_COUNT_IDX 24 #define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD} +// clang-format off #define ENBPARAMS_CHECK { \ { .s5 = { NULL } }, \ { .s5 = { NULL } }, \ @@ -351,6 +358,7 @@ typedef enum { { .s5 = { NULL } }, \ { .s5 = { NULL } }, \ } +// clang-format on /*-------------------------------------------------------------------------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------------------------------------------------------------------------*/ @@ -367,22 +375,25 @@ typedef enum { #define ENB_MOBILE_NETWORK_CODE_IDX 1 #define ENB_MNC_DIGIT_LENGTH 2 +// clang-format off #define PLMNPARAMS_DESC { \ - /* optname helpstr paramflags XXXptr def val type numelt */ \ - {ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, "mobile country code", 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, "mobile network code", 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_MNC_DIGIT_LENGTH, "length of the MNC (2 or 3)", 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ - } + /* optname helpstr paramflags XXXptr def val type numelt */ \ + {ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, "mobile country code", 0, .uptr=NULL, .defuintval=1000, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, "mobile network code", 0, .uptr=NULL, .defuintval=1000, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_MNC_DIGIT_LENGTH, "length of the MNC (2 or 3)", 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ +} +// clang-format on #define MCC_MNC_OKRANGES {0,999} #define MNC_DIGIT_LENGTH_OKVALUES {2,3} +// clang-format off #define PLMNPARAMS_CHECK { \ - { .s2 = { config_check_intrange, MCC_MNC_OKRANGES } }, \ - { .s2 = { config_check_intrange, MCC_MNC_OKRANGES } }, \ - { .s1 = { config_check_intval, MNC_DIGIT_LENGTH_OKVALUES, 2 } }, \ - } - + { .s2 = { config_check_intrange, MCC_MNC_OKRANGES } }, \ + { .s2 = { config_check_intrange, MCC_MNC_OKRANGES } }, \ + { .s1 = { config_check_intval, MNC_DIGIT_LENGTH_OKVALUES, 2 } }, \ +} +// clang-format on /*-------------------------------------------------------------------------------------------------------------------------------------------------*/ #define ENB_CONFIG_STRING_MBMS_CONFIGURATION_DATA_LIST "mbms_configuration_data_list" @@ -391,10 +402,12 @@ typedef enum { #define ENB_MBMS_SYNC_AREA_IDX 0 +// clang-format off #define MBMS_CONFIG_PARAMS_DESC { \ /* optname helpstr paramflags XXXptr def val type numelt */ \ - {ENB_CONFIG_STRING_MBMS_SYNC_AREA , NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_MBMS_SYNC_AREA , NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ } +// clang-format on /*-------------------------------------------------------------------------------------------------------------------------------------------------*/ @@ -406,7 +419,7 @@ typedef enum { #define MBMSPARAMS_DESC { \ /* optname helpstr paramflags XXXptr def val type numelt */ \ - {ENB_CONFIG_STRING_MBMS_SERVICE_AREA, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_MBMS_SERVICE_AREA, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ } @@ -778,87 +791,89 @@ typedef struct ccparams_lte_s { /* component carriers configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define CCPARAMS_DESC(ccparams) { \ - {ENB_CONFIG_STRING_FRAME_TYPE, NULL, 0, strptr:&ccparams.frame_type, defstrval:"FDD", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_TDD_CONFIG, NULL, 0, iptr:&ccparams.tdd_config, defintval:3, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_TDD_CONFIG_S, NULL, 0, iptr:&ccparams.tdd_config_s, defintval:0, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_PREFIX_TYPE, NULL, 0, strptr:&ccparams.prefix_type, defstrval:"NORMAL", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_PBCH_REPETITION, NULL, 0, strptr:&ccparams.pbch_repetition, defstrval:"FALSE", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_EUTRA_BAND, NULL, 0, iptr:&ccparams.eutra_band, defintval:7, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, NULL, 0, i64ptr:(int64_t *)&ccparams.downlink_frequency, defint64val:2680000000, TYPE_UINT64, 0}, \ - {ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, NULL, 0, iptr:&ccparams.uplink_frequency_offset, defintval:-120000000, TYPE_INT, 0}, \ - {ENB_CONFIG_STRING_NID_CELL, NULL, 0, iptr:&ccparams.Nid_cell, defintval:0, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_N_RB_DL, NULL, 0, iptr:&ccparams.N_RB_DL, defintval:25, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_CELL_MBSFN, NULL, 0, iptr:&ccparams.Nid_cell_mbsfn, defintval:0, TYPE_INT, 0}, \ - {ENB_CONFIG_STRING_NB_ANT_PORTS, NULL, 0, iptr:&ccparams.nb_antenna_ports, defintval:1, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_PRACH_ROOT, NULL, 0, iptr:&ccparams.prach_root, defintval:0, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_PRACH_CONFIG_INDEX, NULL, 0, iptr:&ccparams.prach_config_index, defintval:0, TYPE_INT, 0}, \ - {ENB_CONFIG_STRING_PRACH_HIGH_SPEED, NULL, 0, strptr:&ccparams.prach_high_speed, defstrval:"DISABLE", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_PRACH_ZERO_CORRELATION, NULL, 0, iptr:&ccparams.prach_zero_correlation, defintval:1, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_PRACH_FREQ_OFFSET, NULL, 0, iptr:&ccparams.prach_freq_offset, defintval:2, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT, NULL, 0, iptr:&ccparams.pucch_delta_shift, defintval:1, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_PUCCH_NRB_CQI, NULL, 0, iptr:&ccparams.pucch_nRB_CQI, defintval:1, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_PUCCH_NCS_AN, NULL, 0, iptr:&ccparams.pucch_nCS_AN, defintval:0, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_PUCCH_N1_AN, NULL, 0, iptr:&ccparams.pucch_n1_AN, defintval:0, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_PDSCH_RS_EPRE, NULL, 0, iptr:&ccparams.pdsch_referenceSignalPower, defintval:-29, TYPE_INT, 0}, \ - {ENB_CONFIG_STRING_PDSCH_PB, NULL, 0, iptr:&ccparams.pdsch_p_b, defintval:0, TYPE_INT, 0}, \ - {ENB_CONFIG_STRING_PUSCH_N_SB, NULL, 0, iptr:&ccparams.pusch_n_SB, defintval:1, TYPE_INT, 0}, \ - {ENB_CONFIG_STRING_PUSCH_HOPPINGMODE, NULL, 0, strptr:&ccparams.pusch_hoppingMode, defstrval:"interSubFrame", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_PUSCH_HOPPINGOFFSET, NULL, 0, iptr:&ccparams.pusch_hoppingOffset, defintval:0, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_PUSCH_ENABLE64QAM, NULL, 0, strptr:&ccparams.pusch_enable64QAM, defstrval:"DISABLE", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN, NULL, 0, strptr:&ccparams.pusch_groupHoppingEnabled, defstrval:"ENABLE", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_PUSCH_GROUP_ASSIGNMENT, NULL, 0, iptr:&ccparams.pusch_groupAssignment, defintval:0, TYPE_INT, 0}, \ - {ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN, NULL, 0, strptr:&ccparams.pusch_sequenceHoppingEnabled, defstrval:"DISABLE", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_PUSCH_NDMRS1, NULL, 0, iptr:&ccparams.pusch_nDMRS1, defintval:0, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_PHICH_DURATION, NULL, 0, strptr:&ccparams.phich_duration, defstrval:"NORMAL", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_PHICH_RESOURCE, NULL, 0, strptr:&ccparams.phich_resource, defstrval:"ONESIXTH", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_SRS_ENABLE, NULL, 0, strptr:&ccparams.srs_enable, defstrval:"DISABLE", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG, NULL, 0, iptr:&ccparams.srs_BandwidthConfig, defintval:0, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG, NULL, 0, iptr:&ccparams.srs_SubframeConfig, defintval:0, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG, NULL, 0, strptr:&ccparams.srs_ackNackST, defstrval:"DISABLE", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_SRS_MAXUPPTS, NULL, 0, strptr:&ccparams.srs_MaxUpPts, defstrval:"DISABLE", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_PUSCH_PO_NOMINAL, NULL, 0, iptr:&ccparams.pusch_p0_Nominal, defintval:-90, TYPE_INT, 0}, \ - {ENB_CONFIG_STRING_PUSCH_ALPHA, NULL, 0, strptr:&ccparams.pusch_alpha, defstrval:"AL1", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_PUCCH_PO_NOMINAL, NULL, 0, iptr:&ccparams.pucch_p0_Nominal, defintval:-96, TYPE_INT, 0}, \ - {ENB_CONFIG_STRING_MSG3_DELTA_PREAMBLE, NULL, 0, iptr:&ccparams.msg3_delta_Preamble, defintval:6, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1, NULL, 0, strptr:&ccparams.pucch_deltaF_Format1, defstrval:"DELTAF2", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1b, NULL, 0, strptr:&ccparams.pucch_deltaF_Format1b, defstrval:"deltaF3", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2, defstrval:"deltaF0", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2A, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2a, defstrval:"deltaF0", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2B, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2b, defstrval:"deltaF0", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_RACH_NUM_RA_PREAMBLES, NULL, 0, iptr:&ccparams.rach_numberOfRA_Preambles, defintval:4, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG, NULL, 0, strptr:&ccparams.rach_preamblesGroupAConfig, defstrval:"DISABLE", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA, NULL, 0, iptr:&ccparams.rach_sizeOfRA_PreamblesGroupA, defintval:0, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA, NULL, 0, iptr:&ccparams.rach_messageSizeGroupA, defintval:56, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB, NULL, 0, strptr:&ccparams.rach_messagePowerOffsetGroupB, defstrval:"minusinfinity", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP, NULL, 0, iptr:&ccparams.rach_powerRampingStep, defintval:4, TYPE_INT, 0}, \ - {ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER, NULL, 0, iptr:&ccparams.rach_preambleInitialReceivedTargetPower, defintval:-100, TYPE_INT, 0}, \ - {ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX, NULL, 0, iptr:&ccparams.rach_preambleTransMax, defintval:10, TYPE_INT, 0}, \ - {ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE, NULL, 0, iptr:&ccparams.rach_raResponseWindowSize, defintval:10, TYPE_INT, 0}, \ - {ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER, NULL, 0, iptr:&ccparams.rach_macContentionResolutionTimer, defintval:48, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, NULL, 0, iptr:&ccparams.rach_maxHARQ_Msg3Tx, defintval:4, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE, NULL, 0, iptr:&ccparams.pcch_defaultPagingCycle, defintval:128, TYPE_INT, 0}, \ - {ENB_CONFIG_STRING_PCCH_NB, NULL, 0, strptr:&ccparams.pcch_nB, defstrval:"oneT", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_DRX_CONFIG_PRESENT, NULL, 0, strptr:&ccparams.drx_Config_present, defstrval:"prNothing", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_DRX_ONDURATIONTIMER, NULL, 0, strptr:&ccparams.drx_onDurationTimer, defstrval:"psf10", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_DRX_INACTIVITYTIMER, NULL, 0, strptr:&ccparams.drx_InactivityTimer, defstrval:"psf10", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER, NULL, 0, strptr:&ccparams.drx_RetransmissionTimer, defstrval:"psf8", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT, NULL, 0, strptr:&ccparams.drx_longDrx_CycleStartOffset_present, defstrval:"prSf128", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET, NULL, 0, iptr:&ccparams.drx_longDrx_CycleStartOffset, defintval:0, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE, NULL, 0, strptr:&ccparams.drx_shortDrx_Cycle, defstrval:"sf32", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER, NULL, 0, iptr:&ccparams.drx_shortDrx_ShortCycleTimer, defintval:3, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF, NULL, 0, iptr:&ccparams.bcch_modificationPeriodCoeff, defintval:2, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_UETIMERS_T300, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t300, defintval:1000, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_UETIMERS_T301, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t301, defintval:1000, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_UETIMERS_T310, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t310, defintval:1000, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_UETIMERS_T311, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t311, defintval:10000, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_UETIMERS_N310, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n310, defintval:20, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_UETIMERS_N311, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n311, defintval:1, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&ccparams.ue_TransmissionMode, defintval:1, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_UE_MULTIPLE_MAX, NULL, 0, iptr:&ccparams.ue_multiple_max, defintval:4, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL, NULL, 0, strptr:&ccparams.mbms_dedicated_serving_cell, defstrval:"DISABLE", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_NR_SCG_SSB_FREQ, NULL, 0, iptr:&ccparams.nr_scg_ssb_freq, defintval:641272, TYPE_INT, 0} \ + {ENB_CONFIG_STRING_FRAME_TYPE, NULL, 0, .strptr=&ccparams.frame_type, .defstrval="FDD", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_TDD_CONFIG, NULL, 0, .iptr=&ccparams.tdd_config, .defintval=3, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_TDD_CONFIG_S, NULL, 0, .iptr=&ccparams.tdd_config_s, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PREFIX_TYPE, NULL, 0, .strptr=&ccparams.prefix_type, .defstrval="NORMAL", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PBCH_REPETITION, NULL, 0, .strptr=&ccparams.pbch_repetition, .defstrval="FALSE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_EUTRA_BAND, NULL, 0, .iptr=&ccparams.eutra_band, .defintval=7, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, NULL, 0, .i64ptr=(int64_t *)&ccparams.downlink_frequency, .defint64val=2680000000, TYPE_UINT64, 0}, \ + {ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, NULL, 0, .iptr=&ccparams.uplink_frequency_offset, .defintval=-120000000, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_NID_CELL, NULL, 0, .iptr=&ccparams.Nid_cell, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_N_RB_DL, NULL, 0, .iptr=&ccparams.N_RB_DL, .defintval=25, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_CELL_MBSFN, NULL, 0, .iptr=&ccparams.Nid_cell_mbsfn, .defintval=0, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_NB_ANT_PORTS, NULL, 0, .iptr=&ccparams.nb_antenna_ports, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PRACH_ROOT, NULL, 0, .iptr=&ccparams.prach_root, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PRACH_CONFIG_INDEX, NULL, 0, .iptr=&ccparams.prach_config_index, .defintval=0, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_PRACH_HIGH_SPEED, NULL, 0, .strptr=&ccparams.prach_high_speed, .defstrval="DISABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PRACH_ZERO_CORRELATION, NULL, 0, .iptr=&ccparams.prach_zero_correlation, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PRACH_FREQ_OFFSET, NULL, 0, .iptr=&ccparams.prach_freq_offset, .defintval=2, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT, NULL, 0, .iptr=&ccparams.pucch_delta_shift, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PUCCH_NRB_CQI, NULL, 0, .iptr=&ccparams.pucch_nRB_CQI, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PUCCH_NCS_AN, NULL, 0, .iptr=&ccparams.pucch_nCS_AN, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PUCCH_N1_AN, NULL, 0, .iptr=&ccparams.pucch_n1_AN, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PDSCH_RS_EPRE, NULL, 0, .iptr=&ccparams.pdsch_referenceSignalPower, .defintval=-29, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_PDSCH_PB, NULL, 0, .iptr=&ccparams.pdsch_p_b, .defintval=0, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_PUSCH_N_SB, NULL, 0, .iptr=&ccparams.pusch_n_SB, .defintval=1, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_PUSCH_HOPPINGMODE, NULL, 0, .strptr=&ccparams.pusch_hoppingMode, .defstrval="interSubFrame", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUSCH_HOPPINGOFFSET, NULL, 0, .iptr=&ccparams.pusch_hoppingOffset, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PUSCH_ENABLE64QAM, NULL, 0, .strptr=&ccparams.pusch_enable64QAM, .defstrval="DISABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN, NULL, 0, .strptr=&ccparams.pusch_groupHoppingEnabled, .defstrval="ENABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUSCH_GROUP_ASSIGNMENT, NULL, 0, .iptr=&ccparams.pusch_groupAssignment, .defintval=0, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN, NULL, 0, .strptr=&ccparams.pusch_sequenceHoppingEnabled, .defstrval="DISABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUSCH_NDMRS1, NULL, 0, .iptr=&ccparams.pusch_nDMRS1, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PHICH_DURATION, NULL, 0, .strptr=&ccparams.phich_duration, .defstrval="NORMAL", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PHICH_RESOURCE, NULL, 0, .strptr=&ccparams.phich_resource, .defstrval="ONESIXTH", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_SRS_ENABLE, NULL, 0, .strptr=&ccparams.srs_enable, .defstrval="DISABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG, NULL, 0, .iptr=&ccparams.srs_BandwidthConfig, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG, NULL, 0, .iptr=&ccparams.srs_SubframeConfig, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG, NULL, 0, .strptr=&ccparams.srs_ackNackST, .defstrval="DISABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_SRS_MAXUPPTS, NULL, 0, .strptr=&ccparams.srs_MaxUpPts, .defstrval="DISABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUSCH_PO_NOMINAL, NULL, 0, .iptr=&ccparams.pusch_p0_Nominal, .defintval=-90, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_PUSCH_ALPHA, NULL, 0, .strptr=&ccparams.pusch_alpha, .defstrval="AL1", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUCCH_PO_NOMINAL, NULL, 0, .iptr=&ccparams.pucch_p0_Nominal, .defintval=-96, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_MSG3_DELTA_PREAMBLE, NULL, 0, .iptr=&ccparams.msg3_delta_Preamble, .defintval=6, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1, NULL, 0, .strptr=&ccparams.pucch_deltaF_Format1, .defstrval="DELTAF2", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1b, NULL, 0, .strptr=&ccparams.pucch_deltaF_Format1b, .defstrval="deltaF3", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2, NULL, 0, .strptr=&ccparams.pucch_deltaF_Format2, .defstrval="deltaF0", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2A, NULL, 0, .strptr=&ccparams.pucch_deltaF_Format2a, .defstrval="deltaF0", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2B, NULL, 0, .strptr=&ccparams.pucch_deltaF_Format2b, .defstrval="deltaF0", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_RACH_NUM_RA_PREAMBLES, NULL, 0, .iptr=&ccparams.rach_numberOfRA_Preambles, .defintval=4, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG, NULL, 0, .strptr=&ccparams.rach_preamblesGroupAConfig, .defstrval="DISABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA, NULL, 0, .iptr=&ccparams.rach_sizeOfRA_PreamblesGroupA, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA, NULL, 0, .iptr=&ccparams.rach_messageSizeGroupA, .defintval=56, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB, NULL, 0, .strptr=&ccparams.rach_messagePowerOffsetGroupB, .defstrval="minusinfinity", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP, NULL, 0, .iptr=&ccparams.rach_powerRampingStep, .defintval=4, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER, NULL, 0, .iptr=&ccparams.rach_preambleInitialReceivedTargetPower, .defintval=-100, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX, NULL, 0, .iptr=&ccparams.rach_preambleTransMax, .defintval=10, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE, NULL, 0, .iptr=&ccparams.rach_raResponseWindowSize, .defintval=10, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER, NULL, 0, .iptr=&ccparams.rach_macContentionResolutionTimer, .defintval=48, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, NULL, 0, .iptr=&ccparams.rach_maxHARQ_Msg3Tx, .defintval=4, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE, NULL, 0, .iptr=&ccparams.pcch_defaultPagingCycle, .defintval=128, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_PCCH_NB, NULL, 0, .strptr=&ccparams.pcch_nB, .defstrval="oneT", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DRX_CONFIG_PRESENT, NULL, 0, .strptr=&ccparams.drx_Config_present, .defstrval="prNothing", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DRX_ONDURATIONTIMER, NULL, 0, .strptr=&ccparams.drx_onDurationTimer, .defstrval="psf10", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DRX_INACTIVITYTIMER, NULL, 0, .strptr=&ccparams.drx_InactivityTimer, .defstrval="psf10", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER, NULL, 0, .strptr=&ccparams.drx_RetransmissionTimer, .defstrval="psf8", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT, NULL, 0, .strptr=&ccparams.drx_longDrx_CycleStartOffset_present, .defstrval="prSf128", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET, NULL, 0, .iptr=&ccparams.drx_longDrx_CycleStartOffset, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE, NULL, 0, .strptr=&ccparams.drx_shortDrx_Cycle, .defstrval="sf32", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER, NULL, 0, .iptr=&ccparams.drx_shortDrx_ShortCycleTimer, .defintval=3, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF, NULL, 0, .iptr=&ccparams.bcch_modificationPeriodCoeff, .defintval=2, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_UETIMERS_T300, NULL, 0, .iptr=&ccparams.ue_TimersAndConstants_t300, .defintval=1000, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_UETIMERS_T301, NULL, 0, .iptr=&ccparams.ue_TimersAndConstants_t301, .defintval=1000, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_UETIMERS_T310, NULL, 0, .iptr=&ccparams.ue_TimersAndConstants_t310, .defintval=1000, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_UETIMERS_T311, NULL, 0, .iptr=&ccparams.ue_TimersAndConstants_t311, .defintval=10000, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_UETIMERS_N310, NULL, 0, .iptr=&ccparams.ue_TimersAndConstants_n310, .defintval=20, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_UETIMERS_N311, NULL, 0, .iptr=&ccparams.ue_TimersAndConstants_n311, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, .iptr=&ccparams.ue_TransmissionMode, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_UE_MULTIPLE_MAX, NULL, 0, .iptr=&ccparams.ue_multiple_max, .defintval=4, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL, NULL, 0, .strptr=&ccparams.mbms_dedicated_serving_cell, .defstrval="DISABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_NR_SCG_SSB_FREQ, NULL, 0, .iptr=&ccparams.nr_scg_ssb_freq, .defintval=641272, TYPE_INT, 0}, \ } +// clang-format on #define ENB_CONFIG_FRAME_TYPE_IDX 0 @@ -964,14 +979,16 @@ typedef struct srb1_params_s { int32_t srb1_max_retx_threshold; } srb1_params_t; +// clang-format off #define SRB1PARAMS_DESC(srb1_params) { \ - {ENB_CONFIG_STRING_SRB1_TIMER_POLL_RETRANSMIT, NULL, 0, iptr:&srb1_params.srb1_timer_poll_retransmit, defintval:80, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_SRB1_TIMER_REORDERING, NULL, 0, iptr:&srb1_params.srb1_timer_reordering, defintval:35, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_SRB1_TIMER_STATUS_PROHIBIT, NULL, 0, iptr:&srb1_params.srb1_timer_status_prohibit, defintval:0, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_SRB1_POLL_PDU, NULL, 0, iptr:&srb1_params.srb1_poll_pdu, defintval:4, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_SRB1_POLL_BYTE, NULL, 0, iptr:&srb1_params.srb1_poll_byte, defintval:99999, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_SRB1_MAX_RETX_THRESHOLD, NULL, 0, iptr:&srb1_params.srb1_max_retx_threshold, defintval:4, TYPE_UINT, 0} \ - } + {ENB_CONFIG_STRING_SRB1_TIMER_POLL_RETRANSMIT, NULL, 0, .iptr=&srb1_params.srb1_timer_poll_retransmit, .defintval=80, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_SRB1_TIMER_REORDERING, NULL, 0, .iptr=&srb1_params.srb1_timer_reordering, .defintval=35, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_SRB1_TIMER_STATUS_PROHIBIT, NULL, 0, .iptr=&srb1_params.srb1_timer_status_prohibit, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_SRB1_POLL_PDU, NULL, 0, .iptr=&srb1_params.srb1_poll_pdu, .defintval=4, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_SRB1_POLL_BYTE, NULL, 0, .iptr=&srb1_params.srb1_poll_byte, .defintval=99999, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_SRB1_MAX_RETX_THRESHOLD, NULL, 0, .iptr=&srb1_params.srb1_max_retx_threshold, .defintval=4, TYPE_UINT, 0}, \ +} +// clang-format on /* MME configuration parameters section name */ #define ENB_CONFIG_STRING_MME_IP_ADDRESS "mme_ip_address" @@ -989,15 +1006,16 @@ typedef struct srb1_params_s { /* MME configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define S1PARAMS_DESC { \ - {ENB_CONFIG_STRING_MME_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_MME_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX, NULL, 0, uptr:NULL, defintarrayval:NULL, TYPE_UINTARRAY, 6}, \ - {ENB_CONFIG_STRING_MME_PORT, NULL, 0, u16ptr:NULL, defuintval:S1AP_PORT_NUMBER, TYPE_UINT16, 0}, \ + {ENB_CONFIG_STRING_MME_IPV4_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_MME_IPV6_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX, NULL, 0, .uptr=NULL, .defintarrayval=NULL, TYPE_UINTARRAY, 6}, \ + {ENB_CONFIG_STRING_MME_PORT, NULL, 0, .u16ptr=NULL, .defuintval=S1AP_PORT_NUMBER, TYPE_UINT16, 0}, \ } - +// clang-format on @@ -1025,11 +1043,13 @@ typedef struct srb1_params_s { /* X2 configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define X2PARAMS_DESC { \ - {ENB_CONFIG_STRING_TARGET_ENB_X2_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_TARGET_ENB_X2_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_TARGET_ENB_X2_IPV4_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_TARGET_ENB_X2_IPV6_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS_PREFERENCE, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ } +// clang-format on #define ENB_X2_IPV4_ADDRESS_IDX 0 #define ENB_X2_IPV6_ADDRESS_IDX 1 @@ -1056,11 +1076,13 @@ typedef struct srb1_params_s { /* M2 configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define M2PARAMS_DESC { \ -{ENB_CONFIG_STRING_TARGET_MCE_M2_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_TARGET_MCE_M2_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_TARGET_MCE_M2_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_TARGET_MCE_M2_IPV4_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_TARGET_MCE_M2_IPV6_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_TARGET_MCE_M2_IP_ADDRESS_PREFERENCE, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ } +// clang-format on #define ENB_M2_IPV4_ADDRESS_IDX 0 #define ENB_M2_IPV6_ADDRESS_IDX 1 @@ -1081,10 +1103,12 @@ typedef struct srb1_params_s { /* SRB1 configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-----------------------------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define SCTPPARAMS_DESC { \ - {ENB_CONFIG_STRING_SCTP_INSTREAMS, NULL, 0, uptr:NULL, defintval:-1, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_SCTP_OUTSTREAMS, NULL, 0, uptr:NULL, defintval:-1, TYPE_UINT, 0} \ - } + {ENB_CONFIG_STRING_SCTP_INSTREAMS, NULL, 0, .uptr=NULL, .defintval=-1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_SCTP_OUTSTREAMS, NULL, 0, .uptr=NULL, .defintval=-1, TYPE_UINT, 0} \ +} +// clang-format on #define ENB_SCTP_INSTREAMS_IDX 0 #define ENB_SCTP_OUTSTREAMS_IDX 1 @@ -1129,28 +1153,30 @@ typedef struct srb1_params_s { /*--------------------------------------------------------------------------------------------------------------------------------------------------*/ // clang-format off #define NETPARAMS_DESC { \ - {ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, u16ptr:NULL, defuintval:GTPV1_U_PORT_NUMBER, TYPE_UINT16, 0}, \ - {ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_ENB_PORT_FOR_X2C, NULL, 0, uptr:NULL, defintval:0L, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_M2C, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_ENB_PORT_FOR_M2C, NULL, 0, uptr:NULL, defintval:0L, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_MCE_IPV4_ADDR_FOR_M2C, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_MCE_PORT_FOR_M2C, NULL, 0, uptr:NULL, defintval:0L, TYPE_UINT, 0}, \ - } + {ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, .u16ptr=NULL, .defuintval=GTPV1_U_PORT_NUMBER, TYPE_UINT16, 0}, \ + {ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_ENB_PORT_FOR_X2C, NULL, 0, .uptr=NULL, .defintval=0L, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_M2C, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_ENB_PORT_FOR_M2C, NULL, 0, .uptr=NULL, .defintval=0L, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_MCE_IPV4_ADDR_FOR_M2C, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_MCE_PORT_FOR_M2C, NULL, 0, .uptr=NULL, .defintval=0L, TYPE_UINT, 0}, \ +} +// clang-format on /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ /* GTPU configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define GTPUPARAMS_DESC { \ - {ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, strptr:&enb_interface_name_for_S1U, defstrval:"lo", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, strptr:&enb_ipv4_address_for_S1U, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, u16ptr:&enb_port_for_S1U, defuintval:GTPV1_U_PORT_NUMBER, TYPE_UINT16, 0} \ - } + {ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, .strptr=&enb_interface_name_for_S1U, .defstrval="lo", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, .strptr=&enb_ipv4_address_for_S1U, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, .u16ptr=&enb_port_for_S1U, .defuintval=GTPV1_U_PORT_NUMBER, TYPE_UINT16, 0}, \ +} // clang-format on /*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ @@ -1181,24 +1207,30 @@ typedef struct srb1_params_s { #define CONFIG_STRING_CU_BALANCING "CU_BALANCING" +// clang-format off #define CUPARAMS_DESC { \ - {ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_CU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_DU_TYPE, NULL, 0, strptr:NULL, defstrval:"LTE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U, NULL, 0, .strptr=NULL, .defstrval="eth0", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U, NULL, 0, .strptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_CU_PORT_FOR_F1U, NULL, 0, .uptr=NULL, .defintval=2210, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE, NULL, 0, .strptr=NULL, .defstrval="TCP", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DU_TYPE, NULL, 0, .strptr=NULL, .defstrval="LTE", TYPE_STRING, 0}, \ } +// clang-format on +// clang-format off #define DUPARAMS_DESC { \ - {ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_DU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U, NULL, 0, .strptr=NULL, .defstrval="eth0", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U, NULL, 0, .strptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DU_PORT_FOR_F1U, NULL, 0, .uptr=NULL, .defintval=2210, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE, NULL, 0, .strptr=NULL, .defstrval="TCP", TYPE_STRING, 0}, \ } +// clang-format on +// clang-format off #define CU_BAL_DESC { \ - {CONFIG_STRING_CU_BALANCING, NULL, 0, strptr:NULL, defstrval:"ALL", TYPE_STRING, 0}, \ + {CONFIG_STRING_CU_BALANCING, NULL, 0, .strptr=NULL, .defstrval="ALL", TYPE_STRING, 0}, \ } +// clang-format on #define CU_INTERFACE_F1U 0 #define CU_ADDRESS_F1U 1 @@ -1273,10 +1305,12 @@ typedef struct srb1_params_s { /* thread configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define THREAD_CONF_DESC { \ - {THREAD_CONFIG_STRING_PARALLEL, CONFIG_HLP_PARALLEL, 0, strptr:NULL, defstrval:"PARALLEL_RU_L1_TRX_SPLIT", TYPE_STRING, 0}, \ - {THREAD_CONFIG_STRING_WORKER, CONFIG_HLP_WORKER, 0, strptr:NULL, defstrval:"WORKER_ENABLE", TYPE_STRING, 0} \ - } + {THREAD_CONFIG_STRING_PARALLEL, CONFIG_HLP_PARALLEL, 0, .strptr=NULL, .defstrval="PARALLEL_RU_L1_TRX_SPLIT", TYPE_STRING, 0}, \ + {THREAD_CONFIG_STRING_WORKER, CONFIG_HLP_WORKER, 0, .strptr=NULL, .defstrval="WORKER_ENABLE", TYPE_STRING, 0} \ +} +// clang-format on #define CONFIG_HLP_WORKER "coding and FEP worker thread WORKER_DISABLE or WORKER_ENABLE\n" diff --git a/openair2/ENB_APP/enb_paramdef_emtc.h b/openair2/ENB_APP/enb_paramdef_emtc.h index d805737340..9d7bfb98e0 100644 --- a/openair2/ENB_APP/enb_paramdef_emtc.h +++ b/openair2/ENB_APP/enb_paramdef_emtc.h @@ -169,97 +169,100 @@ typedef struct ccparams_eMTC_s { } ccparams_eMTC_t; -#define EMTCPARAMS_DESC(eMTCconfig) { \ - {"eMTC_configured", NULL, 0, iptr:&eMTCconfig->eMTC_configured, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PRACH_ROOT, NULL, 0, iptr:&eMTCconfig->ccparams.prach_root, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PRACH_CONFIG_INDEX, NULL, 0, iptr:&eMTCconfig->ccparams.prach_config_index, defintval:0, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_PRACH_HIGH_SPEED, NULL, 0, strptr:&eMTCconfig->ccparams.prach_high_speed, defstrval:"DISABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PRACH_ZERO_CORRELATION, NULL, 0, iptr:&eMTCconfig->ccparams.prach_zero_correlation, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PRACH_FREQ_OFFSET, NULL, 0, iptr:&eMTCconfig->ccparams.prach_freq_offset, defintval:2, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT, NULL, 0, iptr:&eMTCconfig->ccparams.pucch_delta_shift, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PUCCH_NRB_CQI, NULL, 0, iptr:&eMTCconfig->ccparams.pucch_nRB_CQI, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PUCCH_NCS_AN, NULL, 0, iptr:&eMTCconfig->ccparams.pucch_nCS_AN, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PUCCH_N1_AN, NULL, 0, iptr:&eMTCconfig->ccparams.pucch_n1_AN, defintval:32, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PDSCH_RS_EPRE, NULL, 0, iptr:&eMTCconfig->ccparams.pdsch_referenceSignalPower, defintval:-29, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_PDSCH_PB, NULL, 0, iptr:&eMTCconfig->ccparams.pdsch_p_b, defintval:0, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_PUSCH_N_SB, NULL, 0, iptr:&eMTCconfig->ccparams.pusch_n_SB, defintval:1, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_PUSCH_HOPPINGMODE, NULL, 0, strptr:&eMTCconfig->ccparams.pusch_hoppingMode, defstrval:"interSubFrame", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUSCH_HOPPINGOFFSET, NULL, 0, iptr:&eMTCconfig->ccparams.pusch_hoppingOffset, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PUSCH_ENABLE64QAM, NULL, 0, strptr:&eMTCconfig->ccparams.pusch_enable64QAM, defstrval:"DISABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN, NULL, 0, strptr:&eMTCconfig->ccparams.pusch_groupHoppingEnabled, defstrval:"ENABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUSCH_GROUP_ASSIGNMENT, NULL, 0, iptr:&eMTCconfig->ccparams.pusch_groupAssignment, defintval:0, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN, NULL, 0, strptr:&eMTCconfig->ccparams.pusch_sequenceHoppingEnabled, defstrval:"DISABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUSCH_NDMRS1, NULL, 0, iptr:&eMTCconfig->ccparams.pusch_nDMRS1, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PHICH_DURATION, NULL, 0, strptr:&eMTCconfig->ccparams.phich_duration, defstrval:"NORMAL", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PHICH_RESOURCE, NULL, 0, strptr:&eMTCconfig->ccparams.phich_resource, defstrval:"ONESIXTH", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_SRS_ENABLE, NULL, 0, strptr:&eMTCconfig->ccparams.srs_enable, defstrval:"DISABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG, NULL, 0, iptr:&eMTCconfig->ccparams.srs_BandwidthConfig, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG, NULL, 0, iptr:&eMTCconfig->ccparams.srs_SubframeConfig, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG, NULL, 0, strptr:&eMTCconfig->ccparams.srs_ackNackST, defstrval:"DISABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_SRS_MAXUPPTS, NULL, 0, strptr:&eMTCconfig->ccparams.srs_MaxUpPts, defstrval:"DISABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUSCH_PO_NOMINAL, NULL, 0, iptr:&eMTCconfig->ccparams.pusch_p0_Nominal, defintval:-90, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_PUSCH_ALPHA, NULL, 0, strptr:&eMTCconfig->ccparams.pusch_alpha, defstrval:"AL1", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUCCH_PO_NOMINAL, NULL, 0, iptr:&eMTCconfig->ccparams.pucch_p0_Nominal, defintval:-96, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_MSG3_DELTA_PREAMBLE, NULL, 0, iptr:&eMTCconfig->ccparams.msg3_delta_Preamble, defintval:6, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1, NULL, 0, strptr:&eMTCconfig->ccparams.pucch_deltaF_Format1, defstrval:"DELTAF2", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1b, NULL, 0, strptr:&eMTCconfig->ccparams.pucch_deltaF_Format1b, defstrval:"deltaF3", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2, NULL, 0, strptr:&eMTCconfig->ccparams.pucch_deltaF_Format2, defstrval:"deltaF0", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2A, NULL, 0, strptr:&eMTCconfig->ccparams.pucch_deltaF_Format2a, defstrval:"deltaF0", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2B, NULL, 0, strptr:&eMTCconfig->ccparams.pucch_deltaF_Format2b, defstrval:"deltaF0", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_RACH_NUM_RA_PREAMBLES, NULL, 0, iptr:&eMTCconfig->ccparams.rach_numberOfRA_Preambles, defintval:4, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG, NULL, 0, strptr:&eMTCconfig->ccparams.rach_preamblesGroupAConfig, defstrval:"DISABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA, NULL, 0, iptr:&eMTCconfig->ccparams.rach_sizeOfRA_PreamblesGroupA, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA, NULL, 0, iptr:&eMTCconfig->ccparams.rach_messageSizeGroupA, defintval:56, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB, NULL, 0, strptr:&eMTCconfig->ccparams.rach_messagePowerOffsetGroupB, defstrval:"minusinfinity", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP, NULL, 0, iptr:&eMTCconfig->ccparams.rach_powerRampingStep, defintval:4, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER, NULL, 0, iptr:&eMTCconfig->ccparams.rach_preambleInitialReceivedTargetPower, defintval:-100, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX, NULL, 0, iptr:&eMTCconfig->ccparams.rach_preambleTransMax, defintval:10, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE, NULL, 0, iptr:&eMTCconfig->ccparams.rach_raResponseWindowSize, defintval:10, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER, NULL, 0, iptr:&eMTCconfig->ccparams.rach_macContentionResolutionTimer, defintval:48, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, NULL, 0, iptr:&eMTCconfig->ccparams.rach_maxHARQ_Msg3Tx, defintval:4, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE, NULL, 0, iptr:&eMTCconfig->ccparams.pcch_defaultPagingCycle, defintval:128, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_PCCH_NB, NULL, 0, strptr:&eMTCconfig->ccparams.pcch_nB, defstrval:"oneT", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF, NULL, 0, iptr:&eMTCconfig->ccparams.bcch_modificationPeriodCoeff, defintval:2, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG, NULL, 0, strptr:&eMTCconfig->ccparams.rach_preamblesGroupAConfig, defstrval:"DISABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_UETIMERS_T300, NULL, 0, iptr:&eMTCconfig->ccparams.ue_TimersAndConstants_t300, defintval:1000, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_UETIMERS_T301, NULL, 0, iptr:&eMTCconfig->ccparams.ue_TimersAndConstants_t301, defintval:1000, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_UETIMERS_T310, NULL, 0, iptr:&eMTCconfig->ccparams.ue_TimersAndConstants_t310, defintval:1000, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_UETIMERS_T311, NULL, 0, iptr:&eMTCconfig->ccparams.ue_TimersAndConstants_t311, defintval:10000, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_UETIMERS_N310, NULL, 0, iptr:&eMTCconfig->ccparams.ue_TimersAndConstants_n310, defintval:20, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_UETIMERS_N311, NULL, 0, iptr:&eMTCconfig->ccparams.ue_TimersAndConstants_n311, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&eMTCconfig->ccparams.ue_TransmissionMode, defintval:1, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_SCHEDULING_INFO_SIB1_BR_R13, NULL, 0, iptr:&eMTCconfig->schedulingInfoSIB1_BR_r13, defintval:4, TYPE_UINT, 0}, \ - {ENB_CONFIG_STRING_PRACH_CONFIG_COMMON_V1310, NULL, 0, strptr:&eMTCconfig->prach_ConfigCommon_v1310, defstrval:"ENABLE", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_MPDCCH_START_SF_CSS_RA_R13, NULL, 0, strptr:&eMTCconfig->mpdcch_startSF_CSS_RA_r13, defstrval:"fdd-r13", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_MPDCCH_START_SF_CSS_RA_R13_VAL, NULL, 0, strptr:&eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, defstrval:"v1", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_PRACH_HOPPING_OFFSET_R13, NULL, 0, iptr:&eMTCconfig->prach_HoppingOffset_r13, defintval:0, TYPE_INT, 0}, \ - {ENB_CONFIG_STRING_PDSCH_MAX_NUM_REPETITION_CE_MODE_A_R13, NULL, 0, strptr:&eMTCconfig->pdsch_maxNumRepetitionCEmodeA_r13, defstrval:"r16", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_PUSCH_MAX_NUM_REPETITION_CE_MODE_A_R13, NULL, 0, strptr:&eMTCconfig->pusch_maxNumRepetitionCEmodeA_r13, defstrval:"r8", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_PUSCH_REPETITION_LEVEL_CE_MODE_A_R13, NULL, 0, strptr:&eMTCconfig->pusch_repetitionLevelCEmodeA_r13, defstrval:"l1", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_CELL_SELECTION_INFO_CE_R13, NULL, 0, strptr:&eMTCconfig->cellSelectionInfoCE_r13, defstrval:"ENABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_Q_RX_LEV_MIN_CE_R13, NULL, 0, iptr:&eMTCconfig->q_RxLevMinCE_r13, defintval:-70, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_BANDWIDTH_REDUCED_ACCESS_RELATED_INFO_R13, NULL, 0, strptr:&eMTCconfig->bandwidthReducedAccessRelatedInfo_r13, defstrval:"ENABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_SI_WINDOW_LENGTH_BR_R13, NULL, 0, strptr:&eMTCconfig->si_WindowLength_BR_r13, defstrval:"ms20", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_SI_REPETITION_PATTERN_R13, NULL, 0, strptr:&eMTCconfig->si_RepetitionPattern_r13, defstrval:"everyRF", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_FDD_DOWNLINK_OR_TDD_SUBFRAME_BITMAP_BR_R13, NULL, 0, strptr:&eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_r13, defstrval:"subframePattern40-r13", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_FDD_DOWNLINK_OR_TDD_SUBFRAME_BITMAP_BR_VAL_R13, NULL, 0, i64ptr:&eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_val_r13, defint64val:0xFFFFFFFFFF, TYPE_UINT64, 0}, \ -{ENB_CONFIG_STRING_START_SYMBOL_BR_R13, NULL, 0, iptr:&eMTCconfig->startSymbolBR_r13, defintval:3, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_SI_HOPPING_CONFIG_COMMON_R13, NULL, 0, strptr:&eMTCconfig->si_HoppingConfigCommon_r13 , defstrval:"off", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_SI_VALIDITY_TIME_R13, NULL, 0, strptr:&eMTCconfig->si_ValidityTime_r13, defstrval:"true", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_FREQ_HOPPING_PARAMETERS_DL_R13, NULL, 0, strptr:&eMTCconfig->freqHoppingParametersDL_r13, defstrval:"DISABLE", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_MPDCCH_PDSCH_HOPPING_NB_R13, NULL, 0, strptr:&eMTCconfig->mpdcch_pdsch_HoppingNB_r13, defstrval:"nb2", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_INTERVAL_DL_HOPPING_CONFIG_COMMON_MODE_A_R13, NULL, 0, strptr:&eMTCconfig->interval_DLHoppingConfigCommonModeA_r13, defstrval:"interval-FDD-r13", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_INTERVAL_DL_HOPPING_CONFIG_COMMON_MODE_A_R13_VAL, NULL, 0, iptr:&eMTCconfig->interval_DLHoppingConfigCommonModeA_r13_val, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_INTERVAL_DL_HOPPING_CONFIG_COMMON_MODE_B_R13, NULL, 0, strptr:&eMTCconfig->interval_DLHoppingConfigCommonModeB_r13, defstrval:"interval-FDD-r13", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_INTERVAL_DL_HOPPING_CONFIG_COMMON_MODE_B_R13_VAL, NULL, 0, iptr:&eMTCconfig->interval_DLHoppingConfigCommonModeB_r13_val, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_MPDCCH_PDSCH_HOPPING_OFFSET_R13, NULL, 0, iptr:&eMTCconfig->mpdcch_pdsch_HoppingOffset_r13, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PREAMBLE_TRANSMAX_CE_R13, NULL, 0, iptr:&eMTCconfig->preambleTransMax_CE_r13, defintval:10, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL0, NULL, 0, strptr:&eMTCconfig->pucch_NumRepetitionCE_Msg4_Level0_r13, defstrval:"n1", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL1, NULL, 0, strptr:&eMTCconfig->pucch_NumRepetitionCE_Msg4_Level1_r13, defstrval:"", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL2, NULL, 0, strptr:&eMTCconfig->pucch_NumRepetitionCE_Msg4_Level2_r13, defstrval:"", TYPE_STRING, 0}, \ - {ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL3, NULL, 0, strptr:&eMTCconfig->pucch_NumRepetitionCE_Msg4_Level3_r13, defstrval:"", TYPE_STRING, 0} \ - } +// clang-format off +#define EMTCPARAMS_DESC(eMTCconfig) { \ + {"eMTC_configured", NULL, 0, .iptr=&eMTCconfig->eMTC_configured, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PRACH_ROOT, NULL, 0, .iptr=&eMTCconfig->ccparams.prach_root, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PRACH_CONFIG_INDEX, NULL, 0, .iptr=&eMTCconfig->ccparams.prach_config_index, .defintval=0, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_PRACH_HIGH_SPEED, NULL, 0, .strptr=&eMTCconfig->ccparams.prach_high_speed, .defstrval="DISABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PRACH_ZERO_CORRELATION, NULL, 0, .iptr=&eMTCconfig->ccparams.prach_zero_correlation, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PRACH_FREQ_OFFSET, NULL, 0, .iptr=&eMTCconfig->ccparams.prach_freq_offset, .defintval=2, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT, NULL, 0, .iptr=&eMTCconfig->ccparams.pucch_delta_shift, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PUCCH_NRB_CQI, NULL, 0, .iptr=&eMTCconfig->ccparams.pucch_nRB_CQI, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PUCCH_NCS_AN, NULL, 0, .iptr=&eMTCconfig->ccparams.pucch_nCS_AN, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PUCCH_N1_AN, NULL, 0, .iptr=&eMTCconfig->ccparams.pucch_n1_AN, .defintval=32, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PDSCH_RS_EPRE, NULL, 0, .iptr=&eMTCconfig->ccparams.pdsch_referenceSignalPower, .defintval=-29, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_PDSCH_PB, NULL, 0, .iptr=&eMTCconfig->ccparams.pdsch_p_b, .defintval=0, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_PUSCH_N_SB, NULL, 0, .iptr=&eMTCconfig->ccparams.pusch_n_SB, .defintval=1, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_PUSCH_HOPPINGMODE, NULL, 0, .strptr=&eMTCconfig->ccparams.pusch_hoppingMode, .defstrval="interSubFrame", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUSCH_HOPPINGOFFSET, NULL, 0, .iptr=&eMTCconfig->ccparams.pusch_hoppingOffset, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PUSCH_ENABLE64QAM, NULL, 0, .strptr=&eMTCconfig->ccparams.pusch_enable64QAM, .defstrval="DISABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN, NULL, 0, .strptr=&eMTCconfig->ccparams.pusch_groupHoppingEnabled, .defstrval="ENABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUSCH_GROUP_ASSIGNMENT, NULL, 0, .iptr=&eMTCconfig->ccparams.pusch_groupAssignment, .defintval=0, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN, NULL, 0, .strptr=&eMTCconfig->ccparams.pusch_sequenceHoppingEnabled, .defstrval="DISABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUSCH_NDMRS1, NULL, 0, .iptr=&eMTCconfig->ccparams.pusch_nDMRS1, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PHICH_DURATION, NULL, 0, .strptr=&eMTCconfig->ccparams.phich_duration, .defstrval="NORMAL", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PHICH_RESOURCE, NULL, 0, .strptr=&eMTCconfig->ccparams.phich_resource, .defstrval="ONESIXTH", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_SRS_ENABLE, NULL, 0, .strptr=&eMTCconfig->ccparams.srs_enable, .defstrval="DISABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG, NULL, 0, .iptr=&eMTCconfig->ccparams.srs_BandwidthConfig, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG, NULL, 0, .iptr=&eMTCconfig->ccparams.srs_SubframeConfig, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG, NULL, 0, .strptr=&eMTCconfig->ccparams.srs_ackNackST, .defstrval="DISABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_SRS_MAXUPPTS, NULL, 0, .strptr=&eMTCconfig->ccparams.srs_MaxUpPts, .defstrval="DISABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUSCH_PO_NOMINAL, NULL, 0, .iptr=&eMTCconfig->ccparams.pusch_p0_Nominal, .defintval=-90, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_PUSCH_ALPHA, NULL, 0, .strptr=&eMTCconfig->ccparams.pusch_alpha, .defstrval="AL1", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUCCH_PO_NOMINAL, NULL, 0, .iptr=&eMTCconfig->ccparams.pucch_p0_Nominal, .defintval=-96, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_MSG3_DELTA_PREAMBLE, NULL, 0, .iptr=&eMTCconfig->ccparams.msg3_delta_Preamble, .defintval=6, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1, NULL, 0, .strptr=&eMTCconfig->ccparams.pucch_deltaF_Format1, .defstrval="DELTAF2", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1b, NULL, 0, .strptr=&eMTCconfig->ccparams.pucch_deltaF_Format1b, .defstrval="deltaF3", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2, NULL, 0, .strptr=&eMTCconfig->ccparams.pucch_deltaF_Format2, .defstrval="deltaF0", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2A, NULL, 0, .strptr=&eMTCconfig->ccparams.pucch_deltaF_Format2a, .defstrval="deltaF0", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2B, NULL, 0, .strptr=&eMTCconfig->ccparams.pucch_deltaF_Format2b, .defstrval="deltaF0", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_RACH_NUM_RA_PREAMBLES, NULL, 0, .iptr=&eMTCconfig->ccparams.rach_numberOfRA_Preambles, .defintval=4, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG, NULL, 0, .strptr=&eMTCconfig->ccparams.rach_preamblesGroupAConfig, .defstrval="DISABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA, NULL, 0, .iptr=&eMTCconfig->ccparams.rach_sizeOfRA_PreamblesGroupA, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA, NULL, 0, .iptr=&eMTCconfig->ccparams.rach_messageSizeGroupA, .defintval=56, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB, NULL, 0, .strptr=&eMTCconfig->ccparams.rach_messagePowerOffsetGroupB, .defstrval="minusinfinity", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP, NULL, 0, .iptr=&eMTCconfig->ccparams.rach_powerRampingStep, .defintval=4, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER, NULL, 0, .iptr=&eMTCconfig->ccparams.rach_preambleInitialReceivedTargetPower, .defintval=-100, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX, NULL, 0, .iptr=&eMTCconfig->ccparams.rach_preambleTransMax, .defintval=10, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE, NULL, 0, .iptr=&eMTCconfig->ccparams.rach_raResponseWindowSize, .defintval=10, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER, NULL, 0, .iptr=&eMTCconfig->ccparams.rach_macContentionResolutionTimer, .defintval=48, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, NULL, 0, .iptr=&eMTCconfig->ccparams.rach_maxHARQ_Msg3Tx, .defintval=4, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE, NULL, 0, .iptr=&eMTCconfig->ccparams.pcch_defaultPagingCycle, .defintval=128, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_PCCH_NB, NULL, 0, .strptr=&eMTCconfig->ccparams.pcch_nB, .defstrval="oneT", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF, NULL, 0, .iptr=&eMTCconfig->ccparams.bcch_modificationPeriodCoeff, .defintval=2, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG, NULL, 0, .strptr=&eMTCconfig->ccparams.rach_preamblesGroupAConfig, .defstrval="DISABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_UETIMERS_T300, NULL, 0, .iptr=&eMTCconfig->ccparams.ue_TimersAndConstants_t300, .defintval=1000, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_UETIMERS_T301, NULL, 0, .iptr=&eMTCconfig->ccparams.ue_TimersAndConstants_t301, .defintval=1000, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_UETIMERS_T310, NULL, 0, .iptr=&eMTCconfig->ccparams.ue_TimersAndConstants_t310, .defintval=1000, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_UETIMERS_T311, NULL, 0, .iptr=&eMTCconfig->ccparams.ue_TimersAndConstants_t311, .defintval=10000, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_UETIMERS_N310, NULL, 0, .iptr=&eMTCconfig->ccparams.ue_TimersAndConstants_n310, .defintval=20, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_UETIMERS_N311, NULL, 0, .iptr=&eMTCconfig->ccparams.ue_TimersAndConstants_n311, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, .iptr=&eMTCconfig->ccparams.ue_TransmissionMode, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_SCHEDULING_INFO_SIB1_BR_R13, NULL, 0, .iptr=&eMTCconfig->schedulingInfoSIB1_BR_r13, .defintval=4, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PRACH_CONFIG_COMMON_V1310, NULL, 0, .strptr=&eMTCconfig->prach_ConfigCommon_v1310, .defstrval="ENABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_MPDCCH_START_SF_CSS_RA_R13, NULL, 0, .strptr=&eMTCconfig->mpdcch_startSF_CSS_RA_r13, .defstrval="fdd-r13", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_MPDCCH_START_SF_CSS_RA_R13_VAL, NULL, 0, .strptr=&eMTCconfig->mpdcch_startSF_CSS_RA_r13_val, .defstrval="v1", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PRACH_HOPPING_OFFSET_R13, NULL, 0, .iptr=&eMTCconfig->prach_HoppingOffset_r13, .defintval=0, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_PDSCH_MAX_NUM_REPETITION_CE_MODE_A_R13, NULL, 0, .strptr=&eMTCconfig->pdsch_maxNumRepetitionCEmodeA_r13, .defstrval="r16", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUSCH_MAX_NUM_REPETITION_CE_MODE_A_R13, NULL, 0, .strptr=&eMTCconfig->pusch_maxNumRepetitionCEmodeA_r13, .defstrval="r8", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUSCH_REPETITION_LEVEL_CE_MODE_A_R13, NULL, 0, .strptr=&eMTCconfig->pusch_repetitionLevelCEmodeA_r13, .defstrval="l1", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_CELL_SELECTION_INFO_CE_R13, NULL, 0, .strptr=&eMTCconfig->cellSelectionInfoCE_r13, .defstrval="ENABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_Q_RX_LEV_MIN_CE_R13, NULL, 0, .iptr=&eMTCconfig->q_RxLevMinCE_r13, .defintval=-70, TYPE_INT, 0}, \ + {ENB_CONFIG_STRING_BANDWIDTH_REDUCED_ACCESS_RELATED_INFO_R13, NULL, 0, .strptr=&eMTCconfig->bandwidthReducedAccessRelatedInfo_r13, .defstrval="ENABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_SI_WINDOW_LENGTH_BR_R13, NULL, 0, .strptr=&eMTCconfig->si_WindowLength_BR_r13, .defstrval="ms20", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_SI_REPETITION_PATTERN_R13, NULL, 0, .strptr=&eMTCconfig->si_RepetitionPattern_r13, .defstrval="everyRF", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_FDD_DOWNLINK_OR_TDD_SUBFRAME_BITMAP_BR_R13, NULL, 0, .strptr=&eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_r13, .defstrval="subframePattern40-r13", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_FDD_DOWNLINK_OR_TDD_SUBFRAME_BITMAP_BR_VAL_R13, NULL, 0, .i64ptr=&eMTCconfig->fdd_DownlinkOrTddSubframeBitmapBR_val_r13, .defint64val=0xFFFFFFFFFF, TYPE_UINT64, 0}, \ + {ENB_CONFIG_STRING_START_SYMBOL_BR_R13, NULL, 0, .iptr=&eMTCconfig->startSymbolBR_r13, .defintval=3, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_SI_HOPPING_CONFIG_COMMON_R13, NULL, 0, .strptr=&eMTCconfig->si_HoppingConfigCommon_r13 , .defstrval="off", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_SI_VALIDITY_TIME_R13, NULL, 0, .strptr=&eMTCconfig->si_ValidityTime_r13, .defstrval="true", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_FREQ_HOPPING_PARAMETERS_DL_R13, NULL, 0, .strptr=&eMTCconfig->freqHoppingParametersDL_r13, .defstrval="DISABLE", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_MPDCCH_PDSCH_HOPPING_NB_R13, NULL, 0, .strptr=&eMTCconfig->mpdcch_pdsch_HoppingNB_r13, .defstrval="nb2", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_INTERVAL_DL_HOPPING_CONFIG_COMMON_MODE_A_R13, NULL, 0, .strptr=&eMTCconfig->interval_DLHoppingConfigCommonModeA_r13, .defstrval="interval-FDD-r13", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_INTERVAL_DL_HOPPING_CONFIG_COMMON_MODE_A_R13_VAL, NULL, 0, .iptr=&eMTCconfig->interval_DLHoppingConfigCommonModeA_r13_val, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_INTERVAL_DL_HOPPING_CONFIG_COMMON_MODE_B_R13, NULL, 0, .strptr=&eMTCconfig->interval_DLHoppingConfigCommonModeB_r13, .defstrval="interval-FDD-r13", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_INTERVAL_DL_HOPPING_CONFIG_COMMON_MODE_B_R13_VAL, NULL, 0, .iptr=&eMTCconfig->interval_DLHoppingConfigCommonModeB_r13_val, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_MPDCCH_PDSCH_HOPPING_OFFSET_R13, NULL, 0, .iptr=&eMTCconfig->mpdcch_pdsch_HoppingOffset_r13, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PREAMBLE_TRANSMAX_CE_R13, NULL, 0, .iptr=&eMTCconfig->preambleTransMax_CE_r13, .defintval=10, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL0, NULL, 0, .strptr=&eMTCconfig->pucch_NumRepetitionCE_Msg4_Level0_r13, .defstrval="n1", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL1, NULL, 0, .strptr=&eMTCconfig->pucch_NumRepetitionCE_Msg4_Level1_r13, .defstrval="", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL2, NULL, 0, .strptr=&eMTCconfig->pucch_NumRepetitionCE_Msg4_Level2_r13, .defstrval="", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_PUCCH_NUM_REPETITION_CE_MSG4_LEVEL3, NULL, 0, .strptr=&eMTCconfig->pucch_NumRepetitionCE_Msg4_Level3_r13, .defstrval="", TYPE_STRING, 0}, \ +} +// clang-format on +// clang-format off #define EMTCPARAMS_CHECK { \ { {NULL}} , \ { {NULL}} , \ @@ -349,64 +352,79 @@ typedef struct ccparams_eMTC_s { { {NULL}} , \ { {NULL}} , \ } +// clang-format on -#define SYSTEM_INFO_VALUE_TAG_SI_DESC(eMTCconfig) { \ -{"systemInfoValueTagSi_r13", NULL, 0, iptr:&eMTCconfig->systemInfoValueTagSi_r13, defintval:0, TYPE_UINT, 0} \ - } - - -#define SI_INFO_BR_DESC(eMTCconfig) { \ -{"si_Narrowband_r13", NULL, 0, iptr:&eMTCconfig->si_Narrowband_r13, defintval:5, TYPE_UINT, 0}, \ -{"si_TBS_r13", NULL, 0, iptr:&eMTCconfig->si_TBS_r13, defintval:5, TYPE_UINT, 0} \ +// clang-format off +#define SYSTEM_INFO_VALUE_TAG_SI_DESC(eMTCconfig) { \ + {"systemInfoValueTagSi_r13", NULL, 0, .iptr=&eMTCconfig->systemInfoValueTagSi_r13, .defintval=0, TYPE_UINT, 0} \ } - -#define RSRP_RANGE_LIST_DESC(eMTCconfig) { \ -{"rsrp_range_br", NULL, 0, iptr:&eMTCconfig->rsrp_range_br, defintval:0, TYPE_UINT, 0} \ - } +// clang-format on -#define RACH_CE_LEVELINFOLIST_R13_DESC(eMTCconfig) { \ -{ENB_CONFIG_STRING_FIRST_PREAMBLE_R13, NULL, 0, iptr:&eMTCconfig->firstPreamble_r13, defintval:60, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_LAST_PREAMBLE_R13, NULL, 0, iptr:&eMTCconfig->lastPreamble_r13, defintval:63, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_RA_RESPONSE_WINDOW_SIZE_R13, NULL, 0, iptr:&eMTCconfig->ra_ResponseWindowSize_r13, defintval:20, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_MAC_CONTENTION_RESOLUTION_TIMER_R13, NULL, 0, iptr:&eMTCconfig->mac_ContentionResolutionTimer_r13, defintval:80, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_RAR_HOPPING_CONFIG_R13, NULL, 0, iptr:&eMTCconfig->rar_HoppingConfig_r13, defintval:1, TYPE_UINT, 0}\ +// clang-format off +#define SI_INFO_BR_DESC(eMTCconfig) { \ + {"si_Narrowband_r13", NULL, 0, .iptr=&eMTCconfig->si_Narrowband_r13, .defintval=5, TYPE_UINT, 0}, \ + {"si_TBS_r13", NULL, 0, .iptr=&eMTCconfig->si_TBS_r13, .defintval=5, TYPE_UINT, 0}, \ } +// clang-format on -#define PRACH_PARAMS_CE_R13_DESC(eMTCconfig) { \ -{ENB_CONFIG_STRING_PRACH_CONFIG_INDEX_BR, NULL, 0, iptr:&eMTCconfig->prach_config_index_br, defintval:3, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PRACH_FREQ_OFFSET_BR, NULL, 0, iptr:&eMTCconfig->prach_freq_offset_br, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PRACH_STARTING_SUBFRAME_R13, NULL, 0, iptr:&eMTCconfig->prach_StartingSubframe_r13, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_MAX_NUM_PER_PREAMBLE_ATTEMPT_CE_R13, NULL, 0, iptr:&eMTCconfig->maxNumPreambleAttemptCE_r13, defintval:10, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_NUM_REPETITION_PER_PREAMBLE_ATTEMPT_R13, NULL, 0, iptr:&eMTCconfig->numRepetitionPerPreambleAttempt_r13, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_MPDCCH_NUM_REPETITION_RA_R13, NULL, 0, iptr:&eMTCconfig->mpdcch_NumRepetition_RA_r13, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PRACH_HOPPING_CONFIG_R13, NULL, 0, iptr:&eMTCconfig->prach_HoppingConfig_r13, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_SRING_MAX_AVAILABLE_NARROW_BAND, NULL, 0, uptr:NULL, defintarrayval:NULL, TYPE_INTARRAY, 0} \ +// clang-format off +#define RSRP_RANGE_LIST_DESC(eMTCconfig) { \ + {"rsrp_range_br", NULL, 0, .iptr=&eMTCconfig->rsrp_range_br, .defintval=0, TYPE_UINT, 0} \ } +// clang-format on -#define N1PUCCH_AN_INFOLIST_R13_DESC(eMTCconfig) { \ -{ENB_CONFIG_STRING_PUCCH_INFO_VALUE, NULL, 0, iptr:&eMTCconfig->pucch_info_value, defintval:0, TYPE_UINT, 0} \ + +// clang-format off +#define RACH_CE_LEVELINFOLIST_R13_DESC(eMTCconfig) { \ + {ENB_CONFIG_STRING_FIRST_PREAMBLE_R13, NULL, 0, .iptr=&eMTCconfig->firstPreamble_r13, .defintval=60, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_LAST_PREAMBLE_R13, NULL, 0, .iptr=&eMTCconfig->lastPreamble_r13, .defintval=63, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_RA_RESPONSE_WINDOW_SIZE_R13, NULL, 0, .iptr=&eMTCconfig->ra_ResponseWindowSize_r13, .defintval=20, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_MAC_CONTENTION_RESOLUTION_TIMER_R13, NULL, 0, .iptr=&eMTCconfig->mac_ContentionResolutionTimer_r13, .defintval=80, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_RAR_HOPPING_CONFIG_R13, NULL, 0, .iptr=&eMTCconfig->rar_HoppingConfig_r13, .defintval=1, TYPE_UINT, 0}, \ } +// clang-format on - -#define PCCH_CONFIG_V1310_DESC(eMTCconfig) { \ -{ENB_CONFIG_STRING_PAGING_NARROWBANDS_R13, NULL, 0, iptr:&eMTCconfig->paging_narrowbands_r13, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_MPDCCH_NUMREPETITION_PAGING_R13, NULL, 0, iptr:&eMTCconfig->mpdcch_numrepetition_paging_r13, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_NB_V1310, NULL, 0, iptr:&eMTCconfig->nb_v1310, defintval:256, TYPE_UINT, 0} \ +// clang-format off +#define PRACH_PARAMS_CE_R13_DESC(eMTCconfig) { \ + {ENB_CONFIG_STRING_PRACH_CONFIG_INDEX_BR, NULL, 0, .iptr=&eMTCconfig->prach_config_index_br, .defintval=3, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PRACH_FREQ_OFFSET_BR, NULL, 0, .iptr=&eMTCconfig->prach_freq_offset_br, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PRACH_STARTING_SUBFRAME_R13, NULL, 0, .iptr=&eMTCconfig->prach_StartingSubframe_r13, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_MAX_NUM_PER_PREAMBLE_ATTEMPT_CE_R13, NULL, 0, .iptr=&eMTCconfig->maxNumPreambleAttemptCE_r13, .defintval=10, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_NUM_REPETITION_PER_PREAMBLE_ATTEMPT_R13, NULL, 0, .iptr=&eMTCconfig->numRepetitionPerPreambleAttempt_r13, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_MPDCCH_NUM_REPETITION_RA_R13, NULL, 0, .iptr=&eMTCconfig->mpdcch_NumRepetition_RA_r13, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_PRACH_HOPPING_CONFIG_R13, NULL, 0, .iptr=&eMTCconfig->prach_HoppingConfig_r13, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_SRING_MAX_AVAILABLE_NARROW_BAND, NULL, 0, .uptr=NULL, .defintarrayval=NULL, TYPE_INTARRAY, 0}, \ } +// clang-format on - -#define SIB2_FREQ_HOPPING_R13_DESC(eMTCconfig) { \ -{ENB_CONFIG_STRING_MPDCCH_PDSCH_HOPPING_NB_R13, NULL, 0, iptr:&eMTCconfig->sib2_mpdcch_pdsch_hoppingNB_r13, defintval:0, TYPE_UINT, 0}, \ -{"sib2_interval_DLHoppingConfigCommonModeA_r13", NULL, 0, strptr:&eMTCconfig->sib2_interval_DLHoppingConfigCommonModeA_r13, defstrval:"FDD", TYPE_STRING, 0}, \ -{"sib2_interval_DLHoppingConfigCommonModeA_r13_val", NULL, 0, iptr:&eMTCconfig->sib2_interval_DLHoppingConfigCommonModeA_r13_val, defintval:0, TYPE_UINT, 0}, \ -{"sib2_interval_DLHoppingConfigCommonModeB_r13", NULL, 0, strptr:&eMTCconfig->sib2_interval_DLHoppingConfigCommonModeB_r13, defstrval:"FDD", TYPE_STRING, 0}, \ -{"sib2_interval_DLHoppingConfigCommonModeB_r13_val", NULL, 0, iptr:&eMTCconfig->sib2_interval_DLHoppingConfigCommonModeB_r13_val, defintval:0, TYPE_UINT, 0}, \ -{"sib2_interval_ULHoppingConfigCommonModeA_r13", NULL, 0, strptr:&eMTCconfig->sib2_interval_ULHoppingConfigCommonModeA_r13, defstrval:"FDD", TYPE_STRING, 0}, \ -{"sib2_interval_ULHoppingConfigCommonModeA_r13_val", NULL, 0, iptr:&eMTCconfig->sib2_interval_ULHoppingConfigCommonModeA_r13_val, defintval:4, TYPE_UINT, 0}, \ -{"sib2_interval_ULHoppingConfigCommonModeB_r13", NULL, 0, strptr:&eMTCconfig->sib2_interval_ULHoppingConfigCommonModeB_r13, defstrval:"FDD", TYPE_STRING, 0}, \ -{"sib2_interval_ULHoppingConfigCommonModeB_r13_val", NULL, 0, iptr:&eMTCconfig->sib2_interval_ULHoppingConfigCommonModeB_r13_val, defintval:0, TYPE_UINT, 0}, \ -{"sib2_mpdcch_pdsch_hoppingOffset_r13", NULL, 0, iptr:&eMTCconfig->sib2_mpdcch_pdsch_hoppingOffset_r13, defintval:1, TYPE_UINT, 0} \ +// clang-format off +#define N1PUCCH_AN_INFOLIST_R13_DESC(eMTCconfig) { \ + {ENB_CONFIG_STRING_PUCCH_INFO_VALUE, NULL, 0, .iptr=&eMTCconfig->pucch_info_value, .defintval=0, TYPE_UINT, 0}, \ } +// clang-format on + +// clang-format off +#define PCCH_CONFIG_V1310_DESC(eMTCconfig) { \ + {ENB_CONFIG_STRING_PAGING_NARROWBANDS_R13, NULL, 0, .iptr=&eMTCconfig->paging_narrowbands_r13, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_MPDCCH_NUMREPETITION_PAGING_R13, NULL, 0, .iptr=&eMTCconfig->mpdcch_numrepetition_paging_r13, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_NB_V1310, NULL, 0, .iptr=&eMTCconfig->nb_v1310, .defintval=256, TYPE_UINT, 0}, \ +} +// clang-format on + +// clang-format off +#define SIB2_FREQ_HOPPING_R13_DESC(eMTCconfig) { \ + {ENB_CONFIG_STRING_MPDCCH_PDSCH_HOPPING_NB_R13, NULL, 0, .iptr=&eMTCconfig->sib2_mpdcch_pdsch_hoppingNB_r13, .defintval=0, TYPE_UINT, 0}, \ + {"sib2_interval_DLHoppingConfigCommonModeA_r13", NULL, 0, .strptr=&eMTCconfig->sib2_interval_DLHoppingConfigCommonModeA_r13, .defstrval="FDD", TYPE_STRING, 0}, \ + {"sib2_interval_DLHoppingConfigCommonModeA_r13_val", NULL, 0, .iptr=&eMTCconfig->sib2_interval_DLHoppingConfigCommonModeA_r13_val, .defintval=0, TYPE_UINT, 0}, \ + {"sib2_interval_DLHoppingConfigCommonModeB_r13", NULL, 0, .strptr=&eMTCconfig->sib2_interval_DLHoppingConfigCommonModeB_r13, .defstrval="FDD", TYPE_STRING, 0}, \ + {"sib2_interval_DLHoppingConfigCommonModeB_r13_val", NULL, 0, .iptr=&eMTCconfig->sib2_interval_DLHoppingConfigCommonModeB_r13_val, .defintval=0, TYPE_UINT, 0}, \ + {"sib2_interval_ULHoppingConfigCommonModeA_r13", NULL, 0, .strptr=&eMTCconfig->sib2_interval_ULHoppingConfigCommonModeA_r13, .defstrval="FDD", TYPE_STRING, 0}, \ + {"sib2_interval_ULHoppingConfigCommonModeA_r13_val", NULL, 0, .iptr=&eMTCconfig->sib2_interval_ULHoppingConfigCommonModeA_r13_val, .defintval=4, TYPE_UINT, 0}, \ + {"sib2_interval_ULHoppingConfigCommonModeB_r13", NULL, 0, .strptr=&eMTCconfig->sib2_interval_ULHoppingConfigCommonModeB_r13, .defstrval="FDD", TYPE_STRING, 0}, \ + {"sib2_interval_ULHoppingConfigCommonModeB_r13_val", NULL, 0, .iptr=&eMTCconfig->sib2_interval_ULHoppingConfigCommonModeB_r13_val, .defintval=0, TYPE_UINT, 0}, \ + {"sib2_mpdcch_pdsch_hoppingOffset_r13", NULL, 0, .iptr=&eMTCconfig->sib2_mpdcch_pdsch_hoppingOffset_r13, .defintval=1, TYPE_UINT, 0}, \ +} +// clang-format on #endif diff --git a/openair2/ENB_APP/enb_paramdef_mce.h b/openair2/ENB_APP/enb_paramdef_mce.h index fdc2731e16..16c230d5ee 100644 --- a/openair2/ENB_APP/enb_paramdef_mce.h +++ b/openair2/ENB_APP/enb_paramdef_mce.h @@ -46,10 +46,10 @@ #define MCE_CONFIG_STRING_MCE_M3 "enable_mce_m3" #define MCE_PARAMS_DESC {\ -{MCE_CONFIG_STRING_MCE_ID, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{MCE_CONFIG_STRING_MCE_NAME, NULL, 0, strptr:NULL, defstrval:"OAIMCE", TYPE_STRING, 0}, \ -{MCE_CONFIG_STRING_MCE_M2, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \ -{MCE_CONFIG_STRING_MCE_M3, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \ +{MCE_CONFIG_STRING_MCE_ID, NULL, 0, .uptr=NULL, .defintval=0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MCE_NAME, NULL, 0, .strptr=NULL, .defstrval="OAIMCE", TYPE_STRING, 0}, \ +{MCE_CONFIG_STRING_MCE_M2, NULL, 0, .strptr=NULL, .defstrval="no", TYPE_STRING, 0}, \ +{MCE_CONFIG_STRING_MCE_M3, NULL, 0, .strptr=NULL, .defstrval="no", TYPE_STRING, 0}, \ } #define MCE_MCE_ID_IDX 0 @@ -87,12 +87,12 @@ #define MCE_NETPARAMS_DESC { \ -{MCE_CONFIG_STRING_MCE_INTERFACE_NAME_FOR_M2_ENB, NULL, 0, strptr:&mce_interface_name_for_m2_enb, defstrval:"lo", TYPE_STRING, 0}, \ -{MCE_CONFIG_STRING_MCE_IPV4_ADDRESS_FOR_M2C, NULL, 0, strptr:&mce_ipv4_address_for_m2c, defstrval:NULL, TYPE_STRING, 0}, \ -{MCE_CONFIG_STRING_MCE_PORT_FOR_M2C, NULL, 0, uptr:&mce_port_for_m2c, defintval:36443L, TYPE_UINT, 0}, \ -{MCE_CONFIG_STRING_MCE_INTERFACE_NAME_FOR_M3_MME, NULL, 0, strptr:&mce_interface_name_for_m3_mme, defstrval:NULL, TYPE_STRING, 0}, \ -{MCE_CONFIG_STRING_MCE_IPV4_ADDRESS_FOR_M3C, NULL, 0, strptr:&mce_ipv4_address_for_m3c, defstrval:NULL, TYPE_STRING, 0}, \ -{MCE_CONFIG_STRING_MCE_PORT_FOR_M3C, NULL, 0, uptr:&mce_port_for_m3c, defintval:36444L, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MCE_INTERFACE_NAME_FOR_M2_ENB, NULL, 0, .strptr=&mce_interface_name_for_m2_enb, .defstrval="lo", TYPE_STRING, 0}, \ +{MCE_CONFIG_STRING_MCE_IPV4_ADDRESS_FOR_M2C, NULL, 0, .strptr=&mce_ipv4_address_for_m2c, .defstrval=NULL, TYPE_STRING, 0}, \ +{MCE_CONFIG_STRING_MCE_PORT_FOR_M2C, NULL, 0, .uptr=&mce_port_for_m2c, .defintval=36443L, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MCE_INTERFACE_NAME_FOR_M3_MME, NULL, 0, .strptr=&mce_interface_name_for_m3_mme, .defstrval=NULL, TYPE_STRING, 0}, \ +{MCE_CONFIG_STRING_MCE_IPV4_ADDRESS_FOR_M3C, NULL, 0, .strptr=&mce_ipv4_address_for_m3c, .defstrval=NULL, TYPE_STRING, 0}, \ +{MCE_CONFIG_STRING_MCE_PORT_FOR_M3C, NULL, 0, .uptr=&mce_port_for_m3c, .defintval=36444L, TYPE_UINT, 0}, \ } @@ -106,9 +106,9 @@ #define MCE_CONFIG_STRING_TARGET_MME_M3_IP_ADDRESS_PREFERENCE "preference" /* optname helpstr paramflags XXXptr defXXXval type numelt */ #define M3PARAMS_DESC { \ -{MCE_CONFIG_STRING_TARGET_MME_M3_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{MCE_CONFIG_STRING_TARGET_MME_M3_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{MCE_CONFIG_STRING_TARGET_MME_M3_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{MCE_CONFIG_STRING_TARGET_MME_M3_IPV4_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ +{MCE_CONFIG_STRING_TARGET_MME_M3_IPV6_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ +{MCE_CONFIG_STRING_TARGET_MME_M3_IP_ADDRESS_PREFERENCE, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ } #define MCE2_M3_IPV4_ADDRESS_IDX 0 @@ -132,13 +132,13 @@ /* optname helpstr paramflags XXXptr defXXXval type numelt */ #define MCCH_PARAMS_DESC { \ -{MCE_CONFIG_STRING_MCCH_MBSFN_AREA, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{MCE_CONFIG_STRING_MCCH_PDCCH_LENGTH, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{MCE_CONFIG_STRING_MCCH_REPETITION_PERIOD, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{MCE_CONFIG_STRING_MCCH_OFFSET, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{MCE_CONFIG_STRING_MCCH_MODIFICATION_PERIOD,NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{MCE_CONFIG_STRING_MCCH_SF_ALLOCATION_INFO, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{MCE_CONFIG_STRING_MCCH_MCS, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MCCH_MBSFN_AREA, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MCCH_PDCCH_LENGTH, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MCCH_REPETITION_PERIOD, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MCCH_OFFSET, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MCCH_MODIFICATION_PERIOD,NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MCCH_SF_ALLOCATION_INFO, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MCCH_MCS, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ } #define MCCH_MBSFN_AREA_IDX 0 @@ -157,9 +157,9 @@ #define MCE_CONFIG_STRING_MNC_LENGTH "mnc_length" /* optname helpstr paramflags XXXptr defXXXval type numelt */ #define MCE_PLMN_PARAMS_DESC { \ -{MCE_CONFIG_STRING_MCC, NULL, 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \ -{MCE_CONFIG_STRING_MNC, NULL, 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \ -{MCE_CONFIG_STRING_MNC_LENGTH, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MCC, NULL, 0, .uptr=NULL, .defuintval=1000, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MNC, NULL, 0, .uptr=NULL, .defuintval=1000, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MNC_LENGTH, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ } #define MCE_CONFIG_STRING_MCC_IDX 0 @@ -171,7 +171,7 @@ #define MCE_CONFIG_STRING_MCCH_UPDATE_TIME "mcch_update_time" #define MCE_MBMS_SCHEDULING_INFO_PARAMS_DESC { \ -{MCE_CONFIG_STRING_MCCH_UPDATE_TIME, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MCCH_UPDATE_TIME, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ } #define MCE_CONFIG_STRING_MCCH_UPDATE_TIME_IDX 0 @@ -182,8 +182,8 @@ #define MCE_CONFIG_STRING_MBMS_AREA_ID "mbms_area_id" #define MCE_MBMS_AREA_CONFIGURATION_LIST_PARAMS_DESC { \ -{MCE_CONFIG_STRING_COMMON_SF_ALLOCATION_PERIOD, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{MCE_CONFIG_STRING_MBMS_AREA_ID, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_COMMON_SF_ALLOCATION_PERIOD, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MBMS_AREA_ID, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ } #define MCE_CONFIG_STRING_COMMON_SF_ALLOCATION_PERIOD_IDX 0 #define MCE_CONFIG_STRING_MBMS_AREA_ID_IDX 1 @@ -196,9 +196,9 @@ #define MCE_CONFIG_STRING_MCH_SCHEDULING_PERIOD "mch_scheduling_period" #define MCE_MBMS_PMCH_CONFIGURATION_LIST_PARAMS_DESC { \ -{MCE_CONFIG_STRING_ALLOCATED_SF_END, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{MCE_CONFIG_STRING_DATA_MCS, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{MCE_CONFIG_STRING_MCH_SCHEDULING_PERIOD, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_ALLOCATED_SF_END, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_DATA_MCS, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MCH_SCHEDULING_PERIOD, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ } #define MCE_CONFIG_STRING_ALLOCATED_SF_END_IDX 0 #define MCE_CONFIG_STRING_DATA_MCS_IDX 1 @@ -211,9 +211,9 @@ #define MCE_CONFIG_STRING_MBMS_LCID "lcid" #define MCE_MBMS_MBMS_SESSION_LIST_DESC { \ -{MCE_CONFIG_STRING_MBMS_SERVICE_ID, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT32, 0}, \ -{MCE_CONFIG_STRING_MBMS_LCID_ID, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{MCE_CONFIG_STRING_MBMS_LCID, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MBMS_SERVICE_ID, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT32, 0}, \ +{MCE_CONFIG_STRING_MBMS_LCID_ID, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_MBMS_LCID, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ } #define MCE_CONFIG_STRING_MBMS_SERVICE_ID_IDX 0 #define MCE_CONFIG_STRING_MBMS_LCID_ID_IDX 1 @@ -228,10 +228,10 @@ #define MCE_CONFIG_STRING_SUBFRAME_ALLOCATION "subframe_allocation" #define MCE_MBMS_MBMS_SF_CONFIGURATION_LIST_PARAMS_DESC { \ -{MCE_CONFIG_STRING_RADIOFRAME_ALLOCATION_PERIOD, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{MCE_CONFIG_STRING_RADIOFRAME_ALLOOCATION_OFFSET, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{MCE_CONFIG_STRING_NUM_FRAME, NULL, 0, strptr:NULL, defstrval:"oneFrame", TYPE_STRING, 0}, \ -{MCE_CONFIG_STRING_SUBFRAME_ALLOCATION, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_RADIOFRAME_ALLOCATION_PERIOD, NULL, 0, .uptr=NULL, .defintval=0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_RADIOFRAME_ALLOOCATION_OFFSET, NULL, 0, .uptr=NULL, .defintval=0, TYPE_UINT, 0}, \ +{MCE_CONFIG_STRING_NUM_FRAME, NULL, 0, .strptr=NULL, .defstrval="oneFrame", TYPE_STRING, 0}, \ +{MCE_CONFIG_STRING_SUBFRAME_ALLOCATION, NULL, 0, .uptr=NULL, .defintval=0, TYPE_UINT, 0}, \ } #define MCE_CONFIG_STRING_RADIOFRAME_ALLOCATION_PERIOD_IDX 0 #define MCE_CONFIG_STRING_RADIOFRAME_ALLOOCATION_OFFSET_IDX 1 diff --git a/openair2/ENB_APP/enb_paramdef_sidelink.h b/openair2/ENB_APP/enb_paramdef_sidelink.h index 98a3a56eaa..91677b895b 100644 --- a/openair2/ENB_APP/enb_paramdef_sidelink.h +++ b/openair2/ENB_APP/enb_paramdef_sidelink.h @@ -137,46 +137,47 @@ typedef struct ccparams_sidelink_s { /* component carriers configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt checked_param */ /*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ - -#define CCPARAMS_SIDELINK_DESC(SLparams) { \ -{"sidelink_configured", NULL, 0, iptr:&SLparams.sidelink_configured, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_RXPOOL_SC_CP_LEN, NULL, 0, strptr:&SLparams.rxPool_sc_CP_Len, defstrval:"normal", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_RXPOOL_SC_PRIOD, NULL, 0, strptr:&SLparams.rxPool_sc_Period, defstrval:"sf40", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_RXPOOL_DATA_CP_LEN, NULL, 0, strptr:&SLparams.rxPool_data_CP_Len, defstrval:"normal", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_RXPOOL_RC_PRB_NUM, NULL, 0, iptr:&SLparams.rxPool_ResourceConfig_prb_Num, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_RXPOOL_RC_PRB_START, NULL, 0, iptr:&SLparams.rxPool_ResourceConfig_prb_Start, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_RXPOOL_RC_PRB_END, NULL, 0, iptr:&SLparams.rxPool_ResourceConfig_prb_End, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_RXPOOL_RC_OFFSETIND_PRESENT, NULL, 0, strptr:&SLparams.rxPool_ResourceConfig_offsetIndicator_present, defstrval:"prNothing", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_RXPOOL_RC_OFFSETIND_CHOICE, NULL, 0, iptr:&SLparams.rxPool_ResourceConfig_offsetIndicator_choice, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_PRESENT, NULL, 0, strptr:&SLparams.rxPool_ResourceConfig_subframeBitmap_present, defstrval:"prNothing", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_BUF, NULL, 0, strptr:&SLparams.rxPool_ResourceConfig_subframeBitmap_choice_bs_buf, defstrval:"001001", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_SIZE, NULL, 0, iptr:&SLparams.rxPool_ResourceConfig_subframeBitmap_choice_bs_size, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED, NULL, 0, iptr:&SLparams.rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOL_CP_LEN, NULL, 0, strptr:&SLparams.discRxPool_cp_Len, defstrval:"normal", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOL_DISCPERIOD, NULL, 0, strptr:&SLparams.discRxPool_discPeriod, defstrval:"rf32", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOL_NUMRETX, NULL, 0, iptr:&SLparams.discRxPool_numRetx, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOL_NUMREPETITION, NULL, 0, iptr:&SLparams.discRxPool_numRepetition, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_NUM, NULL, 0, iptr:&SLparams.discRxPool_ResourceConfig_prb_Num, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_START, NULL, 0, iptr:&SLparams.discRxPool_ResourceConfig_prb_Start, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_END, NULL, 0, iptr:&SLparams.discRxPool_ResourceConfig_prb_End, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOL_RC_OFFSETIND_PRESENT, NULL, 0, strptr:&SLparams.discRxPool_ResourceConfig_offsetIndicator_present, defstrval:"prNothing", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOL_RC_OFFSETIND_CHOICE, NULL, 0, iptr:&SLparams.discRxPool_ResourceConfig_offsetIndicator_choice, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_PRESENT, NULL, 0, strptr:&SLparams.discRxPool_ResourceConfig_subframeBitmap_present, defstrval:"prNothing", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_BUF, NULL, 0, strptr:&SLparams.discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf, defstrval:"001001", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_SIZE, NULL, 0, iptr:&SLparams.discRxPool_ResourceConfig_subframeBitmap_choice_bs_size, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED,NULL, 0, iptr:&SLparams.discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOLPS_CP_LEN, NULL, 0, strptr:&SLparams.discRxPoolPS_cp_Len, defstrval:"normal", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOLPS_DISCPERIOD, NULL, 0, strptr:&SLparams.discRxPoolPS_discPeriod, defstrval:"rf32", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOLPS_NUMRETX, NULL, 0, iptr:&SLparams.discRxPoolPS_numRetx, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOLPS_NUMREPETITION, NULL, 0, iptr:&SLparams.discRxPoolPS_numRepetition, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_NUM, NULL, 0, iptr:&SLparams.discRxPoolPS_ResourceConfig_prb_Num, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_START, NULL, 0, iptr:&SLparams.discRxPoolPS_ResourceConfig_prb_Start, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_END, NULL, 0, iptr:&SLparams.discRxPoolPS_ResourceConfig_prb_End, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_OFFSETIND_PRESENT, NULL, 0, strptr:&SLparams.discRxPoolPS_ResourceConfig_offsetIndicator_present, defstrval:"prNothing", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_OFFSETIND_CHOICE, NULL, 0, iptr:&SLparams.discRxPoolPS_ResourceConfig_offsetIndicator_choice, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_PRESENT, NULL, 0, strptr:&SLparams.discRxPoolPS_ResourceConfig_subframeBitmap_present, defstrval:"prNothing", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_BUF, NULL, 0, strptr:&SLparams.discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf, defstrval:"001001", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_SIZE, NULL, 0, iptr:&SLparams.discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size, defintval:1, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED,NULL, 0, iptr:&SLparams.discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused, defintval:1, TYPE_UINT, 0} \ +// clang-format off +#define CCPARAMS_SIDELINK_DESC(SLparams) { \ + {"sidelink_configured", NULL, 0, .iptr=&SLparams.sidelink_configured, .defintval=0, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_RXPOOL_SC_CP_LEN, NULL, 0, .strptr=&SLparams.rxPool_sc_CP_Len, .defstrval="normal", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_RXPOOL_SC_PRIOD, NULL, 0, .strptr=&SLparams.rxPool_sc_Period, .defstrval="sf40", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_RXPOOL_DATA_CP_LEN, NULL, 0, .strptr=&SLparams.rxPool_data_CP_Len, .defstrval="normal", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_RXPOOL_RC_PRB_NUM, NULL, 0, .iptr=&SLparams.rxPool_ResourceConfig_prb_Num, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_RXPOOL_RC_PRB_START, NULL, 0, .iptr=&SLparams.rxPool_ResourceConfig_prb_Start, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_RXPOOL_RC_PRB_END, NULL, 0, .iptr=&SLparams.rxPool_ResourceConfig_prb_End, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_RXPOOL_RC_OFFSETIND_PRESENT, NULL, 0, .strptr=&SLparams.rxPool_ResourceConfig_offsetIndicator_present, .defstrval="prNothing", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_RXPOOL_RC_OFFSETIND_CHOICE, NULL, 0, .iptr=&SLparams.rxPool_ResourceConfig_offsetIndicator_choice, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_PRESENT, NULL, 0, .strptr=&SLparams.rxPool_ResourceConfig_subframeBitmap_present, .defstrval="prNothing", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_BUF, NULL, 0, .strptr=&SLparams.rxPool_ResourceConfig_subframeBitmap_choice_bs_buf, .defstrval="001001", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_SIZE, NULL, 0, .iptr=&SLparams.rxPool_ResourceConfig_subframeBitmap_choice_bs_size, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_RXPOOL_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED, NULL, 0, .iptr=&SLparams.rxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOL_CP_LEN, NULL, 0, .strptr=&SLparams.discRxPool_cp_Len, .defstrval="normal", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOL_DISCPERIOD, NULL, 0, .strptr=&SLparams.discRxPool_discPeriod, .defstrval="rf32", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOL_NUMRETX, NULL, 0, .iptr=&SLparams.discRxPool_numRetx, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOL_NUMREPETITION, NULL, 0, .iptr=&SLparams.discRxPool_numRepetition, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_NUM, NULL, 0, .iptr=&SLparams.discRxPool_ResourceConfig_prb_Num, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_START, NULL, 0, .iptr=&SLparams.discRxPool_ResourceConfig_prb_Start, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOL_RC_PRB_END, NULL, 0, .iptr=&SLparams.discRxPool_ResourceConfig_prb_End, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOL_RC_OFFSETIND_PRESENT, NULL, 0, .strptr=&SLparams.discRxPool_ResourceConfig_offsetIndicator_present, .defstrval="prNothing", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOL_RC_OFFSETIND_CHOICE, NULL, 0, .iptr=&SLparams.discRxPool_ResourceConfig_offsetIndicator_choice, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_PRESENT, NULL, 0, .strptr=&SLparams.discRxPool_ResourceConfig_subframeBitmap_present, .defstrval="prNothing", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_BUF, NULL, 0, .strptr=&SLparams.discRxPool_ResourceConfig_subframeBitmap_choice_bs_buf, .defstrval="001001", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_SIZE, NULL, 0, .iptr=&SLparams.discRxPool_ResourceConfig_subframeBitmap_choice_bs_size, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOL_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED, NULL, 0, .iptr=&SLparams.discRxPool_ResourceConfig_subframeBitmap_choice_bs_bits_unused, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOLPS_CP_LEN, NULL, 0, .strptr=&SLparams.discRxPoolPS_cp_Len, .defstrval="normal", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOLPS_DISCPERIOD, NULL, 0, .strptr=&SLparams.discRxPoolPS_discPeriod, .defstrval="rf32", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOLPS_NUMRETX, NULL, 0, .iptr=&SLparams.discRxPoolPS_numRetx, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOLPS_NUMREPETITION, NULL, 0, .iptr=&SLparams.discRxPoolPS_numRepetition, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_NUM, NULL, 0, .iptr=&SLparams.discRxPoolPS_ResourceConfig_prb_Num, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_START, NULL, 0, .iptr=&SLparams.discRxPoolPS_ResourceConfig_prb_Start, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOLPS_RC_PRB_END, NULL, 0, .iptr=&SLparams.discRxPoolPS_ResourceConfig_prb_End, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOLPS_RC_OFFSETIND_PRESENT, NULL, 0, .strptr=&SLparams.discRxPoolPS_ResourceConfig_offsetIndicator_present, .defstrval="prNothing", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOLPS_RC_OFFSETIND_CHOICE, NULL, 0, .iptr=&SLparams.discRxPoolPS_ResourceConfig_offsetIndicator_choice, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_PRESENT, NULL, 0, .strptr=&SLparams.discRxPoolPS_ResourceConfig_subframeBitmap_present, .defstrval="prNothing", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_BUF, NULL, 0, .strptr=&SLparams.discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_buf, .defstrval="001001", TYPE_STRING, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_SIZE, NULL, 0, .iptr=&SLparams.discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_size, .defintval=1, TYPE_UINT, 0}, \ + {ENB_CONFIG_STRING_DISCRXPOOLPS_RC_SFBITMAP_CHOICE_BS_ASN_BITS_UNUSED, NULL, 0, .iptr=&SLparams.discRxPoolPS_ResourceConfig_subframeBitmap_choice_bs_bits_unused, .defintval=1, TYPE_UINT, 0}, \ } +// clang-format on #endif diff --git a/openair2/F1AP/f1ap_common.c b/openair2/F1AP/f1ap_common.c index efcb1d161b..9bafbdf2d9 100644 --- a/openair2/F1AP/f1ap_common.c +++ b/openair2/F1AP/f1ap_common.c @@ -32,15 +32,14 @@ #include "f1ap_common.h" -static f1ap_cudu_inst_t *f1_du_inst[NUMBER_OF_eNB_MAX]= {0}; -static f1ap_cudu_inst_t *f1_cu_inst[NUMBER_OF_eNB_MAX]= {0}; +static f1ap_cudu_inst_t *f1_du_inst[NUMBER_OF_gNB_MAX]= {0}; +static f1ap_cudu_inst_t *f1_cu_inst[NUMBER_OF_gNB_MAX]= {0}; -uint8_t F1AP_get_next_transaction_identifier(instance_t enb_mod_idP, instance_t cu_mod_idP) { - static uint8_t transaction_identifier[NUMBER_OF_eNB_MAX]; - transaction_identifier[enb_mod_idP+cu_mod_idP] = - (transaction_identifier[enb_mod_idP+cu_mod_idP] + 1) % F1AP_TRANSACTION_IDENTIFIER_NUMBER; - //LOG_T(F1AP,"generated xid is %d\n",transaction_identifier[enb_mod_idP+cu_mod_idP]); - return transaction_identifier[enb_mod_idP+cu_mod_idP]; +uint8_t F1AP_get_next_transaction_identifier(instance_t mod_idP, instance_t cu_mod_idP) { + static uint8_t transaction_identifier[NUMBER_OF_gNB_MAX]; + transaction_identifier[mod_idP+cu_mod_idP] = + (transaction_identifier[mod_idP+cu_mod_idP] + 1) % F1AP_TRANSACTION_IDENTIFIER_NUMBER; + return transaction_identifier[mod_idP+cu_mod_idP]; } f1ap_cudu_inst_t *getCxt(F1_t isCU, instance_t instanceP) { @@ -72,7 +71,7 @@ int f1ap_add_ue(F1_t isCu, rnti_t rntiP) { f1ap_cudu_inst_t *f1_inst=getCxt(isCu, instanceP); - for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) { + for (int i = 0; i < MAX_MOBILES_PER_GNB; i++) { if (f1_inst->f1ap_ue[i].rnti == rntiP) { f1_inst->f1ap_ue[i].f1ap_uid = i; LOG_I(F1AP, "Updating the index of UE with RNTI %x and du_ue_f1ap_id %ld\n", f1_inst->f1ap_ue[i].rnti, f1_inst->f1ap_ue[i].du_ue_f1ap_id); @@ -81,7 +80,7 @@ int f1ap_add_ue(F1_t isCu, } // We didn't find the rnti - for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) { + for (int i = 0; i < MAX_MOBILES_PER_GNB; i++) { if (f1_inst->f1ap_ue[i].rnti == 0 ) { f1_inst->f1ap_ue[i].rnti = rntiP; f1_inst->f1ap_ue[i].f1ap_uid = i; @@ -101,7 +100,7 @@ int f1ap_remove_ue(F1_t isCu, instance_t instanceP, rnti_t rntiP) { f1ap_cudu_inst_t *f1_inst=getCxt(isCu, instanceP); - for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) { + for (int i = 0; i < MAX_MOBILES_PER_GNB; i++) { if (f1_inst->f1ap_ue[i].rnti == rntiP) { f1_inst->f1ap_ue[i].rnti = 0; break; @@ -116,7 +115,7 @@ int f1ap_get_du_ue_f1ap_id(F1_t isCu, instance_t instanceP, rnti_t rntiP) { f1ap_cudu_inst_t *f1_inst=getCxt(isCu, instanceP); - for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) { + for (int i = 0; i < MAX_MOBILES_PER_GNB; i++) { if (f1_inst->f1ap_ue[i].rnti == rntiP) { return f1_inst->f1ap_ue[i].du_ue_f1ap_id; } @@ -129,7 +128,7 @@ int f1ap_get_cu_ue_f1ap_id(F1_t isCu, instance_t instanceP, rnti_t rntiP) { f1ap_cudu_inst_t *f1_inst=getCxt(isCu, instanceP); - for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) { + for (int i = 0; i < MAX_MOBILES_PER_GNB; i++) { if (f1_inst->f1ap_ue[i].rnti == rntiP) { return f1_inst->f1ap_ue[i].cu_ue_f1ap_id; } @@ -142,7 +141,7 @@ int f1ap_get_rnti_by_du_id(F1_t isCu, instance_t instanceP, instance_t du_ue_f1ap_id ) { f1ap_cudu_inst_t *f1_inst=getCxt(isCu, instanceP); - for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) { + for (int i = 0; i < MAX_MOBILES_PER_GNB; i++) { if (f1_inst->f1ap_ue[i].du_ue_f1ap_id == du_ue_f1ap_id) { return f1_inst->f1ap_ue[i].rnti; } @@ -155,7 +154,7 @@ int f1ap_get_rnti_by_cu_id(F1_t isCu, instance_t instanceP, instance_t cu_ue_f1ap_id ) { f1ap_cudu_inst_t *f1_inst=getCxt(isCu, instanceP); - for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) { + for (int i = 0; i < MAX_MOBILES_PER_GNB; i++) { if (f1_inst->f1ap_ue[i].cu_ue_f1ap_id == cu_ue_f1ap_id) { return f1_inst->f1ap_ue[i].rnti; } @@ -170,14 +169,14 @@ int f1ap_du_add_cu_ue_id(instance_t instanceP, f1ap_cudu_inst_t *f1_inst=getCxt(DUtype, instanceP); instance_t f1ap_uid=-1; - for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) { + for (int i = 0; i < MAX_MOBILES_PER_GNB; i++) { if (f1_inst->f1ap_ue[i].du_ue_f1ap_id == du_ue_f1ap_id) { f1ap_uid=i; break; } } - if (f1ap_uid < 0 || f1ap_uid >= MAX_MOBILES_PER_ENB) + if (f1ap_uid < 0 || f1ap_uid >= MAX_MOBILES_PER_GNB) return -1; f1_inst->f1ap_ue[f1ap_uid].cu_ue_f1ap_id = cu_ue_f1ap_id; diff --git a/openair2/F1AP/f1ap_common.h b/openair2/F1AP/f1ap_common.h index 1c537f1722..2ae6352464 100644 --- a/openair2/F1AP/f1ap_common.h +++ b/openair2/F1AP/f1ap_common.h @@ -404,7 +404,7 @@ int f1ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream, const uint8_t *const data, const uint32_t data_length); typedef struct f1ap_cudu_ue_inst_s { - // used for eNB stats generation + // used for NB stats generation rnti_t rnti; instance_t f1ap_uid; instance_t du_ue_f1ap_id; @@ -419,7 +419,7 @@ typedef struct f1ap_cudu_inst_s { instance_t gtpInst; uint64_t gNB_DU_id; uint16_t num_ues; - f1ap_cudu_ue_t f1ap_ue[MAX_MOBILES_PER_ENB]; + f1ap_cudu_ue_t f1ap_ue[MAX_MOBILES_PER_GNB]; } f1ap_cudu_inst_t; typedef enum { @@ -429,7 +429,7 @@ typedef enum { static const int nrb_lut[29] = {11, 18, 24, 25, 31, 32, 38, 51, 52, 65, 66, 78, 79, 93, 106, 107, 121, 132, 133, 135, 160, 162, 189, 216, 217, 245, 264, 270, 273}; -uint8_t F1AP_get_next_transaction_identifier(instance_t enb_mod_idP, instance_t cu_mod_idP); +uint8_t F1AP_get_next_transaction_identifier(instance_t mod_idP, instance_t cu_mod_idP); f1ap_cudu_inst_t *getCxt(F1_t isCU, instance_t instanceP); @@ -465,8 +465,6 @@ static inline f1ap_setup_req_t *f1ap_req(F1_t isCu, instance_t instanceP) { return &getCxt(isCu, instanceP)->setupReq; } -#define TASK_F1APP f1ap_req(false, instance)->cell_type==CELL_MACRO_GNB?TASK_GNB_APP:TASK_ENB_APP - //lts: C struct type is not homogeneous, so we need macros instead of functions #define addnRCGI(nRCGi, servedCelL) \ MCC_MNC_TO_PLMNID((servedCelL)->mcc,(servedCelL)-> mnc,(servedCelL)->mnc_digit_length, \ diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 9436b84ff7..8636d1fd08 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -257,11 +257,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, memcpy(&F1AP_SETUP_REQ(message_p), req, sizeof(f1ap_setup_req_t) ); if (req->num_cells_available > 0) { - if (f1ap_req(true, instance)->cell_type == CELL_MACRO_GNB) { itti_send_msg_to_task(TASK_RRC_GNB, GNB_MODULE_ID_TO_INSTANCE(instance), message_p); - } else { - itti_send_msg_to_task(TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(instance), message_p); - } } else { CU_send_F1_SETUP_FAILURE(instance); itti_free(TASK_CU_F1,message_p); diff --git a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c index ed61ad794b..f1e0a7ade1 100644 --- a/openair2/F1AP/f1ap_cu_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_cu_rrc_message_transfer.c @@ -37,6 +37,7 @@ #include "f1ap_cu_rrc_message_transfer.h" #include "common/ran_context.h" #include "openair3/UTILS/conversions.h" +#include "pdcp.h" /* Initial UL RRC Message Transfer @@ -162,7 +163,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ie1->criticality = F1AP_Criticality_reject; ie1->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID; ie1->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(CUtype, instance, f1ap_dl_rrc->rnti); - LOG_I(F1AP, "Setting GNB_CU_UE_F1AP_ID %llu associated with UE RNTI %x (instance %ld)\n", + LOG_D(F1AP, "Setting GNB_CU_UE_F1AP_ID %llu associated with UE RNTI %x (instance %ld)\n", (unsigned long long int)ie1->value.choice.GNB_CU_UE_F1AP_ID, f1ap_dl_rrc->rnti, instance); /* mandatory */ /* c2. GNB_DU_UE_F1AP_ID */ @@ -171,7 +172,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ie2->criticality = F1AP_Criticality_reject; ie2->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID; ie2->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(CUtype, instance, f1ap_dl_rrc->rnti); - LOG_I(F1AP, "GNB_DU_UE_F1AP_ID %llu associated with UE RNTI %x \n", (unsigned long long int)ie2->value.choice.GNB_DU_UE_F1AP_ID, f1ap_dl_rrc->rnti); + LOG_D(F1AP, "GNB_DU_UE_F1AP_ID %llu associated with UE RNTI %x \n", (unsigned long long int)ie2->value.choice.GNB_DU_UE_F1AP_ID, f1ap_dl_rrc->rnti); /* optional */ /* c3. oldgNB_DU_UE_F1AP_ID */ /* if (f1ap_dl_rrc->old_gNB_DU_ue_id != 0xFFFFFFFF) { @@ -299,8 +300,7 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance, ctxt.eNB_index = 0; mem_block_t *mb = get_free_mem_block(ie->value.choice.RRCContainer.size,__func__); memcpy((void *)mb->data,(void *)ie->value.choice.RRCContainer.buf,ie->value.choice.RRCContainer.size); - LOG_I(F1AP, "Calling pdcp_data_ind for UE RNTI %lx srb_id %lu with size %ld (DCCH) \n", ctxt.rntiMaybeUEid, srb_id, ie->value.choice.RRCContainer.size); - //LOG_I(F1AP, "%s() RRCContainer size %lu: ", __func__, ie->value.choice.RRCContainer.size); + LOG_D(F1AP, "Calling pdcp_data_ind for UE RNTI %lx srb_id %lu with size %ld (DCCH) \n", ctxt.rntiMaybeUEid, srb_id, ie->value.choice.RRCContainer.size); //for (int i = 0; i < ie->value.choice.RRCContainer.size; i++) // printf("%02x ", mb->data[i]); //printf("\n"); diff --git a/openair2/F1AP/f1ap_cu_system_information.c b/openair2/F1AP/f1ap_cu_system_information.c deleted file mode 100644 index 725bb4e1af..0000000000 --- a/openair2/F1AP/f1ap_cu_system_information.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file f1ap_du_interface_management.h - * \brief f1ap interface management for DU - * \author EURECOM/NTUST - * \date 2018 - * \version 0.1 - * \company Eurecom - * \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr - * \note - * \warning - */ diff --git a/openair2/F1AP/f1ap_cu_system_information.h b/openair2/F1AP/f1ap_cu_system_information.h deleted file mode 100644 index b6bbedba2f..0000000000 --- a/openair2/F1AP/f1ap_cu_system_information.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file f1ap_du_interface_management.h - * \brief f1ap interface management for DU - * \author EURECOM/NTUST - * \date 2018 - * \version 0.1 - * \company Eurecom - * \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr - * \note - * \warning - */ \ No newline at end of file diff --git a/openair2/F1AP/f1ap_cu_task.c b/openair2/F1AP/f1ap_cu_task.c index 1710596a0e..901932f54b 100644 --- a/openair2/F1AP/f1ap_cu_task.c +++ b/openair2/F1AP/f1ap_cu_task.c @@ -57,7 +57,7 @@ static void cu_task_handle_sctp_association_ind(instance_t instance, sctp_new_as f1ap_cu_data->sctp_in_streams = sctp_new_association_ind->in_streams; f1ap_cu_data->sctp_out_streams = sctp_new_association_ind->out_streams; f1ap_cu_data->default_sctp_stream_id = 0; - if (RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type != ngran_gNB_CUCP) { + if (RC.nrrrc[instance]->node_type != ngran_gNB_CUCP) { getCxt(CUtype, instance)->gtpInst = cu_task_create_gtpu_instance(IPaddrs); AssertFatal(getCxt(CUtype, instance)->gtpInst > 0, "Failed to create CU F1-U UDP listener"); } else @@ -92,8 +92,8 @@ static void cu_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *s } static void cu_task_send_sctp_init_req(instance_t instance, char *my_addr) { - // 1. get the itti msg, and retrive the enb_id from the message - // 2. use RC.rrc[enb_id] to fill the sctp_init_t with the ip, port + // 1. get the itti msg, and retrive the nb_id from the message + // 2. use RC.rrc[nb_id] to fill the sctp_init_t with the ip, port // 3. creat an itti message to init LOG_I(F1AP, "F1AP_CU_SCTP_REQ(create socket)\n"); MessageDef *message_p = NULL; @@ -129,7 +129,7 @@ void *F1AP_CU_task(void *arg) { while (1) { itti_receive_msg(TASK_CU_F1, &received_msg); - LOG_I(F1AP, "CU Task Received %s for instance %ld\n", + LOG_D(F1AP, "CU Task Received %s for instance %ld\n", ITTI_MSG_NAME(received_msg), ITTI_MSG_DESTINATION_INSTANCE(received_msg)); switch (ITTI_MSG_ID(received_msg)) { case SCTP_NEW_ASSOCIATION_IND: diff --git a/openair2/F1AP/f1ap_cu_ue_context_management.c b/openair2/F1AP/f1ap_cu_ue_context_management.c index cdd97e9367..0cb476b2d7 100644 --- a/openair2/F1AP/f1ap_cu_ue_context_management.c +++ b/openair2/F1AP/f1ap_cu_ue_context_management.c @@ -38,11 +38,9 @@ #include #include "rrc_extern.h" -#include "rrc_eNB_UE_context.h" -#include "rrc_eNB_S1AP.h" -#include "rrc_eNB_GTPV1U.h" #include "openair2/RRC/NR/rrc_gNB_NGAP.h" #include +#include "pdcp.h" static void setQos(F1AP_NonDynamic5QIDescriptor_t *toFill) { asn1cCalloc(toFill, tmp); @@ -511,7 +509,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, for (int j = 0; j < f1ap_ue_context_setup_req->drbs_to_be_setup[i].up_ul_tnl_length; j++) { /*Use a dummy teid for the outgoing GTP-U tunnel (DU) which will be updated once we get the UE context setup response from the DU*/ /* Use a dummy address and teid for the outgoing GTP-U tunnel (DU) which will be updated once we get the UE context setup response from the DU */ - transport_layer_addr_t addr = { length: 32, buffer: { 0 } }; + transport_layer_addr_t addr = { .length= 32, .buffer= { 0 } }; f1ap_ue_context_setup_req->drbs_to_be_setup[i].up_ul_tnl[j].teid = newGtpuCreateTunnel(getCxt(CUtype, instance)->gtpInst, f1ap_ue_context_setup_req->rnti, f1ap_ue_context_setup_req->drbs_to_be_setup[i].drb_id, @@ -826,16 +824,7 @@ int CU_handle_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, if (f1ap_req(true, instance)->cell_type==CELL_MACRO_GNB) { AssertFatal(false,"must be devlopped\n"); - } else { - struct rrc_eNB_ue_context_s *ue_context_pP; - ue_context_pP = rrc_eNB_get_ue_context(RC.rrc[instance], rnti); - rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ( - instance, - ue_context_pP, - S1AP_CAUSE_RADIO_NETWORK, - 21); // send cause 21: connection with ue lost - } - + } return 0; } @@ -956,15 +945,15 @@ int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, } protocol_ctxt_t ctxt; - PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, instance, ENB_FLAG_YES, rnti, 0, 0, instance); + PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, instance, GNB_FLAG_YES, rnti, 0, 0, instance); - struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[instance], rnti); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(RC.nrrrc[instance], rnti); if (ue_context_p) { MessageDef *msg = itti_alloc_new_message(TASK_CU_F1, 0, NGAP_UE_CONTEXT_RELEASE_COMPLETE); NGAP_UE_CONTEXT_RELEASE_COMPLETE(msg).gNB_ue_ngap_id = ue_context_p->ue_context.gNB_ue_ngap_id; itti_send_msg_to_task(TASK_NGAP, instance, msg); - rrc_gNB_remove_ue_context(&ctxt, RC.nrrrc[instance], ue_context_p); + rrc_gNB_remove_ue_context(RC.nrrrc[instance], ue_context_p); } else { LOG_E(F1AP, "could not find ue_context of UE RNTI %x\n", rnti); } @@ -1611,7 +1600,7 @@ int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true); f1ap_ue_context_modification_resp->gNB_DU_ue_id = ie->value.choice.GNB_DU_UE_F1AP_ID; - LOG_D(F1AP, "f1ap_ue_context_setup_resp->gNB_DU_ue_id is: %d \n", f1ap_ue_context_modification_resp->gNB_DU_ue_id); + LOG_D(F1AP, "f1ap_ue_context_modification_resp->gNB_DU_ue_id is: %d \n", f1ap_ue_context_modification_resp->gNB_DU_ue_id); f1ap_ue_context_modification_resp->rnti = f1ap_get_rnti_by_du_id(CUtype, instance, f1ap_ue_context_modification_resp->gNB_DU_ue_id); diff --git a/openair2/F1AP/f1ap_decoder.c b/openair2/F1AP/f1ap_decoder.c index 0085add838..e0d7db216d 100644 --- a/openair2/F1AP/f1ap_decoder.c +++ b/openair2/F1AP/f1ap_decoder.c @@ -44,47 +44,47 @@ static int f1ap_decode_initiating_message(F1AP_F1AP_PDU_t *pdu) { switch(pdu->choice.initiatingMessage->procedureCode) { case F1AP_ProcedureCode_id_F1Setup: //res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu); - LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_F1Setup\n", __func__); + LOG_D(F1AP, "%s(): F1AP_ProcedureCode_id_F1Setup\n", __func__); break; case F1AP_ProcedureCode_id_gNBCUConfigurationUpdate: //res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu); - LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_gNBCUConfigurationUpdate\n", __func__); + LOG_D(F1AP, "%s(): F1AP_ProcedureCode_id_gNBCUConfigurationUpdate\n", __func__); break; case F1AP_ProcedureCode_id_InitialULRRCMessageTransfer: //res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu); - LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_InitialULRRCMessageTransfer\n", __func__); + LOG_D(F1AP, "%s(): F1AP_ProcedureCode_id_InitialULRRCMessageTransfer\n", __func__); break; case F1AP_ProcedureCode_id_DLRRCMessageTransfer: //res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu); - LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_DLRRCMessageTransfer\n", __func__); + LOG_D(F1AP, "%s(): F1AP_ProcedureCode_id_DLRRCMessageTransfer\n", __func__); break; case F1AP_ProcedureCode_id_ULRRCMessageTransfer: //res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_F1AP_F1AP_PDU, pdu); - LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_ULRRCMessageTransfer\n", __func__); + LOG_D(F1AP, "%s(): F1AP_ProcedureCode_id_ULRRCMessageTransfer\n", __func__); break; case F1AP_ProcedureCode_id_UEContextRelease: - LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextRelease\n", __func__); + LOG_D(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextRelease\n", __func__); break; case F1AP_ProcedureCode_id_UEContextReleaseRequest: - LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextReleaseRequest\n", __func__); + LOG_D(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextReleaseRequest\n", __func__); break; case F1AP_ProcedureCode_id_UEContextSetup: - LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextSetup\n", __func__); + LOG_D(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextSetup\n", __func__); break; case F1AP_ProcedureCode_id_UEContextModification: - LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextModification\n", __func__); + LOG_D(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextModification\n", __func__); break; case F1AP_ProcedureCode_id_Paging: - LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_Paging\n", __func__); + LOG_D(F1AP, "%s(): F1AP_ProcedureCode_id_Paging\n", __func__); break; // case F1AP_ProcedureCode_id_InitialContextSetup: @@ -116,23 +116,23 @@ static int f1ap_decode_successful_outcome(F1AP_F1AP_PDU_t *pdu) { switch(pdu->choice.successfulOutcome->procedureCode) { case F1AP_ProcedureCode_id_F1Setup: - LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_F1Setup\n", __func__); + LOG_D(F1AP, "%s(): F1AP_ProcedureCode_id_F1Setup\n", __func__); break; case F1AP_ProcedureCode_id_gNBCUConfigurationUpdate: - LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_gNBCUConfigurationUpdate\n", __func__); + LOG_D(F1AP, "%s(): F1AP_ProcedureCode_id_gNBCUConfigurationUpdate\n", __func__); break; case F1AP_ProcedureCode_id_UEContextRelease: - LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextRelease\n", __func__); + LOG_D(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextRelease\n", __func__); break; case F1AP_ProcedureCode_id_UEContextSetup: - LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextSetup\n", __func__); + LOG_D(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextSetup\n", __func__); break; case F1AP_ProcedureCode_id_UEContextModification: - LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextModification\n", __func__); + LOG_D(F1AP, "%s(): F1AP_ProcedureCode_id_UEContextModification\n", __func__); break; default: @@ -149,7 +149,7 @@ static int f1ap_decode_unsuccessful_outcome(F1AP_F1AP_PDU_t *pdu) { switch(pdu->choice.unsuccessfulOutcome->procedureCode) { case F1AP_ProcedureCode_id_F1Setup: - LOG_I(F1AP, "%s(): F1AP_ProcedureCode_id_F1Setup\n", __func__); + LOG_D(F1AP, "%s(): F1AP_ProcedureCode_id_F1Setup\n", __func__); break; default: @@ -181,8 +181,6 @@ int f1ap_decode_pdu(F1AP_F1AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t LOG_E(F1AP, "----------------- ASN1 DECODER PRINT END ----------------- \n"); } - //LOG_I(F1AP, "f1ap_decode_pdu.dec_ret.code = %d\n", dec_ret.code); - if (dec_ret.code != RC_OK) { AssertFatal(1==0,"Failed to decode pdu\n"); return -1; diff --git a/openair2/F1AP/f1ap_default_values.h b/openair2/F1AP/f1ap_default_values.h index 7c64614f50..0c112d0a2f 100644 --- a/openair2/F1AP/f1ap_default_values.h +++ b/openair2/F1AP/f1ap_default_values.h @@ -33,13 +33,6 @@ #ifndef F1AP_DEFAULT_VALUES_H_ #define F1AP_DEFAULT_VALUES_H_ -#define ENB_TAC (1) -#define ENB_MCC (208) -#define ENB_MNC (92) - -#define ENB_NAME "Eurecom ENB" -#define ENB_NAME_FORMAT (ENB_NAME" %u") - #define F1AP_PORT_NUMBER (38472) #define F1AP_SCTP_PPID (62) diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index cef29e92db..94fecfea11 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -95,7 +95,7 @@ int DU_handle_ERROR_INDICATION(instance_t instance, // SETUP REQUEST int DU_send_F1_SETUP_REQUEST(instance_t instance) { - instance_t enb_mod_idP=0; + instance_t nb_mod_idP=0; instance_t du_mod_idP=0; F1AP_F1AP_PDU_t pdu= {0}; uint8_t *buffer; @@ -114,7 +114,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { ieC1->id = F1AP_ProtocolIE_ID_id_TransactionID; ieC1->criticality = F1AP_Criticality_reject; ieC1->value.present = F1AP_F1SetupRequestIEs__value_PR_TransactionID; - ieC1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP); + ieC1->value.choice.TransactionID = F1AP_get_next_transaction_identifier(nb_mod_idP, du_mod_idP); /* mandatory */ /* c2. GNB_DU_ID (integer value) */ asn1cSequenceAdd(f1Setup->protocolIEs.list, F1AP_F1SetupRequestIEs_t, ieC2); @@ -515,7 +515,7 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, AssertFatal(F1AP_SETUP_RESP (msg_p).cells_to_activate[i].num_SI > 0, "System Information %d is missing",i); LOG_D(F1AP, "Sending F1AP_SETUP_RESP ITTI message\n"); - itti_send_msg_to_task(TASK_F1APP, GNB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p); + itti_send_msg_to_task(TASK_GNB_APP, GNB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p); return 0; } @@ -936,7 +936,7 @@ int DU_handle_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, LOG_D(F1AP,"F1AP: num_cells_to_activate %d\n",num_cells_to_activate); F1AP_GNB_CU_CONFIGURATION_UPDATE (msg_p).num_cells_to_activate = num_cells_to_activate; LOG_D(F1AP, "Sending F1AP_GNB_CU_CONFIGURATION_UPDATE ITTI message \n"); - itti_send_msg_to_task(TASK_F1APP, GNB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p); + itti_send_msg_to_task(TASK_GNB_APP, GNB_MODULE_ID_TO_INSTANCE(assoc_id), msg_p); return 0; } diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.c b/openair2/F1AP/f1ap_du_rrc_message_transfer.c index 81c88ad044..c2fefec662 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.c +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.c @@ -37,11 +37,6 @@ #include "f1ap_du_rrc_message_transfer.h" - -#include "LTE_DL-CCCH-Message.h" -#include "LTE_DL-DCCH-Message.h" -#include "LTE_UL-DCCH-Message.h" - #include "NR_DL-CCCH-Message.h" #include "NR_UL-CCCH-Message.h" #include "NR_DL-DCCH-Message.h" @@ -50,7 +45,6 @@ #include "rrc_extern.h" #include "common/ran_context.h" -#include "rrc_eNB_UE_context.h" #include "openair2/RRC/NR/rrc_gNB_UE_context.h" #include "asn1_msg.h" #include "intertask_interface.h" @@ -145,191 +139,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, .rnti = f1ap_get_rnti_by_du_id(DUtype, instance, du_ue_f1ap_id), .srb_id = srb_id }; - int rc = dl_rrc_message(instance, &dl_rrc); - if (rc == 0) - return 0; /* has been handled, otherwise continue below */ - - // decode RRC Container and act on the message type - AssertFatal(srb_id<3,"illegal srb_id\n"); - MessageDef *msg = itti_alloc_new_message(TASK_DU_F1, 0, NR_DU_RRC_DL_INDICATION); - NRDuDlReq_t *req=&NRDuDlReq(msg); - req->rnti=f1ap_get_rnti_by_du_id(DUtype, instance, du_ue_f1ap_id); - req->srb_id=srb_id; - req->buf= get_free_mem_block( ie->value.choice.RRCContainer.size, __func__); - memcpy(req->buf->data, ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size); - itti_send_msg_to_task(TASK_RRC_GNB, instance, msg); - return 0; -} - -int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, - const f1ap_ul_rrc_message_t *msg) { - const rnti_t rnti = msg->rnti; - F1AP_F1AP_PDU_t pdu; - F1AP_ULRRCMessageTransfer_t *out; - F1AP_ULRRCMessageTransferIEs_t *ie; - uint8_t *buffer = NULL; - uint32_t len; - LOG_I(F1AP, "[DU %ld] %s: size %d UE RNTI %x in SRB %d\n", - instance, __func__, msg->rrc_container_length, rnti, msg->srb_id); - //LOG_I(F1AP, "%s() RRCContainer size %d: ", __func__, msg->rrc_container_length); - //for (int i = 0;i < msg->rrc_container_length; i++) - // printf("%02x ", msg->rrc_container[i]); - //printf("\n"); - /* Create */ - /* 0. Message Type */ - memset(&pdu, 0, sizeof(pdu)); - pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; - pdu.choice.initiatingMessage = (F1AP_InitiatingMessage_t *)calloc(1, sizeof(F1AP_InitiatingMessage_t)); - pdu.choice.initiatingMessage->procedureCode = F1AP_ProcedureCode_id_ULRRCMessageTransfer; - pdu.choice.initiatingMessage->criticality = F1AP_Criticality_ignore; - pdu.choice.initiatingMessage->value.present = F1AP_InitiatingMessage__value_PR_ULRRCMessageTransfer; - out = &pdu.choice.initiatingMessage->value.choice.ULRRCMessageTransfer; - /* mandatory */ - /* c1. GNB_CU_UE_F1AP_ID */ - ie = (F1AP_ULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_ULRRCMessageTransferIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID; - ie->criticality = F1AP_Criticality_reject; - ie->value.present = F1AP_ULRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID; - ie->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(DUtype, instance, rnti); - asn1cSeqAdd(&out->protocolIEs.list, ie); - /* mandatory */ - /* c2. GNB_DU_UE_F1AP_ID */ - ie = (F1AP_ULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_ULRRCMessageTransferIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID; - ie->criticality = F1AP_Criticality_reject; - ie->value.present = F1AP_ULRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID; - ie->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(DUtype, instance, rnti); - asn1cSeqAdd(&out->protocolIEs.list, ie); - /* mandatory */ - /* c3. SRBID */ - ie = (F1AP_ULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_ULRRCMessageTransferIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_SRBID; - ie->criticality = F1AP_Criticality_reject; - ie->value.present = F1AP_ULRRCMessageTransferIEs__value_PR_SRBID; - ie->value.choice.SRBID = msg->srb_id; - asn1cSeqAdd(&out->protocolIEs.list, ie); - // issue in here - /* mandatory */ - /* c4. RRCContainer */ - ie = (F1AP_ULRRCMessageTransferIEs_t *)calloc(1, sizeof(F1AP_ULRRCMessageTransferIEs_t)); - ie->id = F1AP_ProtocolIE_ID_id_RRCContainer; - ie->criticality = F1AP_Criticality_reject; - ie->value.present = F1AP_ULRRCMessageTransferIEs__value_PR_RRCContainer; - OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, - (const char *) msg->rrc_container, - msg->rrc_container_length); - asn1cSeqAdd(&out->protocolIEs.list, ie); - - if (msg->srb_id == 1 || msg->srb_id == 2) { - struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[instance], rnti); - LTE_UL_DCCH_Message_t *ul_dcch_msg=NULL; - asn_dec_rval_t dec_rval; - dec_rval = uper_decode(NULL, - &asn_DEF_LTE_UL_DCCH_Message, - (void **)&ul_dcch_msg, - &ie->value.choice.RRCContainer.buf[1], // buf[0] includes the pdcp header - msg->rrc_container_length, 0, 0); - - if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)) - LOG_E(F1AP, " Failed to decode UL-DCCH (%zu bytes)\n",dec_rval.consumed); - else - LOG_I(F1AP, "Received message: present %d and c1 present %d\n", - ul_dcch_msg->message.present, ul_dcch_msg->message.choice.c1.present); - - if (ul_dcch_msg->message.present == LTE_UL_DCCH_MessageType_PR_c1) { - switch (ul_dcch_msg->message.choice.c1.present) { - case LTE_UL_DCCH_MessageType__c1_PR_NOTHING: /* No components present */ - break; - - case LTE_UL_DCCH_MessageType__c1_PR_csfbParametersRequestCDMA2000: - break; - - case LTE_UL_DCCH_MessageType__c1_PR_measurementReport: - break; - - case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionReconfigurationComplete: - LOG_I(F1AP, "[MSG] RRC UL rrcConnectionReconfigurationComplete\n"); - /* CDRX: activated when RRC Connection Reconfiguration Complete is received */ - int UE_id_mac = find_UE_id(instance, rnti); - - if (UE_id_mac == -1) { - LOG_E(F1AP, "Can't find UE_id(MAC) of UE rnti %x\n", rnti); - break; - } - - UE_sched_ctrl_t *UE_scheduling_control = &(RC.mac[instance]->UE_info.UE_sched_ctrl[UE_id_mac]); - - if (UE_scheduling_control->cdrx_waiting_ack == true) { - UE_scheduling_control->cdrx_waiting_ack = false; - UE_scheduling_control->cdrx_configured = true; // Set to TRUE when RRC Connection Reconfiguration Complete is received - LOG_I(F1AP, "CDRX configuration activated after RRC Connection Reconfiguration Complete reception\n"); - } - - /* End of CDRX processing */ - break; - - case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionReestablishmentComplete: - break; - - case LTE_UL_DCCH_MessageType__c1_PR_rrcConnectionSetupComplete: - LOG_I(F1AP, "[MSG] RRC UL rrcConnectionSetupComplete \n"); - - if(!ue_context_p) { - LOG_E(F1AP, "Did not find the UE context associated with UE RNTOI %x, ue_context_p is NULL\n", rnti); - } else { - LOG_I(F1AP, "Processing RRCConnectionSetupComplete UE %x\n", rnti); - ue_context_p->ue_context.StatusRrc = RRC_CONNECTED; - } - - break; - - case LTE_UL_DCCH_MessageType__c1_PR_securityModeComplete: - LOG_I(F1AP, "[MSG] RRC securityModeComplete \n"); - break; - - case LTE_UL_DCCH_MessageType__c1_PR_securityModeFailure: - break; - - case LTE_UL_DCCH_MessageType__c1_PR_ueCapabilityInformation: - LOG_I(F1AP, "[MSG] RRC ueCapabilityInformation \n"); - break; - - case LTE_UL_DCCH_MessageType__c1_PR_ulHandoverPreparationTransfer: - break; - - case LTE_UL_DCCH_MessageType__c1_PR_ulInformationTransfer: - LOG_I(F1AP,"[MSG] RRC UL Information Transfer \n"); - break; - - case LTE_UL_DCCH_MessageType__c1_PR_counterCheckResponse: - break; - - case LTE_UL_DCCH_MessageType__c1_PR_ueInformationResponse_r9: - break; - - case LTE_UL_DCCH_MessageType__c1_PR_proximityIndication_r9: - break; - - case LTE_UL_DCCH_MessageType__c1_PR_rnReconfigurationComplete_r10: - break; - - case LTE_UL_DCCH_MessageType__c1_PR_mbmsCountingResponse_r10: - break; - - case LTE_UL_DCCH_MessageType__c1_PR_interFreqRSTDMeasurementIndication_r10: - break; - } - } - } - - /* encode */ - if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { - LOG_E(F1AP, "Failed to encode F1 UL RRC MESSAGE TRANSFER\n"); - return -1; - } - - ASN_STRUCT_RESET(asn_DEF_F1AP_F1AP_PDU, &pdu); - f1ap_itti_send_sctp_data_req(false, instance, buffer, len, getCxt(DUtype, instance)->default_sctp_stream_id); + dl_rrc_message(instance, &dl_rrc); return 0; } @@ -407,7 +217,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instanceP, asn1cSequenceAdd(out->protocolIEs.list, F1AP_InitialULRRCMessageTransferIEs_t, ie6); ie6->id = F1AP_ProtocolIE_ID_id_TransactionID; ie6->criticality = F1AP_Criticality_ignore; - ie6->value.present = F1AP_F1SetupRequestIEs__value_PR_TransactionID; + ie6->value.present = F1AP_InitialULRRCMessageTransferIEs__value_PR_TransactionID; ie6->value.choice.TransactionID = F1AP_get_next_transaction_identifier(f1ap_req(false, instanceP)->gNB_DU_id, f1ap_req(false, instanceP)->gNB_DU_id); /* encode */ @@ -428,9 +238,8 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, F1AP_ULRRCMessageTransfer_t *out; uint8_t *buffer = NULL; uint32_t len; - LOG_I(F1AP, "[DU %ld] %s: size %d UE RNTI %x in SRB %d\n", + LOG_D(F1AP, "[DU %ld] %s: size %d UE RNTI %x in SRB %d\n", instance, __func__, msg->rrc_container_length, rnti, msg->srb_id); - //LOG_I(F1AP, "%s() RRCContainer size %d: ", __func__, msg->rrc_container_length); //for (int i = 0;i < msg->rrc_container_length; i++) // printf("%02x ", msg->rrc_container[i]); //printf("\n"); diff --git a/openair2/F1AP/f1ap_du_rrc_message_transfer.h b/openair2/F1AP/f1ap_du_rrc_message_transfer.h index b42d731ac7..7a0c1f8974 100644 --- a/openair2/F1AP/f1ap_du_rrc_message_transfer.h +++ b/openair2/F1AP/f1ap_du_rrc_message_transfer.h @@ -41,7 +41,6 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, uint32_t stream, F1AP_F1AP_PDU_t *pdu); -int DU_send_UL_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_message_t *msg); int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, const f1ap_ul_rrc_message_t *msg); int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instanceP, diff --git a/openair2/F1AP/f1ap_du_task.c b/openair2/F1AP/f1ap_du_task.c index 29b15ae2bb..8717382dfc 100644 --- a/openair2/F1AP/f1ap_du_task.c +++ b/openair2/F1AP/f1ap_du_task.c @@ -99,7 +99,6 @@ void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_dat void *F1AP_DU_task(void *arg) { //sctp_cu_init(); LOG_I(F1AP, "Starting F1AP at DU\n"); - //f1ap_eNB_prepare_internal_data(); itti_mark_task_ready(TASK_DU_F1); // SCTP @@ -107,11 +106,11 @@ void *F1AP_DU_task(void *arg) { MessageDef *msg = NULL; itti_receive_msg(TASK_DU_F1, &msg); instance_t myInstance=ITTI_MSG_DESTINATION_INSTANCE(msg); - LOG_I(F1AP, "DU Task Received %s for instance %ld\n", + LOG_D(F1AP, "DU Task Received %s for instance %ld\n", ITTI_MSG_NAME(msg),myInstance); switch (ITTI_MSG_ID(msg)) { case F1AP_SETUP_REQ: { - // this is not a true F1 message, but rather an ITTI message sent by enb_app + // this is not a true F1 message, but rather an ITTI message sent by gnb_app // 1. save the itti msg so that you can use it to sen f1ap_setup_req, fill the f1ap_setup_req message, // 2. store the message in f1ap context, that is also stored in RC // 2. send a sctp_association req diff --git a/openair2/F1AP/f1ap_du_ue_context_management.c b/openair2/F1AP/f1ap_du_ue_context_management.c index 85282f742c..fbe8388714 100644 --- a/openair2/F1AP/f1ap_du_ue_context_management.c +++ b/openair2/F1AP/f1ap_du_ue_context_management.c @@ -37,7 +37,6 @@ #include "f1ap_du_ue_context_management.h" #include "rrc_extern.h" -#include "rrc_eNB_UE_context.h" #include "openair2/RRC/NR/rrc_gNB_UE_context.h" #include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h" #include @@ -1247,7 +1246,7 @@ int DU_send_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance, f1ap_ue_contex /* procedureCriticality */ if (0) { ie11->value.choice.CriticalityDiagnostics.procedureCriticality = (F1AP_Criticality_t *)calloc(1, sizeof(F1AP_Criticality_t)); - ie11->value.choice.CriticalityDiagnostics.procedureCriticality = F1AP_Criticality_reject; + *ie11->value.choice.CriticalityDiagnostics.procedureCriticality = F1AP_Criticality_reject; } /* optional */ diff --git a/openair2/F1AP/f1ap_handlers.c b/openair2/F1AP/f1ap_handlers.c index f3db249e09..8f40ec6166 100644 --- a/openair2/F1AP/f1ap_handlers.c +++ b/openair2/F1AP/f1ap_handlers.c @@ -110,7 +110,7 @@ int f1ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream, ret=-1; } else { /* Calling the right handler */ - LOG_I(F1AP, "Calling handler with instance %ld\n",instance); + LOG_D(F1AP, "Calling handler with instance %ld\n",instance); ret = (*f1ap_messages_processing[pdu.choice.initiatingMessage->procedureCode][pdu.present - 1]) (instance, assoc_id, stream, &pdu); } diff --git a/openair2/F1AP/f1ap_itti_messaging.c b/openair2/F1AP/f1ap_itti_messaging.c index e45edcc3a3..12386b69d6 100644 --- a/openair2/F1AP/f1ap_itti_messaging.c +++ b/openair2/F1AP/f1ap_itti_messaging.c @@ -31,7 +31,7 @@ void f1ap_itti_send_sctp_data_req(bool isCu, instance_t instance, uint8_t *buffe sctp_data_req->assoc_id = f1ap_assoc_id(isCu,instance); sctp_data_req->buffer = buffer; sctp_data_req->buffer_length = buffer_length; - sctp_data_req->stream = stream; + sctp_data_req->stream = stream; LOG_D(F1AP, "Sending ITTI message to SCTP Task\n"); itti_send_msg_to_task(TASK_SCTP, instance, message_p); } diff --git a/openair2/F1AP/f1ap_itti_messaging.h b/openair2/F1AP/f1ap_itti_messaging.h index a5560e6c81..a6499849a9 100644 --- a/openair2/F1AP/f1ap_itti_messaging.h +++ b/openair2/F1AP/f1ap_itti_messaging.h @@ -25,7 +25,4 @@ void f1ap_itti_send_sctp_data_req(bool isCu,instance_t instance, uint8_t *buffer, uint32_t buffer_length, uint16_t stream); -void f1ap_eNB_itti_send_sctp_close_association(bool isCu,instance_t instance); - - #endif /* F1AP_ITTI_MESSAGING_H_ */ diff --git a/openair2/F1AP/f1ap_messaging.h b/openair2/F1AP/f1ap_messaging.h deleted file mode 100644 index eb3b4224e9..0000000000 --- a/openair2/F1AP/f1ap_messaging.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file f1ap_messaging.h - * \brief f1ap procedures - * \author EURECOM/NTUST - * \date 2018 - * \version 0.1 - * \company Eurecom - * \email: navid.nikaein@eurecom.fr, bing-kai.hong@eurecom.fr - * \note - * \warning - */ - - -#ifndef F1AP_MESSAGING_H_ -#define F1AP_MESSAGING_H_ - -void f1ap_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer, - uint32_t buffer_length, uint16_t stream); - -void f1ap_send_sctp_close_association(instance_t instance, - int32_t assoc_id); - - -#endif /* F1AP_MESSAGING_H_ */ diff --git a/openair2/GNB_APP/L1_nr_paramdef.h b/openair2/GNB_APP/L1_nr_paramdef.h index efe378820d..dec87bf985 100644 --- a/openair2/GNB_APP/L1_nr_paramdef.h +++ b/openair2/GNB_APP/L1_nr_paramdef.h @@ -55,31 +55,33 @@ #define CONFIG_STRING_L1_MAX_LDPC_ITERATIONS "max_ldpc_iterations" #define CONFIG_STRING_L1_RX_THREAD_CORE "L1_rx_thread_core" #define CONFIG_STRING_L1_TX_THREAD_CORE "L1_tx_thread_core" - +#define HLP_TP_SIZ "thread_pool_size paramter removed, please use --thread-pool" /*----------------------------------------------------------------------------------------------------------------------------------------------------*/ /* L1 configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*----------------------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define L1PARAMS_DESC { \ -{CONFIG_STRING_L1_CC, NULL, 0, uptr:NULL, defintval:1, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_TRANSPORT_N_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_mac", TYPE_STRING, 0}, \ -{CONFIG_STRING_L1_LOCAL_N_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ -{CONFIG_STRING_L1_LOCAL_N_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ -{CONFIG_STRING_L1_REMOTE_N_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ -{CONFIG_STRING_L1_LOCAL_N_PORTC, NULL, 0, uptr:NULL, defintval:50030, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_REMOTE_N_PORTC, NULL, 0, uptr:NULL, defintval:50030, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_LOCAL_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50031, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_THREAD_POOL_SIZE, "thread_pool_size paramter removed, please use --thread-pool", 0, uptr:NULL, defintval:2022, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_OFDM_OFFSET_DIVISOR, NULL, 0, uptr:NULL, defuintval:8, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_PUCCH0_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:100, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:150, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_PUSCH_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:50, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_SRS_DTX_THRESHOLD, NULL, 0, uptr:NULL, defintval:50, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_MAX_LDPC_ITERATIONS, NULL, 0, uptr:NULL, defintval:5, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_RX_THREAD_CORE, NULL, 0, uptr:NULL, defintval:-1, TYPE_UINT, 0}, \ -{CONFIG_STRING_L1_TX_THREAD_CORE, NULL, 0, uptr:NULL, defintval:-1, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_CC, NULL, 0, .uptr=NULL, .defintval=1, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_TRANSPORT_N_PREFERENCE, NULL, 0, .strptr=NULL, .defstrval="local_mac", TYPE_STRING, 0}, \ + {CONFIG_STRING_L1_LOCAL_N_IF_NAME, NULL, 0, .strptr=NULL, .defstrval="lo", TYPE_STRING, 0}, \ + {CONFIG_STRING_L1_LOCAL_N_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ + {CONFIG_STRING_L1_REMOTE_N_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.2", TYPE_STRING, 0}, \ + {CONFIG_STRING_L1_LOCAL_N_PORTC, NULL, 0, .uptr=NULL, .defintval=50030, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_REMOTE_N_PORTC, NULL, 0, .uptr=NULL, .defintval=50030, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_LOCAL_N_PORTD, NULL, 0, .uptr=NULL, .defintval=50031, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_REMOTE_N_PORTD, NULL, 0, .uptr=NULL, .defintval=50031, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_THREAD_POOL_SIZE, HLP_TP_SIZ, 0, .uptr=NULL, .defintval=2022, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_OFDM_OFFSET_DIVISOR, NULL, 0, .uptr=NULL, .defuintval=8, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_PUCCH0_DTX_THRESHOLD, NULL, 0, .uptr=NULL, .defintval=100, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_PRACH_DTX_THRESHOLD, NULL, 0, .uptr=NULL, .defintval=150, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_PUSCH_DTX_THRESHOLD, NULL, 0, .uptr=NULL, .defintval=50, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_SRS_DTX_THRESHOLD, NULL, 0, .uptr=NULL, .defintval=50, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_MAX_LDPC_ITERATIONS, NULL, 0, .uptr=NULL, .defintval=5, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_RX_THREAD_CORE, NULL, 0, .uptr:NULL, .defintval:-1, TYPE_UINT, 0}, \ + {CONFIG_STRING_L1_TX_THREAD_CORE, NULL, 0, .uptr:NULL, .defintval:-1, TYPE_UINT, 0}, \ } +// clang-format on #define L1_CC_IDX 0 #define L1_TRANSPORT_N_PREFERENCE_IDX 1 #define L1_LOCAL_N_IF_NAME_IDX 2 diff --git a/openair2/GNB_APP/MACRLC_nr_paramdef.h b/openair2/GNB_APP/MACRLC_nr_paramdef.h index 0a50d19e13..5d69fbc6f2 100644 --- a/openair2/GNB_APP/MACRLC_nr_paramdef.h +++ b/openair2/GNB_APP/MACRLC_nr_paramdef.h @@ -71,47 +71,64 @@ #define CONFIG_STRING_MACRLC_UL_HARQ_ROUND_MAX "ul_harq_round_max" #define CONFIG_STRING_MACRLC_MIN_GRANT_PRB "min_grant_prb" #define CONFIG_STRING_MACRLC_MIN_GRANT_MCS "min_grant_mcs" +#define CONFIG_STRING_MACRLC_IDENTITY_PM "identity_precoding_matrix" +#define HLP_MACRLC_UL_PRBBLACK "SNR threshold to decide whether a PRB will be blacklisted or not" +#define HLP_MACRLC_DL_BLER_UP "Upper threshold of BLER to decrease DL MCS" +#define HLP_MACRLC_DL_BLER_LO "Lower threshold of BLER to increase DL MCS" +#define HLP_MACRLC_DL_MAX_MCS "Maximum DL MCS that should be used" +#define HLP_MACRLC_UL_BLER_UP "Upper threshold of BLER to decrease UL MCS" +#define HLP_MACRLC_UL_BLER_LO "Lower threshold of BLER to increase UL MCS" +#define HLP_MACRLC_UL_MAX_MCS "Maximum UL MCS that should be used" +#define HLP_MACRLC_DL_HARQ_MAX "Maximum number of DL HARQ rounds" +#define HLP_MACRLC_UL_HARQ_MAX "Maximum number of UL HARQ rounds" +#define HLP_MACRLC_MIN_GRANT_PRB "Minimal Periodic ULSCH Grant PRBs" +#define HLP_MACRLC_MIN_GRANT_MCS "Minimal Periodic ULSCH Grant MCS" +#define HLP_MACRLC_IDENTITY_PM "Flag to use only identity matrix in DL precoding" /*-------------------------------------------------------------------------------------------------------------------------------------------------------*/ /* MacRLC configuration parameters */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-------------------------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define MACRLCPARAMS_DESC { \ -{CONFIG_STRING_MACRLC_CC, NULL, 0, uptr:NULL, defintval:50011, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_TRANSPORT_N_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_L1", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_N_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_N_ADDRESS, NULL, 0, uptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_N_PORTC, NULL, 0, uptr:NULL, defintval:50010, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_N_PORTC, NULL, 0, uptr:NULL, defintval:50010, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_N_PORTD, NULL, 0, uptr:NULL, defintval:50011, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_N_PORTD, NULL, 0, uptr:NULL, defintval:50011, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_TRANSPORT_S_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_RRC", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_S_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_S_ADDRESS, NULL, 0, uptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_S_ADDRESS, NULL, 0, uptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_S_PORTC, NULL, 0, uptr:NULL, defintval:50020, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defintval:50020, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defintval:50021, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_ULSCH_MAX_FRAME_INACTIVITY, NULL, 0, uptr:NULL, defintval:10, TYPE_UINT, 0}, \ -{CONFIG_STRING_MACRLC_PUSCHTARGETSNRX10, NULL, 0, iptr:NULL, defintval:200, TYPE_INT, 0}, \ -{CONFIG_STRING_MACRLC_PUCCHTARGETSNRX10, NULL, 0, iptr:NULL, defintval:150, TYPE_INT, 0}, \ -{CONFIG_STRING_MACRLC_UL_PRBBLACK_SNR_THRESHOLD, "SNR threshold to decide whether a PRB will be blacklisted or not", 0, iptr:NULL, defintval:10, TYPE_INT, 0}, \ -{CONFIG_STRING_MACRLC_PUCCHFAILURETHRES, NULL, 0, iptr:NULL, defintval:10, TYPE_INT, 0}, \ -{CONFIG_STRING_MACRLC_PUSCHFAILURETHRES, NULL, 0, iptr:NULL, defintval:10, TYPE_INT, 0}, \ -{CONFIG_STRING_MACRLC_DL_BLER_TARGET_UPPER, "Upper threshold of BLER to decrease DL MCS", 0, dblptr:NULL, defdblval:0.15, TYPE_DOUBLE, 0}, \ -{CONFIG_STRING_MACRLC_DL_BLER_TARGET_LOWER, "Lower threshold of BLER to increase DL MCS", 0, dblptr:NULL, defdblval:0.05, TYPE_DOUBLE, 0}, \ -{CONFIG_STRING_MACRLC_DL_MAX_MCS, "Maximum DL MCS that should be used", 0, u8ptr:NULL, defintval:28, TYPE_UINT8, 0}, \ -{CONFIG_STRING_MACRLC_UL_BLER_TARGET_UPPER, "Upper threshold of BLER to decrease UL MCS", 0, dblptr:NULL, defdblval:0.15, TYPE_DOUBLE, 0}, \ -{CONFIG_STRING_MACRLC_UL_BLER_TARGET_LOWER, "Lower threshold of BLER to increase UL MCS", 0, dblptr:NULL, defdblval:0.05, TYPE_DOUBLE, 0}, \ -{CONFIG_STRING_MACRLC_UL_MAX_MCS, "Maximum UL MCS that should be used", 0, u8ptr:NULL, defintval:9, TYPE_UINT8, 0}, \ -{CONFIG_STRING_MACRLC_DL_HARQ_ROUND_MAX, "Maximum number of DL HARQ rounds", 0, u8ptr:NULL, defintval:4, TYPE_UINT8, 0}, \ -{CONFIG_STRING_MACRLC_UL_HARQ_ROUND_MAX, "Maximum number of UL HARQ rounds", 0, u8ptr:NULL, defintval:4, TYPE_UINT8, 0}, \ -{CONFIG_STRING_MACRLC_MIN_GRANT_PRB, "Minimal Periodic ULSCH Grant PRBs", 0, u8ptr:NULL, defintval:5, TYPE_UINT8, 0}, \ -{CONFIG_STRING_MACRLC_MIN_GRANT_MCS, "Minimal Periodic ULSCH Grant MCS", 0, u8ptr:NULL, defintval:9, TYPE_UINT8, 0}, \ + {CONFIG_STRING_MACRLC_CC, NULL, 0, .uptr=NULL, .defintval=50011, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_TRANSPORT_N_PREFERENCE, NULL, 0, .strptr=NULL, .defstrval="local_L1", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_LOCAL_N_IF_NAME, NULL, 0, .strptr=NULL, .defstrval="lo", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_LOCAL_N_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_REMOTE_N_ADDRESS, NULL, 0, .uptr=NULL, .defstrval="127.0.0.2", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_LOCAL_N_PORTC, NULL, 0, .uptr=NULL, .defintval=50010, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_REMOTE_N_PORTC, NULL, 0, .uptr=NULL, .defintval=50010, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_LOCAL_N_PORTD, NULL, 0, .uptr=NULL, .defintval=50011, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_REMOTE_N_PORTD, NULL, 0, .uptr=NULL, .defintval=50011, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_TRANSPORT_S_PREFERENCE, NULL, 0, .strptr=NULL, .defstrval="local_RRC", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_LOCAL_S_IF_NAME, NULL, 0, .strptr=NULL, .defstrval="lo", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_LOCAL_S_ADDRESS, NULL, 0, .uptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_REMOTE_S_ADDRESS, NULL, 0, .uptr=NULL, .defstrval="127.0.0.2", TYPE_STRING, 0}, \ + {CONFIG_STRING_MACRLC_LOCAL_S_PORTC, NULL, 0, .uptr=NULL, .defintval=50020, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_REMOTE_S_PORTC, NULL, 0, .uptr=NULL, .defintval=50020, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_LOCAL_S_PORTD, NULL, 0, .uptr=NULL, .defintval=50021, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_REMOTE_S_PORTD, NULL, 0, .uptr=NULL, .defintval=50021, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_ULSCH_MAX_FRAME_INACTIVITY, NULL, 0, .uptr=NULL, .defintval=10, TYPE_UINT, 0}, \ + {CONFIG_STRING_MACRLC_PUSCHTARGETSNRX10, NULL, 0, .iptr=NULL, .defintval=200, TYPE_INT, 0}, \ + {CONFIG_STRING_MACRLC_PUCCHTARGETSNRX10, NULL, 0, .iptr=NULL, .defintval=150, TYPE_INT, 0}, \ + {CONFIG_STRING_MACRLC_UL_PRBBLACK_SNR_THRESHOLD, HLP_MACRLC_UL_PRBBLACK, 0, .iptr=NULL, .defintval=10, TYPE_INT, 0}, \ + {CONFIG_STRING_MACRLC_PUCCHFAILURETHRES, NULL, 0, .iptr=NULL, .defintval=10, TYPE_INT, 0}, \ + {CONFIG_STRING_MACRLC_PUSCHFAILURETHRES, NULL, 0, .iptr=NULL, .defintval=10, TYPE_INT, 0}, \ + {CONFIG_STRING_MACRLC_DL_BLER_TARGET_UPPER, HLP_MACRLC_DL_BLER_UP, 0, .dblptr=NULL, .defdblval=0.15, TYPE_DOUBLE, 0}, \ + {CONFIG_STRING_MACRLC_DL_BLER_TARGET_LOWER, HLP_MACRLC_DL_BLER_LO, 0, .dblptr=NULL, .defdblval=0.05, TYPE_DOUBLE, 0}, \ + {CONFIG_STRING_MACRLC_DL_MAX_MCS, HLP_MACRLC_DL_MAX_MCS, 0, .u8ptr=NULL, .defintval=28, TYPE_UINT8, 0}, \ + {CONFIG_STRING_MACRLC_UL_BLER_TARGET_UPPER, HLP_MACRLC_UL_BLER_UP, 0, .dblptr=NULL, .defdblval=0.15, TYPE_DOUBLE, 0}, \ + {CONFIG_STRING_MACRLC_UL_BLER_TARGET_LOWER, HLP_MACRLC_UL_BLER_LO, 0, .dblptr=NULL, .defdblval=0.05, TYPE_DOUBLE, 0}, \ + {CONFIG_STRING_MACRLC_UL_MAX_MCS, HLP_MACRLC_UL_MAX_MCS, 0, .u8ptr=NULL, .defintval=9, TYPE_UINT8, 0}, \ + {CONFIG_STRING_MACRLC_DL_HARQ_ROUND_MAX, HLP_MACRLC_DL_HARQ_MAX, 0, .u8ptr=NULL, .defintval=4, TYPE_UINT8, 0}, \ + {CONFIG_STRING_MACRLC_UL_HARQ_ROUND_MAX, HLP_MACRLC_UL_HARQ_MAX, 0, .u8ptr=NULL, .defintval=4, TYPE_UINT8, 0}, \ + {CONFIG_STRING_MACRLC_MIN_GRANT_PRB, HLP_MACRLC_MIN_GRANT_PRB, 0, .u8ptr=NULL, .defintval=5, TYPE_UINT8, 0}, \ + {CONFIG_STRING_MACRLC_MIN_GRANT_MCS, HLP_MACRLC_MIN_GRANT_MCS, 0, .u8ptr=NULL, .defintval=9, TYPE_UINT8, 0}, \ + {CONFIG_STRING_MACRLC_IDENTITY_PM, HLP_MACRLC_IDENTITY_PM, PARAMFLAG_BOOL, .u8ptr=NULL, .defintval=0, TYPE_UINT8, 0}, \ } +// clang-format off + #define MACRLC_CC_IDX 0 #define MACRLC_TRANSPORT_N_PREFERENCE_IDX 1 #define MACRLC_LOCAL_N_IF_NAME_IDX 2 @@ -145,6 +162,7 @@ #define MACRLC_UL_HARQ_ROUND_MAX_IDX 30 #define MACRLC_MIN_GRANT_PRB_IDX 31 #define MACRLC_MIN_GRANT_MCS_IDX 32 +#define MACRLC_IDENTITY_PM_IDX 33 #define MACRLCPARAMS_CHECK { \ { .s5 = { NULL } }, \ @@ -180,6 +198,7 @@ { .s2 = { config_check_intrange, {1, 8} } }, /* UL max HARQ rounds */ \ { .s5 = { NULL } }, \ { .s5 = { NULL } }, \ + { .s2 = { NULL } }, \ } /*---------------------------------------------------------------------------------------------------------------------------------------------------------*/ diff --git a/openair2/GNB_APP/RRC_nr_paramsvalues.h b/openair2/GNB_APP/RRC_nr_paramsvalues.h index e5bcd0e228..e6e32233c8 100644 --- a/openair2/GNB_APP/RRC_nr_paramsvalues.h +++ b/openair2/GNB_APP/RRC_nr_paramsvalues.h @@ -84,7 +84,6 @@ #define GNB_CONFIG_STRING_MSG1SUBCARRIERSPACING "msg1_SubcarrierSpacing" #define GNB_CONFIG_STRING_RESTRICTEDSETCONFIG "restrictedSetConfig" #define GNB_CONFIG_STRING_MSG3TRANSFPREC "msg3_transformPrecoder" -#define GNB_CONFIG_STRING_PUSCHTIMEDOMAINALLOCATIONLIST "puschTimeDomainAllocationList" #define GNB_CONFIG_STRING_MSG3DELTAPREABMLE "msg3_DeltaPreamble" #define GNB_CONFIG_STRING_P0NOMINALWITHGRANT "p0_NominalWithGrant" #define GNB_CONFIG_STRING_PUCCHGROUPHOPPING "pucchGroupHopping" @@ -174,113 +173,113 @@ #define SCCPARAMS_DESC(scc) { \ -{GNB_CONFIG_STRING_PHYSCELLID,NULL,0,i64ptr:scc->physCellId,defint64val:0,TYPE_INT64,0/*0*/}, \ -{GNB_CONFIG_STRING_NTIMINGADVANCEOFFSET,NULL,0,i64ptr:scc->n_TimingAdvanceOffset,defint64val:NR_ServingCellConfigCommon__n_TimingAdvanceOffset_n0,TYPE_INT64,0/*1*/},\ -{GNB_CONFIG_STRING_SSBPERIODICITYSERVINGCELL,NULL,0,i64ptr:scc->ssb_periodicityServingCell,defint64val:NR_ServingCellConfigCommon__ssb_periodicityServingCell_ms20,TYPE_INT64,0/*2*/},\ -{GNB_CONFIG_STRING_DMRSTYPEAPOSITION,NULL,0,i64ptr:&scc->dmrs_TypeA_Position,defint64val:NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos2,TYPE_INT64,0/*3*/},\ -{GNB_CONFIG_STRING_SUBCARRIERSPACING,NULL,0,i64ptr:scc->ssbSubcarrierSpacing,defint64val:NR_SubcarrierSpacing_kHz30,TYPE_INT64,0/*4*/},\ -{GNB_CONFIG_STRING_ABSOLUTEFREQUENCYSSB,NULL,0,i64ptr:scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB,defint64val:660960,TYPE_INT64,0/*5*/},\ -{GNB_CONFIG_STRING_DLFREQUENCYBAND,NULL,0,i64ptr:scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0],defint64val:78,TYPE_INT64,0/*6*/},\ -{GNB_CONFIG_STRING_DLABSOLUEFREQUENCYPOINTA,NULL,0,i64ptr:&scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA,defint64val:660000,TYPE_INT64,0/*7*/},\ -{GNB_CONFIG_STRING_DLOFFSETTOCARRIER,NULL,0,i64ptr:&scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->offsetToCarrier,defint64val:0,TYPE_INT64,0/*8*/},\ -{GNB_CONFIG_STRING_DLSUBCARRIERSPACING,NULL,0,i64ptr:&scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,defint64val:NR_SubcarrierSpacing_kHz30,TYPE_INT64,0/*9*/},\ -{GNB_CONFIG_STRING_DLCARRIERBANDWIDTH,NULL,0,i64ptr:&scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth,defint64val:217,TYPE_INT64,0 /*10*/}, \ -{GNB_CONFIG_STRING_INITIALDLBWPLOCATIONANDBANDWIDTH,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth,defint64val:13036,TYPE_INT64,0/*11*/},\ -{GNB_CONFIG_STRING_INITIALDLBWPSUBCARRIERSPACING,NULL,0,i64ptr:&scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing,defint64val:NR_SubcarrierSpacing_kHz30,TYPE_INT64,0/*12*/},\ -{GNB_CONFIG_STRING_INITIALDLBWPCONTROLRESOURCESETZERO,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->controlResourceSetZero,defint64val:-1,TYPE_INT64,0/*13*/},\ -{GNB_CONFIG_STRING_INITIALDLBWPSEARCHSPACEZERO,NULL,0,i64ptr:scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceZero,defint64val:-1,TYPE_INT64,0/*14*/},\ -{GNB_CONFIG_STRING_ULFREQUENCYBAND,NULL,0,i64ptr:scc->uplinkConfigCommon->frequencyInfoUL->frequencyBandList->list.array[0],defint64val:-1,TYPE_INT64,0/*63*/},\ -{GNB_CONFIG_STRING_ULABSOLUEFREQUENCYPOINTA,NULL,0,i64ptr:scc->uplinkConfigCommon->frequencyInfoUL->absoluteFrequencyPointA,defint64val:-1,TYPE_INT64,0/*64*/},\ -{GNB_CONFIG_STRING_ULOFFSETTOCARRIER,NULL,0,i64ptr:&scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->offsetToCarrier,defint64val:0,TYPE_INT64,0/*65*/},\ -{GNB_CONFIG_STRING_ULSUBCARRIERSPACING,NULL,0,i64ptr:&scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,defint64val:NR_SubcarrierSpacing_kHz30,TYPE_INT64,0/*66*/},\ -{GNB_CONFIG_STRING_ULCARRIERBANDWIDTH,NULL,0,i64ptr:&scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth,defint64val:217,TYPE_INT64,0/*67*/},\ -{GNB_CONFIG_STRING_PMAX,NULL,0,i64ptr:scc->uplinkConfigCommon->frequencyInfoUL->p_Max,defint64val:20,TYPE_INT64,0/*68*/},\ -{GNB_CONFIG_STRING_INITIALULBWPLOCATIONANDBANDWIDTH,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth,defint64val:13036,TYPE_INT64,0/*69*/},\ -{GNB_CONFIG_STRING_INITIALULBWPSUBCARRIERSPACING,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing,defint64val:NR_SubcarrierSpacing_kHz30,TYPE_INT64,0 /*70*/}, \ -{GNB_CONFIG_STRING_PRACHCONFIGURATIONINDEX,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.prach_ConfigurationIndex,defint64val:98,TYPE_INT64,0/*71*/},\ -{GNB_CONFIG_STRING_PRACHMSG1FDM,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FDM,defint64val:NR_RACH_ConfigGeneric__msg1_FDM_one,TYPE_INT64,0/*72*/},\ -{GNB_CONFIG_STRING_PRACHMSG1FREQUENCYSTART,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart,defint64val:0,TYPE_INT64,0/*73*/},\ -{GNB_CONFIG_STRING_ZEROCORRELATIONZONECONFIG,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig,defint64val:13,TYPE_INT64,0/*74*/},\ -{GNB_CONFIG_STRING_PREAMBLERECEIVEDTARGETPOWER,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleReceivedTargetPower,defintval:-118,TYPE_INT64,0/*75*/},\ -{GNB_CONFIG_STRING_PREAMBLETRANSMAX,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleTransMax,defint64val:NR_RACH_ConfigGeneric__preambleTransMax_n10,TYPE_INT64,0/*76*/},\ -{GNB_CONFIG_STRING_POWERRAMPINGSTEP,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.powerRampingStep,defint64val:NR_RACH_ConfigGeneric__powerRampingStep_dB2,TYPE_INT64,0/*77*/},\ -{GNB_CONFIG_STRING_RARESPONSEWINDOW,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.ra_ResponseWindow,defint64val:NR_RACH_ConfigGeneric__ra_ResponseWindow_sl20,TYPE_INT64,0/*78*/},\ -{GNB_CONFIG_STRING_SSBPERRACHOCCASIONANDCBPREAMBLESPERSSBPR,NULL,0,uptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present,defuintval:NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_one,TYPE_UINT,0/*79*/},\ -{GNB_CONFIG_STRING_SSBPERRACHOCCASIONANDCBPREAMBLESPERSSB,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.one,defint64val:NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n64,TYPE_INT64,0 /*80*/}, \ -{GNB_CONFIG_STRING_RACONTENTIONRESOLUTIONTIMER,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ra_ContentionResolutionTimer,defint64val:NR_RACH_ConfigCommon__ra_ContentionResolutionTimer_sf64,TYPE_INT64,0/*81*/},\ -{GNB_CONFIG_STRING_RSRPTHRESHOLDSSB,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rsrp_ThresholdSSB,defint64val:19,TYPE_INT64,0/*82*/},\ -{GNB_CONFIG_STRING_PRACHROOTSEQUENCEINDEXPR,NULL,0,uptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.present,defuintval:NR_RACH_ConfigCommon__prach_RootSequenceIndex_PR_l139,TYPE_UINT,0/*83*/},\ -{GNB_CONFIG_STRING_PRACHROOTSEQUENCEINDEX,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l139,defint64val:0,TYPE_INT64,0/*84*/},\ -{GNB_CONFIG_STRING_RESTRICTEDSETCONFIG,NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->restrictedSetConfig,defintval:NR_RACH_ConfigCommon__restrictedSetConfig_unrestrictedSet,TYPE_INT64,0/*85*/}, \ -{GNB_CONFIG_STRING_MSG3TRANSFPREC,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder,defintval:1,TYPE_INT64,0/*86*/}, \ -{GNB_CONFIG_STRING_MSG3DELTAPREABMLE, NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->msg3_DeltaPreamble,defint64val:1,TYPE_INT64,0},\ -{GNB_CONFIG_STRING_P0NOMINALWITHGRANT, NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->p0_NominalWithGrant,defint64val:1,TYPE_INT64,0},\ -{GNB_CONFIG_STRING_PUCCHGROUPHOPPING, NULL,0,i64ptr:&scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->pucch_GroupHopping,defint64val:NR_PUCCH_ConfigCommon__pucch_GroupHopping_neither,TYPE_INT64,0},\ -{GNB_CONFIG_STRING_HOPPINGID, NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->hoppingId,defint64val:40,TYPE_INT64,0},\ -{GNB_CONFIG_STRING_P0NOMINAL, NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->p0_nominal,defint64val:1,TYPE_INT64,0},\ -{GNB_CONFIG_STRING_PUCCHRES, NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->pucch_ResourceCommon,defint64val:0,TYPE_INT64,0},\ -{GNB_CONFIG_STRING_SSBPOSITIONSINBURSTPR,NULL,0,uptr:&scc->ssb_PositionsInBurst->present,defuintval:NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap,TYPE_UINT,0/*140*/}, \ -{GNB_CONFIG_STRING_SSBPOSITIONSINBURST,NULL,0,u64ptr:&ssb_bitmap,defintval:0xff,TYPE_UINT64,0}, \ -{GNB_CONFIG_STRING_REFERENCESUBCARRIERSPACING,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->referenceSubcarrierSpacing,defint64val:NR_SubcarrierSpacing_kHz30,TYPE_INT64,0},\ -{GNB_CONFIG_STRING_DLULTRANSMISSIONPERIODICITY,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity,defint64val:NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms0p5,TYPE_INT64,0},\ -{GNB_CONFIG_STRING_NROFDOWNLINKSLOTS,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSlots,defint64val:7,TYPE_INT64,0},\ -{GNB_CONFIG_STRING_NROFDOWNLINKSYMBOLS,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSymbols,defint64val:6,TYPE_INT64,0},\ -{GNB_CONFIG_STRING_NROFUPLINKSLOTS,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots,defint64val:2,TYPE_INT64,0},\ -{GNB_CONFIG_STRING_NROFUPLINKSYMBOLS,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols,defint64val:4,TYPE_INT64,0},\ -{GNB_CONFIG_STRING_DLULTRANSMISSIONPERIODICITY2,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern2->dl_UL_TransmissionPeriodicity,defintval:-1,TYPE_INT64,0},\ -{GNB_CONFIG_STRING_NROFDOWNLINKSLOTS2,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofDownlinkSlots,defint64val:-1,TYPE_INT64,0},\ -{GNB_CONFIG_STRING_NROFDOWNLINKSYMBOLS2,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofDownlinkSymbols,defint64val:-1,TYPE_INT64,0},\ -{GNB_CONFIG_STRING_NROFUPLINKSLOTS2,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofUplinkSlots,defint64val:-1,TYPE_INT64,0},\ -{GNB_CONFIG_STRING_NROFUPLINKSYMBOLS2,NULL,0,i64ptr:&scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofUplinkSymbols,defint64val:-1,TYPE_INT64,0},\ -{GNB_CONFIG_STRING_SSPBCHBLOCKPOWER,NULL,0,i64ptr:&scc->ss_PBCH_BlockPower,defint64val:20,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_MSG1SUBCARRIERSPACING,NULL,0,i64ptr:scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing,defintval:-1,TYPE_INT64,0}} +{GNB_CONFIG_STRING_PHYSCELLID,NULL,0,.i64ptr=scc->physCellId,.defint64val=0,TYPE_INT64,0/*0*/}, \ +{GNB_CONFIG_STRING_NTIMINGADVANCEOFFSET,NULL,0,.i64ptr=scc->n_TimingAdvanceOffset,.defint64val=NR_ServingCellConfigCommon__n_TimingAdvanceOffset_n0,TYPE_INT64,0/*1*/},\ +{GNB_CONFIG_STRING_SSBPERIODICITYSERVINGCELL,NULL,0,.i64ptr=scc->ssb_periodicityServingCell,.defint64val=NR_ServingCellConfigCommon__ssb_periodicityServingCell_ms20,TYPE_INT64,0/*2*/},\ +{GNB_CONFIG_STRING_DMRSTYPEAPOSITION,NULL,0,.i64ptr=&scc->dmrs_TypeA_Position,.defint64val=NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos2,TYPE_INT64,0/*3*/},\ +{GNB_CONFIG_STRING_SUBCARRIERSPACING,NULL,0,.i64ptr=scc->ssbSubcarrierSpacing,.defint64val=NR_SubcarrierSpacing_kHz30,TYPE_INT64,0/*4*/},\ +{GNB_CONFIG_STRING_ABSOLUTEFREQUENCYSSB,NULL,0,.i64ptr=scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencySSB,.defint64val=660960,TYPE_INT64,0/*5*/},\ +{GNB_CONFIG_STRING_DLFREQUENCYBAND,NULL,0,.i64ptr=scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0],.defint64val=78,TYPE_INT64,0/*6*/},\ +{GNB_CONFIG_STRING_DLABSOLUEFREQUENCYPOINTA,NULL,0,.i64ptr=&scc->downlinkConfigCommon->frequencyInfoDL->absoluteFrequencyPointA,.defint64val=660000,TYPE_INT64,0/*7*/},\ +{GNB_CONFIG_STRING_DLOFFSETTOCARRIER,NULL,0,.i64ptr=&scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->offsetToCarrier,.defint64val=0,TYPE_INT64,0/*8*/},\ +{GNB_CONFIG_STRING_DLSUBCARRIERSPACING,NULL,0,.i64ptr=&scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,.defint64val=NR_SubcarrierSpacing_kHz30,TYPE_INT64,0/*9*/},\ +{GNB_CONFIG_STRING_DLCARRIERBANDWIDTH,NULL,0,.i64ptr=&scc->downlinkConfigCommon->frequencyInfoDL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth,.defint64val=217,TYPE_INT64,0 /*10*/}, \ +{GNB_CONFIG_STRING_INITIALDLBWPLOCATIONANDBANDWIDTH,NULL,0,.i64ptr=&scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth,.defint64val=13036,TYPE_INT64,0/*11*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPSUBCARRIERSPACING,NULL,0,.i64ptr=&scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.subcarrierSpacing,.defint64val=NR_SubcarrierSpacing_kHz30,TYPE_INT64,0/*12*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPCONTROLRESOURCESETZERO,NULL,0,.i64ptr=scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->controlResourceSetZero,.defint64val=-1,TYPE_INT64,0/*13*/},\ +{GNB_CONFIG_STRING_INITIALDLBWPSEARCHSPACEZERO,NULL,0,.i64ptr=scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->searchSpaceZero,.defint64val=-1,TYPE_INT64,0/*14*/},\ +{GNB_CONFIG_STRING_ULFREQUENCYBAND,NULL,0,.i64ptr=scc->uplinkConfigCommon->frequencyInfoUL->frequencyBandList->list.array[0],.defint64val=-1,TYPE_INT64,0/*63*/},\ +{GNB_CONFIG_STRING_ULABSOLUEFREQUENCYPOINTA,NULL,0,.i64ptr=scc->uplinkConfigCommon->frequencyInfoUL->absoluteFrequencyPointA,.defint64val=-1,TYPE_INT64,0/*64*/},\ +{GNB_CONFIG_STRING_ULOFFSETTOCARRIER,NULL,0,.i64ptr=&scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->offsetToCarrier,.defint64val=0,TYPE_INT64,0/*65*/},\ +{GNB_CONFIG_STRING_ULSUBCARRIERSPACING,NULL,0,.i64ptr=&scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing,.defint64val=NR_SubcarrierSpacing_kHz30,TYPE_INT64,0/*66*/},\ +{GNB_CONFIG_STRING_ULCARRIERBANDWIDTH,NULL,0,.i64ptr=&scc->uplinkConfigCommon->frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->carrierBandwidth,.defint64val=217,TYPE_INT64,0/*67*/},\ +{GNB_CONFIG_STRING_PMAX,NULL,0,.i64ptr=scc->uplinkConfigCommon->frequencyInfoUL->p_Max,.defint64val=20,TYPE_INT64,0/*68*/},\ +{GNB_CONFIG_STRING_INITIALULBWPLOCATIONANDBANDWIDTH,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth,.defint64val=13036,TYPE_INT64,0/*69*/},\ +{GNB_CONFIG_STRING_INITIALULBWPSUBCARRIERSPACING,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing,.defint64val=NR_SubcarrierSpacing_kHz30,TYPE_INT64,0 /*70*/}, \ +{GNB_CONFIG_STRING_PRACHCONFIGURATIONINDEX,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.prach_ConfigurationIndex,.defint64val=98,TYPE_INT64,0/*71*/},\ +{GNB_CONFIG_STRING_PRACHMSG1FDM,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FDM,.defint64val=NR_RACH_ConfigGeneric__msg1_FDM_one,TYPE_INT64,0/*72*/},\ +{GNB_CONFIG_STRING_PRACHMSG1FREQUENCYSTART,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.msg1_FrequencyStart,.defint64val=0,TYPE_INT64,0/*73*/},\ +{GNB_CONFIG_STRING_ZEROCORRELATIONZONECONFIG,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.zeroCorrelationZoneConfig,.defint64val=13,TYPE_INT64,0/*74*/},\ +{GNB_CONFIG_STRING_PREAMBLERECEIVEDTARGETPOWER,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleReceivedTargetPower,.defintval=-118,TYPE_INT64,0/*75*/},\ +{GNB_CONFIG_STRING_PREAMBLETRANSMAX,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.preambleTransMax,.defint64val=NR_RACH_ConfigGeneric__preambleTransMax_n10,TYPE_INT64,0/*76*/},\ +{GNB_CONFIG_STRING_POWERRAMPINGSTEP,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.powerRampingStep,.defint64val=NR_RACH_ConfigGeneric__powerRampingStep_dB2,TYPE_INT64,0/*77*/},\ +{GNB_CONFIG_STRING_RARESPONSEWINDOW,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.ra_ResponseWindow,.defint64val=NR_RACH_ConfigGeneric__ra_ResponseWindow_sl20,TYPE_INT64,0/*78*/},\ +{GNB_CONFIG_STRING_SSBPERRACHOCCASIONANDCBPREAMBLESPERSSBPR,NULL,0,.uptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present,.defuintval=NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB_PR_one,TYPE_UINT,0/*79*/},\ +{GNB_CONFIG_STRING_SSBPERRACHOCCASIONANDCBPREAMBLESPERSSB,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->choice.one,.defint64val=NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB__one_n64,TYPE_INT64,0 /*80*/}, \ +{GNB_CONFIG_STRING_RACONTENTIONRESOLUTIONTIMER,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->ra_ContentionResolutionTimer,.defint64val=NR_RACH_ConfigCommon__ra_ContentionResolutionTimer_sf64,TYPE_INT64,0/*81*/},\ +{GNB_CONFIG_STRING_RSRPTHRESHOLDSSB,NULL,0,.i64ptr=scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rsrp_ThresholdSSB,.defint64val=19,TYPE_INT64,0/*82*/},\ +{GNB_CONFIG_STRING_PRACHROOTSEQUENCEINDEXPR,NULL,0,.uptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.present,.defuintval=NR_RACH_ConfigCommon__prach_RootSequenceIndex_PR_l139,TYPE_UINT,0/*83*/},\ +{GNB_CONFIG_STRING_PRACHROOTSEQUENCEINDEX,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->prach_RootSequenceIndex.choice.l139,.defint64val=0,TYPE_INT64,0/*84*/},\ +{GNB_CONFIG_STRING_RESTRICTEDSETCONFIG,NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->restrictedSetConfig,.defintval=NR_RACH_ConfigCommon__restrictedSetConfig_unrestrictedSet,TYPE_INT64,0/*85*/}, \ +{GNB_CONFIG_STRING_MSG3TRANSFPREC,NULL,0,.i64ptr=scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder,.defintval=1,TYPE_INT64,0/*86*/}, \ +{GNB_CONFIG_STRING_MSG3DELTAPREABMLE, NULL,0,.i64ptr=scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->msg3_DeltaPreamble,.defint64val=1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_P0NOMINALWITHGRANT, NULL,0,.i64ptr=scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->p0_NominalWithGrant,.defint64val=1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_PUCCHGROUPHOPPING, NULL,0,.i64ptr=&scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->pucch_GroupHopping,.defint64val=NR_PUCCH_ConfigCommon__pucch_GroupHopping_neither,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_HOPPINGID, NULL,0,.i64ptr=scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->hoppingId,.defint64val=40,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_P0NOMINAL, NULL,0,.i64ptr=scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->p0_nominal,.defint64val=1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_PUCCHRES, NULL,0,.i64ptr=scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup->pucch_ResourceCommon,.defint64val=0,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_SSBPOSITIONSINBURSTPR,NULL,0,.uptr=&scc->ssb_PositionsInBurst->present,.defuintval=NR_ServingCellConfigCommon__ssb_PositionsInBurst_PR_mediumBitmap,TYPE_UINT,0/*140*/}, \ +{GNB_CONFIG_STRING_SSBPOSITIONSINBURST,NULL,0,.u64ptr=&ssb_bitmap,.defintval=0xff,TYPE_UINT64,0}, \ +{GNB_CONFIG_STRING_REFERENCESUBCARRIERSPACING,NULL,0,.i64ptr=&scc->tdd_UL_DL_ConfigurationCommon->referenceSubcarrierSpacing,.defint64val=NR_SubcarrierSpacing_kHz30,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_DLULTRANSMISSIONPERIODICITY,NULL,0,.i64ptr=&scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity,.defint64val=NR_TDD_UL_DL_Pattern__dl_UL_TransmissionPeriodicity_ms0p5,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_NROFDOWNLINKSLOTS,NULL,0,.i64ptr=&scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSlots,.defint64val=7,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_NROFDOWNLINKSYMBOLS,NULL,0,.i64ptr=&scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSymbols,.defint64val=6,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_NROFUPLINKSLOTS,NULL,0,.i64ptr=&scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots,.defint64val=2,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_NROFUPLINKSYMBOLS,NULL,0,.i64ptr=&scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols,.defint64val=4,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_DLULTRANSMISSIONPERIODICITY2,NULL,0,.i64ptr=&scc->tdd_UL_DL_ConfigurationCommon->pattern2->dl_UL_TransmissionPeriodicity,.defintval=-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_NROFDOWNLINKSLOTS2,NULL,0,.i64ptr=&scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofDownlinkSlots,.defint64val=-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_NROFDOWNLINKSYMBOLS2,NULL,0,.i64ptr=&scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofDownlinkSymbols,.defint64val=-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_NROFUPLINKSLOTS2,NULL,0,.i64ptr=&scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofUplinkSlots,.defint64val=-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_NROFUPLINKSYMBOLS2,NULL,0,.i64ptr=&scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofUplinkSymbols,.defint64val=-1,TYPE_INT64,0},\ +{GNB_CONFIG_STRING_SSPBCHBLOCKPOWER,NULL,0,.i64ptr=&scc->ss_PBCH_BlockPower,.defint64val=20,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_MSG1SUBCARRIERSPACING,NULL,0,.i64ptr=scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing,.defintval=-1,TYPE_INT64,0}} /*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ /* Serving Cell Config Dedicated configuration parameters */ /*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ #define SCDPARAMS_DESC(scd) { \ -{GNB_CONFIG_STRING_DLPTRSFREQDENSITY0_0,NULL,0,i64ptr:scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->frequencyDensity->list.array[0],defint64val:-1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_DLPTRSFREQDENSITY1_0,NULL,0,i64ptr:scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->frequencyDensity->list.array[1],defint64val:-1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_DLPTRSTIMEDENSITY0_0,NULL,0,i64ptr:scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->timeDensity->list.array[0],defint64val:-1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_DLPTRSTIMEDENSITY1_0,NULL,0,i64ptr:scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->timeDensity->list.array[1],defint64val:-1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_DLPTRSTIMEDENSITY2_0,NULL,0,i64ptr:scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->timeDensity->list.array[2],defint64val:-1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_DLPTRSEPRERATIO_0,NULL,0,i64ptr:scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->epre_Ratio,defint64val:-1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_DLPTRSREOFFSET_0,NULL,0,i64ptr:scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->resourceElementOffset,defint64val:-1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_ULPTRSFREQDENSITY0_0,NULL,0,i64ptr:scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->frequencyDensity->list.array[0],defint64val:-1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_ULPTRSFREQDENSITY1_0,NULL,0,i64ptr:scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->frequencyDensity->list.array[1],defint64val:-1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_ULPTRSTIMEDENSITY0_0,NULL,0,i64ptr:scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->timeDensity->list.array[0],defint64val:-1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_ULPTRSTIMEDENSITY1_0,NULL,0,i64ptr:scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->timeDensity->list.array[1],defint64val:-1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_ULPTRSTIMEDENSITY2_0,NULL,0,i64ptr:scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->timeDensity->list.array[2],defint64val:-1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_ULPTRSREOFFSET_0,NULL,0,i64ptr:scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->resourceElementOffset,defint64val:-1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_ULPTRSMAXPORTS_0,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->maxNrofPorts,defint64val:0,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_ULPTRSPOWER_0,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->ptrs_Power,defint64val:0,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_FIRSTACTIVEDLBWP_ID,NULL,0,i64ptr:scd->firstActiveDownlinkBWP_Id,defint64val:1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_FIRSTACTIVEULBWP_ID,NULL,0,i64ptr:scd->uplinkConfig->firstActiveUplinkBWP_Id,defint64val:1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_DLBWP1_ID,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Id,defint64val:1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_DLBWP2_ID,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[1]->bwp_Id,defint64val:2,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_DLBWP3_ID,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[2]->bwp_Id,defint64val:3,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_DLBWP4_ID,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[3]->bwp_Id,defint64val:4,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_SCS_DLBWP1,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.subcarrierSpacing,defint64val:1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_SCS_DLBWP2,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[1]->bwp_Common->genericParameters.subcarrierSpacing,defint64val:1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_SCS_DLBWP3,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[2]->bwp_Common->genericParameters.subcarrierSpacing,defint64val:1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_SCS_DLBWP4,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[3]->bwp_Common->genericParameters.subcarrierSpacing,defint64val:1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP1,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.locationAndBandwidth,defint64val:0,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP2,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[1]->bwp_Common->genericParameters.locationAndBandwidth,defint64val:0,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP3,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[2]->bwp_Common->genericParameters.locationAndBandwidth,defint64val:0,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP4,NULL,0,i64ptr:&scd->downlinkBWP_ToAddModList->list.array[3]->bwp_Common->genericParameters.locationAndBandwidth,defint64val:0,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_ULBWP1_ID,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Id,defint64val:1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_ULBWP2_ID,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[1]->bwp_Id,defint64val:2,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_ULBWP3_ID,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[2]->bwp_Id,defint64val:3,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_ULBWP4_ID,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[3]->bwp_Id,defint64val:4,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_SCS_ULBWP1,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.subcarrierSpacing,defint64val:1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_SCS_ULBWP2,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[1]->bwp_Common->genericParameters.subcarrierSpacing,defint64val:1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_SCS_ULBWP3,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[2]->bwp_Common->genericParameters.subcarrierSpacing,defint64val:1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_SCS_ULBWP4,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[3]->bwp_Common->genericParameters.subcarrierSpacing,defint64val:1,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP1,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.locationAndBandwidth,defint64val:0,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP2,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[1]->bwp_Common->genericParameters.locationAndBandwidth,defint64val:0,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP3,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[2]->bwp_Common->genericParameters.locationAndBandwidth,defint64val:0,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP4,NULL,0,i64ptr:&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[3]->bwp_Common->genericParameters.locationAndBandwidth,defint64val:0,TYPE_INT64,0}, \ -{GNB_CONFIG_STRING_DEFAULTDLBWP_ID,NULL,0,i64ptr:scd->defaultDownlinkBWP_Id,defint64val:0,TYPE_INT64,0}} +{GNB_CONFIG_STRING_DLPTRSFREQDENSITY0_0,NULL,0,.i64ptr=scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->frequencyDensity->list.array[0],.defint64val=-1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_DLPTRSFREQDENSITY1_0,NULL,0,.i64ptr=scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->frequencyDensity->list.array[1],.defint64val=-1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_DLPTRSTIMEDENSITY0_0,NULL,0,.i64ptr=scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->timeDensity->list.array[0],.defint64val=-1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_DLPTRSTIMEDENSITY1_0,NULL,0,.i64ptr=scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->timeDensity->list.array[1],.defint64val=-1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_DLPTRSTIMEDENSITY2_0,NULL,0,.i64ptr=scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->timeDensity->list.array[2],.defint64val=-1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_DLPTRSEPRERATIO_0,NULL,0,.i64ptr=scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->epre_Ratio,.defint64val=-1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_DLPTRSREOFFSET_0,NULL,0,.i64ptr=scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->resourceElementOffset,.defint64val=-1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_ULPTRSFREQDENSITY0_0,NULL,0,.i64ptr=scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->frequencyDensity->list.array[0],.defint64val=-1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_ULPTRSFREQDENSITY1_0,NULL,0,.i64ptr=scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->frequencyDensity->list.array[1],.defint64val=-1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_ULPTRSTIMEDENSITY0_0,NULL,0,.i64ptr=scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->timeDensity->list.array[0],.defint64val=-1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_ULPTRSTIMEDENSITY1_0,NULL,0,.i64ptr=scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->timeDensity->list.array[1],.defint64val=-1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_ULPTRSTIMEDENSITY2_0,NULL,0,.i64ptr=scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->timeDensity->list.array[2],.defint64val=-1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_ULPTRSREOFFSET_0,NULL,0,.i64ptr=scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->resourceElementOffset,.defint64val=-1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_ULPTRSMAXPORTS_0,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->maxNrofPorts,.defint64val=0,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_ULPTRSPOWER_0,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->ptrs_Power,.defint64val=0,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_FIRSTACTIVEDLBWP_ID,NULL,0,.i64ptr=scd->firstActiveDownlinkBWP_Id,.defint64val=1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_FIRSTACTIVEULBWP_ID,NULL,0,.i64ptr=scd->uplinkConfig->firstActiveUplinkBWP_Id,.defint64val=1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_DLBWP1_ID,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Id,.defint64val=1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_DLBWP2_ID,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[1]->bwp_Id,.defint64val=2,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_DLBWP3_ID,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[2]->bwp_Id,.defint64val=3,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_DLBWP4_ID,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[3]->bwp_Id,.defint64val=4,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_SCS_DLBWP1,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.subcarrierSpacing,.defint64val=1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_SCS_DLBWP2,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[1]->bwp_Common->genericParameters.subcarrierSpacing,.defint64val=1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_SCS_DLBWP3,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[2]->bwp_Common->genericParameters.subcarrierSpacing,.defint64val=1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_SCS_DLBWP4,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[3]->bwp_Common->genericParameters.subcarrierSpacing,.defint64val=1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP1,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.locationAndBandwidth,.defint64val=0,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP2,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[1]->bwp_Common->genericParameters.locationAndBandwidth,.defint64val=0,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP3,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[2]->bwp_Common->genericParameters.locationAndBandwidth,.defint64val=0,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP4,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[3]->bwp_Common->genericParameters.locationAndBandwidth,.defint64val=0,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_ULBWP1_ID,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Id,.defint64val=1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_ULBWP2_ID,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[1]->bwp_Id,.defint64val=2,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_ULBWP3_ID,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[2]->bwp_Id,.defint64val=3,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_ULBWP4_ID,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[3]->bwp_Id,.defint64val=4,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_SCS_ULBWP1,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.subcarrierSpacing,.defint64val=1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_SCS_ULBWP2,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[1]->bwp_Common->genericParameters.subcarrierSpacing,.defint64val=1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_SCS_ULBWP3,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[2]->bwp_Common->genericParameters.subcarrierSpacing,.defint64val=1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_SCS_ULBWP4,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[3]->bwp_Common->genericParameters.subcarrierSpacing,.defint64val=1,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP1,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.locationAndBandwidth,.defint64val=0,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP2,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[1]->bwp_Common->genericParameters.locationAndBandwidth,.defint64val=0,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP3,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[2]->bwp_Common->genericParameters.locationAndBandwidth,.defint64val=0,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP4,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[3]->bwp_Common->genericParameters.locationAndBandwidth,.defint64val=0,TYPE_INT64,0}, \ +{GNB_CONFIG_STRING_DEFAULTDLBWP_ID,NULL,0,.i64ptr=scd->defaultDownlinkBWP_Id,.defint64val=0,TYPE_INT64,0}} #endif diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 4a378033dd..4fb0864ad2 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -50,10 +50,11 @@ // #include "SystemInformationBlockType2.h" // #include "LAYER2/MAC/extern.h" // #include "LAYER2/MAC/proto.h" -#include "PHY/INIT/phy_init.h" +#include "PHY/INIT/nr_phy_init.h" #include "radio/ETHERNET/USERSPACE/LIB/ethernet_lib.h" #include "nfapi_vnf.h" #include "nfapi_pnf.h" +#include "pdcp.h" //#include "L1_paramdef.h" #include "prs_nr_paramdef.h" @@ -172,7 +173,7 @@ void prepare_scc(NR_ServingCellConfigCommon_t *scc) { scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->present = NR_SetupRelease_PUSCH_ConfigCommon_PR_setup; scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup = CALLOC(1,sizeof(struct NR_PUSCH_ConfigCommon)); - scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->groupHoppingEnabledTransformPrecoding = CALLOC(1,sizeof(long)); + scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->groupHoppingEnabledTransformPrecoding = NULL; scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->pusch_TimeDomainAllocationList = CALLOC(1,sizeof(struct NR_PUSCH_TimeDomainResourceAllocationList)); scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->msg3_DeltaPreamble = CALLOC(1,sizeof(long)); @@ -938,6 +939,7 @@ void RCconfig_nr_macrlc() { ul_bler_options->harq_round_max = *(MacRLC_ParamList.paramarray[j][MACRLC_UL_HARQ_ROUND_MAX_IDX].u8ptr); RC.nrmac[j]->min_grant_prb = *(MacRLC_ParamList.paramarray[j][MACRLC_MIN_GRANT_PRB_IDX].u8ptr); RC.nrmac[j]->min_grant_mcs = *(MacRLC_ParamList.paramarray[j][MACRLC_MIN_GRANT_MCS_IDX].u8ptr); + RC.nrmac[j]->identity_pm = *(MacRLC_ParamList.paramarray[j][MACRLC_IDENTITY_PM_IDX].u8ptr); RC.nrmac[j]->num_ulprbbl = num_prbbl; memcpy(RC.nrmac[j]->ulprbbl, prbbl, 275 * sizeof(prbbl[0])); } // for (j=0;jsiblock1->message.choice.c1->choice.systemInformationBlockType1; - AssertFatal(sib1->cellAccessRelatedInfo.plmn_IdentityList.list.array[0]->plmn_IdentityList.list.count > 0, + AssertFatal(sib1->cellAccessRelatedInfo.plmn_IdentityInfoList.list.array[0]->plmn_IdentityList.list.count > 0, "plmn info isn't there\n"); AssertFatal(mnc_digit_length == 2 || mnc_digit_length == 3, "impossible mnc_digit_length %d\n", mnc_digit_length); - NR_PLMN_Identity_t *plmn_Identity = sib1->cellAccessRelatedInfo.plmn_IdentityList.list.array[0] + NR_PLMN_Identity_t *plmn_Identity = sib1->cellAccessRelatedInfo.plmn_IdentityInfoList.list.array[0] ->plmn_IdentityList.list.array[0]; // check if mcc is different and return failure if so @@ -2086,24 +2088,6 @@ void du_extract_and_decode_SI(int inst, int si_ind, uint8_t *si_container, int s } else AssertFatal(1 == 0, "No SI messages\n"); } -void configure_gnb_du_mac(int inst) { - gNB_RRC_INST *rrc = RC.nrrrc[inst]; - // LOG_I(GNB_APP,"Configuring MAC/L1 %d, carrier->sib2 %p\n", inst, &carrier->sib2->radioResourceConfigCommon); - LOG_I(GNB_APP,"Configuring gNB DU MAC/L1 %d \n", inst); - rrc_mac_config_req_gNB(rrc->module_id, - rrc->configuration.pdsch_AntennaPorts, - rrc->configuration.pusch_AntennaPorts, - rrc->configuration.sib1_tda, - rrc->configuration.minRXTXTIME, - rrc->configuration.scc, - NULL, - NULL, - 0, - 0, // rnti - NULL); -} - - int gNB_app_handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) { int i, j, si_ind; int ret=0; @@ -2128,9 +2112,6 @@ int gNB_app_handle_f1ap_setup_resp(f1ap_setup_resp_t *resp) { resp->cells_to_activate[j].SI_container[si_ind], resp->cells_to_activate[j].SI_container_length[si_ind]); } - - // perform MAC/L1 common configuration - configure_gnb_du_mac(i); ret++; } else { LOG_E(GNB_APP, "F1 Setup Response not matching\n"); @@ -2163,9 +2144,6 @@ int gNB_app_handle_f1ap_gnb_cu_configuration_update(f1ap_gnb_cu_configuration_up gnb_cu_cfg_update->cells_to_activate[j].SI_container[si_ind], gnb_cu_cfg_update->cells_to_activate[j].SI_container_length[si_ind]); } - - // perform MAC/L1 common configuration - configure_gnb_du_mac(i); ret++; } else { LOG_E(GNB_APP, "GNB_CU_CONFIGURATION_UPDATE not matching\n"); diff --git a/openair2/GNB_APP/gnb_paramdef.h b/openair2/GNB_APP/gnb_paramdef.h index 8b62b7720b..d59ecb9eb3 100644 --- a/openair2/GNB_APP/gnb_paramdef.h +++ b/openair2/GNB_APP/gnb_paramdef.h @@ -88,8 +88,8 @@ typedef enum { /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/ #define GNBSPARAMS_DESC { \ -{GNB_CONFIG_STRING_ASN1_VERBOSITY, NULL, 0, uptr:NULL, defstrval:GNB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_ACTIVE_GNBS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRINGLIST, 0} \ +{GNB_CONFIG_STRING_ASN1_VERBOSITY, NULL, 0, .uptr=NULL, .defstrval=GNB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \ +{GNB_CONFIG_STRING_ACTIVE_GNBS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRINGLIST, 0} \ } #define GNB_ASN1_VERBOSITY_IDX 0 @@ -137,34 +137,34 @@ typedef enum { /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-----------------------------------------------------------------------------------------------------------------------------------------*/ #define GNBPARAMS_DESC {\ -{GNB_CONFIG_STRING_GNB_ID, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{GNB_CONFIG_STRING_CELL_TYPE, NULL, 0, strptr:NULL, defstrval:"CELL_MACRO_GNB", TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_GNB_NAME, NULL, 0, strptr:NULL, defstrval:"OAIgNodeB", TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_TRACKING_AREA_CODE, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{GNB_CONFIG_STRING_MOBILE_COUNTRY_CODE_OLD, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_MOBILE_NETWORK_CODE_OLD, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_TRANSPORT_S_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_mac", TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_LOCAL_S_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_LOCAL_S_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_REMOTE_S_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_LOCAL_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \ -{GNB_CONFIG_STRING_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \ -{GNB_CONFIG_STRING_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \ -{GNB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \ -{GNB_CONFIG_STRING_PDSCHANTENNAPORTS_N1, "horiz. log. antenna ports", 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \ -{GNB_CONFIG_STRING_PDSCHANTENNAPORTS_N2, "vert. log. antenna ports", 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \ -{GNB_CONFIG_STRING_PDSCHANTENNAPORTS_XP, "XP log. antenna ports", 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \ -{GNB_CONFIG_STRING_PUSCHANTENNAPORTS, NULL, 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \ -{GNB_CONFIG_STRING_SIB1TDA, NULL, 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \ -{GNB_CONFIG_STRING_DOCSIRS, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \ -{GNB_CONFIG_STRING_DOSRS, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \ -{GNB_CONFIG_STRING_NRCELLID, NULL, 0, u64ptr:NULL, defint64val:1, TYPE_UINT64, 0}, \ -{GNB_CONFIG_STRING_MINRXTXTIME, NULL, 0, iptr:NULL, defintval:2, TYPE_INT, 0}, \ -{GNB_CONFIG_STRING_ULPRBBLACKLIST, NULL, 0, strptr:NULL, defstrval:"", TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_UMONDEFAULTDRB, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ -{GNB_CONFIG_STRING_FORCE256QAMOFF, GNB_CONFIG_HLP_FORCE256QAMOFF, PARAMFLAG_BOOL, iptr:NULL, defintval:0, TYPE_INT, 0}, \ -{GNB_CONFIG_STRING_ENABLE_SDAP, GNB_CONFIG_HLP_STRING_ENABLE_SDAP, PARAMFLAG_BOOL, iptr:NULL, defintval:0, TYPE_INT, 0}, \ -{GNB_CONFIG_STRING_DRBS, GNB_CONFIG_HLP_STRING_DRBS, 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \ +{GNB_CONFIG_STRING_GNB_ID, NULL, 0, .uptr=NULL, .defintval=0, TYPE_UINT, 0}, \ +{GNB_CONFIG_STRING_CELL_TYPE, NULL, 0, .strptr=NULL, .defstrval="CELL_MACRO_GNB", TYPE_STRING, 0}, \ +{GNB_CONFIG_STRING_GNB_NAME, NULL, 0, .strptr=NULL, .defstrval="OAIgNodeB", TYPE_STRING, 0}, \ +{GNB_CONFIG_STRING_TRACKING_AREA_CODE, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ +{GNB_CONFIG_STRING_MOBILE_COUNTRY_CODE_OLD, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ +{GNB_CONFIG_STRING_MOBILE_NETWORK_CODE_OLD, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ +{GNB_CONFIG_STRING_TRANSPORT_S_PREFERENCE, NULL, 0, .strptr=NULL, .defstrval="local_mac", TYPE_STRING, 0}, \ +{GNB_CONFIG_STRING_LOCAL_S_IF_NAME, NULL, 0, .strptr=NULL, .defstrval="lo", TYPE_STRING, 0}, \ +{GNB_CONFIG_STRING_LOCAL_S_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ +{GNB_CONFIG_STRING_REMOTE_S_ADDRESS, NULL, 0, .strptr=NULL, .defstrval="127.0.0.2", TYPE_STRING, 0}, \ +{GNB_CONFIG_STRING_LOCAL_S_PORTC, NULL, 0, .uptr=NULL, .defuintval=50000, TYPE_UINT, 0}, \ +{GNB_CONFIG_STRING_REMOTE_S_PORTC, NULL, 0, .uptr=NULL, .defuintval=50000, TYPE_UINT, 0}, \ +{GNB_CONFIG_STRING_LOCAL_S_PORTD, NULL, 0, .uptr=NULL, .defuintval=50001, TYPE_UINT, 0}, \ +{GNB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, .uptr=NULL, .defuintval=50001, TYPE_UINT, 0}, \ +{GNB_CONFIG_STRING_PDSCHANTENNAPORTS_N1, "horiz. log. antenna ports", 0,.iptr=NULL, .defintval=1, TYPE_INT, 0}, \ +{GNB_CONFIG_STRING_PDSCHANTENNAPORTS_N2, "vert. log. antenna ports", 0, .iptr=NULL, .defintval=1, TYPE_INT, 0}, \ +{GNB_CONFIG_STRING_PDSCHANTENNAPORTS_XP, "XP log. antenna ports", 0, .iptr=NULL, .defintval=1, TYPE_INT, 0}, \ +{GNB_CONFIG_STRING_PUSCHANTENNAPORTS, NULL, 0, .iptr=NULL, .defintval=1, TYPE_INT, 0}, \ +{GNB_CONFIG_STRING_SIB1TDA, NULL, 0, .iptr=NULL, .defintval=1, TYPE_INT, 0}, \ +{GNB_CONFIG_STRING_DOCSIRS, NULL, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \ +{GNB_CONFIG_STRING_DOSRS, NULL, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \ +{GNB_CONFIG_STRING_NRCELLID, NULL, 0, .u64ptr=NULL,.defint64val=1, TYPE_UINT64, 0}, \ +{GNB_CONFIG_STRING_MINRXTXTIME, NULL, 0, .iptr=NULL, .defintval=2, TYPE_INT, 0}, \ +{GNB_CONFIG_STRING_ULPRBBLACKLIST, NULL, 0, .strptr=NULL,.defstrval="", TYPE_STRING, 0}, \ +{GNB_CONFIG_STRING_UMONDEFAULTDRB, NULL, 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ +{GNB_CONFIG_STRING_FORCE256QAMOFF, GNB_CONFIG_HLP_FORCE256QAMOFF, PARAMFLAG_BOOL, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \ +{GNB_CONFIG_STRING_ENABLE_SDAP, GNB_CONFIG_HLP_STRING_ENABLE_SDAP, PARAMFLAG_BOOL,.iptr=NULL, .defintval=0, TYPE_INT, 0}, \ +{GNB_CONFIG_STRING_DRBS, GNB_CONFIG_HLP_STRING_DRBS, 0, .iptr=NULL, .defintval=1, TYPE_INT, 0}, \ } #define GNB_GNB_ID_IDX 0 @@ -231,9 +231,9 @@ typedef enum { #define GNBPLMNPARAMS_DESC { \ /* optname helpstr paramflags XXXptr def val type numelt */ \ - {GNB_CONFIG_STRING_MOBILE_COUNTRY_CODE, "mobile country code", 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \ - {GNB_CONFIG_STRING_MOBILE_NETWORK_CODE, "mobile network code", 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \ - {GNB_CONFIG_STRING_MNC_DIGIT_LENGTH, "length of the MNC (2 or 3)", 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \ + {GNB_CONFIG_STRING_MOBILE_COUNTRY_CODE, "mobile country code", 0, .uptr=NULL, .defuintval=1000, TYPE_UINT, 0}, \ + {GNB_CONFIG_STRING_MOBILE_NETWORK_CODE, "mobile network code", 0, .uptr=NULL, .defuintval=1000, TYPE_UINT, 0}, \ + {GNB_CONFIG_STRING_MNC_DIGIT_LENGTH, "length of the MNC (2 or 3)", 0, .uptr=NULL, .defuintval=0, TYPE_UINT, 0}, \ } #define MCC_MNC_OKRANGES {0,999} @@ -258,8 +258,8 @@ typedef enum { #define GNBSNSSAIPARAMS_DESC { \ /* optname helpstr paramflags XXXptr def val type numelt */ \ - {GNB_CONFIG_STRING_SLICE_SERVICE_TYPE, "slice service type", 0, uptr:NULL, defuintval:1, TYPE_UINT, 0}, \ - {GNB_CONFIG_STRING_SLICE_DIFFERENTIATOR, "slice differentiator", 0, uptr:NULL, defuintval:0xffffff, TYPE_UINT, 0}, \ + {GNB_CONFIG_STRING_SLICE_SERVICE_TYPE, "slice service type", 0, .uptr=NULL, .defuintval=1, TYPE_UINT, 0}, \ + {GNB_CONFIG_STRING_SLICE_DIFFERENTIATOR, "slice differentiator", 0, .uptr=NULL, .defuintval=0xffffff, TYPE_UINT, 0}, \ } #define SLICE_SERVICE_TYPE_OKRANGE {0, 255} @@ -288,10 +288,10 @@ typedef enum { /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-------------------------------------------------------------------------------------------------------------------------------------*/ #define GNBNGPARAMS_DESC { \ -{GNB_CONFIG_STRING_AMF_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_AMF_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_AMF_IP_ADDRESS_ACTIVE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ -{GNB_CONFIG_STRING_AMF_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ +{GNB_CONFIG_STRING_AMF_IPV4_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ +{GNB_CONFIG_STRING_AMF_IPV6_ADDRESS, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ +{GNB_CONFIG_STRING_AMF_IP_ADDRESS_ACTIVE, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ +{GNB_CONFIG_STRING_AMF_IP_ADDRESS_PREFERENCE, NULL, 0, .uptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ } #define GNB_AMF_IPV4_ADDRESS_IDX 0 @@ -315,8 +315,8 @@ typedef enum { /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-----------------------------------------------------------------------------------------------------------------------------------------------------------*/ #define GNBSCTPPARAMS_DESC { \ -{GNB_CONFIG_STRING_SCTP_INSTREAMS, NULL, 0, uptr:NULL, defintval:-1, TYPE_UINT, 0}, \ -{GNB_CONFIG_STRING_SCTP_OUTSTREAMS, NULL, 0, uptr:NULL, defintval:-1, TYPE_UINT, 0} \ +{GNB_CONFIG_STRING_SCTP_INSTREAMS, NULL, 0, .uptr=NULL, .defintval=-1, TYPE_UINT, 0}, \ +{GNB_CONFIG_STRING_SCTP_OUTSTREAMS, NULL, 0, .uptr=NULL, .defintval=-1, TYPE_UINT, 0} \ } #define GNB_SCTP_INSTREAMS_IDX 0 @@ -356,16 +356,16 @@ typedef enum { /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*--------------------------------------------------------------------------------------------------------------------------------------------------*/ #define GNBNETPARAMS_DESC { \ - {GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_NG_AMF, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {GNB_CONFIG_STRING_GNB_IPV4_ADDRESS_FOR_NG_AMF, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_NGU, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {GNB_CONFIG_STRING_GNB_IPV4_ADDR_FOR_NGU, NULL, 0, strptr:&gnb_ipv4_address_for_NGU, defstrval:"127.0.0.1",TYPE_STRING, 0}, \ - {GNB_CONFIG_STRING_GNB_PORT_FOR_NGU, NULL, 0, uptr:&gnb_port_for_NGU, defintval:2152L, TYPE_UINT, 0}, \ - {GNB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {GNB_CONFIG_STRING_ENB_PORT_FOR_X2C, NULL, 0, uptr:NULL, defintval:0L, TYPE_UINT, 0}, \ - {GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_S1U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {GNB_CONFIG_STRING_GNB_IPV4_ADDRESS_FOR_S1U, NULL, 0, strptr:&gnb_ipv4_address_for_S1U, defstrval:"127.0.0.1",TYPE_STRING, 0}, \ - {GNB_CONFIG_STRING_GNB_PORT_FOR_S1U, NULL, 0, uptr:&gnb_port_for_S1U, defintval:2152L, TYPE_UINT, 0} \ + {GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_NG_AMF, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {GNB_CONFIG_STRING_GNB_IPV4_ADDRESS_FOR_NG_AMF, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_NGU, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {GNB_CONFIG_STRING_GNB_IPV4_ADDR_FOR_NGU, NULL, 0, .strptr=&gnb_ipv4_address_for_NGU, .defstrval="127.0.0.1",TYPE_STRING, 0}, \ + {GNB_CONFIG_STRING_GNB_PORT_FOR_NGU, NULL, 0, .uptr=&gnb_port_for_NGU, .defintval=2152L, TYPE_UINT, 0}, \ + {GNB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {GNB_CONFIG_STRING_ENB_PORT_FOR_X2C, NULL, 0, .uptr=NULL, .defintval=0L, TYPE_UINT, 0}, \ + {GNB_CONFIG_STRING_GNB_INTERFACE_NAME_FOR_S1U, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {GNB_CONFIG_STRING_GNB_IPV4_ADDRESS_FOR_S1U, NULL, 0, .strptr=&gnb_ipv4_address_for_S1U, .defstrval="127.0.0.1",TYPE_STRING, 0}, \ + {GNB_CONFIG_STRING_GNB_PORT_FOR_S1U, NULL, 0, .uptr=&gnb_port_for_S1U, .defintval=2152L, TYPE_UINT, 0} \ } /*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ @@ -385,10 +385,10 @@ typedef enum { // clang-format off #define GNBE1PARAMS_DESC { \ - {GNB_CONFIG_STRING_E1_CU_TYPE, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {GNB_CONFIG_STRING_E1_IPV4_ADDRESS_CUCP, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {GNB_CONFIG_STRING_E1_IPV4_ADDRESS_CUUP, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \ - {GNB_CONFIG_STRING_E1_CN_SUPPORT, NULL, 0, uptr :NULL, defintval:1L, TYPE_UINT, 0} \ + {GNB_CONFIG_STRING_E1_CU_TYPE, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {GNB_CONFIG_STRING_E1_IPV4_ADDRESS_CUCP, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {GNB_CONFIG_STRING_E1_IPV4_ADDRESS_CUUP, NULL, 0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0}, \ + {GNB_CONFIG_STRING_E1_CN_SUPPORT, NULL, 0, .uptr =NULL, .defintval=1L, TYPE_UINT, 0} \ } // clang-format on /* L1 configuration section names */ @@ -459,8 +459,8 @@ typedef enum { /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-------------------------------------------------------------------------------------------------------------------------------------------------------------*/ #define THREAD_CONF_DESC { \ -{THREAD_CONFIG_STRING_PARALLEL, CONFIG_HLP_PARALLEL, 0, strptr:NULL, defstrval:"PARALLEL_RU_L1_TRX_SPLIT", TYPE_STRING, 0}, \ -{THREAD_CONFIG_STRING_WORKER, CONFIG_HLP_WORKER, 0, strptr:NULL, defstrval:"WORKER_ENABLE", TYPE_STRING, 0} \ +{THREAD_CONFIG_STRING_PARALLEL, CONFIG_HLP_PARALLEL, 0, .strptr=NULL, .defstrval="PARALLEL_RU_L1_TRX_SPLIT", TYPE_STRING, 0}, \ +{THREAD_CONFIG_STRING_WORKER, CONFIG_HLP_WORKER, 0, .strptr=NULL, .defstrval="WORKER_ENABLE", TYPE_STRING, 0} \ } @@ -484,10 +484,10 @@ typedef enum { /* optname help paramflags XXXptr defXXXval type numelt */ /*----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ #define SECURITY_GLOBALPARAMS_DESC { \ - {SECURITY_CONFIG_CIPHERING, "preferred ciphering algorithms\n", 0, strlistptr:NULL, defstrlistval:NULL, TYPE_STRINGLIST, 0}, \ - {SECURITY_CONFIG_INTEGRITY, "preferred integrity algorithms\n", 0, strlistptr:NULL, defstrlistval:NULL, TYPE_STRINGLIST, 0}, \ - {SECURITY_CONFIG_DO_DRB_CIPHERING, "use ciphering for DRBs", 0, strptr:NULL, defstrval:"yes", TYPE_STRING, 0}, \ - {SECURITY_CONFIG_DO_DRB_INTEGRITY, "use integrity for DRBs", 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \ + {SECURITY_CONFIG_CIPHERING, "preferred ciphering algorithms\n", 0, .strlistptr=NULL, .defstrlistval=NULL, TYPE_STRINGLIST, 0}, \ + {SECURITY_CONFIG_INTEGRITY, "preferred integrity algorithms\n", 0, .strlistptr=NULL, .defstrlistval=NULL, TYPE_STRINGLIST, 0}, \ + {SECURITY_CONFIG_DO_DRB_CIPHERING, "use ciphering for DRBs", 0, .strptr=NULL, .defstrval="yes", TYPE_STRING, 0}, \ + {SECURITY_CONFIG_DO_DRB_INTEGRITY, "use integrity for DRBs", 0, .strptr=NULL, .defstrval="no", TYPE_STRING, 0}, \ } #define SECURITY_CONFIG_CIPHERING_IDX 0 diff --git a/openair2/LAYER2/MAC/config.c b/openair2/LAYER2/MAC/config.c index 732ebd4d4a..f584c6a0b4 100644 --- a/openair2/LAYER2/MAC/config.c +++ b/openair2/LAYER2/MAC/config.c @@ -119,10 +119,14 @@ static const eutra_bandentry_t eutra_bandtable[] = { {44, 7030, 8030, 7030, 8030, 455900}, {45, 14470, 14670, 14470, 14670, 465900}, {46, 51500, 59250, 51500, 59250, 467900}, + {64, 0, 0, 0, 0, 60140},//reserved {65, 19200, 20100, 21100, 22000, 655360}, {66, 17100, 18000, 21100, 22000, 664360}, {67, 0, 0, 7380, 7580, 67336 }, - {68, 6980, 7280, 7530, 7830, 67536 } + {68, 6980, 7280, 7530, 7830, 67536 }, + {71, 6630, 6980, 6170, 6520, 68586 }, + {72, 4510, 4560, 4610, 4660, 68936 }, + {73, 4500, 4550, 4600, 4650, 68986 } }; @@ -132,11 +136,12 @@ uint32_t to_earfcn(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw) { uint32_t dl_CarrierFreq_by_100k = dl_CarrierFreq / 100000; int bw_by_100 = bw / 100; int i; - AssertFatal(eutra_bandP < 69, "eutra_band %d > 68\n", eutra_bandP); + AssertFatal(eutra_bandP < 74, "eutra_band %d > 74\n", eutra_bandP); for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++); AssertFatal(i < BANDTABLE_SIZE, "i %d >= BANDTABLE_SIZE %ld\n", i, BANDTABLE_SIZE); + AssertFatal(eutra_bandP != 64, "LTE b64 is a reserved band"); AssertFatal(dl_CarrierFreq_by_100k >= eutra_bandtable[i].dl_min, "Band %d, bw %u : DL carrier frequency %u Hz < %u\n", eutra_bandP, bw, dl_CarrierFreq, @@ -148,17 +153,19 @@ uint32_t to_earfcn(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw) { eutra_bandtable[i].dl_max - bw_by_100); return (dl_CarrierFreq_by_100k - eutra_bandtable[i].dl_min + (eutra_bandtable[i].N_OFFs_DL / 10)); -} + } + uint32_t to_earfcn_DL(int eutra_bandP, long long int dl_CarrierFreq, uint32_t bw) { uint32_t dl_CarrierFreq_by_100k = dl_CarrierFreq / 100000; int bw_by_100 = bw / 100; int i; - AssertFatal(eutra_bandP < 69, "eutra_band %d > 68\n", eutra_bandP); + AssertFatal(eutra_bandP < 74, "eutra_band %d > 74\n", eutra_bandP); for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++); AssertFatal(i < BANDTABLE_SIZE, "i = %d , it will trigger out-of-bounds read.\n",i); + AssertFatal(eutra_bandP != 64, "LTE b64 is a reserved band"); AssertFatal(dl_CarrierFreq_by_100k >= eutra_bandtable[i].dl_min, "Band %d, bw %u : DL carrier frequency %lld Hz < %u\n", eutra_bandP, bw, dl_CarrierFreq, @@ -170,17 +177,19 @@ uint32_t to_earfcn_DL(int eutra_bandP, long long int dl_CarrierFreq, uint32_t bw eutra_bandtable[i].dl_max - bw_by_100); return (dl_CarrierFreq_by_100k - eutra_bandtable[i].dl_min + (eutra_bandtable[i].N_OFFs_DL / 10)); -} + } + uint32_t to_earfcn_UL(int eutra_bandP, long long int ul_CarrierFreq, uint32_t bw) { uint32_t ul_CarrierFreq_by_100k = ul_CarrierFreq / 100000; int bw_by_100 = bw / 100; int i; - AssertFatal(eutra_bandP < 69, "eutra_band %d > 68\n", eutra_bandP); + AssertFatal(eutra_bandP < 74, "eutra_band %d > 74\n", eutra_bandP); for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++); AssertFatal(i < BANDTABLE_SIZE, "i = %d , it will trigger out-of-bounds read.\n",i); + AssertFatal(eutra_bandP != 64, "LTE b64 is a reserved band"); AssertFatal(ul_CarrierFreq_by_100k >= eutra_bandtable[i].ul_min, "Band %d, bw %u : UL carrier frequency %lld Hz < %u\n", eutra_bandP, bw, ul_CarrierFreq, @@ -196,11 +205,12 @@ uint32_t to_earfcn_UL(int eutra_bandP, long long int ul_CarrierFreq, uint32_t bw uint32_t from_earfcn(int eutra_bandP, uint32_t dl_earfcn) { int i; - AssertFatal(eutra_bandP < 69, "eutra_band %d > 68\n", eutra_bandP); + AssertFatal(eutra_bandP < 74, "eutra_band %d > 74\n", eutra_bandP); for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++); AssertFatal(i < BANDTABLE_SIZE, "i %d >= BANDTABLE_SIZE %ld\n", i, BANDTABLE_SIZE); + AssertFatal(eutra_bandP != 64, "LTE b64 is a reserved band"); return (eutra_bandtable[i].dl_min + (dl_earfcn - (eutra_bandtable[i].N_OFFs_DL / 10))) * 100000; } diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c index b7cbac4256..badcd36cc6 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler.c +++ b/openair2/LAYER2/MAC/eNB_scheduler.c @@ -39,8 +39,6 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "RRC/LTE/rrc_extern.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" diff --git a/openair2/LAYER2/MAC/eNB_scheduler_RA.c b/openair2/LAYER2/MAC/eNB_scheduler_RA.c index 12f37c3b68..40eeacfaec 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_RA.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_RA.c @@ -43,8 +43,6 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "PHY/LTE_TRANSPORT/transport_common_proto.h" #include "RRC/LTE/rrc_extern.h" diff --git a/openair2/LAYER2/MAC/eNB_scheduler_bch.c b/openair2/LAYER2/MAC/eNB_scheduler_bch.c index e4b9a7a65b..a51aca96b9 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_bch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_bch.c @@ -35,8 +35,6 @@ #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "RRC/LTE/rrc_extern.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" @@ -362,7 +360,7 @@ schedule_SIB1_BR(module_id_t module_idP, N_RB_DL); if ((sfoffset == 1) - && ((subframeP != 0) || (subframeP != 5))) + && ((subframeP != 0) && (subframeP != 5))) continue; else if ((sfoffset == 0) && (foffset == 0) && (subframeP != 4) && (subframeP != 9)) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 2cd1a4167f..395803b5f5 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -38,9 +38,8 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "PHY/LTE_TRANSPORT/transport_common_proto.h" +#include "PHY/defs_eNB.h" #include "RRC/LTE/rrc_extern.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" diff --git a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c index fb113cbb5c..118de4f7f8 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_fairRR.c @@ -35,6 +35,7 @@ #include "PHY/phy_extern.h" #include "PHY/LTE_TRANSPORT/transport_common_proto.h" +#include "PHY/defs_eNB.h" #include "SIMULATION/TOOLS/sim.h" #include "LAYER2/MAC/mac_proto.h" #include "LAYER2/MAC/mac_extern.h" @@ -43,8 +44,6 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "rlc.h" #include "common/utils/lte/prach_utils.h" @@ -2742,7 +2741,7 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP, UE_info->UE_template[CC_id][UE_id].pre_allocated_rb_table_index_ul = rb_table_index; UE_info->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = mcs; } - LOG_D(MAC,"[eNB %hu] frame %u subframe %u, UE %d/%x CC %d snr %hhu snr_inst %hhu mcs %hhd mcs_offset %hhu bler %lf total_bler %lf ( %lu %lu ) rb_num %hhu phr_info %hhd tx_power %hd bsr %d estimated_ul_buffer %d scheduled_ul_bytes %d\n", + LOG_D(MAC,"[eNB %hu] frame %u subframe %u, UE %d/%x CC %d snr %hhu snr_inst %hd mcs %hhd mcs_offset %hhu bler %lf total_bler %lf ( %lu %lu ) rb_num %hhu phr_info %hhd tx_power %hd bsr %d estimated_ul_buffer %d scheduled_ul_bytes %d\n", module_idP,frameP,subframeP,UE_id,UE_RNTI(CC_id,UE_id),CC_id, snr, UE_info->UE_sched_ctrl[UE_id].pusch_snr[CC_id], mcs, UE_info->UE_sched_ctrl[UE_id].mcs_offset[CC_id], UE_info->UE_sched_ctrl[UE_id].pusch_bler[CC_id], total_bler, UE_info->UE_sched_ctrl[UE_id].pusch_rx_num[CC_id], UE_info->UE_sched_ctrl[UE_id].pusch_rx_error_num[CC_id], rb_table[rb_table_index-1], UE_template->phr_info, tx_power, bytes_to_schedule, UE_template->estimated_ul_buffer, UE_template->scheduled_ul_bytes); diff --git a/openair2/LAYER2/MAC/eNB_scheduler_mch.c b/openair2/LAYER2/MAC/eNB_scheduler_mch.c index 6567500ac5..9cdc72a558 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_mch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_mch.c @@ -37,8 +37,6 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "PHY/LTE_TRANSPORT/transport_common_proto.h" #include "RRC/LTE/rrc_extern.h" @@ -136,7 +134,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP, int ii = 0, msi_pos = -1; int mcch_mcs = -1; int shifted_sf = 0; - uint16_t TBS, j = -1, padding = 0, post_padding = 0; + uint16_t TBS, padding = 0, post_padding = 0; mac_rlc_status_resp_t rlc_status; int num_mtch=0; int msi_length=0, i, k; @@ -144,6 +142,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP, unsigned char sdu_lcids[11], num_sdus = 0, offset = 0; uint16_t sdu_lengths[11], sdu_length_total = 0; unsigned char mch_buffer[MAX_DLSCH_PAYLOAD_BYTES]; // check the max value, this is for dlsch only + int16_t j = -1; COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id]; @@ -213,7 +212,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP, msi_pos++; mbms_mch_i=0; - if((subframeP==0)){ + if (subframeP==0) { x=0; mbms_mch_i=0; } @@ -459,7 +458,7 @@ schedule_MBMS_NFAPI(module_id_t module_idP, uint8_t CC_id, frame_t frameP, module_idP, CC_id, frameP, subframeP, i, j, cc->mbsfn_SubframeConfig[j]->subframeAllocation.choice.oneFrame.buf[0], msi_pos); - if((subframeP==1)){ + if (subframeP==1) { x=0; mbms_mch_i=0; LOG_D(MAC,"MSP, frameP %d subframeP %d msi_pos(%d) mbms_mch_i %d\n",frameP, subframeP, msi_pos,mbms_mch_i); @@ -1116,7 +1115,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, 0, header_len_mcch_temp = 0, header_len_msi_temp = 0; int ii = 0, msi_pos = 0; int mcch_mcs = -1; - uint16_t TBS, j = -1, padding = 0, post_padding = 0; + uint16_t TBS, padding = 0, post_padding = 0; mac_rlc_status_resp_t rlc_status; int num_mtch; int msi_length, i, k; @@ -1124,6 +1123,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, unsigned char sdu_lcids[11], num_sdus = 0, offset = 0; uint16_t sdu_lengths[11], sdu_length_total = 0; unsigned char mch_buffer[MAX_DLSCH_PAYLOAD_BYTES]; // check the max value, this is for dlsch only + int16_t j = -1; COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id]; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c index 9ade5eb8b2..db04ab143f 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_phytest.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_phytest.c @@ -42,8 +42,6 @@ #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "SIMULATION/TOOLS/sim.h" // for taus diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index 7cb7f774ce..6dedc0e47b 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -39,8 +39,6 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "RRC/LTE/rrc_extern.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" @@ -2685,7 +2683,7 @@ allocate_prbs_sub(int nb_rb, break; case 25: - if ((check == N_RBG - 1)) { + if (check == N_RBG - 1) { nb_rb--; } else { nb_rb -= 2; @@ -2694,7 +2692,7 @@ allocate_prbs_sub(int nb_rb, break; case 50: - if ((check == N_RBG - 1)) { + if (check == N_RBG - 1) { nb_rb -= 2; } else { nb_rb -= 3; diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 4832456915..1372cb7276 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -38,9 +38,8 @@ #include "common/utils/LOG/vcd_signal_dumper.h" #include "nfapi/oai_integration/vendor_ext.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "PHY/LTE_TRANSPORT/transport_common_proto.h" +#include "PHY/defs_eNB.h" #include "RRC/LTE/rrc_extern.h" #include "RRC/LTE/rrc_eNB_UE_context.h" diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h index c958d7cf85..c1f9a51335 100644 --- a/openair2/LAYER2/MAC/mac.h +++ b/openair2/LAYER2/MAC/mac.h @@ -162,6 +162,8 @@ #define U_PLANE_INACTIVITY_VALUE 0 /* defined 10ms order (zero means infinity) */ +static const int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28}; + /* * eNB part */ diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index db4d51a92f..64e5822071 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -40,8 +40,6 @@ #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "RRC/LTE/rrc_extern.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "rlc.h" @@ -806,6 +804,7 @@ void rr_ul_unset(void **data) { free(*data); *data = NULL; } +#define MAX(a, b) (((a)>(b))?(a):(b)) int rr_ul_run(module_id_t Mod_id, int CC_id, int frame, diff --git a/openair2/LAYER2/MAC/ra_procedures.c b/openair2/LAYER2/MAC/ra_procedures.c index af68cebbe1..0917e0a1bc 100644 --- a/openair2/LAYER2/MAC/ra_procedures.c +++ b/openair2/LAYER2/MAC/ra_procedures.c @@ -42,8 +42,6 @@ #include "common/utils/LOG/log.h" #include "nfapi/oai_integration/vendor_ext.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "SIMULATION/TOOLS/sim.h" // for taus #include "PHY/LTE_TRANSPORT/transport_common_proto.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h" diff --git a/openair2/LAYER2/MAC/rar_tools.c b/openair2/LAYER2/MAC/rar_tools.c index 740923cc08..b608ea03a1 100644 --- a/openair2/LAYER2/MAC/rar_tools.c +++ b/openair2/LAYER2/MAC/rar_tools.c @@ -33,8 +33,6 @@ #include "mac_extern.h" #include "SIMULATION/TOOLS/sim.h" #include "common/utils/LOG/log.h" -#include "OCG.h" -#include "OCG_extern.h" #include "UTIL/OPT/opt.h" #include "common/ran_context.h" diff --git a/openair2/LAYER2/MAC/rar_tools_ue.c b/openair2/LAYER2/MAC/rar_tools_ue.c index 9af5baec39..1ab9bbd644 100644 --- a/openair2/LAYER2/MAC/rar_tools_ue.c +++ b/openair2/LAYER2/MAC/rar_tools_ue.c @@ -33,8 +33,6 @@ #include "mac_extern.h" #include "SIMULATION/TOOLS/sim.h" #include "common/utils/LOG/log.h" -#include "OCG.h" -#include "OCG_extern.h" #include "UTIL/OPT/opt.h" #include "common/ran_context.h" diff --git a/openair2/LAYER2/MAC/ue_procedures.c b/openair2/LAYER2/MAC/ue_procedures.c index 377410f0af..d7fd5d23dd 100644 --- a/openair2/LAYER2/MAC/ue_procedures.c +++ b/openair2/LAYER2/MAC/ue_procedures.c @@ -45,8 +45,6 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "openair2/PHY_INTERFACE/phy_stub_UE.h" #include "pdcp.h" @@ -903,7 +901,7 @@ int ue_query_p_mch_info(module_id_t module_idP, uint32_t frameP, uint32_t subfra continue; int mch_scheduling_period = 8 << UE_mac_inst[module_idP].pmch_Config[i]->mch_SchedulingPeriod_r9; - uint8_t sf_AllocEnd_r9 = UE_mac_inst[module_idP].pmch_Config[i]->sf_AllocEnd_r9; + long sf_AllocEnd_r9 = UE_mac_inst[module_idP].pmch_Config[i]->sf_AllocEnd_r9; if (sf_AllocEnd_r9 == 2047) { msi_flag = 1; @@ -915,7 +913,7 @@ int ue_query_p_mch_info(module_id_t module_idP, uint32_t frameP, uint32_t subfra //msi and mtch are mutally excluded then the break is safe if ((num_sf_alloc == 0) && (sf_AllocEnd_r9 >= 1)) { msi_flag = 1; - LOG_D(MAC,"msi(%d) should be allocated:frame(%d),submframe(%d),num_sf_alloc(%d),sf_AllocEnd_r9(%d),common_num_sf_alloc(%d)\n",i,frameP,subframe,num_sf_alloc,sf_AllocEnd_r9, + LOG_D(MAC,"msi(%d) should be allocated:frame(%d),submframe(%d),num_sf_alloc(%d),sf_AllocEnd_r9(%ld),common_num_sf_alloc(%d)\n",i,frameP,subframe,num_sf_alloc,sf_AllocEnd_r9, UE_mac_inst[module_idP].common_num_sf_alloc); UE_mac_inst[module_idP].msi_current_alloc = num_sf_alloc; UE_mac_inst[module_idP].msi_pmch = i; @@ -927,7 +925,7 @@ int ue_query_p_mch_info(module_id_t module_idP, uint32_t frameP, uint32_t subfra //if ((num_sf_alloc == UE_mac_inst[module_idP].pmch_Config[i-1]->sf_AllocEnd_r9) && (sf_AllocEnd_r9 >= (num_sf_alloc))) { //msi should be just after msi_flag = 1; - LOG_D(MAC,"msi(%d) should be allocated:frame(%d),submframe(%d),num_sf_alloc(%d),sf_AllocEnd_r9(%d),common_num_sf_alloc(%d)\n",i,frameP,subframe,num_sf_alloc,sf_AllocEnd_r9, + LOG_D(MAC,"msi(%d) should be allocated:frame(%d),submframe(%d),num_sf_alloc(%d),sf_AllocEnd_r9(%ld),common_num_sf_alloc(%d)\n",i,frameP,subframe,num_sf_alloc,sf_AllocEnd_r9, UE_mac_inst[module_idP].common_num_sf_alloc); UE_mac_inst[module_idP].msi_current_alloc = num_sf_alloc; UE_mac_inst[module_idP].msi_pmch = i; @@ -1305,7 +1303,7 @@ int ue_query_mch_fembms(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, //} - if ((mcch_flag == 1)) { // || (msi_flag==1)) + if (mcch_flag == 1) { // || (msi_flag==1)) *mcch_active = 1; } @@ -1975,7 +1973,7 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_ stop_UE_TIMING(UE_mac_inst[module_idP].ue_query_mch); - if ((mcch_flag == 1)) { // || (msi_flag==1)) + if (mcch_flag == 1) { // || (msi_flag==1)) *mcch_active = 1; } @@ -3129,7 +3127,7 @@ ue_scheduler(const module_id_t module_idP, } // UE has no valid phy config dedicated || no valid/released SR - if ((UE_mac_inst[module_idP].physicalConfigDedicated == NULL)) { + if (UE_mac_inst[module_idP].physicalConfigDedicated == NULL) { // cancel all pending SRs UE_mac_inst[module_idP].scheduling_info.SR_pending = 0; UE_mac_inst[module_idP].ul_active = 0; diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h index 4af6eb02e6..9465d69e8b 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h @@ -113,11 +113,11 @@ typedef struct { } __attribute__ ((__packed__)) NR_MAC_SUBHEADER_FIXED; static inline int get_mac_len(uint8_t* pdu, int pdu_len, uint16_t *mac_ce_len, uint16_t *mac_subheader_len) { - if ( pdu_len < sizeof(NR_MAC_SUBHEADER_SHORT)) + if ( pdu_len < (int)sizeof(NR_MAC_SUBHEADER_SHORT)) return false; NR_MAC_SUBHEADER_SHORT *s = (NR_MAC_SUBHEADER_SHORT*) pdu; NR_MAC_SUBHEADER_LONG *l = (NR_MAC_SUBHEADER_LONG*) pdu; - if (s->F && pdu_len < sizeof(NR_MAC_SUBHEADER_LONG)) + if (s->F && pdu_len < (int)sizeof(NR_MAC_SUBHEADER_LONG)) return false; if (s->F) { *mac_subheader_len = sizeof(*l); @@ -602,7 +602,7 @@ typedef struct NR_UE_UL_BWP { NR_CSI_MeasConfig_t *csi_MeasConfig; NR_SRS_Config_t *srs_Config; long *msg3_DeltaPreamble; - uint8_t transform_precoding; + long transform_precoding; uint8_t mcs_table; nr_dci_format_t dci_format; int max_fb_time; diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c index 7ee06c4406..04b7bf8975 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c @@ -680,70 +680,50 @@ uint16_t get_NCS(uint8_t index, uint16_t format0, uint8_t restricted_set_config) } } -//38.211 Table 6.3.3.2-1 -int16_t table_6_3_3_2_1[16][5] = { -//Length_RA, delta_f_RA_PRACH, delta_f_PUSCH, N_RA_RB, kbar -{ 839, 1.25, 15, 6, 7}, -{ 839, 1.25, 30, 3, 1}, -{ 839, 1.25, 60, 2, 133}, -{ 839, 5, 15, 24, 12}, -{ 839, 5, 30, 12, 10}, -{ 839, 5, 60, 6, 7}, -{ 139, 15, 15, 12, 2}, -{ 139, 15, 30, 6, 2}, -{ 139, 15, 60, 3, 2}, -{ 139, 30, 15, 24, 2}, -{ 139, 30, 30, 12, 2}, -{ 139, 30, 60, 6, 2}, -{ 139, 60, 60, 12, 2}, -{ 139, 60, 120, 6, 2}, -{ 139, 120, 60, 24, 2}, -{ 139, 120, 120, 12, 2} -}; +//from 38.211 Table 6.3.3.2-1 +int16_t N_RA_RB[16] = {6, 3, 2, 24, 12, 6, 12, 6, 3, 24, 12, 6, 12, 6, 24, 12}; /* Function to get number of RBs required for prach occasion based on * 38.211 Table 6.3.3.2-1 */ int16_t get_N_RA_RB (int delta_f_RA_PRACH,int delta_f_PUSCH) { - int8_t index = 0; - switch(delta_f_RA_PRACH) { - case 0 : index = 6; - if (delta_f_PUSCH == 0) - index += 0; - else if(delta_f_PUSCH == 1) - index += 1; - else - index += 2; - break; - - case 1 : index = 9; - if (delta_f_PUSCH == 0) - index += 0; - else if(delta_f_PUSCH == 1) - index += 1; - else - index += 2; - break; - - case 2 : index = 11; - if (delta_f_PUSCH == 2) - index += 0; - else - index += 1; - break; - - case 3: index = 13; - if (delta_f_PUSCH == 2) - index += 0; - else - index += 1; - break; - - default : index = 10;/*30khz prach scs and 30khz pusch scs*/ - - } - - return table_6_3_3_2_1[index][3]; + int8_t index = 0; + switch(delta_f_RA_PRACH) { + case 0 : + index = 6; + if (delta_f_PUSCH == 0) + index += 0; + else if(delta_f_PUSCH == 1) + index += 1; + else + index += 2; + break; + case 1 : + index = 9; + if (delta_f_PUSCH == 0) + index += 0; + else if(delta_f_PUSCH == 1) + index += 1; + else + index += 2; + break; + case 2 : + index = 11; + if (delta_f_PUSCH == 2) + index += 0; + else + index += 1; + break; + case 3: + index = 13; + if (delta_f_PUSCH == 2) + index += 0; + else + index += 1; + break; + default : index = 10;/*30khz prach scs and 30khz pusch scs*/ + } + return N_RA_RB[index]; } // Table 6.3.3.2-2: Random access configurations for FR1 and paired spectrum/supplementary uplink // the column 5, (SFN_nbr is a bitmap where we set bit to '1' in the position of the subframe where the RACH can be sent. @@ -2852,15 +2832,18 @@ uint16_t get_nr_srs_offset(NR_SRS_PeriodicityAndOffset_t periodicityAndOffset) { // Set the transform precoding status according to 6.1.3 of 3GPP TS 38.214 version 16.3.0 Release 16: // - "UE procedure for applying transform precoding on PUSCH" -uint8_t get_transformPrecoding(const NR_UE_UL_BWP_t *current_UL_BWP, nr_dci_format_t dci_format, uint8_t configuredGrant) +long get_transformPrecoding(const NR_UE_UL_BWP_t *current_UL_BWP, nr_dci_format_t dci_format, uint8_t configuredGrant) { if (configuredGrant && current_UL_BWP->configuredGrantConfig && current_UL_BWP->configuredGrantConfig->transformPrecoder) return *current_UL_BWP->configuredGrantConfig->transformPrecoder; if (dci_format == NR_UL_DCI_FORMAT_0_1 && current_UL_BWP && current_UL_BWP->pusch_Config && current_UL_BWP->pusch_Config->transformPrecoder) return *current_UL_BWP->pusch_Config->transformPrecoder; - else - return current_UL_BWP->rach_ConfigCommon->msg3_transformPrecoder ? 0 : 1; + + if (current_UL_BWP->rach_ConfigCommon && current_UL_BWP->rach_ConfigCommon->msg3_transformPrecoder) + return NR_PUSCH_Config__transformPrecoder_enabled; + + return NR_PUSCH_Config__transformPrecoder_disabled; } uint8_t get_pusch_nb_antenna_ports(NR_PUSCH_Config_t *pusch_Config, @@ -3435,7 +3418,7 @@ uint16_t nr_dci_size(const NR_UE_DL_BWP_t *DL_BWP, if(pusch_Config && pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB != NULL){ NR_DMRS_UplinkConfig = pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup; - xb = ul_ant_bits(NR_DMRS_UplinkConfig,transformPrecoder); + xb = ul_ant_bits(NR_DMRS_UplinkConfig, transformPrecoder); } if (xa>xb) dci_pdu->antenna_ports.nbits = xa; diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h index a6cc264c02..58fe0899db 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h @@ -160,7 +160,7 @@ uint8_t compute_nr_root_seq(NR_RACH_ConfigCommon_t *rach_config, uint8_t unpaired, frequency_range_t); -int ul_ant_bits(NR_DMRS_UplinkConfig_t *NR_DMRS_UplinkConfig,long transformPrecoder); +int ul_ant_bits(NR_DMRS_UplinkConfig_t *NR_DMRS_UplinkConfig, long transformPrecoder); uint8_t get_pdsch_mcs_table(long *mcs_Table, int dci_format, int rnti_type, int ss_type); @@ -268,13 +268,11 @@ bool set_ul_ptrs_values(NR_PTRS_UplinkConfig_t *ul_ptrs_config, uint8_t NrOfSymbols); /* \brief Set the transform precoding according to 6.1.3 of 3GPP TS 38.214 version 16.3.0 Release 16 -@param *pusch_config, pointer to pusch config -@param *ubwp pointer to uplink bwp -@param *dci_format pointer to dci format -@param rnti_type rnti type +@param *current_UL_BWP pointer to uplink bwp +@param dci_format dci format @param configuredGrant indicates whether a configured grant was received or not @returns transformPrecoding value */ -uint8_t get_transformPrecoding(const NR_UE_UL_BWP_t *current_UL_BWP, nr_dci_format_t dci_format, uint8_t configuredGrant); +long get_transformPrecoding(const NR_UE_UL_BWP_t *current_UL_BWP, nr_dci_format_t dci_format, uint8_t configuredGrant); void nr_mac_gNB_rrc_ul_failure(const module_id_t Mod_instP, const int CC_idP, diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index 5b5587a7e7..8ab321b9e1 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -37,6 +37,7 @@ #include "LAYER2/NR_MAC_COMMON/nr_mac_common.h" #include "common/utils/nr/nr_common.h" #include "executables/softmodem-common.h" +#include "SCHED_NR/phy_frame_config_nr.h" void set_tdd_config_nr_ue(fapi_nr_config_request_t *cfg, int mu, @@ -683,6 +684,7 @@ void configure_current_BWP(NR_UE_MAC_INST_t *mac, NRRIV2PRBOFFSET(mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.genericParameters.locationAndBandwidth, MAX_BWP_SIZE); UL_BWP->initial_BWPStart = mac->scc ? NRRIV2PRBOFFSET(mac->scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE) : NRRIV2PRBOFFSET(mac->scc_SIB->uplinkConfigCommon->initialUplinkBWP.genericParameters.locationAndBandwidth, MAX_BWP_SIZE); + } @@ -731,6 +733,7 @@ int nr_rrc_mac_config_req_ue(module_id_t module_id, build_ssb_to_ro_map(mac);//->scc, mac->phy_config.config_req.cell_config.frame_duplex_type); if (!get_softmodem_params()->emulate_l1) mac->if_module->phy_config_request(&mac->phy_config); + mac->phy_config_request_sent = true; } if(scell_group_config != NULL ){ mac->cg = scell_group_config; diff --git a/openair2/LAYER2/NR_MAC_UE/mac_defs.h b/openair2/LAYER2/NR_MAC_UE/mac_defs.h index 66397b20a3..e3f4247bd6 100644 --- a/openair2/LAYER2/NR_MAC_UE/mac_defs.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_defs.h @@ -61,6 +61,7 @@ #include "NR_CellGroupConfig.h" #include "NR_ServingCellConfig.h" #include "NR_MeasConfig.h" +#include "NR_ServingCellConfigCommonSIB.h" // ========== @@ -158,10 +159,11 @@ /*!\brief UE layer 2 status */ typedef enum { - UE_CONNECTION_OK = 0, - UE_CONNECTION_LOST, - UE_PHY_RESYNCH, - UE_PHY_HO_PRACH + UE_NOT_SYNC = 0, + UE_SYNC, + UE_PERFORMING_RA, + UE_WAIT_TX_ACK_MSG4, + UE_CONNECTED } NR_UE_L2_STATE_t; typedef enum { @@ -379,7 +381,7 @@ typedef struct { /*!\brief Top level UE MAC structure */ typedef struct { - + NR_UE_L2_STATE_t state; NR_ServingCellConfigCommon_t *scc; NR_ServingCellConfigCommonSIB_t *scc_SIB; NR_CellGroupConfig_t *cg; @@ -405,6 +407,7 @@ typedef struct { NR_ControlResourceSet_t *coreset[MAX_NUM_BWP_UE][FAPI_NR_MAX_CORESET_PER_BWP]; NR_SearchSpace_t *SSpace[MAX_NUM_BWP_UE][FAPI_NR_MAX_SS]; + bool phy_config_request_sent; frame_type_t frame_type; /// Type0-PDCCH seach space @@ -504,7 +507,7 @@ typedef struct prach_association_pattern { typedef struct ssb_info { bool transmitted; // True if the SSB index is transmitted according to the SSB positions map configuration prach_occasion_info_t *mapped_ro[MAX_NB_RO_PER_SSB_IN_ASSOCIATION_PATTERN]; // List of mapped RACH Occasions to this SSB index - uint16_t nb_mapped_ro; // Total number of mapped ROs to this SSB index + uint32_t nb_mapped_ro; // Total number of mapped ROs to this SSB index } ssb_info_t; // List of all the possible SSBs and their details diff --git a/openair2/LAYER2/NR_MAC_UE/mac_proto.h b/openair2/LAYER2/NR_MAC_UE/mac_proto.h index eb773672d4..6015fe27bc 100644 --- a/openair2/LAYER2/NR_MAC_UE/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_proto.h @@ -120,7 +120,8 @@ NR_UE_MAC_INST_t *get_mac_inst( performs BSR/SR/PHR procedures, random access procedure handler and DLSCH/ULSCH procedures. \param dl_info DL indication \param ul_info UL indication*/ -NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_indication_t *ul_info); +void nr_ue_ul_scheduler(nr_uplink_indication_t *ul_info); +void nr_ue_dl_scheduler(nr_downlink_indication_t *dl_info); /**\brief fill nr_scheduled_response struct instance @param nr_scheduled_response_t * pointer to scheduled_response instance to fill @@ -435,7 +436,7 @@ void configure_ss_coreset(NR_UE_MAC_INST_t *mac, NR_BWP_Id_t dl_bwp_id); static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, - uint8_t dci_format, + nr_dci_format_t dci_format, uint8_t dci_size, uint16_t rnti, int ss_type, @@ -466,6 +467,12 @@ int get_rnti_type(NR_UE_MAC_INST_t *mac, uint16_t rnti); // - 6.1.4.2 of TS 38.214 // - 6.4.1.1.1 of TS 38.211 // - 6.3.1.7 of 38.211 -int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, NR_tda_info_t *tda_info, nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu, dci_pdu_rel15_t *dci, RAR_grant_t *rar_grant, uint16_t rnti, uint8_t *dci_format); +int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, + NR_tda_info_t *tda_info, + nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu, + dci_pdu_rel15_t *dci, + RAR_grant_t *rar_grant, + uint16_t rnti, + const nr_dci_format_t *dci_format); #endif /** @}*/ diff --git a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c index e9eb77b9c1..7fb2295f2d 100644 --- a/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c +++ b/openair2/LAYER2/NR_MAC_UE/main_ue_nr.c @@ -38,6 +38,7 @@ #include "openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h" #include "executables/softmodem-common.h" #include "openair2/LAYER2/nr_pdcp/nr_pdcp.h" +#include "openair2/LAYER2/PDCP_v10.1.0/pdcp.h" #include static NR_UE_MAC_INST_t *nr_ue_mac_inst; @@ -52,6 +53,8 @@ NR_UE_MAC_INST_t * nr_l2_init_ue(NR_UE_RRC_INST_t* rrc_inst) { nr_ue_mac_inst = (NR_UE_MAC_INST_t *)calloc(sizeof(NR_UE_MAC_INST_t),NB_NR_UE_MAC_INST); nr_ue_mac_inst->first_sync_frame = -1; nr_ue_mac_inst->sib1_decoded = false; + nr_ue_mac_inst->phy_config_request_sent = false; + nr_ue_mac_inst->state = UE_NOT_SYNC; for (int j=0;jphy_config.config_req.carrier_config.uplink_bandwidth == 30){ - delta_MPR_c = 0.5; + delta_MPR_c = 1; } if (mac->cg && mac->cg->spCellConfig->spCellConfigDedicated->uplinkConfig->ext1){ @@ -141,7 +141,7 @@ void init_RA(module_id_t mod_id, NR_RACH_ConfigDedicated_t *rach_ConfigDedicated) { NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id); - + mac->state = UE_PERFORMING_RA; RA_config_t *ra = &mac->ra; ra->RA_active = 1; ra->ra_PreambleIndex = -1; @@ -164,25 +164,25 @@ void init_RA(module_id_t mod_id, NR_SearchSpaceId_t ss_id = -1; NR_SearchSpace_t *ss = NULL; - if(mac->scc_SIB) { - commonSearchSpaceList = mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.pdcch_ConfigCommon->choice.setup->commonSearchSpaceList; - ss_id = *mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.pdcch_ConfigCommon->choice.setup->ra_SearchSpace; - } - else{ - if (mac->scc) { - NR_SearchSpaceId_t *ra_ss = mac->scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->ra_SearchSpace; - if (ra_ss) { - commonSearchSpaceList = mac->scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList; - ss_id = *mac->scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->ra_SearchSpace; - } + if (mac->scc) { + NR_SearchSpaceId_t *ra_ss = mac->scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->ra_SearchSpace; + if (ra_ss) { + commonSearchSpaceList = mac->scc->downlinkConfigCommon->initialDownlinkBWP->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList; + ss_id = *ra_ss; } - if (ss_id < 0) { - if (mac->current_DL_BWP.bwp_id>0) { - ra_ss = mac->DLbwp[mac->current_DL_BWP.bwp_id-1]->bwp_Common->pdcch_ConfigCommon->choice.setup->ra_SearchSpace; - if (ra_ss) { - commonSearchSpaceList = mac->DLbwp[mac->current_DL_BWP.bwp_id-1]->bwp_Common->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList; - ss_id = *mac->DLbwp[mac->current_DL_BWP.bwp_id-1]->bwp_Common->pdcch_ConfigCommon->choice.setup->ra_SearchSpace; - } + } else if (mac->scc_SIB) { + NR_SearchSpaceId_t *ra_ss = mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.pdcch_ConfigCommon->choice.setup->ra_SearchSpace; + if (ra_ss) { + commonSearchSpaceList = mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP.pdcch_ConfigCommon->choice.setup->commonSearchSpaceList; + ss_id = *ra_ss; + } + } + if (ss_id < 0) { + if (mac->current_DL_BWP.bwp_id>0) { + ra_ss = mac->DLbwp[mac->current_DL_BWP.bwp_id-1]->bwp_Common->pdcch_ConfigCommon->choice.setup->ra_SearchSpace; + if (ra_ss) { + commonSearchSpaceList = mac->DLbwp[mac->current_DL_BWP.bwp_id-1]->bwp_Common->pdcch_ConfigCommon->choice.setup->commonSearchSpaceList; + ss_id = *ra_ss; } } } @@ -312,11 +312,11 @@ int8_t nr_get_DELTA_PREAMBLE(module_id_t mod_id, int CC_id, uint16_t prach_forma mu = 4; break; - case NR_SubcarrierSpacing_spare3: + case NR_SubcarrierSpacing_kHz480_v1700: mu = 5; break; - case NR_SubcarrierSpacing_spare2: + case NR_SubcarrierSpacing_kHz960_v1700: mu = 6; break; @@ -482,8 +482,14 @@ void ra_preambles_config(NR_PRACH_RESOURCES_t *prach_resources, NR_UE_MAC_INST_t long deltaPreamble_Msg3 = 0; uint8_t noGroupB = 0; // Random seed generation - long long tmp = rdtsc_oai(); - unsigned short int *seed = (unsigned short int*)&tmp; + unsigned int seed; + + if (IS_SOFTMODEM_IQPLAYER || IS_SOFTMODEM_IQRECORDER) { + // Overwrite seed with non-random seed for IQ player/recorder + seed = 1; + } else { + seed=(unsigned int) (rdtsc_oai() && ~0); + } RA_config_t *ra = &mac->ra; NR_RACH_ConfigCommon_t *setup = mac->current_UL_BWP.rach_ConfigCommon; @@ -580,28 +586,28 @@ void ra_preambles_config(NR_PRACH_RESOURCES_t *prach_resources, NR_UE_MAC_INST_t if(ra->ra_PreambleIndex < 0 || ra->ra_PreambleIndex > 63) { if (noGroupB) { // use Group A preamble - ra->ra_PreambleIndex = ra->starting_preamble_nb + (rand_r((unsigned int *)seed) % ra->cb_preambles_per_ssb); + ra->ra_PreambleIndex = ra->starting_preamble_nb + (rand_r(&seed) % ra->cb_preambles_per_ssb); ra->RA_usedGroupA = 1; } else if ((ra->Msg3_size < messageSizeGroupA) && (dl_pathloss > PLThreshold)) { // Group B is configured and RA preamble Group A is used // - todo add condition on CCCH_sdu_size for initiation by CCCH - ra->ra_PreambleIndex = ra->starting_preamble_nb + (rand_r((unsigned int *)seed) % sizeOfRA_PreamblesGroupA); + ra->ra_PreambleIndex = ra->starting_preamble_nb + (rand_r(&seed) % sizeOfRA_PreamblesGroupA); ra->RA_usedGroupA = 1; } else { // Group B preamble is configured and used // the first sizeOfRA_PreamblesGroupA RA preambles belong to RA Preambles Group A // the remaining belong to RA Preambles Group B - ra->ra_PreambleIndex = ra->starting_preamble_nb + sizeOfRA_PreamblesGroupA + (rand_r((unsigned int *)seed) % (ra->cb_preambles_per_ssb - sizeOfRA_PreamblesGroupA)); + ra->ra_PreambleIndex = ra->starting_preamble_nb + sizeOfRA_PreamblesGroupA + (rand_r(&seed) % (ra->cb_preambles_per_ssb - sizeOfRA_PreamblesGroupA)); ra->RA_usedGroupA = 0; } } } else { // Msg3 is being retransmitted if (ra->RA_usedGroupA && noGroupB) { - ra->ra_PreambleIndex = ra->starting_preamble_nb + (rand_r((unsigned int *)seed) % ra->cb_preambles_per_ssb); + ra->ra_PreambleIndex = ra->starting_preamble_nb + (rand_r(&seed) % ra->cb_preambles_per_ssb); } else if (ra->RA_usedGroupA && !noGroupB){ - ra->ra_PreambleIndex = ra->starting_preamble_nb + (rand_r((unsigned int *)seed) % sizeOfRA_PreamblesGroupA); + ra->ra_PreambleIndex = ra->starting_preamble_nb + (rand_r(&seed) % sizeOfRA_PreamblesGroupA); } else { - ra->ra_PreambleIndex = ra->starting_preamble_nb + sizeOfRA_PreamblesGroupA + (rand_r((unsigned int *)seed) % (ra->cb_preambles_per_ssb - sizeOfRA_PreamblesGroupA)); + ra->ra_PreambleIndex = ra->starting_preamble_nb + sizeOfRA_PreamblesGroupA + (rand_r(&seed) % (ra->cb_preambles_per_ssb - sizeOfRA_PreamblesGroupA)); } } } @@ -728,8 +734,8 @@ uint8_t nr_ue_get_rach(module_id_t mod_id, int CC_id, frame_t frame, uint8_t gNB_id, - int nr_slot_tx){ - + int nr_slot_tx) +{ NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id); RA_config_t *ra = &mac->ra; NR_RACH_ConfigDedicated_t *rach_ConfigDedicated = ra->rach_ConfigDedicated; @@ -1001,27 +1007,21 @@ void nr_ra_succeeded(module_id_t mod_id, frame_t frame, int slot){ RA_config_t *ra = &mac->ra; if (ra->cfra) { - LOG_I(MAC, "[UE %d][%d.%d][RAPROC] RA procedure succeeded. CF-RA: RAR successfully received.\n", mod_id, frame, slot); - + mac->state = UE_CONNECTED; ra->RA_window_cnt = -1; - } else { - LOG_A(MAC, "[UE %d][%d.%d][RAPROC] RA procedure succeeded. CB-RA: Contention Resolution is successful.\n", mod_id, frame, slot); - ra->RA_contention_resolution_timer_active = 0; mac->crnti = ra->t_crnti; ra->t_crnti = 0; - LOG_D(MAC, "In %s: [UE %d][%d.%d] CB-RA: cleared contention resolution timer...\n", __FUNCTION__, mod_id, frame, slot); - + mac->state = UE_WAIT_TX_ACK_MSG4; } LOG_D(MAC, "In %s: [UE %d] clearing RA_active flag...\n", __FUNCTION__, mod_id); ra->RA_active = 0; ra->ra_state = RA_SUCCEEDED; - } // Handling failure of RA procedure @ MAC layer @@ -1033,9 +1033,15 @@ void nr_ra_failed(uint8_t mod_id, uint8_t CC_id, NR_PRACH_RESOURCES_t *prach_res NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id); RA_config_t *ra = &mac->ra; // Random seed generation - long long tmp = rdtsc_oai(); - unsigned short int *seed = (unsigned short int*)&tmp; + unsigned int seed; + if (IS_SOFTMODEM_IQPLAYER || IS_SOFTMODEM_IQRECORDER) { + // Overwrite seed with non-random seed for IQ player/recorder + seed = 1; + } else { + seed=(unsigned int) (rdtsc_oai() && ~0); + } + ra->first_Msg3 = 1; ra->ra_PreambleIndex = -1; ra->ra_state = RA_UE_IDLE; @@ -1047,7 +1053,7 @@ void nr_ra_failed(uint8_t mod_id, uint8_t CC_id, NR_PRACH_RESOURCES_t *prach_res LOG_D(MAC, "In %s: [UE %d][%d.%d] Maximum number of RACH attempts (%d) reached, selecting backoff time...\n", __FUNCTION__, mod_id, frame, slot, ra->preambleTransMax); - ra->RA_backoff_cnt = rand_r((unsigned int *)seed) % (prach_resources->RA_PREAMBLE_BACKOFF + 1); + ra->RA_backoff_cnt = rand_r(&seed) % (prach_resources->RA_PREAMBLE_BACKOFF + 1); prach_resources->RA_PREAMBLE_TRANSMISSION_COUNTER = 1; prach_resources->RA_PREAMBLE_POWER_RAMPING_STEP += 2; // 2 dB increment prach_resources->ra_PREAMBLE_RECEIVED_TARGET_POWER = nr_get_Po_NOMINAL_PUSCH(prach_resources, mod_id, CC_id); diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c index 9d691514ed..e5b246f5c1 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c @@ -268,7 +268,7 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl uint8_t bwp_id = mac->current_DL_BWP.bwp_id; //NR_ServingCellConfig_t *scd = mac->scg->spCellConfig->spCellConfigDedicated; - NR_BWP_DownlinkDedicated_t *bwpd = (bwp_id>0) ? mac->DLbwp[bwp_id-1]->bwp_Dedicated : mac->cg->spCellConfig->spCellConfigDedicated->initialDownlinkBWP; + NR_BWP_DownlinkDedicated_t *bwpd = (bwp_id>0) ? mac->DLbwp[bwp_id-1]->bwp_Dedicated : (mac->cg ? mac->cg->spCellConfig->spCellConfigDedicated->initialDownlinkBWP : NULL); NR_BWP_DownlinkCommon_t *bwp_Common = (bwp_id>0) ? mac->DLbwp[bwp_id-1]->bwp_Common : &mac->scc_SIB->downlinkConfigCommon.initialDownlinkBWP; LOG_D(NR_MAC, "[DCI_CONFIG] ra_rnti %p (%x) crnti %p (%x) t_crnti %p (%x)\n", &ra->ra_rnti, ra->ra_rnti, &mac->crnti, mac->crnti, &ra->t_crnti, ra->t_crnti); @@ -376,7 +376,7 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl // this is an USS if (ss->searchSpaceType->choice.ue_Specific && ss->searchSpaceType->choice.ue_Specific->dci_Formats == NR_SearchSpace__searchSpaceType__ue_Specific__dci_Formats_formats0_1_And_1_1 && - (ra->ra_state == RA_SUCCEEDED || get_softmodem_params()->phy_test) && + mac->state == UE_CONNECTED && mac->crnti > 0) { // Monitors DCI 01 and 11 scrambled with C-RNTI, or CS-RNTI(s), or SP-CSI-RNTI LOG_D(NR_MAC, "[DCI_CONFIG] Configure monitoring of PDCCH candidates in the user specific search space\n"); @@ -417,6 +417,6 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl } // for ss_id } else { - AssertFatal(1==0,"Handle DCI searching when CellGroup without dedicated BWP\n"); + LOG_E(MAC,"Cannot handle DCI without dedicated BWP\n"); } } diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 02ad48a655..4190331a3e 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -319,6 +319,11 @@ int8_t nr_ue_decode_mib(module_id_t module_id, mac->dl_config_request.sfn = frame; mac->dl_config_request.slot = ssb_start_symbol/14; + if(get_softmodem_params()->phy_test) + mac->state = UE_CONNECTED; + else if(mac->state == UE_NOT_SYNC) + mac->state = UE_SYNC; + return 0; } @@ -431,8 +436,8 @@ int nr_ue_process_dci_indication_pdu(module_id_t module_id,int cc_id, int gNB_in int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, frame_t frame, int slot, dci_pdu_rel15_t *dci, fapi_nr_dci_indication_pdu_t *dci_ind) { uint16_t rnti = dci_ind->rnti; - uint8_t dci_format = dci_ind->dci_format; int coreset_type = dci_ind->coreset_type == NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG; // 0 for coreset0, 1 otherwise + nr_dci_format_t dci_format = dci_ind->dci_format; int ret = 0; int pucch_res_set_cnt = 0, valid = 0; frame_t frame_tx = 0; @@ -1295,9 +1300,11 @@ void nr_ue_configure_pucch(NR_UE_MAC_INST_t *mac, NR_PUSCH_Config_t *pusch_Config = current_UL_BWP ? current_UL_BWP->pusch_Config : NULL; if (pusch_Config) { pusch_id = pusch_Config->dataScramblingIdentityPUSCH; - if (pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA != NULL) + if (pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA != NULL && + pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup->transformPrecodingDisabled != NULL) id0 = pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup->transformPrecodingDisabled->scramblingID0; - else if (pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB != NULL) + else if (pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB != NULL && + pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->transformPrecodingDisabled != NULL) id0 = pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->transformPrecodingDisabled->scramblingID0; } @@ -2386,7 +2393,7 @@ void nr_ue_send_sdu(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t *u } static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, - uint8_t dci_format, + nr_dci_format_t dci_format, uint8_t dci_size, uint16_t rnti, int ss_type, @@ -2850,8 +2857,8 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, break; case NR_DL_DCI_FORMAT_1_1: - switch(rnti_type) - { + switch(rnti_type) + { case NR_RNTI_C: //Identifier for DCI formats pos++; @@ -3051,9 +3058,12 @@ static uint8_t nr_extract_dci_info(NR_UE_MAC_INST_t *mac, break; } break; - } - - return 0; + + default: // other DCI formats + break; + } + + return 0; } /////////////////////////////////// @@ -3236,12 +3246,14 @@ void nr_ue_process_mac_pdu(nr_downlink_indication_t *dl_info, module_idP, frameP, pduP[1], pduP[2], pduP[3], pduP[4], pduP[5], pduP[6]); bool ra_success = true; - for(int i = 0; icont_res_id[i] != pduP[i+1]) { - ra_success = false; - break; - } - } + if (!IS_SOFTMODEM_IQPLAYER) { // Control is bypassed when replaying IQs (BMC) + for(int i = 0; icont_res_id[i] != pduP[i+1]) { + ra_success = false; + break; + } + } + } if ( (ra->RA_active == 1) && ra_success) { nr_ra_succeeded(module_idP, frameP, slot); diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index a6acf1fa77..deeb4a181a 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -35,6 +35,9 @@ /* exe */ #include +/* PHY */ +#include "openair1/PHY/impl_defs_top.h" + /* MAC */ #include "NR_MAC_COMMON/nr_mac.h" #include "NR_MAC_COMMON/nr_mac_common.h" @@ -142,21 +145,19 @@ void ul_layers_config(NR_UE_MAC_INST_t *mac, nfapi_nr_ue_pusch_pdu_t *pusch_conf NR_SRS_Config_t *srs_config = current_UL_BWP->srs_Config; NR_PUSCH_Config_t *pusch_Config = current_UL_BWP->pusch_Config; - long transformPrecoder = get_transformPrecoding(current_UL_BWP, dci_format, 0); - pusch_config_pdu->transform_precoding = transformPrecoder; + long transformPrecoder = pusch_config_pdu->transform_precoding; /* PRECOD_NBR_LAYERS */ - if ((*pusch_Config->txConfig == NR_PUSCH_Config__txConfig_nonCodebook)); // 0 bits if the higher layer parameter txConfig = nonCodeBook - if ((*pusch_Config->txConfig == NR_PUSCH_Config__txConfig_codebook)){ + if (*pusch_Config->txConfig == NR_PUSCH_Config__txConfig_codebook){ // The UE shall transmit PUSCH using the same antenna port(s) as the SRS port(s) in the SRS resource indicated by the DCI format 0_1 // 38.214 Section 6.1.1 uint8_t n_antenna_port = get_pusch_nb_antenna_ports(pusch_Config, srs_config, dci->srs_resource_indicator); - if (n_antenna_port == 1); // 1 antenna port and the higher layer parameter txConfig = codebook 0 bits + // 1 antenna port and the higher layer parameter txConfig = codebook 0 bits if (n_antenna_port == 4) { // 4 antenna port and the higher layer parameter txConfig = codebook @@ -238,34 +239,6 @@ void ul_layers_config(NR_UE_MAC_INST_t *mac, nfapi_nr_ue_pusch_pdu_t *pusch_conf } } } - - /*-------------------- Changed to enable Transform precoding in RF SIM------------------------------------------------*/ - - /*if (pusch_config_pdu->transformPrecoder == transformPrecoder_enabled) { - - pusch_config_dedicated->transform_precoder = transformPrecoder_enabled; - - if(pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA != NULL) { - - NR_DMRS_UplinkConfig_t *NR_DMRS_ulconfig = pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup; - - if (NR_DMRS_ulconfig->dmrs_Type == NULL) - pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_a.dmrs_type = 1; - if (NR_DMRS_ulconfig->maxLength == NULL) - pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_a.max_length = 1; - - } else if(pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB != NULL) { - - NR_DMRS_UplinkConfig_t *NR_DMRS_ulconfig = pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup; - - if (NR_DMRS_ulconfig->dmrs_Type == NULL) - pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_b.dmrs_type = 1; - if (NR_DMRS_ulconfig->maxLength == NULL) - pusch_config_dedicated->dmrs_ul_for_pusch_mapping_type_b.max_length = 1; - - } - } else - pusch_config_dedicated->transformPrecoder = ttransformPrecoder_disabled;*/ } // todo: this function shall be reviewed completely because of the many comments left by the author @@ -276,11 +249,11 @@ void ul_ports_config(NR_UE_MAC_INST_t *mac, int *n_front_load_symb, nfapi_nr_ue_ NR_PUSCH_Config_t *pusch_Config = mac->current_UL_BWP.pusch_Config; AssertFatal(pusch_Config!=NULL,"pusch_Config shouldn't be null\n"); - long transformPrecoder = get_transformPrecoding(&mac->current_UL_BWP, dci_format, 0); + long transformPrecoder = pusch_config_pdu->transform_precoding; + LOG_D(NR_MAC,"transformPrecoder %s\n", transformPrecoder==NR_PUSCH_Config__transformPrecoder_disabled ? "disabled" : "enabled"); + long *max_length = NULL; long *dmrs_type = NULL; - LOG_D(NR_MAC,"transformPrecoder %s\n",transformPrecoder==NR_PUSCH_Config__transformPrecoder_disabled?"disabled":"enabled"); - if (pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA) { max_length = pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup->maxLength; dmrs_type = pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup->dmrs_Type; @@ -449,7 +422,13 @@ void ul_ports_config(NR_UE_MAC_INST_t *mac, int *n_front_load_symb, nfapi_nr_ue_ // - 6.1.4.2 of TS 38.214 // - 6.4.1.1.1 of TS 38.211 // - 6.3.1.7 of 38.211 -int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, NR_tda_info_t *tda_info, nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu, dci_pdu_rel15_t *dci, RAR_grant_t *rar_grant, uint16_t rnti, uint8_t *dci_format) +int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, + NR_tda_info_t *tda_info, + nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu, + dci_pdu_rel15_t *dci, + RAR_grant_t *rar_grant, + uint16_t rnti, + const nr_dci_format_t *dci_format) { int f_alloc; @@ -568,9 +547,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, NR_tda_info_t *tda_info, nfapi_nr } /* Transform precoding */ - if (rnti_type != NR_RNTI_CS || (rnti_type == NR_RNTI_CS && dci->ndi == 1)) { - pusch_config_pdu->transform_precoding = get_transformPrecoding(current_UL_BWP, *dci_format, 0); - } + pusch_config_pdu->transform_precoding = get_transformPrecoding(current_UL_BWP, *dci_format, 0); /*DCI format-related configuration*/ if (*dci_format == NR_UL_DCI_FORMAT_0_0) { @@ -604,7 +581,6 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, NR_tda_info_t *tda_info, nfapi_nr pusch_config_pdu->scid = dci->dmrs_sequence_initialization.val; /* TRANSFORM PRECODING ------------------------------------------------------------------------------------------*/ - if (pusch_config_pdu->transform_precoding == NR_PUSCH_Config__transformPrecoder_enabled) { pusch_config_pdu->num_dmrs_cdm_grps_no_data = 2; @@ -614,15 +590,15 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, NR_tda_info_t *tda_info, nfapi_nr NR_DMRS_ulconfig->transformPrecodingEnabled->nPUSCH_Identity != NULL) n_RS_Id = *NR_DMRS_ulconfig->transformPrecodingEnabled->nPUSCH_Identity; else - n_RS_Id = *mac->scc->physCellId; + n_RS_Id = mac->physCellId; // U as specified in section 6.4.1.1.1.2 in 38.211, if sequence hopping and group hopping are disabled pusch_config_pdu->dfts_ofdm.low_papr_group_number = n_RS_Id % 30; // V as specified in section 6.4.1.1.1.2 in 38.211 V = 0 if sequence hopping and group hopping are disabled - if ((NR_DMRS_ulconfig->transformPrecodingEnabled->sequenceGroupHopping == NULL) && - (NR_DMRS_ulconfig->transformPrecodingEnabled->sequenceHopping == NULL)) - pusch_config_pdu->dfts_ofdm.low_papr_sequence_number = 0; + if (!NR_DMRS_ulconfig || !NR_DMRS_ulconfig->transformPrecodingEnabled || + (!NR_DMRS_ulconfig->transformPrecodingEnabled->sequenceGroupHopping && !NR_DMRS_ulconfig->transformPrecodingEnabled->sequenceHopping)) + pusch_config_pdu->dfts_ofdm.low_papr_sequence_number = 0; else AssertFatal(1==0,"SequenceGroupHopping or sequenceHopping are NOT Supported\n"); @@ -788,8 +764,8 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, NR_tda_info_t *tda_info, nfapi_nr } // Periodic SRS scheduling -bool nr_ue_periodic_srs_scheduling(module_id_t mod_id, frame_t frame, slot_t slot) { - +bool nr_ue_periodic_srs_scheduling(module_id_t mod_id, frame_t frame, slot_t slot) +{ bool srs_scheduled = false; NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id); @@ -910,185 +886,171 @@ bool nr_ue_periodic_srs_scheduling(module_id_t mod_id, frame_t frame, slot_t slo // 1. TODO: Call RRC for link status return to PHY // 2. TODO: Perform SR/BSR procedures for scheduling feedback // 3. TODO: Perform PHR procedures -NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_indication_t *ul_info){ +void nr_ue_dl_scheduler(nr_downlink_indication_t *dl_info) +{ + module_id_t mod_id = dl_info->module_id; + uint32_t gNB_index = dl_info->gNB_index; + int cc_id = dl_info->cc_id; + frame_t rx_frame = dl_info->frame; + slot_t rx_slot = dl_info->slot; + NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id); - if (dl_info){ + fapi_nr_dl_config_request_t *dl_config = &mac->dl_config_request; - module_id_t mod_id = dl_info->module_id; - uint32_t gNB_index = dl_info->gNB_index; - int cc_id = dl_info->cc_id; - frame_t rx_frame = dl_info->frame; - slot_t rx_slot = dl_info->slot; - NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id); + nr_scheduled_response_t scheduled_response; + nr_dcireq_t dcireq; - fapi_nr_dl_config_request_t *dl_config = &mac->dl_config_request; + if(mac->state == UE_CONNECTED) { - nr_scheduled_response_t scheduled_response; - nr_dcireq_t dcireq; + dcireq.module_id = mod_id; + dcireq.gNB_index = gNB_index; + dcireq.cc_id = cc_id; + dcireq.frame = rx_frame; + dcireq.slot = rx_slot; + dcireq.dl_config_req.number_pdus = 0; + nr_ue_dcireq(&dcireq); //to be replaced with function pointer later + mac->dl_config_request = dcireq.dl_config_req; - if(mac->cg != NULL){ // we have a cg + nr_schedule_csirs_reception(mac, rx_frame, rx_slot); + nr_schedule_csi_for_im(mac, rx_frame, rx_slot); + dcireq.dl_config_req = mac->dl_config_request; - dcireq.module_id = mod_id; - dcireq.gNB_index = gNB_index; - dcireq.cc_id = cc_id; - dcireq.frame = rx_frame; - dcireq.slot = rx_slot; - dcireq.dl_config_req.number_pdus = 0; - nr_ue_dcireq(&dcireq); //to be replaced with function pointer later - mac->dl_config_request = dcireq.dl_config_req; - - nr_schedule_csirs_reception(mac, rx_frame, rx_slot); - nr_schedule_csi_for_im(mac, rx_frame, rx_slot); - dcireq.dl_config_req = mac->dl_config_request; - - fill_scheduled_response(&scheduled_response, &dcireq.dl_config_req, NULL, NULL, mod_id, cc_id, rx_frame, rx_slot, dl_info->phy_data); - if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL) { - LOG_D(NR_MAC,"1# scheduled_response transmitted, %d, %d\n", rx_frame, rx_slot); + fill_scheduled_response(&scheduled_response, &dcireq.dl_config_req, NULL, NULL, mod_id, cc_id, rx_frame, rx_slot, dl_info->phy_data); + if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL) { + LOG_D(NR_MAC,"1# scheduled_response transmitted, %d, %d\n", rx_frame, rx_slot); + mac->if_module->scheduled_response(&scheduled_response); + } + } + else if (mac->state == UE_PERFORMING_RA) { + // this is for Msg2/Msg4 + if (mac->ra.ra_state >= WAIT_RAR) { + fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15 = &dl_config->dl_config_list[dl_config->number_pdus].dci_config_pdu.dci_config_rel15; + rel15->num_dci_options = mac->ra.ra_state == WAIT_RAR ? 1 : 2; + rel15->dci_format_options[0] = NR_DL_DCI_FORMAT_1_0; + if (mac->ra.ra_state == WAIT_CONTENTION_RESOLUTION) + rel15->dci_format_options[1] = NR_UL_DCI_FORMAT_0_0; // msg3 retransmission + config_dci_pdu(mac, rel15, dl_config, mac->ra.ra_state == WAIT_RAR ? NR_RNTI_RA : NR_RNTI_TC , mac->ra.ss->searchSpaceId); + fill_dci_search_candidates(mac->ra.ss, rel15, -1 , -1); + dl_config->number_pdus = 1; + LOG_D(MAC,"mac->cg %p: Calling fill_scheduled_response rnti %x, type0_pdcch, num_pdus %d\n",mac->cg,rel15->rnti,dl_config->number_pdus); + fill_scheduled_response(&scheduled_response, dl_config, NULL, NULL, mod_id, cc_id, rx_frame, rx_slot, dl_info->phy_data); + if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL) mac->if_module->scheduled_response(&scheduled_response); - } } - else { - // this is for Msg2/Msg4 - if (mac->ra.ra_state >= WAIT_RAR) { - fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15 = &dl_config->dl_config_list[dl_config->number_pdus].dci_config_pdu.dci_config_rel15; - rel15->num_dci_options = mac->ra.ra_state == WAIT_RAR ? 1 : 2; - rel15->dci_format_options[0] = NR_DL_DCI_FORMAT_1_0; - if (mac->ra.ra_state == WAIT_CONTENTION_RESOLUTION) - rel15->dci_format_options[1] = NR_UL_DCI_FORMAT_0_0; // msg3 retransmission - config_dci_pdu(mac, rel15, dl_config, mac->ra.ra_state == WAIT_RAR ? NR_RNTI_RA : NR_RNTI_TC , mac->ra.ss->searchSpaceId); - fill_dci_search_candidates(mac->ra.ss, rel15, -1 , -1); - dl_config->number_pdus = 1; - LOG_D(MAC,"mac->cg %p: Calling fill_scheduled_response rnti %x, type0_pdcch, num_pdus %d\n",mac->cg,rel15->rnti,dl_config->number_pdus); - fill_scheduled_response(&scheduled_response, dl_config, NULL, NULL, mod_id, cc_id, rx_frame, rx_slot, dl_info->phy_data); - if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL) - mac->if_module->scheduled_response(&scheduled_response); - } - else - { - dl_config->number_pdus = 0; - } - } - } else if (ul_info) { + } + else + dl_config->number_pdus = 0; +} - int cc_id = ul_info->cc_id; - frame_t frame_tx = ul_info->frame_tx; - slot_t slot_tx = ul_info->slot_tx; - module_id_t mod_id = ul_info->module_id; - uint32_t gNB_index = ul_info->gNB_index; +void nr_ue_ul_scheduler(nr_uplink_indication_t *ul_info) +{ + int cc_id = ul_info->cc_id; + frame_t frame_tx = ul_info->frame_tx; + slot_t slot_tx = ul_info->slot_tx; + module_id_t mod_id = ul_info->module_id; + uint32_t gNB_index = ul_info->gNB_index; - NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id); - RA_config_t *ra = &mac->ra; + NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id); + RA_config_t *ra = &mac->ra; - fapi_nr_ul_config_request_t *ul_config = get_ul_config_request(mac, slot_tx); - if (!ul_config) { - LOG_E(NR_MAC, "mac->ul_config is null!\n"); - } + fapi_nr_ul_config_request_t *ul_config = get_ul_config_request(mac, slot_tx); + if (!ul_config) + LOG_E(NR_MAC, "mac->ul_config is null!\n"); + if(mac->state < UE_CONNECTED) { nr_ue_get_rach(mod_id, cc_id, frame_tx, gNB_index, slot_tx); - // Periodic SRS scheduling + nr_ue_prach_scheduler(mod_id, frame_tx, slot_tx); + } + + // Periodic SRS scheduling + if(mac->state == UE_CONNECTED) nr_ue_periodic_srs_scheduling(mod_id, frame_tx, slot_tx); - // Schedule ULSCH only if the current frame and slot match those in ul_config_req - // AND if a UL grant (UL DCI or Msg3) has been received (as indicated by num_pdus) - if (ul_config){ - pthread_mutex_lock(&ul_config->mutex_ul_config); - if ((ul_info->slot_tx == ul_config->slot && ul_info->frame_tx == ul_config->sfn) && ul_config->number_pdus > 0){ + // Schedule ULSCH only if the current frame and slot match those in ul_config_req + // AND if a UL grant (UL DCI or Msg3) has been received (as indicated by num_pdus) + if (ul_config) { + pthread_mutex_lock(&ul_config->mutex_ul_config); + if ((ul_info->slot_tx == ul_config->slot && ul_info->frame_tx == ul_config->sfn) && ul_config->number_pdus > 0){ - LOG_D(NR_MAC, "In %s:[%d.%d]: number of UL PDUs: %d with UL transmission in [%d.%d]\n", __FUNCTION__, frame_tx, slot_tx, ul_config->number_pdus, ul_config->sfn, ul_config->slot); + LOG_D(NR_MAC, "[%d.%d]: number of UL PDUs: %d with UL transmission in [%d.%d]\n", frame_tx, slot_tx, ul_config->number_pdus, ul_config->sfn, ul_config->slot); - uint8_t ulsch_input_buffer_array[NFAPI_MAX_NUM_UL_PDU][MAX_ULSCH_PAYLOAD_BYTES]; - nr_scheduled_response_t scheduled_response; - fapi_nr_tx_request_t tx_req; - //tx_req.slot = slot_tx; - //tx_req.sfn = frame_tx; - tx_req.slot = slot_tx; - tx_req.sfn = frame_tx; - tx_req.number_of_pdus = 0; + uint8_t ulsch_input_buffer_array[NFAPI_MAX_NUM_UL_PDU][MAX_ULSCH_PAYLOAD_BYTES]; + nr_scheduled_response_t scheduled_response; + fapi_nr_tx_request_t tx_req; + tx_req.slot = slot_tx; + tx_req.sfn = frame_tx; + tx_req.number_of_pdus = 0; - for (int j = 0; j < ul_config->number_pdus; j++) { - uint8_t *ulsch_input_buffer = ulsch_input_buffer_array[tx_req.number_of_pdus]; + for (int j = 0; j < ul_config->number_pdus; j++) { + uint8_t *ulsch_input_buffer = ulsch_input_buffer_array[tx_req.number_of_pdus]; - fapi_nr_ul_config_request_pdu_t *ulcfg_pdu = &ul_config->ul_config_list[j]; + fapi_nr_ul_config_request_pdu_t *ulcfg_pdu = &ul_config->ul_config_list[j]; - if (ulcfg_pdu->pdu_type == FAPI_NR_UL_CONFIG_TYPE_PUSCH) { - int mac_pdu_exist = 0; - uint16_t TBS_bytes = ulcfg_pdu->pusch_config_pdu.pusch_data.tb_size; - LOG_D(NR_MAC,"harq_id %d, NDI %d NDI_DCI %d, TBS_bytes %d (ra_state %d)\n", - ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id, - mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id], - ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator, - TBS_bytes,ra->ra_state); - if (ra->ra_state == WAIT_RAR && !ra->cfra){ - memcpy(ulsch_input_buffer, mac->ulsch_pdu.payload, TBS_bytes); - LOG_D(NR_MAC,"[RAPROC] Msg3 to be transmitted:\n"); - for (int k = 0; k < TBS_bytes; k++) { - LOG_D(NR_MAC,"(%i): 0x%x\n",k,mac->ulsch_pdu.payload[k]); - } - LOG_D(NR_MAC,"Flipping NDI for harq_id %d (Msg3)\n",ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator); - mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator; - mac->first_ul_tx[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = 0; + if (ulcfg_pdu->pdu_type == FAPI_NR_UL_CONFIG_TYPE_PUSCH) { + int mac_pdu_exist = 0; + uint16_t TBS_bytes = ulcfg_pdu->pusch_config_pdu.pusch_data.tb_size; + LOG_D(NR_MAC,"harq_id %d, NDI %d NDI_DCI %d, TBS_bytes %d (ra_state %d)\n", + ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id, + mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id], + ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator, + TBS_bytes,ra->ra_state); + if (ra->ra_state == WAIT_RAR && !ra->cfra){ + memcpy(ulsch_input_buffer, mac->ulsch_pdu.payload, TBS_bytes); + LOG_D(NR_MAC,"[RAPROC] Msg3 to be transmitted:\n"); + for (int k = 0; k < TBS_bytes; k++) { + LOG_D(NR_MAC,"(%i): 0x%x\n",k,mac->ulsch_pdu.payload[k]); + } + LOG_D(NR_MAC,"Flipping NDI for harq_id %d (Msg3)\n",ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator); + mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator; + mac->first_ul_tx[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = 0; + mac_pdu_exist = 1; + } else { + + if ((mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] != ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator || + mac->first_ul_tx[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] == 1) && + (mac->state == UE_CONNECTED || + (ra->ra_state == WAIT_RAR && ra->cfra))){ + + // Getting IP traffic to be transmitted + nr_ue_get_sdu(mod_id, cc_id,frame_tx, slot_tx, gNB_index, ulsch_input_buffer, TBS_bytes); mac_pdu_exist = 1; - } else { - - if ((mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] != ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator || - mac->first_ul_tx[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id]==1) && - ((get_softmodem_params()->phy_test == 1) || - (ra->ra_state == RA_SUCCEEDED) || - (ra->ra_state == WAIT_RAR && ra->cfra))){ - - // Getting IP traffic to be transmitted - nr_ue_get_sdu(mod_id, cc_id,frame_tx, slot_tx, gNB_index, ulsch_input_buffer, TBS_bytes); - mac_pdu_exist = 1; - } - - LOG_D(NR_MAC,"Flipping NDI for harq_id %d\n",ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator); - mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator; - mac->first_ul_tx[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = 0; - } - // Config UL TX PDU - if (mac_pdu_exist) { - tx_req.tx_request_body[tx_req.number_of_pdus].pdu_length = TBS_bytes; - tx_req.tx_request_body[tx_req.number_of_pdus].pdu_index = j; - tx_req.tx_request_body[tx_req.number_of_pdus].pdu = ulsch_input_buffer; - tx_req.number_of_pdus++; - } - if (ra->ra_state == WAIT_CONTENTION_RESOLUTION && !ra->cfra){ - LOG_I(NR_MAC,"[RAPROC][%d.%d] RA-Msg3 retransmitted\n", frame_tx, slot_tx); - // 38.321 restart the ra-ContentionResolutionTimer at each HARQ retransmission in the first symbol after the end of the Msg3 transmission - nr_Msg3_transmitted(ul_info->module_id, ul_info->cc_id, ul_info->frame_tx, ul_info->slot_tx, ul_info->gNB_index); - } - if (ra->ra_state == WAIT_RAR && !ra->cfra){ - LOG_A(NR_MAC, "[RAPROC][%d.%d] RA-Msg3 transmitted\n", frame_tx, slot_tx); - nr_Msg3_transmitted(ul_info->module_id, ul_info->cc_id, ul_info->frame_tx, ul_info->slot_tx, ul_info->gNB_index); - } + LOG_D(NR_MAC,"Flipping NDI for harq_id %d\n",ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator); + mac->UL_ndi[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = ulcfg_pdu->pusch_config_pdu.pusch_data.new_data_indicator; + mac->first_ul_tx[ulcfg_pdu->pusch_config_pdu.pusch_data.harq_process_id] = 0; + + } + + // Config UL TX PDU + if (mac_pdu_exist) { + tx_req.tx_request_body[tx_req.number_of_pdus].pdu_length = TBS_bytes; + tx_req.tx_request_body[tx_req.number_of_pdus].pdu_index = j; + tx_req.tx_request_body[tx_req.number_of_pdus].pdu = ulsch_input_buffer; + tx_req.number_of_pdus++; + } + if (ra->ra_state == WAIT_CONTENTION_RESOLUTION && !ra->cfra){ + LOG_I(NR_MAC,"[RAPROC][%d.%d] RA-Msg3 retransmitted\n", frame_tx, slot_tx); + // 38.321 restart the ra-ContentionResolutionTimer at each HARQ retransmission in the first symbol after the end of the Msg3 transmission + nr_Msg3_transmitted(ul_info->module_id, ul_info->cc_id, ul_info->frame_tx, ul_info->slot_tx, ul_info->gNB_index); + } + if (ra->ra_state == WAIT_RAR && !ra->cfra){ + LOG_A(NR_MAC, "[RAPROC][%d.%d] RA-Msg3 transmitted\n", frame_tx, slot_tx); + nr_Msg3_transmitted(ul_info->module_id, ul_info->cc_id, ul_info->frame_tx, ul_info->slot_tx, ul_info->gNB_index); } } - pthread_mutex_unlock(&ul_config->mutex_ul_config); // avoid double lock - - fill_scheduled_response(&scheduled_response, NULL, ul_config, &tx_req, mod_id, cc_id, frame_tx, slot_tx, ul_info->phy_data); - if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL){ - LOG_D(NR_MAC,"3# scheduled_response transmitted,%d, %d\n", frame_tx, slot_tx); - mac->if_module->scheduled_response(&scheduled_response); - } - pthread_mutex_lock(&ul_config->mutex_ul_config); } - pthread_mutex_unlock(&ul_config->mutex_ul_config); + pthread_mutex_unlock(&ul_config->mutex_ul_config); // avoid double lock + fill_scheduled_response(&scheduled_response, NULL, ul_config, &tx_req, mod_id, cc_id, frame_tx, slot_tx, ul_info->phy_data); + if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL){ + LOG_D(NR_MAC,"3# scheduled_response transmitted,%d, %d\n", frame_tx, slot_tx); + mac->if_module->scheduled_response(&scheduled_response); + } + pthread_mutex_lock(&ul_config->mutex_ul_config); } + pthread_mutex_unlock(&ul_config->mutex_ul_config); } - if (dl_info) { - return (UE_CONNECTION_OK); - } - module_id_t mod_id = ul_info->module_id; - frame_t txFrameP = ul_info->frame_tx; - slot_t txSlotP = ul_info->slot_tx; - - // Handle the SR/BSR procedures per subframe - NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id); - uint8_t gNB_indexP=0; - // Call BSR procedure as described in Section 5.4.5 in 38.321 // First check ReTxBSR Timer because it is always configured @@ -1103,21 +1065,22 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in } //Check whether Regular BSR is triggered - if (nr_update_bsr(mod_id, txFrameP, txSlotP, gNB_indexP) == true) { + if (nr_update_bsr(mod_id, frame_tx, slot_tx, gNB_index) == true) { // call SR procedure to generate pending SR and BSR for next PUCCH/PUSCH TxOp. This should implement the procedures // outlined in Sections 5.4.4 an 5.4.5 of 38.321 mac->scheduling_info.SR_pending = 1; // Regular BSR trigger mac->BSR_reporting_active |= NR_BSR_TRIGGER_REGULAR; LOG_D(NR_MAC, "[UE %d][BSR] Regular BSR Triggered Frame %d slot %d SR for PUSCH is pending\n", - mod_id, txFrameP, txSlotP); + mod_id, frame_tx, slot_tx); } - return UE_CONNECTION_OK; + if(mac->state >= UE_PERFORMING_RA) + nr_ue_pucch_scheduler(mod_id,frame_tx, slot_tx, ul_info->phy_data); } -bool -nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_index) { +bool nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t gNB_index) +{ mac_rlc_status_resp_t rlc_status; bool bsr_regular_triggered = false; uint8_t lcid; @@ -2135,7 +2098,7 @@ void nr_ue_pucch_scheduler(module_id_t module_idP, frame_t frameP, int slotP, vo uint16_t rnti = mac->crnti; //FIXME not sure this is valid for all pucch instances // SR - if (trigger_periodic_scheduling_request(mac, &pucch, frameP, slotP)) { + if (mac->state == UE_CONNECTED && trigger_periodic_scheduling_request(mac, &pucch, frameP, slotP)) { O_SR = 1; /* sr_payload = 1 means that this is a positive SR, sr_payload = 0 means that it is a negative SR */ pucch.sr_payload = nr_ue_get_SR(module_idP, @@ -2144,7 +2107,7 @@ void nr_ue_pucch_scheduler(module_id_t module_idP, frame_t frameP, int slotP, vo } // CSI - if (mac->ra.ra_state == RA_SUCCEEDED || get_softmodem_params()->phy_test == 1) + if (mac->state == UE_CONNECTED) O_CSI = nr_get_csi_measurements(mac, frameP, slotP, &pucch); // ACKNACK @@ -2194,15 +2157,14 @@ void nr_ue_pucch_scheduler(module_id_t module_idP, frame_t frameP, int slotP, vo fill_scheduled_response(&scheduled_response, NULL, ul_config, NULL, module_idP, 0 /*TBR fix*/, frameP, slotP, phy_data); if(mac->if_module != NULL && mac->if_module->scheduled_response != NULL) mac->if_module->scheduled_response(&scheduled_response); + if(mac->state == UE_WAIT_TX_ACK_MSG4) + mac->state = UE_CONNECTED; } } void nr_schedule_csi_for_im(NR_UE_MAC_INST_t *mac, int frame, int slot) { - if (mac->ra.ra_state != RA_SUCCEEDED && get_softmodem_params()->phy_test == 0) - return; - NR_UE_UL_BWP_t *current_UL_BWP = &mac->current_UL_BWP; if (!current_UL_BWP->csi_MeasConfig) @@ -2257,9 +2219,6 @@ void nr_schedule_csi_for_im(NR_UE_MAC_INST_t *mac, int frame, int slot) { void nr_schedule_csirs_reception(NR_UE_MAC_INST_t *mac, int frame, int slot) { - if (mac->ra.ra_state != RA_SUCCEEDED && get_softmodem_params()->phy_test == 0) - return; - NR_UE_UL_BWP_t *current_UL_BWP = &mac->current_UL_BWP; if (!current_UL_BWP->csi_MeasConfig) diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 08a3f291fb..38ae19c72a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -141,8 +141,7 @@ void process_phr_Config(NR_UE_sched_ctrl_t *sched_ctrl,NR_SetupRelease_PHR_Confi void process_CellGroup(NR_CellGroupConfig_t *CellGroup, NR_UE_sched_ctrl_t *sched_ctrl) { AssertFatal(CellGroup, "CellGroup is null\n"); - NR_MAC_CellGroupConfig_t *mac_CellGroupConfig = CellGroup->mac_CellGroupConfig; - + NR_MAC_CellGroupConfig_t *mac_CellGroupConfig = CellGroup->mac_CellGroupConfig; if (mac_CellGroupConfig) { process_drx_Config(sched_ctrl,mac_CellGroupConfig->drx_Config); @@ -160,10 +159,10 @@ void process_CellGroup(NR_CellGroupConfig_t *CellGroup, NR_UE_sched_ctrl_t *sche } -void config_common(int Mod_idP, int pdsch_AntennaPorts, int pusch_AntennaPorts, NR_ServingCellConfigCommon_t *scc) { +void config_common(gNB_MAC_INST *nrmac, int pdsch_AntennaPorts, int pusch_AntennaPorts, NR_ServingCellConfigCommon_t *scc) { - nfapi_nr_config_request_scf_t *cfg = &RC.nrmac[Mod_idP]->config[0]; - RC.nrmac[Mod_idP]->common_channels[0].ServingCellConfigCommon = scc; + nfapi_nr_config_request_scf_t *cfg = &nrmac->config[0]; + nrmac->common_channels[0].ServingCellConfigCommon = scc; // Carrier configuration @@ -233,7 +232,7 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, int pusch_AntennaPorts, frequency_range_t frequency_range = band<100?FR1:FR2; frame_type_t frame_type = get_frame_type(*scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0], *scc->ssbSubcarrierSpacing); - RC.nrmac[Mod_idP]->common_channels[0].frame_type = frame_type; + nrmac->common_channels[0].frame_type = frame_type; // Cell configuration cfg->cell_config.phy_cell_id.value = *scc->physCellId; @@ -351,8 +350,8 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, int pusch_AntennaPorts, cfg->ssb_table.ssb_subcarrier_offset.tl.tag = NFAPI_NR_CONFIG_SSB_SUBCARRIER_OFFSET_TAG; cfg->num_tlv++; - RC.nrmac[Mod_idP]->ssb_SubcarrierOffset = cfg->ssb_table.ssb_subcarrier_offset.value; - RC.nrmac[Mod_idP]->ssb_OffsetPointA = cfg->ssb_table.ssb_offset_point_a.value; + nrmac->ssb_SubcarrierOffset = cfg->ssb_table.ssb_subcarrier_offset.value; + nrmac->ssb_OffsetPointA = cfg->ssb_table.ssb_offset_point_a.value; switch (scc->ssb_PositionsInBurst->present) { case 1 : @@ -434,7 +433,7 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, int pusch_AntennaPorts, LOG_E(NR_MAC,"TDD configuration can not be done\n"); else { LOG_I(NR_MAC,"TDD has been properly configurated\n"); - RC.nrmac[Mod_idP]->tdd_beam_association = (int16_t *)malloc16(periods_per_frame*sizeof(int16_t)); + nrmac->tdd_beam_association = (int16_t *)malloc16(periods_per_frame*sizeof(int16_t)); } } @@ -459,190 +458,199 @@ int nr_mac_enable_ue_rrc_processing_timer(module_id_t Mod_idP, rnti_t rnti, NR_S return 0; } -int rrc_mac_config_req_gNB(module_id_t Mod_idP, - rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts, - int pusch_AntennaPorts, - int sib1_tda, - int minRXTXTIMEpdsch, - NR_ServingCellConfigCommon_t *scc, - NR_BCCH_BCH_Message_t *mib, - NR_BCCH_DL_SCH_Message_t *sib1, - int add_ue, - uint32_t rnti, - NR_CellGroupConfig_t *CellGroup) { +void nr_mac_config_scc(gNB_MAC_INST *nrmac, + rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts, + int pusch_AntennaPorts, + int sib1_tda, + int minRXTXTIMEpdsch, + NR_ServingCellConfigCommon_t *scc) +{ + DevAssert(nrmac != NULL); + AssertFatal(nrmac->common_channels[0].ServingCellConfigCommon == NULL, "logic error: multiple configurations of SCC\n"); - if (scc != NULL ) { - AssertFatal((scc->ssb_PositionsInBurst->present > 0) && (scc->ssb_PositionsInBurst->present < 4), "SSB Bitmap type %d is not valid\n",scc->ssb_PositionsInBurst->present); + DevAssert(scc != NULL); + AssertFatal(scc->ssb_PositionsInBurst->present > 0 && scc->ssb_PositionsInBurst->present < 4, + "SSB Bitmap type %d is not valid\n", + scc->ssb_PositionsInBurst->present); - int n = nr_slots_per_frame[*scc->ssbSubcarrierSpacing]; - if (*scc->ssbSubcarrierSpacing == 0) - n <<= 1; // to have enough room for feedback possibly beyond the frame we need a larger array at 15kHz SCS - RC.nrmac[Mod_idP]->common_channels[0].vrb_map_UL = calloc(n * MAX_BWP_SIZE, sizeof(uint16_t)); - RC.nrmac[Mod_idP]->vrb_map_UL_size = n; - AssertFatal(RC.nrmac[Mod_idP]->common_channels[0].vrb_map_UL, - "could not allocate memory for RC.nrmac[]->common_channels[0].vrb_map_UL\n"); + int n = nr_slots_per_frame[*scc->ssbSubcarrierSpacing]; + if (*scc->ssbSubcarrierSpacing == 0) + n <<= 1; // to have enough room for feedback possibly beyond the frame we need a larger array at 15kHz SCS + nrmac->common_channels[0].vrb_map_UL = calloc(n * MAX_BWP_SIZE, sizeof(uint16_t)); + nrmac->vrb_map_UL_size = n; + AssertFatal(nrmac->common_channels[0].vrb_map_UL, + "could not allocate memory for RC.nrmac[]->common_channels[0].vrb_map_UL\n"); - LOG_I(NR_MAC,"Configuring common parameters from NR ServingCellConfig\n"); + LOG_I(NR_MAC, "Configuring common parameters from NR ServingCellConfig\n"); - int num_pdsch_antenna_ports = pdsch_AntennaPorts.N1 * pdsch_AntennaPorts.N2 * pdsch_AntennaPorts.XP; - RC.nrmac[Mod_idP]->xp_pdsch_antenna_ports = pdsch_AntennaPorts.XP; - config_common(Mod_idP, - num_pdsch_antenna_ports, - pusch_AntennaPorts, - scc); - LOG_D(NR_MAC, "%s() %s:%d RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req:%p\n", __FUNCTION__, __FILE__, __LINE__, RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req); - - if (NFAPI_MODE == NFAPI_MODE_PNF || NFAPI_MODE == NFAPI_MODE_VNF) { - // fake that the gNB is configured in nFAPI mode, which would normally be - // done in a NR_PHY_config_req, but in this mode, there is no PHY - RC.gNB[Mod_idP]->configured = 1; - } else { - NR_PHY_Config_t phycfg = { - .Mod_id = Mod_idP, - .CC_id = 0, - .cfg = &RC.nrmac[Mod_idP]->config[0] - }; - DevAssert(RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req); - RC.nrmac[Mod_idP]->if_inst->NR_PHY_config_req(&phycfg); + int num_pdsch_antenna_ports = pdsch_AntennaPorts.N1 * pdsch_AntennaPorts.N2 * pdsch_AntennaPorts.XP; + nrmac->xp_pdsch_antenna_ports = pdsch_AntennaPorts.XP; + config_common(nrmac, num_pdsch_antenna_ports, pusch_AntennaPorts, scc); + + if (NFAPI_MODE == NFAPI_MODE_PNF || NFAPI_MODE == NFAPI_MODE_VNF) { + // fake that the gNB is configured in nFAPI mode, which would normally be + // done in a NR_PHY_config_req, but in this mode, there is no PHY + RC.gNB[0]->configured = 1; + } else { + NR_PHY_Config_t phycfg = {.Mod_id = 0, .CC_id = 0, .cfg = &nrmac->config[0]}; + DevAssert(nrmac->if_inst->NR_PHY_config_req); + nrmac->if_inst->NR_PHY_config_req(&phycfg); + } + + nrmac->minRXTXTIMEpdsch = minRXTXTIMEpdsch; + find_SSB_and_RO_available(nrmac); + + const NR_TDD_UL_DL_Pattern_t *tdd = scc->tdd_UL_DL_ConfigurationCommon ? &scc->tdd_UL_DL_ConfigurationCommon->pattern1 : NULL; + + int nr_slots_period = n; + int nr_dl_slots = n; + int nr_ulstart_slot = 0; + if (tdd) { + nr_dl_slots = tdd->nrofDownlinkSlots + (tdd->nrofDownlinkSymbols != 0); + nr_ulstart_slot = get_first_ul_slot(tdd->nrofDownlinkSlots, tdd->nrofDownlinkSymbols, tdd->nrofUplinkSymbols); + nr_slots_period /= get_nb_periods_per_frame(tdd->dl_UL_TransmissionPeriodicity); + } else { + // if TDD configuration is not present and the band is not FDD, it means it is a dynamic TDD configuration + AssertFatal(nrmac->common_channels[0].frame_type == FDD,"Dynamic TDD not handled yet\n"); + } + + for (int slot = 0; slot < n; ++slot) { + nrmac->dlsch_slot_bitmap[slot / 64] |= (uint64_t)((slot % nr_slots_period) < nr_dl_slots) << (slot % 64); + nrmac->ulsch_slot_bitmap[slot / 64] |= (uint64_t)((slot % nr_slots_period) >= nr_ulstart_slot) << (slot % 64); + + LOG_I(NR_MAC, + "slot %d DL %d UL %d\n", + slot, + (nrmac->dlsch_slot_bitmap[slot / 64] & ((uint64_t)1 << (slot % 64))) != 0, + (nrmac->ulsch_slot_bitmap[slot / 64] & ((uint64_t)1 << (slot % 64))) != 0); + } + + if (get_softmodem_params()->phy_test) { + nrmac->pre_processor_dl = nr_preprocessor_phytest; + nrmac->pre_processor_ul = nr_ul_preprocessor_phytest; + } else { + nrmac->pre_processor_dl = nr_init_fr1_dlsch_preprocessor(0); + nrmac->pre_processor_ul = nr_init_fr1_ulsch_preprocessor(0); + } + + if (get_softmodem_params()->sa > 0) { + NR_COMMON_channels_t *cc = &nrmac->common_channels[0]; + nrmac->sib1_tda = sib1_tda; + for (int n = 0; n < NR_NB_RA_PROC_MAX; n++) { + NR_RA_t *ra = &cc->ra[n]; + ra->cfra = false; + ra->rnti = 0; + ra->preambles.num_preambles = MAX_NUM_NR_PRACH_PREAMBLES; + ra->preambles.preamble_list = malloc(MAX_NUM_NR_PRACH_PREAMBLES * sizeof(*ra->preambles.preamble_list)); + for (int i = 0; i < MAX_NUM_NR_PRACH_PREAMBLES; i++) + ra->preambles.preamble_list[i] = i; } + } +} - RC.nrmac[Mod_idP]->minRXTXTIMEpdsch = minRXTXTIMEpdsch; - find_SSB_and_RO_available(Mod_idP); +void nr_mac_config_mib(gNB_MAC_INST *nrmac, NR_BCCH_BCH_Message_t *mib) +{ + DevAssert(nrmac != NULL); + DevAssert(mib != NULL); + NR_COMMON_channels_t *cc = &nrmac->common_channels[0]; - const NR_TDD_UL_DL_Pattern_t *tdd = scc->tdd_UL_DL_ConfigurationCommon ? &scc->tdd_UL_DL_ConfigurationCommon->pattern1 : NULL; + AssertFatal(cc->mib == NULL, "logic bug: updated MIB multiple times\n"); + cc->mib = mib; +} - int nr_slots_period = n; - int nr_dl_slots = n; - int nr_ulstart_slot = 0; - if (tdd) { - nr_dl_slots = tdd->nrofDownlinkSlots + (tdd->nrofDownlinkSymbols != 0); - nr_ulstart_slot = get_first_ul_slot(tdd->nrofDownlinkSlots, tdd->nrofDownlinkSymbols, tdd->nrofUplinkSymbols); - nr_slots_period /= get_nb_periods_per_frame(tdd->dl_UL_TransmissionPeriodicity); - } - else - // if TDD configuration is not present and the band is not FDD, it means it is a dynamic TDD configuration - AssertFatal(RC.nrmac[Mod_idP]->common_channels[0].frame_type == FDD,"Dynamic TDD not handled yet\n"); +void nr_mac_config_sib1(gNB_MAC_INST *nrmac, NR_BCCH_DL_SCH_Message_t *sib1) +{ + DevAssert(nrmac != NULL); + DevAssert(sib1 != NULL); + NR_COMMON_channels_t *cc = &nrmac->common_channels[0]; - for (int slot = 0; slot < n; ++slot) { - RC.nrmac[Mod_idP]->dlsch_slot_bitmap[slot / 64] |= (uint64_t)((slot % nr_slots_period) < nr_dl_slots) << (slot % 64); - RC.nrmac[Mod_idP]->ulsch_slot_bitmap[slot / 64] |= (uint64_t)((slot % nr_slots_period) >= nr_ulstart_slot) << (slot % 64); + AssertFatal(cc->sib1 == NULL, "logic bug: updated SIB1 multiple times\n"); + cc->sib1 = sib1; +} - LOG_I(NR_MAC, "In %s: slot %d DL %d UL %d\n", - __FUNCTION__, - slot, - (RC.nrmac[Mod_idP]->dlsch_slot_bitmap[slot / 64] & ((uint64_t)1 << (slot % 64))) != 0, - (RC.nrmac[Mod_idP]->ulsch_slot_bitmap[slot / 64] & ((uint64_t)1 << (slot % 64))) != 0); - } +bool nr_mac_add_test_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig_t *CellGroup) +{ + DevAssert(nrmac != NULL); + DevAssert(CellGroup != NULL); + DevAssert(get_softmodem_params()->phy_test); - if (get_softmodem_params()->phy_test) { - RC.nrmac[Mod_idP]->pre_processor_dl = nr_preprocessor_phytest; - RC.nrmac[Mod_idP]->pre_processor_ul = nr_ul_preprocessor_phytest; - } else { - RC.nrmac[Mod_idP]->pre_processor_dl = nr_init_fr1_dlsch_preprocessor(Mod_idP, 0); - RC.nrmac[Mod_idP]->pre_processor_ul = nr_init_fr1_ulsch_preprocessor(Mod_idP, 0); - } + NR_UE_info_t* UE = add_new_nr_ue(nrmac, rnti, CellGroup); + if (UE) { + LOG_I(NR_MAC,"Force-added new UE %x with initial CellGroup\n", rnti); + } else { + LOG_E(NR_MAC,"Error adding UE %04x\n", rnti); + return false; + } + process_CellGroup(CellGroup,&UE->UE_sched_ctrl); + return true; +} - if (get_softmodem_params()->sa > 0) { - NR_COMMON_channels_t *cc = &RC.nrmac[Mod_idP]->common_channels[0]; - RC.nrmac[Mod_idP]->sib1_tda = sib1_tda; - for (int n=0;nra[n].cfra = false; - cc->ra[n].msg3_dcch_dtch = false; - cc->ra[n].rnti = 0; - cc->ra[n].preambles.num_preambles = MAX_NUM_NR_PRACH_PREAMBLES; - cc->ra[n].preambles.preamble_list = (uint8_t *) malloc(MAX_NUM_NR_PRACH_PREAMBLES*sizeof(uint8_t)); - for (int i = 0; i < MAX_NUM_NR_PRACH_PREAMBLES; i++) - cc->ra[n].preambles.preamble_list[i] = i; +bool nr_mac_prepare_ra_nsa_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig_t *CellGroup) +{ + DevAssert(nrmac != NULL); + DevAssert(CellGroup != NULL); + DevAssert(!get_softmodem_params()->phy_test); + + // NSA case: need to pre-configure CFRA + const int CC_id = 0; + NR_COMMON_channels_t *cc = &nrmac->common_channels[CC_id]; + uint8_t ra_index = 0; + /* checking for free RA process */ + for(; ra_index < NR_NB_RA_PROC_MAX; ra_index++) { + if((cc->ra[ra_index].state == RA_IDLE) && (!cc->ra[ra_index].cfra)) break; + } + if (ra_index == NR_NB_RA_PROC_MAX) { + LOG_E(NR_MAC, "RA processes are not available for CFRA RNTI %04x\n", rnti); + return false; + } + NR_RA_t *ra = &cc->ra[ra_index]; + ra->CellGroup = CellGroup; + AssertFatal(CellGroup->spCellConfig && CellGroup->spCellConfig->reconfigurationWithSync + && CellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated != NULL + && CellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra != NULL, + "invalid CellGroup for RNTI %04x, cannot create RA occasion\n", + rnti); + + ra->cfra = true; + ra->rnti = rnti; + struct NR_CFRA *cfra = CellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra; + uint8_t num_preamble = cfra->resources.choice.ssb->ssb_ResourceList.list.count; + AssertFatal(ra->preambles.num_preambles == 0 && ra->preambles.preamble_list == NULL, + "preamble_list already configured means logic bug, list is allocated here\n"); + ra->preambles.num_preambles = num_preamble; + ra->preambles.preamble_list = calloc(ra->preambles.num_preambles, sizeof(*ra->preambles.preamble_list)); + for (int i = 0; i < cc->num_active_ssb; i++) { + for (int j = 0; j < num_preamble; j++) { + if (cc->ssb_index[i] == cfra->resources.choice.ssb->ssb_ResourceList.list.array[j]->ssb) { + // one dedicated preamble for each beam + ra->preambles.preamble_list[i] = cfra->resources.choice.ssb->ssb_ResourceList.list.array[j]->ra_PreambleIndex; + break; } } } - - if (mib) RC.nrmac[Mod_idP]->common_channels[0].mib = mib; - if (sib1) RC.nrmac[Mod_idP]->common_channels[0].sib1 = sib1; + LOG_I(NR_MAC,"Added new RA process for UE RNTI %04x with initial CellGroup\n", rnti); + return true; +} - if (CellGroup) { +bool nr_mac_update_cellgroup(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig_t *CellGroup) +{ + DevAssert(nrmac != NULL); + DevAssert(CellGroup != NULL); - if (add_ue == 1 && get_softmodem_params()->phy_test) { - NR_UE_info_t* UE = add_new_nr_ue(RC.nrmac[Mod_idP], rnti, CellGroup); - if (UE) { - LOG_I(NR_MAC,"Added new UE %x with initial CellGroup\n", rnti); - } else { - LOG_E(NR_MAC,"Error adding UE %04x\n", rnti); - return -1; - } - process_CellGroup(CellGroup,&UE->UE_sched_ctrl); - } else if (add_ue == 1 && !get_softmodem_params()->phy_test) { - const int CC_id = 0; - NR_COMMON_channels_t *cc = &RC.nrmac[Mod_idP]->common_channels[CC_id]; - uint8_t ra_index = 0; - /* checking for free RA process */ - for(; ra_index < NR_NB_RA_PROC_MAX; ra_index++) { - if((cc->ra[ra_index].state == RA_IDLE) && (!cc->ra[ra_index].cfra)) break; - } - if (ra_index == NR_NB_RA_PROC_MAX) { - LOG_E(NR_MAC, "%s() %s:%d RA processes are not available for CFRA RNTI :%x\n", __FUNCTION__, __FILE__, __LINE__, rnti); - return -1; - } - NR_RA_t *ra = &cc->ra[ra_index]; - ra->CellGroup = CellGroup; - if (CellGroup->spCellConfig && CellGroup->spCellConfig->reconfigurationWithSync && - CellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated!=NULL) { - if (CellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra != NULL) { - ra->cfra = true; - ra->rnti = rnti; - struct NR_CFRA *cfra = CellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra; - uint8_t num_preamble = cfra->resources.choice.ssb->ssb_ResourceList.list.count; - ra->preambles.num_preambles = num_preamble; - ra->preambles.preamble_list = (uint8_t *) malloc(num_preamble*sizeof(uint8_t)); - for(int i=0; inum_active_ssb; i++) { - for(int j=0; jssb_index[i] == cfra->resources.choice.ssb->ssb_ResourceList.list.array[j]->ssb) { - // one dedicated preamble for each beam - ra->preambles.preamble_list[i] = - cfra->resources.choice.ssb->ssb_ResourceList.list.array[j]->ra_PreambleIndex; - break; - } - } - } - } - } else { - ra->cfra = false; - ra->rnti = 0; - ra->preambles.num_preambles = MAX_NUM_NR_PRACH_PREAMBLES; - ra->preambles.preamble_list = (uint8_t *) malloc(MAX_NUM_NR_PRACH_PREAMBLES*sizeof(uint8_t)); - for (int i = 0; i < MAX_NUM_NR_PRACH_PREAMBLES; i++) - ra->preambles.preamble_list[i] = i; - } - ra->msg3_dcch_dtch = false; - LOG_I(NR_MAC,"Added new RA process for UE RNTI %04x with initial CellGroup\n", rnti); - } else { // CellGroup has been updated - NR_UE_info_t *UE = find_nr_UE(&RC.nrmac[Mod_idP]->UE_info, rnti); - if (!UE) { - LOG_E(NR_MAC, "Can't find UE %04x\n", rnti); - return -1; - } + NR_UE_info_t *UE = find_nr_UE(&nrmac->UE_info, rnti); + AssertFatal(UE != NULL, "Can't find UE %04x for CellGroup update\n", rnti); - /* copy CellGroup by calling asn1c encode - this is a temporary hack to avoid the gNB having - a pointer to RRC CellGroup structure - (otherwise it would be applied to early) - TODO remove once we have a proper implementation */ - UE->enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig, - NULL, - (void *) CellGroup, - UE->cg_buf, - 32768); + /* copy CellGroup by calling asn1c encode this is a temporary hack to avoid the gNB having a pointer to RRC CellGroup structure + * (otherwise it would be applied to early) + * TODO remove once we have a proper implementation */ + UE->enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig, NULL, (void *)CellGroup, UE->cg_buf, 32768); - if (UE->enc_rval.encoded == -1) { - LOG_E(NR_MAC, "ASN1 message CellGroupConfig encoding failed (%s, %lu)!\n", - UE->enc_rval.failed_type->name, UE->enc_rval.encoded); - exit(1); - } - - process_CellGroup(CellGroup,&UE->UE_sched_ctrl); - } + if (UE->enc_rval.encoded == -1) { + LOG_E(NR_MAC, "ASN1 message CellGroupConfig encoding failed (%s, %lu)!\n", UE->enc_rval.failed_type->name, UE->enc_rval.encoded); + exit(1); } - VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT); - return 0; -}// END rrc_mac_config_req_gNB + process_CellGroup(CellGroup, &UE->UE_sched_ctrl); + + return true; +} diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c index 895f0bd0dc..c641bf4d15 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c @@ -39,8 +39,6 @@ #include "common/utils/nr/nr_common.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "RRC/NR/nr_rrc_extern.h" diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 06d58bae57..2729ccc00a 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -141,12 +141,11 @@ int16_t ssb_index_from_prach(module_id_t module_idP, //Compute Total active SSBs and RO available -void find_SSB_and_RO_available(module_id_t module_idP) { - - gNB_MAC_INST *gNB = RC.nrmac[module_idP]; - NR_COMMON_channels_t *cc = &gNB->common_channels[0]; +void find_SSB_and_RO_available(gNB_MAC_INST *nrmac) +{ + NR_COMMON_channels_t *cc = &nrmac->common_channels[0]; NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; - nfapi_nr_config_request_scf_t *cfg = &RC.nrmac[module_idP]->config[0]; + nfapi_nr_config_request_scf_t *cfg = &nrmac->config[0]; uint8_t config_index = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->rach_ConfigGeneric.prach_ConfigurationIndex; uint8_t mu,N_dur=0,N_t_slot=0,start_symbol=0,N_RA_slot = 0; @@ -571,7 +570,7 @@ void nr_initiate_ra_proc(module_id_t module_idP, ra_rnti = 1 + symbol + (slotP * 14) + (freq_index * 14 * 80) + (ul_carrier_id * 14 * 80 * 8); // Configure RA BWP - configure_UE_BWP(nr_mac, scc, NULL, ra, NULL); + configure_UE_BWP(nr_mac, scc, NULL, ra, NULL, -1, -1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 1); @@ -680,6 +679,8 @@ void nr_schedule_RA(module_id_t module_idP, frame_t frameP, sub_frame_t slotP) { case Msg3_retransmission: nr_generate_Msg3_retransmission(module_idP, CC_id, frameP, slotP, ra); break; + case Msg3_dcch_dtch: + nr_generate_Msg3_dcch_dtch_response(module_idP, CC_id, frameP, slotP, ra); case Msg4: nr_generate_Msg4(module_idP, CC_id, frameP, slotP, ra); break; @@ -1015,9 +1016,14 @@ void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu, pusch_pdu->cyclic_prefix = 0; pusch_pdu->mcs_table = 0; if (scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder == NULL) - pusch_pdu->transform_precoding = 1; - else - pusch_pdu->transform_precoding = 0; + pusch_pdu->transform_precoding = 1; // disabled + else { + pusch_pdu->transform_precoding = 0; // enabled + pusch_pdu->dfts_ofdm.low_papr_group_number = *scc->physCellId % 30; + pusch_pdu->dfts_ofdm.low_papr_sequence_number = 0; + if (scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->groupHoppingEnabledTransformPrecoding) + AssertFatal(1==0,"Hopping mode is not supported in transform precoding\n"); + } pusch_pdu->data_scrambling_id = *scc->physCellId; pusch_pdu->nrOfLayers = 1; pusch_pdu->ul_dmrs_symb_pos = get_l_prime(nr_of_symbols,mappingtype,pusch_dmrs_pos2,pusch_len1,start_symbol_index, scc->dmrs_TypeA_Position); @@ -1400,8 +1406,374 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra } } -void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t slotP, NR_RA_t *ra) { +void prepare_dl_pdus(gNB_MAC_INST *nr_mac, + NR_RA_t *ra, + NR_UE_DL_BWP_t *dl_bwp, + nfapi_nr_dl_tti_request_body_t *dl_req, + NR_sched_pucch_t *pucch, + NR_pdsch_dmrs_t dmrs_info, + NR_tda_info_t tda, + int aggregation_level, + int CCEIndex, + int tb_size, int ndi, + int tpc, int delta_PRI, + int current_harq_pid, + int time_domain_assignment, + int CC_id, int rnti, int round, + int mcsIndex, int tb_scaling, + int pduindex, int rbStart, int rbSize) +{ + // look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially + // important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them + NR_ControlResourceSet_t *coreset = ra->coreset; + const int coresetid = coreset->controlResourceSetId; + nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15 = nr_mac->pdcch_pdu_idx[CC_id][coresetid]; + if (!pdcch_pdu_rel15) { + nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdcch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; + memset(dl_tti_pdcch_pdu, 0, sizeof(nfapi_nr_dl_tti_request_pdu_t)); + dl_tti_pdcch_pdu->PDUType = NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE; + dl_tti_pdcch_pdu->PDUSize = (uint8_t)(2 + sizeof(nfapi_nr_dl_tti_pdcch_pdu)); + dl_req->nPDUs += 1; + pdcch_pdu_rel15 = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15; + nr_configure_pdcch(pdcch_pdu_rel15, coreset, false, &ra->sched_pdcch); + nr_mac->pdcch_pdu_idx[CC_id][coresetid] = pdcch_pdu_rel15; + } + nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; + memset((void *)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); + dl_tti_pdsch_pdu->PDUType = NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE; + dl_tti_pdsch_pdu->PDUSize = (uint8_t)(2+sizeof(nfapi_nr_dl_tti_pdsch_pdu)); + dl_req->nPDUs+=1; + nfapi_nr_dl_tti_pdsch_pdu_rel15_t *pdsch_pdu_rel15 = &dl_tti_pdsch_pdu->pdsch_pdu.pdsch_pdu_rel15; + + NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id]; + NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; + + long BWPStart = 0; + long BWPSize = 0; + NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config = NULL; + NR_SearchSpace_t *ss = ra->ra_ss; + if(*ss->controlResourceSetId!=0) { + BWPStart = dl_bwp->BWPStart; + BWPSize = dl_bwp->BWPSize; + } else { + type0_PDCCH_CSS_config = &nr_mac->type0_PDCCH_CSS_config[ra->beam_id]; + BWPStart = type0_PDCCH_CSS_config->cset_start_rb; + BWPSize = type0_PDCCH_CSS_config->num_rbs; + } + + int mcsTableIdx = dl_bwp->mcsTableIdx; + + pdsch_pdu_rel15->pduBitmap = 0; + pdsch_pdu_rel15->rnti = rnti; + pdsch_pdu_rel15->pduIndex = pduindex; + pdsch_pdu_rel15->BWPSize = BWPSize; + pdsch_pdu_rel15->BWPStart = BWPStart; + pdsch_pdu_rel15->SubcarrierSpacing = dl_bwp->scs; + pdsch_pdu_rel15->CyclicPrefix = 0; + pdsch_pdu_rel15->NrOfCodewords = 1; + int R = nr_get_code_rate_dl(mcsIndex,mcsTableIdx); + pdsch_pdu_rel15->targetCodeRate[0] = R; + int Qm = nr_get_Qm_dl(mcsIndex, mcsTableIdx); + pdsch_pdu_rel15->qamModOrder[0] = Qm; + pdsch_pdu_rel15->mcsIndex[0] = mcsIndex; + pdsch_pdu_rel15->mcsTable[0] = mcsTableIdx; + pdsch_pdu_rel15->rvIndex[0] = nr_rv_round_map[round % 4]; + pdsch_pdu_rel15->dataScramblingId = *scc->physCellId; + pdsch_pdu_rel15->nrOfLayers = 1; + pdsch_pdu_rel15->transmissionScheme = 0; + pdsch_pdu_rel15->refPoint = 0; + pdsch_pdu_rel15->dmrsConfigType = dmrs_info.dmrsConfigType; + pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId; + pdsch_pdu_rel15->SCID = 0; + pdsch_pdu_rel15->numDmrsCdmGrpsNoData = dmrs_info.numDmrsCdmGrpsNoData; + pdsch_pdu_rel15->dmrsPorts = 1; + pdsch_pdu_rel15->resourceAlloc = 1; + pdsch_pdu_rel15->rbStart = rbStart; + pdsch_pdu_rel15->rbSize = rbSize; + pdsch_pdu_rel15->VRBtoPRBMapping = 0; + pdsch_pdu_rel15->StartSymbolIndex = tda.startSymbolIndex; + pdsch_pdu_rel15->NrOfSymbols = tda.nrOfSymbols; + pdsch_pdu_rel15->dlDmrsSymbPos = dmrs_info.dl_dmrs_symb_pos; + + int x_Overhead = 0; + nr_get_tbs_dl(&dl_tti_pdsch_pdu->pdsch_pdu, x_Overhead, pdsch_pdu_rel15->numDmrsCdmGrpsNoData, tb_scaling); + + int bw_tbslbrm = get_dlbw_tbslbrm(dl_bwp->initial_BWPSize, ra->CellGroup); + pdsch_pdu_rel15->maintenance_parms_v3.tbSizeLbrmBytes = nr_compute_tbslbrm(mcsTableIdx, + bw_tbslbrm, + 1); + pdsch_pdu_rel15->maintenance_parms_v3.ldpcBaseGraph = get_BG(tb_size<<3,R); + + pdsch_pdu_rel15->precodingAndBeamforming.num_prgs=1; + pdsch_pdu_rel15->precodingAndBeamforming.prg_size=275; + pdsch_pdu_rel15->precodingAndBeamforming.dig_bf_interfaces=1; + pdsch_pdu_rel15->precodingAndBeamforming.prgs_list[0].pm_idx = 0; + pdsch_pdu_rel15->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx = ra->beam_id; + + /* Fill PDCCH DL DCI PDU */ + nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci]; + pdcch_pdu_rel15->numDlDci++; + dci_pdu->RNTI = rnti; + dci_pdu->ScramblingId = *scc->physCellId; + dci_pdu->ScramblingRNTI = 0; + dci_pdu->AggregationLevel = aggregation_level; + dci_pdu->CceIndex = CCEIndex; + dci_pdu->beta_PDCCH_1_0 = 0; + dci_pdu->powerControlOffsetSS = 1; + + dci_pdu_rel15_t dci_payload; + dci_payload.frequency_domain_assignment.val = PRBalloc_to_locationandbandwidth0(pdsch_pdu_rel15->rbSize, + pdsch_pdu_rel15->rbStart, + BWPSize); + + dci_payload.format_indicator = 1; + dci_payload.time_domain_assignment.val = time_domain_assignment; + dci_payload.vrb_to_prb_mapping.val = 0; + dci_payload.mcs = pdsch_pdu_rel15->mcsIndex[0]; + dci_payload.tb_scaling = tb_scaling; + dci_payload.rv = pdsch_pdu_rel15->rvIndex[0]; + dci_payload.harq_pid = current_harq_pid; + dci_payload.ndi = ndi; + dci_payload.dai[0].val = pucch ? (pucch->dai_c-1) & 3 : 0; + dci_payload.tpc = tpc; // TPC for PUCCH: table 7.2.1-1 in 38.213 + dci_payload.pucch_resource_indicator = delta_PRI; // This is delta_PRI from 9.2.1 in 38.213 + dci_payload.pdsch_to_harq_feedback_timing_indicator.val = pucch ? pucch->timing_indicator : 0; + + LOG_D(NR_MAC, + "[RAPROC] DCI 1_0 payload: freq_alloc %d (%d,%d,%d), time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d pucchres %d harqtiming %d\n", + dci_payload.frequency_domain_assignment.val, + pdsch_pdu_rel15->rbStart, + pdsch_pdu_rel15->rbSize, + pdsch_pdu_rel15->BWPSize, + dci_payload.time_domain_assignment.val, + dci_payload.vrb_to_prb_mapping.val, + dci_payload.mcs, + dci_payload.tb_scaling, + dci_payload.pucch_resource_indicator, + dci_payload.pdsch_to_harq_feedback_timing_indicator.val); + + LOG_D(NR_MAC, + "[RAPROC] DCI params: rnti 0x%x, rnti_type %d, dci_format %d coreset params: FreqDomainResource %llx, start_symbol %d n_symb %d, BWPsize %d\n", + pdcch_pdu_rel15->dci_pdu[0].RNTI, + NR_RNTI_TC, + NR_DL_DCI_FORMAT_1_0, + (unsigned long long)pdcch_pdu_rel15->FreqDomainResource, + pdcch_pdu_rel15->StartSymbolIndex, + pdcch_pdu_rel15->DurationSymbols, + pdsch_pdu_rel15->BWPSize); + + fill_dci_pdu_rel15(scc, + ra->CellGroup, + dl_bwp, + &ra->UL_BWP, + &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci - 1], + &dci_payload, + NR_DL_DCI_FORMAT_1_0, + NR_RNTI_TC, + dl_bwp->bwp_id, + ss, + coreset, + nr_mac->cset0_bwp_size); + + LOG_D(NR_MAC,"BWPSize: %i\n", pdcch_pdu_rel15->BWPSize); + LOG_D(NR_MAC,"BWPStart: %i\n", pdcch_pdu_rel15->BWPStart); + LOG_D(NR_MAC,"SubcarrierSpacing: %i\n", pdcch_pdu_rel15->SubcarrierSpacing); + LOG_D(NR_MAC,"CyclicPrefix: %i\n", pdcch_pdu_rel15->CyclicPrefix); + LOG_D(NR_MAC,"StartSymbolIndex: %i\n", pdcch_pdu_rel15->StartSymbolIndex); + LOG_D(NR_MAC,"DurationSymbols: %i\n", pdcch_pdu_rel15->DurationSymbols); + for(int n=0;n<6;n++) LOG_D(NR_MAC,"FreqDomainResource[%i]: %x\n",n, pdcch_pdu_rel15->FreqDomainResource[n]); + LOG_D(NR_MAC,"CceRegMappingType: %i\n", pdcch_pdu_rel15->CceRegMappingType); + LOG_D(NR_MAC,"RegBundleSize: %i\n", pdcch_pdu_rel15->RegBundleSize); + LOG_D(NR_MAC,"InterleaverSize: %i\n", pdcch_pdu_rel15->InterleaverSize); + LOG_D(NR_MAC,"CoreSetType: %i\n", pdcch_pdu_rel15->CoreSetType); + LOG_D(NR_MAC,"ShiftIndex: %i\n", pdcch_pdu_rel15->ShiftIndex); + LOG_D(NR_MAC,"precoderGranularity: %i\n", pdcch_pdu_rel15->precoderGranularity); + LOG_D(NR_MAC,"numDlDci: %i\n", pdcch_pdu_rel15->numDlDci); +} + +void nr_generate_Msg3_dcch_dtch_response(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t slotP, NR_RA_t *ra) +{ + gNB_MAC_INST *nr_mac = RC.nrmac[module_idP]; + + // proceed only if it is a DL slot + if (!is_xlsch_in_slot(nr_mac->dlsch_slot_bitmap[slotP / 64], slotP)) + return; + + // UE is known by the network, C-RNTI to be used instead of TC-RNTI + int rnti = ra->crnti; + + NR_UE_info_t *UE = find_nr_UE(&nr_mac->UE_info, rnti); + if (!UE) { + LOG_E(NR_MAC, "Received Msg3 with C-RNTI but rnti %04x not in the table\n", rnti); + return; + } + + NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id]; + NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon; + NR_SearchSpace_t *ss = ra->ra_ss; + + NR_ControlResourceSet_t *coreset = ra->coreset; + AssertFatal(coreset!=NULL,"Coreset cannot be null for RA-Msg4\n"); + + // Only need to schedule DCI with and empty DL + NR_UE_DL_BWP_t *dl_bwp = &ra->DL_BWP; + long BWPStart = 0; + long BWPSize = 0; + NR_Type0_PDCCH_CSS_config_t *type0_PDCCH_CSS_config = NULL; + if(*ss->controlResourceSetId!=0) { + BWPStart = dl_bwp->BWPStart; + BWPSize = dl_bwp->BWPSize; + } else { + type0_PDCCH_CSS_config = &nr_mac->type0_PDCCH_CSS_config[ra->beam_id]; + BWPStart = type0_PDCCH_CSS_config->cset_start_rb; + BWPSize = type0_PDCCH_CSS_config->num_rbs; + } + + // get CCEindex, needed also for PUCCH and then later for PDCCH + uint8_t aggregation_level; + int CCEIndex = get_cce_index(nr_mac, + CC_id, slotP, 0, + &aggregation_level, + ss, + coreset, + &ra->sched_pdcch, + true); + + if (CCEIndex < 0) { + LOG_E(NR_MAC, "%s(): cannot find free CCE for RA RNTI 0x%04x!\n", __func__, rnti); + return; + } + + // Checking if the DCI allocation is feasible in current subframe + nfapi_nr_dl_tti_request_body_t *dl_req = &nr_mac->DL_req[CC_id].dl_tti_request_body; + if (dl_req->nPDUs > NFAPI_NR_MAX_DL_TTI_PDUS - 2) { + LOG_I(NR_MAC, "[RAPROC] Subframe %d: FAPI DL structure is full, skip scheduling UE %d\n", slotP, rnti); + return; + } + + uint8_t time_domain_assignment = get_dl_tda(nr_mac, scc, slotP); + int mux_pattern = type0_PDCCH_CSS_config ? type0_PDCCH_CSS_config->type0_pdcch_ss_mux_pattern : 1; + NR_tda_info_t tda = get_dl_tda_info(dl_bwp, ss->searchSpaceType->present, time_domain_assignment, + scc->dmrs_TypeA_Position, mux_pattern, NR_RNTI_C, coreset->controlResourceSetId, false); + + NR_pdsch_dmrs_t dmrs_info = get_dl_dmrs_params(scc, + dl_bwp, + &tda, + 1); + + int subheader_len = sizeof(NR_MAC_SUBHEADER_SHORT); + int pdu_length = subheader_len + 7; // 7 is contetion resolution length + + int mcsTableIdx = dl_bwp->mcsTableIdx; + int mcsIndex = 0; + int rbStart = 0; + int rbSize = 0; + int tb_scaling = 0; + uint32_t tb_size = 0; + + // increase PRBs until we get to BWPSize or TBS is bigger than MAC PDU size + do { + if(rbSize < BWPSize) + rbSize++; + else + mcsIndex++; + LOG_D(NR_MAC,"Calling nr_compute_tbs with N_PRB_DMRS %d, N_DMRS_SLOT %d\n",dmrs_info.N_PRB_DMRS,dmrs_info.N_DMRS_SLOT); + tb_size = nr_compute_tbs(nr_get_Qm_dl(mcsIndex, mcsTableIdx), + nr_get_code_rate_dl(mcsIndex, mcsTableIdx), + rbSize, tda.nrOfSymbols, dmrs_info.N_PRB_DMRS * dmrs_info.N_DMRS_SLOT, 0, tb_scaling,1) >> 3; + } while (tb_size < pdu_length && mcsIndex<=28); + + AssertFatal(tb_size >= pdu_length,"Cannot allocate response to MSG3 with DCCH\n"); + + int i = 0; + uint16_t *vrb_map = cc[CC_id].vrb_map; + while ((i < rbSize) && (rbStart + rbSize <= BWPSize)) { + if (vrb_map[BWPStart + rbStart + i]&SL_to_bitmap(tda.startSymbolIndex, tda.nrOfSymbols)) { + rbStart += i+1; + i = 0; + } else { + i++; + } + } + + if (rbStart > (BWPSize - rbSize)) { + LOG_E(NR_MAC, "%s(): cannot find free vrb_map for RNTI %04x!\n", __func__, rnti); + return; + } + + // Remove UE associated to TC-RNTI + mac_remove_nr_ue(nr_mac, ra->rnti); + + + // If the UE used MSG3 to transfer a DCCH or DTCH message, then contention resolution is successful if the UE receives a PDCCH transmission which has its CRC bits scrambled by the C-RNTI + // Just send padding LCID + uint8_t buf[tb_size]; + NR_MAC_SUBHEADER_FIXED *padding = (NR_MAC_SUBHEADER_FIXED *) &buf[0]; + padding->R = 0; + padding->LCID = DL_SCH_LCID_PADDING; + for(int k = 1; k < tb_size; k++) + buf[k] = 0; + + T(T_GNB_MAC_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(ra->rnti), + T_INT(frameP), T_INT(slotP), T_INT(0), T_BUFFER(buf, tb_size)); + + // SCF222: PDU index incremented for each PDSCH PDU sent in TX control message. This is used to associate control + // information to data and is reset every slot. + const int pduindex = nr_mac->pdu_index[CC_id]++; + + prepare_dl_pdus(nr_mac, ra, dl_bwp, dl_req, NULL, dmrs_info, tda, aggregation_level, CCEIndex, tb_size, 0, 0, 0, + 0, time_domain_assignment, CC_id, rnti, 0, mcsIndex, tb_scaling, pduindex, rbStart, rbSize); + + // DL TX request + nfapi_nr_pdu_t *tx_req = &nr_mac->TX_req[CC_id].pdu_list[nr_mac->TX_req[CC_id].Number_of_PDUs]; + memcpy(tx_req->TLVs[0].value.direct, buf, sizeof(uint8_t) * tb_size); + tx_req->PDU_length = tb_size; + tx_req->PDU_index = pduindex; + tx_req->num_TLV = 1; + tx_req->TLVs[0].length = tb_size + 2; + nr_mac->TX_req[CC_id].SFN = frameP; + nr_mac->TX_req[CC_id].Number_of_PDUs++; + nr_mac->TX_req[CC_id].Slot = slotP; + + // Mark the corresponding symbols and RBs as used + fill_pdcch_vrb_map(nr_mac, + CC_id, + &ra->sched_pdcch, + CCEIndex, + aggregation_level); + for (int rb = 0; rb < rbSize; rb++) + vrb_map[BWPStart + rb + rbStart] |= SL_to_bitmap(tda.startSymbolIndex, tda.nrOfSymbols); + + + // If the UE used MSG3 to transfer a DCCH or DTCH message, then contention resolution is successful upon transmission of PDCCH + LOG_A(NR_MAC, "(ue rnti 0x%04x) CBRA procedure succeeded!\n", ra->rnti); + nr_clear_ra_proc(module_idP, CC_id, frameP, ra); + UE->Msg4_ACKed = true; + UE->ra_timer = 0; + + if(!UE->CellGroup) { + // In the specific scenario where UE correctly received MSG4 (assuming it decoded RRCsetup with CellGroup) and gNB didn't correctly received an ACK, + // the UE would already have CG but the UE-dedicated gNB structure wouldn't (because RA didn't complete on gNB side). + uper_decode(NULL, + &asn_DEF_NR_CellGroupConfig, //might be added prefix later + (void **)&UE->CellGroup, + (uint8_t *)UE->cg_buf, + (UE->enc_rval.encoded+7)/8, 0, 0); + } + + NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; + process_CellGroup(UE->CellGroup, sched_ctrl); + // switching to initial BWP + configure_UE_BWP(nr_mac, scc, sched_ctrl, NULL, UE, 0, 0); + + // Reset uplink failure flags/counters/timers at MAC so gNB will resume again scheduling resources for this UE + sched_ctrl->pusch_consecutive_dtx_cnt = 0; + sched_ctrl->ul_failure = 0; +} + +void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t slotP, NR_RA_t *ra) +{ gNB_MAC_INST *nr_mac = RC.nrmac[module_idP]; NR_COMMON_channels_t *cc = &nr_mac->common_channels[CC_id]; NR_UE_DL_BWP_t *dl_bwp = &ra->DL_BWP; @@ -1418,12 +1790,6 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra uint16_t mac_sdu_length = 0; - // If UE is known by the network, C-RNTI to be used instead of TC-RNTI - rnti_t tc_rnti = ra->rnti; - if (ra->msg3_dcch_dtch) { - ra->rnti = ra->crnti; - } - NR_UE_info_t *UE = find_nr_UE(&nr_mac->UE_info, ra->rnti); if (!UE) { LOG_E(NR_MAC, "want to generate Msg4, but rnti %04x not in the table\n", ra->rnti); @@ -1435,7 +1801,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra int current_harq_pid = sched_ctrl->retrans_dl_harq.head; logical_chan_id_t lcid = DL_SCH_LCID_CCCH; - if (ra->msg3_dcch_dtch == false && current_harq_pid < 0) { + if (current_harq_pid < 0) { // Check for data on SRB0 (RRCSetup) mac_rlc_status_resp_t srb_status = mac_rlc_status_ind(module_idP, ra->rnti, module_idP, frameP, slotP, ENB_FLAG_YES, MBMS_FLAG_NO, lcid, 0, 0); @@ -1543,7 +1909,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra return; } - const int delta_PRI=0; + const int delta_PRI = 0; int r_pucch = nr_get_pucch_resource(coreset, ra->UL_BWP.pucch_Config, CCEIndex); LOG_D(NR_MAC,"[RAPROC] Msg4 r_pucch %d (CCEIndex %d, delta_PRI %d)\n", r_pucch, CCEIndex, delta_PRI); @@ -1568,11 +1934,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra add_tail_nr_list(&sched_ctrl->feedback_dl_harq, current_harq_pid); harq->is_waiting = true; ra->harq_pid = current_harq_pid; - - // Remove UE associated to TC-RNTI - if(harq->round==0 && ra->msg3_dcch_dtch) { - mac_remove_nr_ue(nr_mac, tc_rnti); - } + UE->mac_stats.dl.rounds[harq->round]++; NR_sched_pucch_t *pucch = &sched_ctrl->sched_pucch[alloc]; harq->feedback_slot = pucch->ul_slot; @@ -1582,187 +1944,45 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra uint8_t *buf = (uint8_t *) harq->transportBlock; // Bytes to be transmitted if (harq->round == 0) { - if (ra->msg3_dcch_dtch) { - // If the UE used MSG3 to transfer a DCCH or DTCH message, then contention resolution is successful if the UE receives a PDCCH transmission which has its CRC bits scrambled by the C-RNTI - // Just send padding LCID - ra->mac_pdu_length = 0; + // UE Contention Resolution Identity MAC CE + uint16_t mac_pdu_length = nr_write_ce_dlsch_pdu(module_idP, nr_mac->sched_ctrlCommon, buf, 255, ra->cont_res_id); + LOG_D(NR_MAC,"Encoded contention resolution mac_pdu_length %d\n",mac_pdu_length); + uint8_t buffer[CCCH_SDU_SIZE]; + uint8_t mac_subheader_len = sizeof(NR_MAC_SUBHEADER_SHORT); + // Get RLC data on the SRB (RRCSetup, RRCReestablishment) + mac_sdu_length = mac_rlc_data_req(module_idP, + ra->rnti, + module_idP, + frameP, + ENB_FLAG_YES, + MBMS_FLAG_NO, + lcid, + CCCH_SDU_SIZE, + (char *)buffer, + 0, + 0); + + if (mac_sdu_length < 256) { + ((NR_MAC_SUBHEADER_SHORT *)&buf[mac_pdu_length])->R = 0; + ((NR_MAC_SUBHEADER_SHORT *)&buf[mac_pdu_length])->F = 0; + ((NR_MAC_SUBHEADER_SHORT *)&buf[mac_pdu_length])->LCID = lcid; + ((NR_MAC_SUBHEADER_SHORT *)&buf[mac_pdu_length])->L = mac_sdu_length; + ra->mac_pdu_length = mac_pdu_length + mac_sdu_length + sizeof(NR_MAC_SUBHEADER_SHORT); } else { - // UE Contention Resolution Identity MAC CE - uint16_t mac_pdu_length = nr_write_ce_dlsch_pdu(module_idP, nr_mac->sched_ctrlCommon, buf, 255, ra->cont_res_id); - LOG_D(NR_MAC,"Encoded contention resolution mac_pdu_length %d\n",mac_pdu_length); - uint8_t buffer[CCCH_SDU_SIZE]; - uint8_t mac_subheader_len = sizeof(NR_MAC_SUBHEADER_SHORT); - // Get RLC data on the SRB (RRCSetup, RRCReestablishment) - mac_sdu_length = mac_rlc_data_req(module_idP, - ra->rnti, - module_idP, - frameP, - ENB_FLAG_YES, - MBMS_FLAG_NO, - lcid, - CCCH_SDU_SIZE, - (char *)buffer, - 0, - 0); - - if (mac_sdu_length < 256) { - ((NR_MAC_SUBHEADER_SHORT *)&buf[mac_pdu_length])->R = 0; - ((NR_MAC_SUBHEADER_SHORT *)&buf[mac_pdu_length])->F = 0; - ((NR_MAC_SUBHEADER_SHORT *)&buf[mac_pdu_length])->LCID = lcid; - ((NR_MAC_SUBHEADER_SHORT *)&buf[mac_pdu_length])->L = mac_sdu_length; - ra->mac_pdu_length = mac_pdu_length + mac_sdu_length + sizeof(NR_MAC_SUBHEADER_SHORT); - } else { - mac_subheader_len = sizeof(NR_MAC_SUBHEADER_LONG); - ((NR_MAC_SUBHEADER_LONG *)&buf[mac_pdu_length])->R = 0; - ((NR_MAC_SUBHEADER_LONG *)&buf[mac_pdu_length])->F = 1; - ((NR_MAC_SUBHEADER_LONG *)&buf[mac_pdu_length])->LCID = lcid; - ((NR_MAC_SUBHEADER_LONG *)&buf[mac_pdu_length])->L = htons(mac_sdu_length); - ra->mac_pdu_length = mac_pdu_length + mac_sdu_length + sizeof(NR_MAC_SUBHEADER_LONG); - } - LOG_I(NR_MAC,"Encoded RRCSetup Piggyback (%d + %d bytes), mac_pdu_length %d\n", mac_sdu_length, mac_subheader_len, ra->mac_pdu_length); - memcpy(&buf[mac_pdu_length + mac_subheader_len], buffer, mac_sdu_length); + mac_subheader_len = sizeof(NR_MAC_SUBHEADER_LONG); + ((NR_MAC_SUBHEADER_LONG *)&buf[mac_pdu_length])->R = 0; + ((NR_MAC_SUBHEADER_LONG *)&buf[mac_pdu_length])->F = 1; + ((NR_MAC_SUBHEADER_LONG *)&buf[mac_pdu_length])->LCID = lcid; + ((NR_MAC_SUBHEADER_LONG *)&buf[mac_pdu_length])->L = htons(mac_sdu_length); + ra->mac_pdu_length = mac_pdu_length + mac_sdu_length + sizeof(NR_MAC_SUBHEADER_LONG); } + LOG_I(NR_MAC,"Encoded RRCSetup Piggyback (%d + %d bytes), mac_pdu_length %d\n", mac_sdu_length, mac_subheader_len, ra->mac_pdu_length); + memcpy(&buf[mac_pdu_length + mac_subheader_len], buffer, mac_sdu_length); } - // look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially - // important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them - const int coresetid = coreset->controlResourceSetId; - nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15 = nr_mac->pdcch_pdu_idx[CC_id][coresetid]; - if (!pdcch_pdu_rel15) { - nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdcch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; - memset(dl_tti_pdcch_pdu, 0, sizeof(nfapi_nr_dl_tti_request_pdu_t)); - dl_tti_pdcch_pdu->PDUType = NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE; - dl_tti_pdcch_pdu->PDUSize = (uint8_t)(2 + sizeof(nfapi_nr_dl_tti_pdcch_pdu)); - dl_req->nPDUs += 1; - pdcch_pdu_rel15 = &dl_tti_pdcch_pdu->pdcch_pdu.pdcch_pdu_rel15; - nr_configure_pdcch(pdcch_pdu_rel15, coreset, false, &ra->sched_pdcch); - nr_mac->pdcch_pdu_idx[CC_id][coresetid] = pdcch_pdu_rel15; - } - - nfapi_nr_dl_tti_request_pdu_t *dl_tti_pdsch_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; - memset((void *)dl_tti_pdsch_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); - dl_tti_pdsch_pdu->PDUType = NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE; - dl_tti_pdsch_pdu->PDUSize = (uint8_t)(2+sizeof(nfapi_nr_dl_tti_pdsch_pdu)); - dl_req->nPDUs+=1; - nfapi_nr_dl_tti_pdsch_pdu_rel15_t *pdsch_pdu_rel15 = &dl_tti_pdsch_pdu->pdsch_pdu.pdsch_pdu_rel15; - - LOG_A(NR_MAC, "[gNB %d] [RAPROC] CC_id %d Frame %d, slotP %d: Generating RA-Msg4 DCI, state %d\n", module_idP, CC_id, frameP, slotP, ra->state); - - // SCF222: PDU index incremented for each PDSCH PDU sent in TX control message. This is used to associate control - // information to data and is reset every slot. const int pduindex = nr_mac->pdu_index[CC_id]++; - - pdsch_pdu_rel15->pduBitmap = 0; - pdsch_pdu_rel15->rnti = ra->rnti; - pdsch_pdu_rel15->pduIndex = pduindex; - pdsch_pdu_rel15->BWPSize = BWPSize; - pdsch_pdu_rel15->BWPStart = BWPStart; - pdsch_pdu_rel15->SubcarrierSpacing = dl_bwp->scs; - pdsch_pdu_rel15->CyclicPrefix = 0; - pdsch_pdu_rel15->NrOfCodewords = 1; - int R = nr_get_code_rate_dl(mcsIndex,mcsTableIdx); - pdsch_pdu_rel15->targetCodeRate[0] = R; - int Qm = nr_get_Qm_dl(mcsIndex, mcsTableIdx); - pdsch_pdu_rel15->qamModOrder[0] = Qm; - pdsch_pdu_rel15->mcsIndex[0] = mcsIndex; - pdsch_pdu_rel15->mcsTable[0] = mcsTableIdx; - pdsch_pdu_rel15->rvIndex[0] = nr_rv_round_map[harq->round%4]; - pdsch_pdu_rel15->dataScramblingId = *scc->physCellId; - pdsch_pdu_rel15->nrOfLayers = 1; - pdsch_pdu_rel15->transmissionScheme = 0; - pdsch_pdu_rel15->refPoint = 0; - pdsch_pdu_rel15->dmrsConfigType = dmrs_info.dmrsConfigType; - pdsch_pdu_rel15->dlDmrsScramblingId = *scc->physCellId; - pdsch_pdu_rel15->SCID = 0; - pdsch_pdu_rel15->numDmrsCdmGrpsNoData = dmrs_info.numDmrsCdmGrpsNoData; - pdsch_pdu_rel15->dmrsPorts = 1; - pdsch_pdu_rel15->resourceAlloc = 1; - pdsch_pdu_rel15->rbStart = rbStart; - pdsch_pdu_rel15->rbSize = rbSize; - pdsch_pdu_rel15->VRBtoPRBMapping = 0; - pdsch_pdu_rel15->StartSymbolIndex = msg4_tda.startSymbolIndex; - pdsch_pdu_rel15->NrOfSymbols = msg4_tda.nrOfSymbols; - pdsch_pdu_rel15->dlDmrsSymbPos = dmrs_info.dl_dmrs_symb_pos; - - int x_Overhead = 0; - nr_get_tbs_dl(&dl_tti_pdsch_pdu->pdsch_pdu, x_Overhead, pdsch_pdu_rel15->numDmrsCdmGrpsNoData, tb_scaling); - - int bw_tbslbrm = get_dlbw_tbslbrm(dl_bwp->initial_BWPSize, ra->CellGroup); - pdsch_pdu_rel15->maintenance_parms_v3.tbSizeLbrmBytes = nr_compute_tbslbrm(mcsTableIdx, - bw_tbslbrm, - 1); - pdsch_pdu_rel15->maintenance_parms_v3.ldpcBaseGraph = get_BG(harq->tb_size<<3,R); - - pdsch_pdu_rel15->precodingAndBeamforming.num_prgs=1; - pdsch_pdu_rel15->precodingAndBeamforming.prg_size=275; - pdsch_pdu_rel15->precodingAndBeamforming.dig_bf_interfaces=1; - pdsch_pdu_rel15->precodingAndBeamforming.prgs_list[0].pm_idx = 0; - pdsch_pdu_rel15->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx = ra->beam_id; - - /* Fill PDCCH DL DCI PDU */ - nfapi_nr_dl_dci_pdu_t *dci_pdu = &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci]; - pdcch_pdu_rel15->numDlDci++; - dci_pdu->RNTI = ra->rnti; - dci_pdu->ScramblingId = *scc->physCellId; - dci_pdu->ScramblingRNTI = 0; - dci_pdu->AggregationLevel = aggregation_level; - dci_pdu->CceIndex = CCEIndex; - dci_pdu->beta_PDCCH_1_0 = 0; - dci_pdu->powerControlOffsetSS = 1; - - dci_pdu_rel15_t dci_payload; - dci_payload.frequency_domain_assignment.val = PRBalloc_to_locationandbandwidth0(pdsch_pdu_rel15->rbSize, - pdsch_pdu_rel15->rbStart, - BWPSize); - - dci_payload.format_indicator = 1; - dci_payload.time_domain_assignment.val = time_domain_assignment; - dci_payload.vrb_to_prb_mapping.val = 0; - dci_payload.mcs = pdsch_pdu_rel15->mcsIndex[0]; - dci_payload.tb_scaling = tb_scaling; - dci_payload.rv = pdsch_pdu_rel15->rvIndex[0]; - dci_payload.harq_pid = current_harq_pid; - dci_payload.ndi = harq->ndi; - dci_payload.dai[0].val = (pucch->dai_c-1)&3; - dci_payload.tpc = sched_ctrl->tpc1; // TPC for PUCCH: table 7.2.1-1 in 38.213 - dci_payload.pucch_resource_indicator = delta_PRI; // This is delta_PRI from 9.2.1 in 38.213 - dci_payload.pdsch_to_harq_feedback_timing_indicator.val = pucch->timing_indicator; - - LOG_D(NR_MAC, - "[RAPROC] DCI 1_0 payload: freq_alloc %d (%d,%d,%d), time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d pucchres %d harqtiming %d\n", - dci_payload.frequency_domain_assignment.val, - pdsch_pdu_rel15->rbStart, - pdsch_pdu_rel15->rbSize, - pdsch_pdu_rel15->BWPSize, - dci_payload.time_domain_assignment.val, - dci_payload.vrb_to_prb_mapping.val, - dci_payload.mcs, - dci_payload.tb_scaling, - dci_payload.pucch_resource_indicator, - dci_payload.pdsch_to_harq_feedback_timing_indicator.val); - - LOG_D(NR_MAC, - "[RAPROC] DCI params: rnti 0x%x, rnti_type %d, dci_format %d coreset params: FreqDomainResource %llx, start_symbol %d n_symb %d, BWPsize %d\n", - pdcch_pdu_rel15->dci_pdu[0].RNTI, - NR_RNTI_TC, - NR_DL_DCI_FORMAT_1_0, - (unsigned long long)pdcch_pdu_rel15->FreqDomainResource, - pdcch_pdu_rel15->StartSymbolIndex, - pdcch_pdu_rel15->DurationSymbols, - pdsch_pdu_rel15->BWPSize); - - fill_dci_pdu_rel15(scc, - ra->CellGroup, - dl_bwp, - &ra->UL_BWP, - &pdcch_pdu_rel15->dci_pdu[pdcch_pdu_rel15->numDlDci - 1], - &dci_payload, - NR_DL_DCI_FORMAT_1_0, - NR_RNTI_TC, - dl_bwp->bwp_id, - ss, - coreset, - nr_mac->cset0_bwp_size); + prepare_dl_pdus(nr_mac, ra, dl_bwp, dl_req, pucch, dmrs_info, msg4_tda, aggregation_level, CCEIndex, tb_size, harq->ndi, sched_ctrl->tpc1, delta_PRI, + current_harq_pid, time_domain_assignment, CC_id, ra->rnti, harq->round, mcsIndex, tb_scaling, pduindex, rbStart, rbSize); // Add padding header and zero rest out if there is space left if (ra->mac_pdu_length < harq->tb_size) { @@ -1794,58 +2014,12 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra &ra->sched_pdcch, CCEIndex, aggregation_level); - for (int rb = 0; rb < pdsch_pdu_rel15->rbSize; rb++) { - vrb_map[BWPStart + rb + pdsch_pdu_rel15->rbStart] |= SL_to_bitmap(msg4_tda.startSymbolIndex, msg4_tda.nrOfSymbols); + for (int rb = 0; rb < rbSize; rb++) { + vrb_map[BWPStart + rb + rbStart] |= SL_to_bitmap(msg4_tda.startSymbolIndex, msg4_tda.nrOfSymbols); } - LOG_D(NR_MAC,"BWPSize: %i\n", pdcch_pdu_rel15->BWPSize); - LOG_D(NR_MAC,"BWPStart: %i\n", pdcch_pdu_rel15->BWPStart); - LOG_D(NR_MAC,"SubcarrierSpacing: %i\n", pdcch_pdu_rel15->SubcarrierSpacing); - LOG_D(NR_MAC,"CyclicPrefix: %i\n", pdcch_pdu_rel15->CyclicPrefix); - LOG_D(NR_MAC,"StartSymbolIndex: %i\n", pdcch_pdu_rel15->StartSymbolIndex); - LOG_D(NR_MAC,"DurationSymbols: %i\n", pdcch_pdu_rel15->DurationSymbols); - for(int n=0;n<6;n++) LOG_D(NR_MAC,"FreqDomainResource[%i]: %x\n",n, pdcch_pdu_rel15->FreqDomainResource[n]); - LOG_D(NR_MAC,"CceRegMappingType: %i\n", pdcch_pdu_rel15->CceRegMappingType); - LOG_D(NR_MAC,"RegBundleSize: %i\n", pdcch_pdu_rel15->RegBundleSize); - LOG_D(NR_MAC,"InterleaverSize: %i\n", pdcch_pdu_rel15->InterleaverSize); - LOG_D(NR_MAC,"CoreSetType: %i\n", pdcch_pdu_rel15->CoreSetType); - LOG_D(NR_MAC,"ShiftIndex: %i\n", pdcch_pdu_rel15->ShiftIndex); - LOG_D(NR_MAC,"precoderGranularity: %i\n", pdcch_pdu_rel15->precoderGranularity); - LOG_D(NR_MAC,"numDlDci: %i\n", pdcch_pdu_rel15->numDlDci); - - if(ra->msg3_dcch_dtch) { - // If the UE used MSG3 to transfer a DCCH or DTCH message, then contention resolution is successful upon transmission of PDCCH - LOG_A(NR_MAC, "(ue rnti 0x%04x) CBRA procedure succeeded!\n", ra->rnti); - nr_clear_ra_proc(module_idP, CC_id, frameP, ra); - UE->Msg3_dcch_dtch = true; - UE->Msg4_ACKed = true; - UE->ra_timer = 0; - - remove_front_nr_list(&sched_ctrl->feedback_dl_harq); - harq->feedback_slot = -1; - harq->is_waiting = false; - add_tail_nr_list(&sched_ctrl->available_dl_harq, current_harq_pid); - harq->round = 0; - harq->ndi ^= 1; - - if(!UE->CellGroup) - // In the specific scenario where UE correctly received MSG4 (assuming it decoded RRCsetup with CellGroup) and gNB didn't correctly received an ACK, - // the UE would already have CG but the UE-dedicated gNB structure wouldn't (because RA didn't complete on gNB side). - uper_decode(NULL, - &asn_DEF_NR_CellGroupConfig, //might be added prefix later - (void **)&UE->CellGroup, - (uint8_t *)UE->cg_buf, - (UE->enc_rval.encoded+7)/8, 0, 0); - process_CellGroup(UE->CellGroup, sched_ctrl); - configure_UE_BWP(nr_mac, scc, sched_ctrl, NULL, UE); - - // Reset uplink failure flags/counters/timers at MAC so gNB will resume again scheduling resources for this UE - UE->UE_sched_ctrl.pusch_consecutive_dtx_cnt = 0; - UE->UE_sched_ctrl.ul_failure = 0; - } else { - ra->state = WAIT_Msg4_ACK; - LOG_D(NR_MAC,"[gNB %d][RAPROC] Frame %d, Subframe %d: RA state %d\n", module_idP, frameP, slotP, ra->state); - } + ra->state = WAIT_Msg4_ACK; + LOG_D(NR_MAC,"[gNB %d][RAPROC] Frame %d, Subframe %d: RA state %d\n", module_idP, frameP, slotP, ra->state); } } @@ -1897,7 +2071,6 @@ void nr_clear_ra_proc(module_id_t module_idP, int CC_id, frame_t frameP, NR_RA_t ra->timing_offset = 0; ra->RRC_timer = 20; ra->msg3_round = 0; - ra->msg3_dcch_dtch = false; ra->crnti = 0; if(ra->cfra == false) { ra->rnti = 0; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index 8db40a26c7..3224223631 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -38,7 +38,6 @@ #include "common/utils/LOG/log.h" #include "common/utils/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" #include "RRC/NR/nr_rrc_extern.h" #include "common/utils/nr/nr_common.h" diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 08611fccd5..7d3cd511e9 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -462,6 +462,7 @@ bool allocate_dl_retransmission(module_id_t module_id, uint16_t new_rbSize; bool success = nr_find_nb_rb(retInfo->Qm, retInfo->R, + 1, // no transform precoding for DL layers, temp_tda.nrOfSymbols, temp_dmrs.N_PRB_DMRS * temp_dmrs.N_DMRS_SLOT, @@ -630,9 +631,7 @@ void pf_dl(module_id_t module_id, else sched_pdsch->mcs = get_mcs_from_bler(bo, stats, &sched_ctrl->dl_bler_stats, max_mcs, frame); sched_pdsch->nrOfLayers = get_dl_nrOfLayers(sched_ctrl, current_BWP->dci_format); - sched_pdsch->pm_index = get_pm_index(UE, - sched_pdsch->nrOfLayers, - mac->xp_pdsch_antenna_ports); + sched_pdsch->pm_index = mac->identity_pm ? 0 : get_pm_index(UE, sched_pdsch->nrOfLayers, mac->xp_pdsch_antenna_ports); const uint8_t Qm = nr_get_Qm_dl(sched_pdsch->mcs, current_BWP->mcsTableIdx); const uint16_t R = nr_get_code_rate_dl(sched_pdsch->mcs, current_BWP->mcsTableIdx); uint32_t tbs = nr_compute_tbs(Qm, @@ -764,6 +763,7 @@ void pf_dl(module_id_t module_id, //const int oh = 3 * sched_ctrl->dl_pdus_total + 2 * (frame == (sched_ctrl->ta_frame + 10) % 1024); nr_find_nb_rb(sched_pdsch->Qm, sched_pdsch->R, + 1, // no transform precoding for DL sched_pdsch->nrOfLayers, tda_info->nrOfSymbols, sched_pdsch->dmrs_parms.N_PRB_DMRS * sched_pdsch->dmrs_parms.N_DMRS_SLOT, @@ -844,7 +844,7 @@ void nr_fr1_dlsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t rballoc_mask); } -nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(module_id_t module_id, int CC_id) { +nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(int CC_id) { /* in the PF algorithm, we have to use the TBsize to compute the coefficient. * This would include the number of DMRS symbols, which in turn depends on * the time domain allocation. In case we are in a mixed slot, we do not want diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index fea0531bee..7981db7522 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -41,8 +41,6 @@ #include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/nr/nr_common.h" #include "UTIL/OPT/opt.h" -#include "OCG.h" -#include "OCG_extern.h" #include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h" @@ -515,8 +513,21 @@ void fill_pdcch_vrb_map(gNB_MAC_INST *mac, } } +bool multiple_2_3_5(int rb) +{ + while (rb % 2 == 0) + rb /= 2; + while (rb % 3 == 0) + rb /= 3; + while (rb % 5 == 0) + rb /= 5; + + return (rb == 1); +} + bool nr_find_nb_rb(uint16_t Qm, uint16_t R, + long transform_precoding, uint8_t nrOfLayers, uint16_t nb_symb_sch, uint16_t nb_dmrs_prb, @@ -526,6 +537,11 @@ bool nr_find_nb_rb(uint16_t Qm, uint32_t *tbs, uint16_t *nb_rb) { + // for transform precoding only RB = 2^a_2 * 3^a_3 * 5^a_5 is allowed with a non-negative + while(transform_precoding == NR_PUSCH_Config__transformPrecoder_enabled && + !multiple_2_3_5(nb_rb_max)) + nb_rb_max--; + /* is the maximum (not even) enough? */ *nb_rb = nb_rb_max; *tbs = nr_compute_tbs(Qm, R, *nb_rb, nb_symb_sch, nb_dmrs_prb, 0, 0, nrOfLayers) >> 3; @@ -547,6 +563,15 @@ bool nr_find_nb_rb(uint16_t Qm, int hi = nb_rb_max; int lo = nb_rb_min; for (int p = (hi + lo) / 2; lo + 1 < hi; p = (hi + lo) / 2) { + // for transform precoding only RB = 2^a_2 * 3^a_3 * 5^a_5 is allowed with a non-negative + while(transform_precoding == NR_PUSCH_Config__transformPrecoder_enabled && + !multiple_2_3_5(p)) + p++; + + // If by increasing p for transform precoding we already hit the high, break to avoid infinite loop + if (p == hi) + break; + const uint32_t TBS = nr_compute_tbs(Qm, R, p, nb_symb_sch, nb_dmrs_prb, 0, 0, nrOfLayers) >> 3; if (bytes == TBS) { hi = p; @@ -570,7 +595,7 @@ NR_pusch_dmrs_t get_ul_dmrs_params(const NR_ServingCellConfigCommon_t *scc, NR_pusch_dmrs_t dmrs = {0}; // TODO setting of cdm groups with no data to be redone for MIMO - if (ul_bwp->transform_precoding || Layers<3) + if (ul_bwp->transform_precoding && Layers < 3) dmrs.num_dmrs_cdm_grps_no_data = ul_bwp->dci_format == NR_UL_DCI_FORMAT_0_1 || tda_info->nrOfSymbols == 2 ? 1 : 2; else dmrs.num_dmrs_cdm_grps_no_data = 2; @@ -806,7 +831,6 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu, NR_PUCCH_ResourceId_t *resource_id = NULL; NR_UE_UL_BWP_t *current_BWP = &UE->current_UL_BWP; - long *id0 = NULL; int n_list, n_set; uint16_t N2,N3; int res_found = 0; @@ -820,9 +844,13 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu, long *pusch_id = pusch_Config ? pusch_Config->dataScramblingIdentityPUSCH : NULL; - if (pusch_Config && pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA != NULL) + long *id0 = NULL; + if (pusch_Config && + pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA != NULL && + pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup->transformPrecodingDisabled != NULL) id0 = pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup->transformPrecodingDisabled->scramblingID0; - else if (pusch_Config && pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB != NULL) + else if (pusch_Config && pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB != NULL && + pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->transformPrecodingDisabled != NULL) id0 = pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->transformPrecodingDisabled->scramblingID0; else id0 = scc->physCellId; @@ -2021,8 +2049,10 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac, NR_ServingCellConfigCommon_t *scc, NR_UE_sched_ctrl_t *sched_ctrl, NR_RA_t *ra, - NR_UE_info_t *UE) { - + NR_UE_info_t *UE, + int dl_bwp_switch, + int ul_bwp_switch) +{ AssertFatal((ra != NULL && UE == NULL) || (ra == NULL && UE != NULL), "RA and UE structures are mutually exlusive in BWP configuration\n"); NR_CellGroupConfig_t *CellGroup; @@ -2067,23 +2097,10 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac, target_ss = NR_SearchSpace__searchSpaceType_PR_ue_Specific; - if(UE && UE->Msg3_dcch_dtch) { - // switching to initial BWP - DL_BWP->bwp_id = 0; - UL_BWP->bwp_id = 0; - UE->Msg3_dcch_dtch = false; - - // Schedule BWP switching to the first active BWP (previous active BWP before RA with Msg3 carrying DCCH or DTCH message) - if (servingCellConfig->firstActiveDownlinkBWP_Id) { - sched_ctrl->next_dl_bwp_id = *servingCellConfig->firstActiveDownlinkBWP_Id; - } else { - sched_ctrl->next_dl_bwp_id = 0; - } - if (servingCellConfig->uplinkConfig->firstActiveUplinkBWP_Id) { - sched_ctrl->next_ul_bwp_id = *servingCellConfig->uplinkConfig->firstActiveUplinkBWP_Id; - } else { - sched_ctrl->next_ul_bwp_id = 0; - } + if(dl_bwp_switch >= 0 && ul_bwp_switch >= 0) { + AssertFatal(dl_bwp_switch == ul_bwp_switch, "Different UL and DL BWP not supported\n"); + DL_BWP->bwp_id = dl_bwp_switch; + UL_BWP->bwp_id = ul_bwp_switch; } else { // (re)configuring BWP @@ -2186,14 +2203,9 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac, UL_BWP->initial_BWPSize = NRRIV2BW(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); UL_BWP->initial_BWPStart = NRRIV2PRBOFFSET(scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - if (UL_BWP->pusch_Config == NULL || !UL_BWP->pusch_Config->transformPrecoder) - UL_BWP->transform_precoding = !scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder; - else - UL_BWP->transform_precoding = *UL_BWP->pusch_Config->transformPrecoder; - if (UL_BWP->bwp_id > 0) { - UL_BWP->pucch_ConfigCommon = ul_bwp->bwp_Common->pucch_ConfigCommon->choice.setup; - UL_BWP->rach_ConfigCommon = ul_bwp->bwp_Common->rach_ConfigCommon->choice.setup; + UL_BWP->pucch_ConfigCommon = ul_bwp->bwp_Common->pucch_ConfigCommon ? ul_bwp->bwp_Common->pucch_ConfigCommon->choice.setup : NULL; + UL_BWP->rach_ConfigCommon = ul_bwp->bwp_Common->rach_ConfigCommon ? ul_bwp->bwp_Common->rach_ConfigCommon->choice.setup : NULL; } else { UL_BWP->pucch_ConfigCommon = scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon->choice.setup; UL_BWP->rach_ConfigCommon = scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup; @@ -2276,14 +2288,17 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac, long *dl_mcs_Table = DL_BWP->pdsch_Config ? DL_BWP->pdsch_Config->mcs_Table : NULL; DL_BWP->mcsTableIdx = get_pdsch_mcs_table(dl_mcs_Table, DL_BWP->dci_format, NR_RNTI_C, target_ss); - long *ul_mcs_Table = NULL; + // 0 precoding enabled 1 precoding disabled + UL_BWP->transform_precoding = get_transformPrecoding(UL_BWP, UL_BWP->dci_format, 0); + // Set uplink MCS table + long *mcs_Table = NULL; if (UL_BWP->pusch_Config) - ul_mcs_Table = UL_BWP->transform_precoding ? - UL_BWP->pusch_Config->mcs_Table : - UL_BWP->pusch_Config->mcs_TableTransformPrecoder; + mcs_Table = UL_BWP->transform_precoding ? + UL_BWP->pusch_Config->mcs_Table : + UL_BWP->pusch_Config->mcs_TableTransformPrecoder; - UL_BWP->mcs_table = get_pusch_mcs_table(ul_mcs_Table, - UL_BWP->transform_precoding ? 0 : 1, + UL_BWP->mcs_table = get_pusch_mcs_table(mcs_Table, + !UL_BWP->transform_precoding, UL_BWP->dci_format, NR_RNTI_C, target_ss, @@ -2335,7 +2350,7 @@ NR_UE_info_t *add_new_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rntiP, NR_CellGroupConf memset(dl_bwp, 0, sizeof(*dl_bwp)); NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP; memset(ul_bwp, 0, sizeof(*ul_bwp)); - configure_UE_BWP(nr_mac, scc, sched_ctrl, NULL, UE); + configure_UE_BWP(nr_mac, scc, sched_ctrl, NULL, UE, -1, -1); /* set illegal time domain allocation to force recomputation of all fields */ sched_ctrl->sched_pdsch.time_domain_allocation = -1; @@ -2795,10 +2810,12 @@ void nr_mac_update_timers(module_id_t module_id, NR_CellGroupConfig_t *cg = NULL; uper_decode(NULL, - &asn_DEF_NR_CellGroupConfig, //might be added prefix later + &asn_DEF_NR_CellGroupConfig, // might be added prefix later (void **)&cg, (uint8_t *)UE->cg_buf, - (UE->enc_rval.encoded+7)/8, 0, 0); + (UE->enc_rval.encoded + 7) / 8, + 0, + 0); UE->CellGroup = cg; if (LOG_DEBUGFLAG(DEBUG_ASN1)) { @@ -2811,7 +2828,7 @@ void nr_mac_update_timers(module_id_t module_id, process_CellGroup(cg,&UE->UE_sched_ctrl); NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; - configure_UE_BWP(RC.nrmac[module_id], scc, sched_ctrl, NULL, UE); + configure_UE_BWP(RC.nrmac[module_id], scc, sched_ctrl, NULL, UE, -1, -1); if (get_softmodem_params()->sa) { // add all available DL HARQ processes for this UE in SA @@ -2891,35 +2908,16 @@ void UL_tti_req_ahead_initialization(gNB_MAC_INST * gNB, NR_ServingCellConfigCom } } -void send_initial_ul_rrc_message(module_id_t module_id, - int CC_id, - int rnti, - int uid, - const uint8_t *sdu, - sdu_size_t sdu_len) { - const gNB_MAC_INST *mac = RC.nrmac[module_id]; - LOG_W(MAC, - "[RAPROC] Received SDU for CCCH length %d for UE %04x\n", - sdu_len, rnti); +void send_initial_ul_rrc_message(gNB_MAC_INST *mac, int rnti, const uint8_t *sdu, sdu_size_t sdu_len, void *rawUE) +{ + LOG_W(MAC, "[RAPROC] Received SDU for CCCH length %d for UE %04x\n", sdu_len, rnti); - /* TODO REMOVE_DU_RRC: the RRC in the DU is a hack and should be taken out in the future */ - if (NODE_IS_DU(RC.nrrrc[module_id]->node_type)) { - struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_allocate_new_UE_context(RC.nrrrc[module_id]); - ue_context_p->ue_id_rnti = rnti; - ue_context_p->ue_context.rnti = rnti; - ue_context_p->ue_context.random_ue_identity = rnti; - RB_INSERT(rrc_nr_ue_tree_s, &RC.nrrrc[module_id]->rrc_ue_head, ue_context_p); - } - - const NR_ServingCellConfigCommon_t *scc = RC.nrrrc[module_id]->carrier.servingcellconfigcommon; - const NR_ServingCellConfig_t *sccd = RC.nrrrc[module_id]->configuration.scd; - NR_CellGroupConfig_t cellGroupConfig = {0}; - fill_initial_cellGroupConfig(uid, &cellGroupConfig, scc, sccd, &RC.nrrrc[module_id]->configuration); + NR_UE_info_t *UE = (NR_UE_info_t *)rawUE; uint8_t du2cu_rrc_container[1024]; asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig, NULL, - &cellGroupConfig, + UE->CellGroup, du2cu_rrc_container, sizeof(du2cu_rrc_container)); AssertFatal(enc_rval.encoded > 0, @@ -2935,5 +2933,48 @@ void send_initial_ul_rrc_message(module_id_t module_id, .du2cu_rrc_container = (uint8_t *) du2cu_rrc_container, .du2cu_rrc_container_length = (enc_rval.encoded + 7) / 8 }; - mac->mac_rrc.initial_ul_rrc_message_transfer(module_id, &ul_rrc_msg); + mac->mac_rrc.initial_ul_rrc_message_transfer(0, &ul_rrc_msg); +} + +void prepare_initial_ul_rrc_message(gNB_MAC_INST *mac, NR_UE_info_t *UE) +{ + /* create this UE's initial CellGroup */ + /* Note: relying on the RRC is a hack, as we are in the DU; there should be + * no RRC, remove in the future */ + module_id_t mod_id = 0; + gNB_RRC_INST *rrc = RC.nrrrc[mod_id]; + const NR_ServingCellConfigCommon_t *scc = rrc->carrier.servingcellconfigcommon; + const NR_ServingCellConfig_t *sccd = rrc->configuration.scd; + NR_CellGroupConfig_t *cellGroupConfig = calloc(1, sizeof(*cellGroupConfig)); + AssertFatal(cellGroupConfig != NULL, "out of memory\n"); + fill_initial_cellGroupConfig(UE->uid, cellGroupConfig, scc, sccd, &rrc->configuration); + + uint8_t du2cu_rrc_container[1024]; + asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig, + NULL, + cellGroupConfig, + du2cu_rrc_container, + sizeof(du2cu_rrc_container)); + AssertFatal(enc_rval.encoded > 0, + "Could not encode cellGroupConfig for UE %04x, failed element %s\n", + UE->rnti, + enc_rval.failed_type->name); + + UE->CellGroup = cellGroupConfig; + nr_mac_update_cellgroup(mac, UE->rnti, cellGroupConfig); + + /* TODO REMOVE_DU_RRC: the RRC in the DU is a hack and should be taken out in the future */ + if (NODE_IS_DU(rrc->node_type)) { + rrc_gNB_ue_context_t *ue = rrc_gNB_create_ue_context(UE->rnti, rrc, UE->rnti); + ue->ue_context.masterCellGroup = cellGroupConfig; + } + + /* activate SRB0 */ + nr_rlc_activate_srb0(UE->rnti, mac, UE, send_initial_ul_rrc_message); + + /* the cellGroup sent to CU specifies there is SRB1, so create it */ + DevAssert(cellGroupConfig->rlc_BearerToAddModList->list.count == 1); + const NR_RLC_BearerConfig_t *bearer = cellGroupConfig->rlc_BearerToAddModList->list.array[0]; + DevAssert(bearer->servedRadioBearer->choice.srb_Identity == 1); + nr_rlc_add_srb(UE->rnti, DCCH, bearer); } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index 25089b2edf..bc86fded1b 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -227,7 +227,7 @@ int nr_process_mac_pdu(instance_t module_idP, NR_RA_t *ra = &RC.nrmac[module_idP]->common_channels[CC_id].ra[i]; if (ra->state >= WAIT_Msg3 && ra->rnti == UE->rnti) { ra->crnti = ((pduP[1]&0xFF)<<8)|(pduP[2]&0xFF); - ra->msg3_dcch_dtch = true; + ra->state = Msg3_dcch_dtch; LOG_I(NR_MAC, "Received UL_SCH_LCID_C_RNTI with C-RNTI 0x%04x\n", ra->crnti); break; } @@ -372,8 +372,9 @@ int nr_process_mac_pdu(instance_t module_idP, mac_len = 6; } - nr_rlc_activate_srb0(UE->rnti, module_idP, CC_id, UE->uid, send_initial_ul_rrc_message); + LOG_W(MAC, "[RAPROC] Received SDU for CCCH length %d for UE %04x\n", mac_len, UE->rnti); + prepare_initial_ul_rrc_message(RC.nrmac[module_idP], UE); mac_rlc_data_ind(module_idP, UE->rnti, module_idP, @@ -755,9 +756,8 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, // harq_pid set a non valid value because it is not used in this call // the function is only called to decode the contention resolution sub-header if (nr_process_mac_pdu(gnb_mod_idP, UE, CC_idP, frameP, slotP, sduP, sdu_lenP, -1) == 0) { - ra->state = Msg4; - if (ra->msg3_dcch_dtch) { + if (ra->state == Msg3_dcch_dtch) { // Check if the UE identified by C-RNTI still exists at the gNB NR_UE_info_t * UE_C = find_nr_UE(&gNB_mac->UE_info, ra->crnti); if (!UE_C) { @@ -775,13 +775,18 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, reset_dl_harq_list(&UE_C->UE_sched_ctrl); reset_ul_harq_list(&UE_C->UE_sched_ctrl); } + LOG_I(NR_MAC, "Activating scheduling response to MSG3 with DCCH/DTCCH and RNTI 0x%04x (state %d)\n", + ra->crnti, ra->state); + } + else { + LOG_I(NR_MAC, "Activating scheduling RA-Msg4 for TC_RNTI 0x%04x (state %d)\n", + ra->rnti, ra->state); + ra->state = Msg4; } - LOG_I(NR_MAC, "Activating scheduling RA-Msg4 for TC_RNTI 0x%04x (state %d)\n", - (ra->msg3_dcch_dtch?ra->crnti:ra->rnti), ra->state); } else { - nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti); - nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); + nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti); + nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra); } } return; @@ -1037,7 +1042,7 @@ uint8_t get_max_tpmi(const NR_PUSCH_Config_t *pusch_Config, void get_precoder_matrix_coef(char *w, const uint8_t ul_ri, const uint16_t num_ue_srs_ports, - const uint8_t transform_precoding, + const long transform_precoding, const uint8_t tpmi, const uint8_t uI, int layer_idx) @@ -1064,7 +1069,7 @@ void get_precoder_matrix_coef(char *w, } int nr_srs_tpmi_estimation(const NR_PUSCH_Config_t *pusch_Config, - const uint8_t transform_precoding, + const long transform_precoding, const uint8_t *channel_matrix, const uint8_t normalized_iq_representation, const uint16_t num_gnb_antenna_elements, @@ -1439,7 +1444,7 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap) rbStart++; if (rbStart + retInfo->rbSize > bwpSize) { - LOG_W(NR_MAC, "[UE %04x][%4d.%2d] could not allocate UL retransmission: no resources (rbStart %d, retInfo->rbSize %d, bwpSize %d) \n", + LOG_D(NR_MAC, "[UE %04x][%4d.%2d] could not allocate UL retransmission: no resources (rbStart %d, retInfo->rbSize %d, bwpSize %d) \n", UE->rnti, frame, slot, @@ -1466,6 +1471,7 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, uint16_t new_rbSize; bool success = nr_find_nb_rb(retInfo->Qm, retInfo->R, + UE->current_UL_BWP.transform_precoding, nrOfLayers, tda_info.nrOfSymbols, dmrs_info.N_PRB_DMRS * dmrs_info.num_dmrs_symb, @@ -1679,7 +1685,7 @@ void pf_ul(module_id_t module_id, while (rbStart < bwpSize && (rballoc_mask[rbStart] & slbitmap) != slbitmap) rbStart++; if (rbStart + min_rb >= bwpSize) { - LOG_W(NR_MAC, "[UE %04x][%4d.%2d] could not allocate continuous UL data: no resources (rbStart %d, min_rb %d, bwpSize %d)\n", + LOG_D(NR_MAC, "[UE %04x][%4d.%2d] could not allocate continuous UL data: no resources (rbStart %d, min_rb %d, bwpSize %d)\n", UE->rnti, frame, slot, @@ -1811,6 +1817,7 @@ void pf_ul(module_id_t module_id, uint32_t TBS = 0; nr_find_nb_rb(sched_pusch->Qm, sched_pusch->R, + current_BWP->transform_precoding, sched_pusch->nrOfLayers, sched_pusch->tda_info.nrOfSymbols, sched_pusch->dmrs_info.N_PRB_DMRS * sched_pusch->dmrs_info.num_dmrs_symb, @@ -1944,7 +1951,7 @@ bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t return true; } -nr_pp_impl_ul nr_init_fr1_ulsch_preprocessor(module_id_t module_id, int CC_id) +nr_pp_impl_ul nr_init_fr1_ulsch_preprocessor(int CC_id) { /* in the PF algorithm, we have to use the TBsize to compute the coefficient. * This would include the number of DMRS symbols, which in turn depends on @@ -2170,13 +2177,14 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot) } else { pusch_pdu->ul_dmrs_scrambling_id = *scc->physCellId; - if (NR_DMRS_UplinkConfig && NR_DMRS_UplinkConfig->transformPrecodingEnabled->nPUSCH_Identity != NULL) + if (NR_DMRS_UplinkConfig && + NR_DMRS_UplinkConfig->transformPrecodingEnabled && + NR_DMRS_UplinkConfig->transformPrecodingEnabled->nPUSCH_Identity != NULL) pusch_pdu->pusch_identity = *NR_DMRS_UplinkConfig->transformPrecodingEnabled->nPUSCH_Identity; else if (NR_DMRS_UplinkConfig) pusch_pdu->pusch_identity = *scc->physCellId; } pusch_pdu->scid = 0; // DMRS sequence initialization [TS38.211, sec 6.4.1.1.1] - pusch_pdu->num_dmrs_cdm_grps_no_data = sched_pusch->dmrs_info.num_dmrs_cdm_grps_no_data; pusch_pdu->dmrs_ports = ((1<nrOfLayers) - 1); /* FAPI: Pusch Allocation in frequency domain */ @@ -2227,11 +2235,13 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot) pusch_pdu->dfts_ofdm.low_papr_group_number = pusch_pdu->pusch_identity % 30; // V as specified in section 6.4.1.1.1.2 in 38.211 V = 0 if sequence hopping and group hopping are disabled - if ((NR_DMRS_UplinkConfig==NULL) || ((NR_DMRS_UplinkConfig->transformPrecodingEnabled->sequenceGroupHopping == NULL) && - (NR_DMRS_UplinkConfig->transformPrecodingEnabled->sequenceHopping == NULL))) + if ((!NR_DMRS_UplinkConfig || + !NR_DMRS_UplinkConfig->transformPrecodingEnabled || + (!NR_DMRS_UplinkConfig->transformPrecodingEnabled->sequenceGroupHopping && !NR_DMRS_UplinkConfig->transformPrecodingEnabled->sequenceHopping)) && + !scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon->choice.setup->groupHoppingEnabledTransformPrecoding) pusch_pdu->dfts_ofdm.low_papr_sequence_number = 0; else - AssertFatal(1==0,"SequenceGroupHopping or sequenceHopping are NOT Supported\n"); + AssertFatal(1==0,"Hopping mode is not supported in transform precoding\n"); LOG_D(NR_MAC,"TRANSFORM PRECODING IS ENABLED. CDM groups: %d, U: %d MCS table: %d\n", pusch_pdu->num_dmrs_cdm_grps_no_data, pusch_pdu->dfts_ofdm.low_papr_group_number, current_BWP->mcs_table); } diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h index ff74e34c4a..fe880785aa 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_gNB/mac_proto.h @@ -33,32 +33,31 @@ #include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h" #include "NR_TAG-Id.h" +#include "common/ngran_types.h" +#include "rrc_messages_types.h" void set_cset_offset(uint16_t); void mac_top_init_gNB(ngran_node_t node_type); -void config_common(int Mod_idP, - int pdsch_AntennaPorts, - int pusch_AntennaPorts, - NR_ServingCellConfigCommon_t *scc); +void config_common(gNB_MAC_INST *nrmac, int pdsch_AntennaPorts, int pusch_AntennaPorts, NR_ServingCellConfigCommon_t *scc); int nr_mac_enable_ue_rrc_processing_timer(module_id_t Mod_idP, rnti_t rnti, NR_SubcarrierSpacing_t subcarrierSpacing, uint32_t rrc_reconfiguration_delay); -int rrc_mac_config_req_gNB(module_id_t Mod_idP, - rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts, - int pusch_AntennaPorts, - int sib1_tda, - int minRXTXTIMEpdsch, - NR_ServingCellConfigCommon_t *scc, - NR_BCCH_BCH_Message_t *mib, - NR_BCCH_DL_SCH_Message_t *sib1, - int add_ue, - uint32_t rnti, - NR_CellGroupConfig_t *CellGroup); +void nr_mac_config_scc(gNB_MAC_INST *nrmac, + rrc_pdsch_AntennaPorts_t pdsch_AntennaPorts, + int pusch_AntennaPorts, + int sib1_tda, + int minRXTXTIMEpdsch, + NR_ServingCellConfigCommon_t *scc); +void nr_mac_config_mib(gNB_MAC_INST *nrmac, NR_BCCH_BCH_Message_t *mib); +void nr_mac_config_sib1(gNB_MAC_INST *nrmac, NR_BCCH_DL_SCH_Message_t *sib1); +bool nr_mac_add_test_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig_t *CellGroup); +bool nr_mac_prepare_ra_nsa_ue(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig_t *CellGroup); +bool nr_mac_update_cellgroup(gNB_MAC_INST *nrmac, uint32_t rnti, NR_CellGroupConfig_t *CellGroup); void clear_nr_nfapi_information(gNB_MAC_INST * gNB, int CC_idP, @@ -93,7 +92,7 @@ uint32_t schedule_control_sib1(module_id_t module_id, uint16_t num_total_bytes); /* \brief default FR1 DL preprocessor init routine, returns preprocessor to call */ -nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(module_id_t module_id, int CC_id); +nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(int CC_id); void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP); @@ -105,7 +104,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP); void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot); /* \brief default FR1 UL preprocessor init routine, returns preprocessor to call */ -nr_pp_impl_ul nr_init_fr1_ulsch_preprocessor(module_id_t module_id, int CC_id); +nr_pp_impl_ul nr_init_fr1_ulsch_preprocessor(int CC_id); /////// Random Access MAC-PHY interface functions and primitives /////// @@ -343,7 +342,9 @@ void configure_UE_BWP(gNB_MAC_INST *nr_mac, NR_ServingCellConfigCommon_t *scc, NR_UE_sched_ctrl_t *sched_ctrl, NR_RA_t *ra, - NR_UE_info_t *UE); + NR_UE_info_t *UE, + int dl_bwp_switch, + int ul_bwp_switch); NR_UE_info_t* add_new_nr_ue(gNB_MAC_INST *nr_mac, rnti_t rntiP, NR_CellGroupConfig_t *CellGroup); @@ -371,6 +372,8 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_frame_t slot, NR_RA_t *ra); +void nr_generate_Msg3_dcch_dtch_response(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t slotP, NR_RA_t *ra); + int binomial(int n, int k); bool is_xlsch_in_slot(uint64_t bitmap, sub_frame_t slot); @@ -423,7 +426,7 @@ int16_t ssb_index_from_prach(module_id_t module_idP, uint8_t freq_index, uint8_t symbol); -void find_SSB_and_RO_available(module_id_t module_idP); +void find_SSB_and_RO_available(gNB_MAC_INST *nrmac); NR_pdsch_dmrs_t get_dl_dmrs_params(const NR_ServingCellConfigCommon_t *scc, const NR_UE_DL_BWP_t *BWP, @@ -457,6 +460,7 @@ int get_cce_index(const gNB_MAC_INST *nrmac, bool nr_find_nb_rb(uint16_t Qm, uint16_t R, + long transform_precoding, uint8_t nrOfLayers, uint16_t nb_symb_sch, uint16_t nb_dmrs_prb, @@ -482,12 +486,8 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset void process_CellGroup(NR_CellGroupConfig_t *CellGroup, NR_UE_sched_ctrl_t *sched_ctrl); -void send_initial_ul_rrc_message(module_id_t module_id, - int CC_id, - int rnti, - int uid, - const uint8_t *sdu, - sdu_size_t sdu_len); +void prepare_initial_ul_rrc_message(gNB_MAC_INST *mac, NR_UE_info_t *UE); +void send_initial_ul_rrc_message(gNB_MAC_INST *mac, int rnti, const uint8_t *sdu, sdu_size_t sdu_len, void *rawUE); void abort_nr_dl_harq(NR_UE_info_t* UE, int8_t harq_pid); diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c index 3213143db9..0a47699591 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c +++ b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c @@ -29,108 +29,10 @@ #include "NR_DL-CCCH-Message.h" #include "NR_CellGroupConfig.h" -int dl_rrc_message_rrcSetup(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc, NR_RRCSetup_t *rrcSetup); - int dl_rrc_message(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc) { - /* dispatch message to dl_rrc_message_rrcSetup() and others, similar to as is - * done in the DU (should be the same here) */ - LOG_I(NR_MAC, "DL RRC Message Transfer with %d bytes for RNTI %04x SRB %d\n", dl_rrc->rrc_container_length, dl_rrc->rnti, dl_rrc->srb_id); - if (dl_rrc->srb_id == CCCH) { // SRB 0 - - NR_DL_CCCH_Message_t *dl_ccch_msg = NULL; - asn_dec_rval_t dec_rval = uper_decode(NULL, - &asn_DEF_NR_DL_CCCH_Message, - (void **) &dl_ccch_msg, - dl_rrc->rrc_container, - dl_rrc->rrc_container_length, - 0, - 0); - AssertFatal(dec_rval.code == RC_OK, "could not decode F1AP message\n"); - - switch (dl_ccch_msg->message.choice.c1->present) { - case NR_DL_CCCH_MessageType__c1_PR_NOTHING: - LOG_W(NR_MAC, "Received NOTHING on DL-CCCH-Message\n"); - break; - case NR_DL_CCCH_MessageType__c1_PR_rrcReject: - LOG_D(NR_MAC, "DL-CCCH/SRB0, received rrcReject for RNTI %04x\n", dl_rrc->rnti); - AssertFatal(0, "rrcReject not implemented yet\n"); - break; - case NR_DL_CCCH_MessageType__c1_PR_rrcSetup: - LOG_I(NR_MAC, "DL-CCCH/SRB0, received rrcSetup for RNTI %04x\n", dl_rrc->rnti); - return dl_rrc_message_rrcSetup(module_id, dl_rrc, dl_ccch_msg->message.choice.c1->choice.rrcSetup); - break; - case NR_DL_CCCH_MessageType__c1_PR_spare2: - LOG_W(NR_MAC, "DL-CCCH/SRB0, received spare2\n"); - break; - case NR_DL_CCCH_MessageType__c1_PR_spare1: - LOG_W(NR_MAC, "DL-CCCH/SRB0, received spare1\n"); - break; - default: - AssertFatal(0 == 1, "Unknown DL-CCCH/SRB0 message %d\n", dl_ccch_msg->message.choice.c1->present); - break; - } - return 0; - } else if (dl_rrc->srb_id == DCCH) { // SRB 1 - nr_rlc_srb_recv_sdu(dl_rrc->rnti, DCCH, dl_rrc->rrc_container, dl_rrc->rrc_container_length); - return 0; - } else if (dl_rrc->srb_id == DCCH1) { // SRB 2 - nr_rlc_srb_recv_sdu(dl_rrc->rnti, DCCH1, dl_rrc->rrc_container, dl_rrc->rrc_container_length); - return 0; - } - - return -1; /* not handled yet */ -} - -int dl_rrc_message_rrcSetup(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc, NR_RRCSetup_t *rrcSetup) -{ - DevAssert(rrcSetup != NULL); - - NR_RRCSetup_IEs_t *rrcSetup_ies = rrcSetup->criticalExtensions.choice.rrcSetup; - AssertFatal(rrcSetup_ies->masterCellGroup.buf != NULL,"masterCellGroup is NULL\n"); - NR_CellGroupConfig_t *cellGroup = NULL; - asn_dec_rval_t dec_rval = uper_decode(NULL, - &asn_DEF_NR_CellGroupConfig, - (void **)&cellGroup, - rrcSetup_ies->masterCellGroup.buf, - rrcSetup_ies->masterCellGroup.size, - 0, - 0); - AssertFatal(dec_rval.code == RC_OK, "could not decode masterCellGroup\n"); - - /* there might be a memory leak for the cell group if we call this multiple - * times. Also, the first parameters of rrc_mac_config_req_gNB() are only - * relevant when setting the scc, which we don't do (and cannot do) here. */ - rrc_pdsch_AntennaPorts_t pap = {0}; - rrc_mac_config_req_gNB(module_id, - pap, /* only when scc != NULL */ - 0, /* only when scc != NULL */ - 0, /* only when scc != NULL */ - 0, /* only when scc != NULL */ - NULL, /* scc */ - NULL, /* mib */ - NULL, /* sib1 */ - 0, /* add_ue */ - dl_rrc->rnti, - cellGroup); - - /* TODO: drop the RRC context */ - gNB_RRC_INST *rrc = RC.nrrrc[module_id]; - struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(rrc, dl_rrc->rnti); - gNB_RRC_UE_t *ue_p = &ue_context_p->ue_context; - ue_p->SRB_configList = rrcSetup_ies->radioBearerConfig.srb_ToAddModList; - ue_p->masterCellGroup = cellGroup; - - nr_rlc_srb_recv_sdu(dl_rrc->rnti, CCCH, dl_rrc->rrc_container, dl_rrc->rrc_container_length); - - protocol_ctxt_t ctxt = {.module_id = module_id, .rntiMaybeUEid = dl_rrc->rnti}; - nr_rrc_rlc_config_asn1_req(&ctxt, - ue_context_p->ue_context.SRB_configList, - NULL, - NULL, - cellGroup->rlc_BearerToAddModList); - + nr_rlc_srb_recv_sdu(dl_rrc->rnti, dl_rrc->srb_id, dl_rrc->rrc_container, dl_rrc->rrc_container_length); return 0; } diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_direct.c b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_direct.c index 25ee7feb14..ace8b17f49 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_direct.c +++ b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_direct.c @@ -20,6 +20,7 @@ */ #include "nr_mac_gNB.h" +#include "intertask_interface.h" #include "mac_rrc_ul.h" diff --git a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_f1ap.c b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_f1ap.c index 65e7f10405..13547c5291 100644 --- a/openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_f1ap.c +++ b/openair2/LAYER2/NR_MAC_gNB/mac_rrc_ul_f1ap.c @@ -20,6 +20,7 @@ */ #include "nr_mac_gNB.h" +#include "intertask_interface.h" #include "mac_rrc_ul.h" diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c index e9d41986c5..f78e7f224f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/main.c +++ b/openair2/LAYER2/NR_MAC_gNB/main.c @@ -33,6 +33,7 @@ #include "NR_MAC_gNB/mac_proto.h" #include "NR_MAC_COMMON/nr_mac_extern.h" #include "assertions.h" +#include "pdcp.h" #include "LAYER2/nr_pdcp/nr_pdcp_entity.h" #include "RRC/NR/nr_rrc_defs.h" @@ -238,8 +239,8 @@ void mac_top_init_gNB(ngran_node_t node_type) RC.nrmac[i]->pre_processor_dl = nr_preprocessor_phytest; RC.nrmac[i]->pre_processor_ul = nr_ul_preprocessor_phytest; } else { - RC.nrmac[i]->pre_processor_dl = nr_init_fr1_dlsch_preprocessor(i, 0); - RC.nrmac[i]->pre_processor_ul = nr_init_fr1_ulsch_preprocessor(i, 0); + RC.nrmac[i]->pre_processor_dl = nr_init_fr1_dlsch_preprocessor(0); + RC.nrmac[i]->pre_processor_ul = nr_init_fr1_ulsch_preprocessor(0); } if (!IS_SOFTMODEM_NOSTATS_BIT) threadCreate(&RC.nrmac[i]->stats_thread, nrmac_stats_thread, (void*)RC.nrmac[i], "MAC_STATS", -1, sched_get_priority_min(SCHED_OAI)+1 ); diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index b4fa43c40f..96734aa8b1 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -51,6 +51,7 @@ /* RRC */ #include "NR_BCCH-BCH-Message.h" #include "NR_CellGroupConfig.h" +#include "NR_BCCH-DL-SCH-Message.h" /* PHY */ #include "time_meas.h" @@ -63,6 +64,7 @@ /* MAC */ #include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h" #include "LAYER2/NR_MAC_COMMON/nr_mac_common.h" +#include "LAYER2/MAC/mac.h" #include "NR_TAG.h" #include @@ -94,8 +96,9 @@ typedef enum { Msg2 = 1, WAIT_Msg3 = 2, Msg3_retransmission = 3, - Msg4 = 4, - WAIT_Msg4_ACK = 5 + Msg3_dcch_dtch = 4, + Msg4 = 5, + WAIT_Msg4_ACK = 6 } RA_gNB_state_t; typedef struct NR_preamble_ue { @@ -163,8 +166,6 @@ typedef struct { uint8_t msg3_cqireq; /// Round of Msg3 HARQ uint8_t msg3_round; - /// Flag to indicate if Msg3 carries a DCCH or DTCH message - bool msg3_dcch_dtch; int msg3_startsymb; int msg3_nrsymb; /// TBS used for Msg4 @@ -195,8 +196,6 @@ typedef struct { /*! \brief gNB common channels */ typedef struct { - int physCellId; - int p_gNB; int Ncp; int nr_band; frame_type_t frame_type; @@ -659,7 +658,6 @@ typedef struct { asn_enc_rval_t enc_rval; // UE selected beam index uint8_t UE_beam_index; - bool Msg3_dcch_dtch; bool Msg4_ACKed; uint32_t ra_timer; float ul_thr_ue; @@ -799,7 +797,7 @@ typedef struct gNB_MAC_INST_s { NR_bler_options_t ul_bler; uint8_t min_grant_prb; uint8_t min_grant_mcs; - + bool identity_pm; nr_mac_rrc_ul_if_t mac_rrc; int16_t frame; diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c index f1fefc6973..b0b4e235c6 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp.c @@ -40,8 +40,6 @@ #include "LAYER2/MAC/mac_extern.h" #include "RRC/LTE/rrc_proto.h" #include "pdcp_primitives.h" -#include "OCG.h" -#include "OCG_extern.h" #include "otg_rx.h" #include "common/utils/LOG/log.h" #include @@ -57,6 +55,7 @@ #include "intertask_interface.h" #include "openair3/S1AP/s1ap_eNB.h" #include +#include "pdcp.h" # include "openair3/ocp-gtpu/gtp_itf.h" #include diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c index a909343965..11ee36669b 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c @@ -51,8 +51,6 @@ extern int otg_enabled; #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "NETWORK_DRIVER/LITE/constant.h" //#include "SIMULATION/ETH_TRANSPORT/extern.h" -#include "UTIL/OCG/OCG.h" -#include "UTIL/OCG/OCG_extern.h" #include "common/utils/LOG/log.h" #include "UTIL/OTG/otg_tx.h" #include "nfapi/oai_integration/vendor_ext.h" diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c index 0bd1b8fa8d..b832fee136 100644 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_netlink.c @@ -54,8 +54,6 @@ #include "common/utils/LOG/log.h" #include "common/utils/system.h" -#include "UTIL/OCG/OCG.h" -#include "UTIL/OCG/OCG_extern.h" #include "LAYER2/MAC/mac_extern.h" #include "pdcp.h" diff --git a/openair2/LAYER2/RLC/rlc.h b/openair2/LAYER2/RLC/rlc.h index 32c3a70ea7..84d4b89b1c 100644 --- a/openair2/LAYER2/RLC/rlc.h +++ b/openair2/LAYER2/RLC/rlc.h @@ -184,13 +184,6 @@ rlc_op_status_t rrc_rlc_config_req(const protocol_ctxt_t *const, const srb_flag_ */ rlc_op_status_t rrc_rlc_data_req (const protocol_ctxt_t *const, const MBMS_flag_t, const rb_id_t, mui_t, confirm_t, sdu_size_t, char *); -/*! \fn void rrc_rlc_register_rrc ( void (*rrc_data_indP) (const protocol_ctxt_t* const ctxtP, const rb_id_t rb_idP, sdu_size_t sdu_sizeP, char* sduP), void (*rrc_data_confP) (const protocol_ctxt_t* const ctxtP, const rb_id_t rb_idP, mui_t muiP, rlc_tx_status_t statusP) -* \brief This function is called by RRC to register its DATA-INDICATE and DATA-CONFIRM handlers to RLC layer. -* \param[in] rrc_data_indP Pointer on RRC data indicate function. -* \param[in] rrc_data_confP Pointer on RRC data confirm callback function. -*/ -void rrc_rlc_register_rrc (rrc_data_ind_cb_t rrc_data_indP, rrc_data_conf_cb_t rrc_data_confP); - //----------------------------------------------------------------------------- // PUBLIC INTERFACE WITH MAC //----------------------------------------------------------------------------- diff --git a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c index 87e3d53ff5..e4bb7bb4f5 100644 --- a/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c +++ b/openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c @@ -1121,7 +1121,7 @@ void nr_DRB_preconfiguration(ue_id_t crntiMaybeUEid) nr_pdcp_add_drbs(ctxt.enb_flag, ctxt.rntiMaybeUEid, 0, rbconfig->drb_ToAddModList, 0, NULL, NULL, Rlc_Bearer_ToAdd_list); - nr_rrc_rlc_config_asn1_req(&ctxt, (NR_SRB_ToAddModList_t *)NULL, rbconfig->drb_ToAddModList, rbconfig->drb_ToReleaseList, Rlc_Bearer_ToAdd_list); + nr_rlc_add_drb(ctxt.rntiMaybeUEid, drb_ToAddMod->drb_Identity, RLC_BearerConfig); LOG_D(PDCP, "%s:%d: done RRC PDCP/RLC ASN1 request for UE ID/RNTI %ld\n", __FUNCTION__, __LINE__, ctxt.rntiMaybeUEid); } diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c index 60c002537a..dab6f9fe58 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c @@ -683,14 +683,13 @@ rb_found: #endif } -static void add_rlc_srb(int rnti, struct NR_SRB_ToAddMod *s, NR_RLC_BearerConfig_t *rlc_BearerConfig) +void nr_rlc_add_srb(int rnti, int srb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig) { nr_rlc_entity_t *nr_rlc_am; nr_rlc_ue_t *ue; struct NR_RLC_Config *r = rlc_BearerConfig->rlc_Config; struct NR_LogicalChannelConfig *l = rlc_BearerConfig->mac_LogicalChannelConfig; - int srb_id = s->srb_Identity; int channel_id = rlc_BearerConfig->logicalChannelIdentity; int logical_channel_group; @@ -774,14 +773,13 @@ static void add_rlc_srb(int rnti, struct NR_SRB_ToAddMod *s, NR_RLC_BearerConfig nr_rlc_manager_unlock(nr_rlc_ue_manager); } -static void add_drb_am(int rnti, struct NR_DRB_ToAddMod *s, NR_RLC_BearerConfig_t *rlc_BearerConfig) +static void add_drb_am(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig) { nr_rlc_entity_t *nr_rlc_am; nr_rlc_ue_t *ue; struct NR_RLC_Config *r = rlc_BearerConfig->rlc_Config; struct NR_LogicalChannelConfig *l = rlc_BearerConfig->mac_LogicalChannelConfig; - int drb_id = s->drb_Identity; int channel_id = rlc_BearerConfig->logicalChannelIdentity; int logical_channel_group; @@ -856,14 +854,13 @@ static void add_drb_am(int rnti, struct NR_DRB_ToAddMod *s, NR_RLC_BearerConfig_ nr_rlc_manager_unlock(nr_rlc_ue_manager); } -static void add_drb_um(int rnti, struct NR_DRB_ToAddMod *s, NR_RLC_BearerConfig_t *rlc_BearerConfig) +static void add_drb_um(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig) { nr_rlc_entity_t *nr_rlc_um; nr_rlc_ue_t *ue; struct NR_RLC_Config *r = rlc_BearerConfig->rlc_Config; struct NR_LogicalChannelConfig *l = rlc_BearerConfig->mac_LogicalChannelConfig; - int drb_id = s->drb_Identity; int channel_id = rlc_BearerConfig->logicalChannelIdentity; int logical_channel_group; @@ -924,14 +921,14 @@ static void add_drb_um(int rnti, struct NR_DRB_ToAddMod *s, NR_RLC_BearerConfig_ nr_rlc_manager_unlock(nr_rlc_ue_manager); } -static void add_drb(int rnti, struct NR_DRB_ToAddMod *s, struct NR_RLC_BearerConfig *rlc_BearerConfig) +void nr_rlc_add_drb(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig) { switch (rlc_BearerConfig->rlc_Config->present) { case NR_RLC_Config_PR_am: - add_drb_am(rnti, s, rlc_BearerConfig); + add_drb_am(rnti, drb_id, rlc_BearerConfig); break; case NR_RLC_Config_PR_um_Bi_Directional: - add_drb_um(rnti, s, rlc_BearerConfig); + add_drb_um(rnti, drb_id, rlc_BearerConfig); break; default: LOG_E(RLC, "%s:%d:%s: fatal: unhandled DRB type\n", @@ -953,96 +950,32 @@ rlc_op_status_t rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP return 0; } -rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP, - const NR_SRB_ToAddModList_t * const srb2add_listP, - const NR_DRB_ToAddModList_t * const drb2add_listP, - const NR_DRB_ToReleaseList_t * const drb2release_listP, - struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list) -{ - int rnti = ctxt_pP->rntiMaybeUEid; - int i; - int j; - - if (/*ctxt_pP->enb_flag != 1 ||*/ ctxt_pP->module_id != 0 /*|| - ctxt_pP->instance != 0 || ctxt_pP->eNB_index != 0 || - ctxt_pP->brOption != 0 */) { - LOG_E(RLC, "%s: ctxt_pP not handled (%d %d %ld %d %d)\n", __FUNCTION__, - ctxt_pP->enb_flag , ctxt_pP->module_id, ctxt_pP->instance, - ctxt_pP->eNB_index, ctxt_pP->brOption); - exit(1); - } - - if (drb2release_listP != NULL) { - LOG_E(RLC, "%s:%d:%s: TODO\n", __FILE__, __LINE__, __FUNCTION__); - //exit(1); - } - - if (srb2add_listP != NULL) { - for (i = 0; i < srb2add_listP->list.count; i++) { - if (rlc_bearer2add_list != NULL) { - for(j = 0; j < rlc_bearer2add_list->list.count; j++){ - if(rlc_bearer2add_list->list.array[j]->servedRadioBearer != NULL){ - if(rlc_bearer2add_list->list.array[j]->servedRadioBearer->present == NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity){ - if(srb2add_listP->list.array[i]->srb_Identity == rlc_bearer2add_list->list.array[j]->servedRadioBearer->choice.srb_Identity){ - add_rlc_srb(rnti, srb2add_listP->list.array[i], rlc_bearer2add_list->list.array[j]); - LOG_D(RLC, "Add srb %ld\n", srb2add_listP->list.array[i]->srb_Identity); - } - } - } - } - } - - } - } - - if ((drb2add_listP != NULL) && (rlc_bearer2add_list != NULL)) { - for (i = 0; i < drb2add_listP->list.count; i++) { - if (rlc_bearer2add_list != NULL) { - for(j = 0; j < rlc_bearer2add_list->list.count; j++){ - if(rlc_bearer2add_list->list.array[j]->servedRadioBearer != NULL){ - if(rlc_bearer2add_list->list.array[j]->servedRadioBearer->present == NR_RLC_BearerConfig__servedRadioBearer_PR_drb_Identity){ - if(drb2add_listP->list.array[i]->drb_Identity == rlc_bearer2add_list->list.array[j]->servedRadioBearer->choice.drb_Identity){ - add_drb(rnti, drb2add_listP->list.array[i], rlc_bearer2add_list->list.array[j]); - } - } - } - } - } - } - } - - return RLC_OP_STATUS_OK; -} - struct srb0_data { - int module_id; - int CC_id; + struct gNB_MAC_INST_s *mac; int rnti; - int uid; - void (*send_initial_ul_rrc_message)(module_id_t module_id, - int CC_id, - int rnti, - int uid, - const uint8_t *sdu, - sdu_size_t sdu_len); + void *rawUE; + void (*send_initial_ul_rrc_message)(struct gNB_MAC_INST_s *mac, + int rnti, + const uint8_t *sdu, + sdu_size_t sdu_len, + void *rawUE); }; void deliver_sdu_srb0(void *deliver_sdu_data, struct nr_rlc_entity_t *entity, char *buf, int size) { struct srb0_data *s0 = (struct srb0_data *)deliver_sdu_data; - s0->send_initial_ul_rrc_message(s0->module_id, s0->CC_id, s0->rnti, s0->uid, - (unsigned char *)buf, size); + s0->send_initial_ul_rrc_message(s0->mac, s0->rnti, (unsigned char *)buf, + size, s0->rawUE); } -void nr_rlc_activate_srb0(int rnti, int module_id, int cc_id, int uid, +void nr_rlc_activate_srb0(int rnti, struct gNB_MAC_INST_s *mac, void *rawUE, void (*send_initial_ul_rrc_message)( - module_id_t module_id, - int CC_id, - int rnti, - int uid, - const uint8_t *sdu, - sdu_size_t sdu_len)) + struct gNB_MAC_INST_s *mac, + int rnti, + const uint8_t *sdu, + sdu_size_t sdu_len, + void *rawUE)) { nr_rlc_entity_t *nr_rlc_tm; nr_rlc_ue_t *ue; @@ -1051,10 +984,9 @@ void nr_rlc_activate_srb0(int rnti, int module_id, int cc_id, int uid, srb0_data = calloc(1, sizeof(struct srb0_data)); AssertFatal(srb0_data != NULL, "out of memory\n"); - srb0_data->module_id = module_id; - srb0_data->CC_id = cc_id; + srb0_data->mac = mac; srb0_data->rnti = rnti; - srb0_data->uid = uid; + srb0_data->rawUE = rawUE; srb0_data->send_initial_ul_rrc_message = send_initial_ul_rrc_message; nr_rlc_manager_lock(nr_rlc_ue_manager); @@ -1132,11 +1064,6 @@ rlc_op_status_t rrc_rlc_config_req ( return RLC_OP_STATUS_OK; } -void rrc_rlc_register_rrc (rrc_data_ind_cb_t rrc_data_indP, rrc_data_conf_cb_t rrc_data_confP) -{ - /* nothing to do */ -} - void nr_rlc_remove_ue(int rnti) { LOG_W(RLC, "remove UE %x\n", rnti); diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h index f6d280c908..38a99dc86f 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h +++ b/openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h @@ -36,9 +36,6 @@ #include "NR_CellGroupConfig.h" #include "openair2/RRC/NR/nr_rrc_proto.h" -/* from OAI */ -#include "pdcp.h" - struct NR_RLC_Config; struct NR_LogicalChannelConfig; @@ -48,6 +45,9 @@ void nr_drb_config(struct NR_RLC_Config *rlc_Config, NR_RLC_Config_PR rlc_config void nr_rlc_bearer_init_ul_spec(struct NR_LogicalChannelConfig *mac_LogicalChannelConfig); +void nr_rlc_add_srb(int rnti, int srb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig); +void nr_rlc_add_drb(int rnti, int drb_id, const NR_RLC_BearerConfig_t *rlc_BearerConfig); + void nr_rlc_remove_ue(int rnti); int nr_rlc_get_available_tx_space( @@ -61,11 +61,11 @@ void nr_rlc_activate_avg_time_to_tx( void nr_rlc_srb_recv_sdu(const int rnti, const logical_chan_id_t channel_id, unsigned char *buf, int size); -void nr_rlc_activate_srb0(int rnti, int module_id, int cc_id, int uid, +struct gNB_MAC_INST_s; +void nr_rlc_activate_srb0(int rnti, struct gNB_MAC_INST_s *mac, void *rawUE, void (*send_initial_ul_rrc_message)( - module_id_t module_id, - int CC_id, - int rnti, - int uid, - const uint8_t *sdu, - sdu_size_t sdu_len)); + struct gNB_MAC_INST_s *mac, + int rnti, + const uint8_t *sdu, + sdu_size_t sdu_len, + void *rawUE)); diff --git a/openair2/LAYER2/rlc_v2/rlc_oai_api.c b/openair2/LAYER2/rlc_v2/rlc_oai_api.c index d45640bbfa..3e191595dd 100644 --- a/openair2/LAYER2/rlc_v2/rlc_oai_api.c +++ b/openair2/LAYER2/rlc_v2/rlc_oai_api.c @@ -976,11 +976,6 @@ rlc_op_status_t rrc_rlc_config_req ( return RLC_OP_STATUS_OK; } -void rrc_rlc_register_rrc (rrc_data_ind_cb_t rrc_data_indP, rrc_data_conf_cb_t rrc_data_confP) -{ - /* nothing to do */ -} - rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t* const x) { LOG_D(RLC, "%s:%d:%s: remove UE %ld\n", __FILE__, __LINE__, __FUNCTION__, x->rntiMaybeUEid); diff --git a/openair2/M2AP/m2ap_MCE.c b/openair2/M2AP/m2ap_MCE.c index e5e924e018..3c4dce3162 100644 --- a/openair2/M2AP/m2ap_MCE.c +++ b/openair2/M2AP/m2ap_MCE.c @@ -711,7 +711,7 @@ int is_m2ap_MCE_enabled(void) char *enable_m2 = NULL; paramdef_t p[] = { - { "enable_mce_m2", "yes/no", 0, strptr:&enable_m2, defstrval:"", TYPE_STRING, 0 } + { "enable_mce_m2", "yes/no", 0, .strptr=&enable_m2, .defstrval="", TYPE_STRING, 0 } }; /* TODO: do it per module - we check only first MCE */ diff --git a/openair2/M2AP/m2ap_eNB.c b/openair2/M2AP/m2ap_eNB.c index c72eda7d8c..bc74ec7fa6 100644 --- a/openair2/M2AP/m2ap_eNB.c +++ b/openair2/M2AP/m2ap_eNB.c @@ -702,7 +702,7 @@ int is_m2ap_eNB_enabled(void) char *enable_m2 = NULL; paramdef_t p[] = { - { "enable_enb_m2", "yes/no", 0, strptr:&enable_m2, defstrval:"", TYPE_STRING, 0 } + { "enable_enb_m2", "yes/no", 0, .strptr=&enable_m2, .defstrval="", TYPE_STRING, 0 } }; /* TODO: do it per module - we check only first eNB */ diff --git a/openair2/NR_PHY_INTERFACE/NR_IF_Module.h b/openair2/NR_PHY_INTERFACE/NR_IF_Module.h index 1fb08d6ba8..47e961da2b 100644 --- a/openair2/NR_PHY_INTERFACE/NR_IF_Module.h +++ b/openair2/NR_PHY_INTERFACE/NR_IF_Module.h @@ -33,6 +33,7 @@ #ifndef __NR_IF_MODULE__H__ #define __NR_IF_MODULE__H__ +#include #include #include "nfapi_nr_interface.h" #include "nfapi_nr_interface_scf.h" diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c index 27adaa39bc..87d8527eb9 100644 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c @@ -736,7 +736,7 @@ void check_and_process_dci(nfapi_nr_dl_tti_request_t *dl_tti_request, NR_UL_TIME_ALIGNMENT_t ul_time_alignment; memset(&ul_time_alignment, 0, sizeof(ul_time_alignment)); fill_dci_from_dl_config(&mac->dl_info, &mac->dl_config_request); - nr_ue_scheduler(&mac->dl_info, NULL); + nr_ue_dl_scheduler(&mac->dl_info); nr_ue_dl_indication(&mac->dl_info, &ul_time_alignment); if (pthread_mutex_unlock(&mac->mutex_dl_info)) abort(); @@ -756,8 +756,7 @@ void check_and_process_dci(nfapi_nr_dl_tti_request_t *dl_tti_request, mac->scc_SIB->tdd_UL_DL_ConfigurationCommon, ul_info.slot_tx, mac->frame_type) && mac->ra.ra_state != RA_SUCCEEDED) { - nr_ue_scheduler(NULL, &ul_info); - nr_ue_prach_scheduler(ul_info.module_id, ul_info.frame_tx, ul_info.slot_tx); + nr_ue_ul_scheduler(&ul_info); } } } @@ -1115,36 +1114,17 @@ void update_harq_status(module_id_t module_id, uint8_t harq_pid, uint8_t ack_nac } } -int nr_ue_ul_indication(nr_uplink_indication_t *ul_info){ - - NR_UE_L2_STATE_t ret=0; +int nr_ue_ul_indication(nr_uplink_indication_t *ul_info) +{ module_id_t module_id = ul_info->module_id; NR_UE_MAC_INST_t *mac = get_mac_inst(module_id); - NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon = mac->scc != NULL ? mac->scc->tdd_UL_DL_ConfigurationCommon : mac->scc_SIB->tdd_UL_DL_ConfigurationCommon; LOG_T(NR_MAC, "In %s():%d not calling scheduler mac->ra.ra_state = %d\n", __FUNCTION__, __LINE__, mac->ra.ra_state); - ret = nr_ue_scheduler(NULL, ul_info); - if (is_nr_UL_slot(tdd_UL_DL_ConfigurationCommon, ul_info->slot_tx, mac->frame_type)) { - nr_ue_pucch_scheduler(module_id, ul_info->frame_tx, ul_info->slot_tx, ul_info->phy_data); - if (!get_softmodem_params()->phy_test) - nr_ue_prach_scheduler(module_id, ul_info->frame_tx, ul_info->slot_tx); - } - - switch(ret){ - case UE_CONNECTION_OK: - break; - case UE_CONNECTION_LOST: - break; - case UE_PHY_RESYNCH: - break; - case UE_PHY_HO_PRACH: - break; - default: - break; - } - + NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon = mac->scc != NULL ? mac->scc->tdd_UL_DL_ConfigurationCommon : mac->scc_SIB->tdd_UL_DL_ConfigurationCommon; + if (mac->phy_config_request_sent && is_nr_UL_slot(tdd_UL_DL_ConfigurationCommon, ul_info->slot_tx, mac->frame_type)) + nr_ue_ul_scheduler(ul_info); return 0; } @@ -1157,11 +1137,11 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_ if ((!dl_info->dci_ind && !dl_info->rx_ind)) { // UL indication to schedule DCI reception - nr_ue_scheduler(dl_info, NULL); + if (mac->phy_config_request_sent) + nr_ue_dl_scheduler(dl_info); } else { // UL indication after reception of DCI or DL PDU if (dl_info && dl_info->dci_ind && dl_info->dci_ind->number_of_dcis) { - LOG_T(MAC,"[L2][IF MODULE][DL INDICATION][DCI_IND]\n"); for (int i = 0; i < dl_info->dci_ind->number_of_dcis; i++) { LOG_T(MAC,">>>NR_IF_Module i=%d, dl_info->dci_ind->number_of_dcis=%d\n",i,dl_info->dci_ind->number_of_dcis); diff --git a/openair2/RRC/LTE/MESSAGES/CMakeLists.txt b/openair2/RRC/LTE/MESSAGES/CMakeLists.txt index 1b85c3ce66..b7e7f3ead6 100644 --- a/openair2/RRC/LTE/MESSAGES/CMakeLists.txt +++ b/openair2/RRC/LTE/MESSAGES/CMakeLists.txt @@ -14,8 +14,23 @@ add_custom_command(OUTPUT ${lte_rrc_source} ${lte_rrc_headers} COMMENT "Generating LTE RRC source file from ${CMAKE_CURRENT_SOURCE_DIR}/${LTE_RRC_GRAMMAR}" ) +# Many other targets include LTE RRC ASN.1 headers, without actually needing +# the actual library (asn1_lte_rrc). Therefore, below we create the INTERFACE +# library asn1_lte_rrc_hdrs that only contains these headers. To actually wait +# that the headers are created in add_custom_command, we use an intermediary +# add_custom_target which create a target that waits for the headers, and make +# a dependency from asn1_lte_rrc_hdrs to gen_lte_rrc_hdrs, which is the +# recommended way, see https://gitlab.kitware.com/cmake/cmake/-/issues/17366. +# In newer cmake version (e.g., 3.20), it is also possible to have +# ${lte_rrc_headers} directly in the add_library(asn1_lte_rrc_hdrs) statement, +# without the need for asn1_lte_rrc_hdrs +add_custom_target(gen_lte_rrc_hdrs DEPENDS ${lte_rrc_headers}) +add_library(asn1_lte_rrc_hdrs INTERFACE) +add_dependencies(asn1_lte_rrc_hdrs gen_lte_rrc_hdrs) +target_include_directories(asn1_lte_rrc_hdrs INTERFACE "${CMAKE_CURRENT_BINARY_DIR}") + add_library(asn1_lte_rrc ${lte_rrc_source}) -target_include_directories(asn1_lte_rrc PUBLIC "${CMAKE_CURRENT_BINARY_DIR}") +target_link_libraries(asn1_lte_rrc PUBLIC asn1_lte_rrc_hdrs) target_compile_options(asn1_lte_rrc PRIVATE -DASN_DISABLE_OER_SUPPORT -w PUBLIC -DLTE_RRC_VERSION=${LTE_RRC_RELEASE}) diff --git a/openair2/RRC/LTE/MESSAGES/asn1_msg.c b/openair2/RRC/LTE/MESSAGES/asn1_msg.c index 6b431ecfcd..f5e6959cf5 100644 --- a/openair2/RRC/LTE/MESSAGES/asn1_msg.c +++ b/openair2/RRC/LTE/MESSAGES/asn1_msg.c @@ -76,6 +76,7 @@ #include "LTE_SystemInformationBlockType1.h" #include "LTE_SystemInformationBlockType1-BR-r13.h" +#include "LTE_SystemInformationBlockType1-v8h0-IEs.h" #include "LTE_SIB-Type.h" @@ -937,7 +938,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, (*sib1)->cellSelectionInfo.q_RxLevMinOffset=NULL; //(*sib1)->p_Max = CALLOC(1, sizeof(P_Max_t)); // *((*sib1)->p_Max) = 23; - (*sib1)->freqBandIndicator = configuration->eutra_band[CC_id]; + schedulingInfo.si_Periodicity=LTE_SchedulingInfo__si_Periodicity_rf8; if(configuration->eMBMS_M2_configured){ schedulingInfo2.si_Periodicity=LTE_SchedulingInfo__si_Periodicity_rf8; @@ -964,7 +965,41 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, (*sib1)->systemInfoValueTag = 0; (*sib1)->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v890_IEs_t)); LTE_SystemInformationBlockType1_v890_IEs_t *sib1_890 = (*sib1)->nonCriticalExtension; - sib1_890->lateNonCriticalExtension = NULL; + + if(configuration->eutra_band[CC_id] <= 64) { + (*sib1)->freqBandIndicator = configuration->eutra_band[CC_id]; + sib1_890->lateNonCriticalExtension = NULL; + } else { + (*sib1)->freqBandIndicator = 64; + + sib1_890->lateNonCriticalExtension = calloc(1, sizeof(OCTET_STRING_t)); + OCTET_STRING_t *octate = (*sib1_890).lateNonCriticalExtension; + + LTE_SystemInformationBlockType1_v8h0_IEs_t *sib1_8h0 = NULL; + sib1_8h0 = calloc(1, sizeof(LTE_SystemInformationBlockType1_v8h0_IEs_t)); + sib1_8h0->multiBandInfoList = NULL; + sib1_8h0->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v9e0_IEs_t)); + + long *eutra_band_ptr; + eutra_band_ptr = malloc(sizeof(long)); + *eutra_band_ptr = configuration->eutra_band[CC_id]; + LTE_SystemInformationBlockType1_v9e0_IEs_t *sib1_9e0 = sib1_8h0->nonCriticalExtension; + sib1_9e0->freqBandIndicator_v9e0 = eutra_band_ptr; + sib1_9e0->multiBandInfoList_v9e0 = NULL; + sib1_9e0->nonCriticalExtension = NULL; + char buffer_sib8h0[1024]; + enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_SystemInformationBlockType1_v8h0_IEs, + NULL, + (void *)sib1_8h0, + buffer_sib8h0, + 1024); + AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", + enc_rval.failed_type->name, enc_rval.encoded); + OCTET_STRING_fromBuf(octate,(const char *)buffer_sib8h0,(enc_rval.encoded + 7) / 8); + + ASN_STRUCT_FREE(asn_DEF_LTE_SystemInformationBlockType1_v8h0_IEs, sib1_8h0); + } + sib1_890->nonCriticalExtension = calloc(1, sizeof(LTE_SystemInformationBlockType1_v920_IEs_t)); memset(sib1_890->nonCriticalExtension, 0, sizeof(LTE_SystemInformationBlockType1_v920_IEs_t)); LTE_SystemInformationBlockType1_v920_IEs_t *sib1_920 = (*sib1_890).nonCriticalExtension; @@ -4378,7 +4413,7 @@ uint8_t do_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8_t ul_dcch_msg.message.present = LTE_UL_DCCH_MessageType_PR_c1; ul_dcch_msg.message.choice.c1.present = LTE_UL_DCCH_MessageType__c1_PR_ulInformationTransfer; ul_dcch_msg.message.choice.c1.choice.ulInformationTransfer.criticalExtensions.present = LTE_ULInformationTransfer__criticalExtensions_PR_c1; - ul_dcch_msg.message.choice.c1.choice.ulInformationTransfer.criticalExtensions.choice.c1.present = LTE_DLInformationTransfer__criticalExtensions__c1_PR_dlInformationTransfer_r8; + ul_dcch_msg.message.choice.c1.choice.ulInformationTransfer.criticalExtensions.choice.c1.present = LTE_ULInformationTransfer__criticalExtensions__c1_PR_ulInformationTransfer_r8; ul_dcch_msg.message.choice.c1.choice.ulInformationTransfer.criticalExtensions.choice.c1.choice.ulInformationTransfer_r8.dedicatedInfoType.present = LTE_ULInformationTransfer_r8_IEs__dedicatedInfoType_PR_dedicatedInfoNAS; ul_dcch_msg.message.choice.c1.choice.ulInformationTransfer.criticalExtensions.choice.c1.choice.ulInformationTransfer_r8.dedicatedInfoType.choice.dedicatedInfoNAS.size = pdu_length; diff --git a/openair2/RRC/LTE/rrc_UE.c b/openair2/RRC/LTE/rrc_UE.c index ca051194db..022875bc68 100644 --- a/openair2/RRC/LTE/rrc_UE.c +++ b/openair2/RRC/LTE/rrc_UE.c @@ -63,6 +63,10 @@ #include "LTE_TDD-Config.h" #include "LTE_UECapabilityEnquiry.h" #include "LTE_UE-CapabilityRequest.h" + +#include "NR_RAT-Type.h" +#include "NR_UE-CapabilityRAT-Container.h" + #include "RRC/NAS/nas_config.h" #include "RRC/NAS/rb_config.h" #if ENABLE_RAL @@ -1599,7 +1603,7 @@ rrc_ue_process_securityModeCommand( securityModeCommand->criticalExtensions.choice.c1.present); ul_dcch_msg.message.choice.c1.choice.securityModeComplete.rrc_TransactionIdentifier = securityModeCommand->rrc_TransactionIdentifier; - ul_dcch_msg.message.choice.c1.choice.securityModeComplete.criticalExtensions.present = LTE_SecurityModeCommand__criticalExtensions_PR_c1; + ul_dcch_msg.message.choice.c1.choice.securityModeComplete.criticalExtensions.present = LTE_SecurityModeComplete__criticalExtensions_PR_securityModeComplete_r8; ul_dcch_msg.message.choice.c1.choice.securityModeComplete.criticalExtensions.choice.securityModeComplete_r8.nonCriticalExtension =NULL; LOG_I(RRC,"[UE %d] SFN/SF %d/%d: Receiving from SRB1 (DL-DCCH), encoding securityModeComplete (eNB %d), rrc_TransactionIdentifier: %ld\n", ctxt_pP->module_id,ctxt_pP->frame, ctxt_pP->subframe, eNB_index, securityModeCommand->rrc_TransactionIdentifier); @@ -1943,9 +1947,11 @@ rrc_ue_process_rrcConnectionReconfiguration( uint32_t SecondaryCellGroup_size; uint8_t trans_id; uint8_t padding[3]; - uint8_t buffer[total_size]; + uint8_t *buffer; } msg; + msg.buffer = calloc(total_size, sizeof(*msg.buffer)); + AssertFatal(msg.buffer != NULL, "Error in memory allocation\n"); msg.RadioBearer_size = nr_RadioBearer->size; msg.SecondaryCellGroup_size = nr_SecondaryCellGroup->size; msg.trans_id = rrcConnectionReconfiguration->rrc_TransactionIdentifier; @@ -1958,6 +1964,7 @@ rrc_ue_process_rrcConnectionReconfiguration( sizeof(msg)); nsa_sendmsg_to_nrue(&msg, sizeof(msg), RRC_CONFIG_COMPLETE_REQ); + free(msg.buffer); LOG_A(RRC, "Sent RRC_CONFIG_COMPLETE_REQ to the NR UE\n"); } diff --git a/openair2/RRC/LTE/rrc_common.c b/openair2/RRC/LTE/rrc_common.c index be7a4048f9..7509aeae4f 100644 --- a/openair2/RRC/LTE/rrc_common.c +++ b/openair2/RRC/LTE/rrc_common.c @@ -56,7 +56,6 @@ rrc_init_global_param( ) //----------------------------------------------------------------------------- { - rrc_rlc_register_rrc (rrc_data_ind, NULL); //register with rlc DCCH_LCHAN_DESC.transport_block_size = 4; DCCH_LCHAN_DESC.max_transport_blocks = 16; DCCH_LCHAN_DESC.Delay_class = 1; @@ -203,6 +202,12 @@ static band_freq bands[] = { { BAND_TYPE_TDD, 41, 2496000000UL, 2690000000UL, 2496000000UL, 2690000000UL }, { BAND_TYPE_TDD, 42, 3400000000UL, 3600000000UL, 3400000000UL, 3600000000UL }, { BAND_TYPE_TDD, 43, 3600000000UL, 3800000000UL, 3600000000UL, 3800000000UL }, + // ... + { BAND_TYPE_FDD, 65, 1920000000UL, 2010000000UL, 2110000000UL, 2200000000UL}, + { BAND_TYPE_FDD, 66, 1710000000UL, 1780000000UL, 2110000000UL, 2200000000UL}, + { BAND_TYPE_FDD, 71, 663000000UL, 698000000UL, 617000000UL, 652000000UL }, + { BAND_TYPE_FDD, 72, 451000000UL, 456000000UL, 461000000UL, 466000000UL }, + { BAND_TYPE_FDD, 73, 450000000UL, 455000000UL, 460000000UL, 466000000UL }, }; typedef struct { @@ -250,6 +255,11 @@ static earfcn earfcn_table[] = { { 41, 2496000000UL, 39650, 39650, 41589, 2496000000UL, 39650, 39650, 41589 }, { 42, 3400000000UL, 41590, 41590, 43589, 3400000000UL, 41590, 41590, 43589 }, { 43, 3600000000UL, 43590, 43590, 45589, 3600000000UL, 43590, 43590, 45589 }, + // ... + { 66, 2110000000UL, 66436, 66436, 67335, 17100000000UL, 131972, 131972, 132671}, + { 71, 617000000UL, 68586, 68586, 68935, 6630000000UL, 133122, 133122, 133471}, + { 72, 461000000UL, 68936, 68936, 68985, 4510000000UL, 133472, 133472, 133521}, + { 73, 460000000UL, 68986, 68986, 69035, 4500000000UL, 133522, 133522, 133571}, }; int freq_to_arfcn10(int band, unsigned long freq) { diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 4c82f0b8f3..afdab4000f 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -59,12 +59,19 @@ #include "LTE_SL-CommConfig-r12.h" #include "LTE_PeriodicBSR-Timer-r12.h" #include "LTE_RetxBSR-Timer-r12.h" +#include "PHY/defs_eNB.h" #include "LTE_BCCH-BCH-Message-MBMS.h" #include "LTE_BCCH-DL-SCH-Message-MBMS.h" #include "LTE_SystemInformationBlockType1-MBMS-r14.h" #include "LTE_NonMBSFN-SubframeConfig-r14.h" +#include "NR_UE-CapabilityRAT-ContainerList.h" +#include "NR_UE-CapabilityRAT-Container.h" +#include "NR_CG-ConfigInfo.h" +#include "NR_CG-Config.h" +#include "NR_RadioBearerConfig.c" + #include "common/utils/LOG/vcd_signal_dumper.h" #include "x2ap_eNB.h" @@ -73,8 +80,6 @@ #include "RRC/NAS/nas_config.h" #include "RRC/NAS/rb_config.h" -#include "OCG.h" -#include "OCG_extern.h" #include "UTIL/OSA/osa_defs.h" @@ -427,7 +432,7 @@ init_SI( .physCellId = carrier->physCellId, .p_eNB = carrier->p_eNB, .Ncp = carrier->Ncp, - .eutra_band = carrier->sib1->freqBandIndicator, + .eutra_band = carrier->eutra_band, .dl_CarrierFreq = carrier->dl_CarrierFreq, .pbch_repetition = carrier->pbch_repetition, .mib = &carrier->mib, @@ -909,10 +914,10 @@ void release_UE_in_freeList(module_id_t mod_id) { protocol_ctxt_t ctxt; PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, mod_id, ENB_FLAG_YES, rnti, 0, 0, mod_id); - for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { - eNB_PHY = RC.eNB[mod_id][CC_id]; - int id; - // clean ULSCH entries for rnti + for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { + eNB_PHY = RC.eNB[mod_id][CC_id]; + int id; + // clean ULSCH entries for rnti id = find_ulsch(rnti, eNB_PHY, eNB_MAC->UE_free_ctrl[ue_num].raFlag ? SEARCH_EXIST_RA : SEARCH_EXIST); if (id >= 0) @@ -929,14 +934,14 @@ void release_UE_in_freeList(module_id_t mod_id) { if (eNB_PHY->uci_vars[i].rnti == rnti) { LOG_I(MAC, "clean eNb uci_vars[%d] UE %x \n", i, rnti); memset(&eNB_PHY->uci_vars[i], 0, sizeof(LTE_eNB_UCI)); - } } + } - for(int j = 0; j < 10; j++) { - nfapi_ul_config_request_body_t *ul_req_tmp = &eNB_MAC->UL_req_tmp[CC_id][j].ul_config_request_body; + for(int j = 0; j < 10; j++) { + nfapi_ul_config_request_body_t *ul_req_tmp = &eNB_MAC->UL_req_tmp[CC_id][j].ul_config_request_body; if (ul_req_tmp) { - int pdu_number = ul_req_tmp->number_of_pdus; + int pdu_number = ul_req_tmp->number_of_pdus; for (int pdu_index = pdu_number - 1; pdu_index >= 0; pdu_index--) { nfapi_ul_config_request_pdu_t *pdu = ul_req_tmp->ul_config_pdu_list + pdu_index; @@ -947,32 +952,32 @@ void release_UE_in_freeList(module_id_t mod_id) { // Very inefficient memory management, but simple if (pdu_index < pdu_number - 1) { memcpy(pdu, pdu + 1, (pdu_number - 1 - pdu_index) * sizeof(nfapi_ul_config_request_pdu_t)); - } - - ul_req_tmp->number_of_pdus--; } + + ul_req_tmp->number_of_pdus--; } } } } - - if (!eNB_MAC->UE_free_ctrl[ue_num].raFlag) - rrc_mac_remove_ue(mod_id, rnti); - rrc_rlc_remove_ue(&ctxt); - pdcp_remove_UE(&ctxt); - - if(eNB_MAC->UE_free_ctrl[ue_num].removeContextFlg) { - struct rrc_eNB_ue_context_s *ue_context_pP = rrc_eNB_get_ue_context(RC.rrc[mod_id],rnti); - if(ue_context_pP) { - LOG_I(PHY, "remove RNTI %04x\n", rnti); - rrc_eNB_remove_ue_context(&ctxt,RC.rrc[mod_id], - (struct rrc_eNB_ue_context_s *) ue_context_pP); - } - } - - LOG_I(RRC, "[release_UE_in_freeList] remove UE %x from freeList ra context: %d\n", rnti, eNB_MAC->UE_free_ctrl[ue_num].raFlag); - eNB_MAC->UE_free_ctrl[ue_num].rnti = 0; } + + if (!eNB_MAC->UE_free_ctrl[ue_num].raFlag) + rrc_mac_remove_ue(mod_id, rnti); + rrc_rlc_remove_ue(&ctxt); + pdcp_remove_UE(&ctxt); + + if(eNB_MAC->UE_free_ctrl[ue_num].removeContextFlg) { + struct rrc_eNB_ue_context_s *ue_context_pP = rrc_eNB_get_ue_context(RC.rrc[mod_id],rnti); + if(ue_context_pP) { + LOG_I(PHY, "remove RNTI %04x\n", rnti); + rrc_eNB_remove_ue_context(&ctxt,RC.rrc[mod_id], + (struct rrc_eNB_ue_context_s *) ue_context_pP); + } + } + + LOG_I(RRC, "[release_UE_in_freeList] remove UE %x from freeList ra context: %d\n", rnti, eNB_MAC->UE_free_ctrl[ue_num].raFlag); + eNB_MAC->UE_free_ctrl[ue_num].rnti = 0; + } pthread_mutex_unlock(&lock_ue_freelist); } @@ -1598,7 +1603,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete( ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.maxReportCells = 2; ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.reportInterval = LTE_ReportInterval_ms120; ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.reportAmount = LTE_ReportConfigEUTRA__reportAmount_infinity; - ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.hysteresis = 0.5; // FIXME ...hysteresis is of type long! + ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.hysteresis = 1; // The actual value is field value * 0.5 dB ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.timeToTrigger = LTE_TimeToTrigger_ms40; asn1cSeqAdd(&ReportConfig_list->list, ReportConfig_A3); @@ -3238,69 +3243,6 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t quantityConfig = NULL; } -//----------------------------------------------------------------------------- -int -rrc_eNB_generate_RRCConnectionReconfiguration_SCell( - const protocol_ctxt_t *const ctxt_pP, - rrc_eNB_ue_context_t *const ue_context_pP, - uint32_t dl_CarrierFreq_r10 -) -//----------------------------------------------------------------------------- -{ - uint8_t size; - uint8_t buffer[100]; - uint8_t sCellIndexToAdd = 0; //one SCell so far - - // uint8_t sCellIndexToAdd; - // sCellIndexToAdd = rrc_find_free_SCell_index(enb_mod_idP, ue_mod_idP, 1); - // if (RC.rrc[enb_mod_idP]->sCell_config[ue_mod_idP][sCellIndexToAdd] ) { - if (ue_context_pP->ue_context.sCell_config != NULL) { - ue_context_pP->ue_context.sCell_config[sCellIndexToAdd].cellIdentification_r10->dl_CarrierFreq_r10 = dl_CarrierFreq_r10; - } else { - LOG_E(RRC,"Scell not configured!\n"); - return(-1); - } - - size = do_RRCConnectionReconfiguration(ctxt_pP, - buffer, - sizeof(buffer), - rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id),//Transaction_id, - (LTE_SRB_ToAddModList_t *)NULL, - (LTE_DRB_ToAddModList_t *)NULL, - (LTE_DRB_ToReleaseList_t *)NULL, - (struct LTE_SPS_Config *)NULL, - (struct LTE_PhysicalConfigDedicated *)NULL, - (LTE_MeasObjectToAddModList_t *)NULL, - (LTE_ReportConfigToAddModList_t *)NULL, - (LTE_QuantityConfig_t *)NULL, - (LTE_MeasIdToAddModList_t *)NULL, - (LTE_MAC_MainConfig_t *)NULL, - (LTE_MeasGapConfig_t *)NULL, - (LTE_MobilityControlInfo_t *)NULL, - (LTE_SecurityConfigHO_t *)NULL, - (struct LTE_MeasConfig__speedStatePars *)NULL, - (LTE_RSRP_Range_t *)NULL, - (LTE_C_RNTI_t *)NULL, - (struct LTE_RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList *)NULL, - (LTE_SL_CommConfig_r12_t *)NULL, - (LTE_SL_DiscConfig_r12_t *)NULL, - ue_context_pP->ue_context.sCell_config - ); - LOG_I(RRC,"[eNB %d] Frame %d, Logical Channel DL-DCCH, Generate LTE_RRCConnectionReconfiguration (bytes %d, UE id %x)\n", - ctxt_pP->module_id,ctxt_pP->frame, size, ue_context_pP->ue_context.rnti); - rrc_data_req( - ctxt_pP, - DCCH, - rrc_eNB_mui++, - SDU_CONFIRM_NO, - size, - buffer, - PDCP_TRANSMISSION_MODE_CONTROL); - return(0); -} - - - //----------------------------------------------------------------------------- /** * @fn :encode_CG_ConfigInfo diff --git a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c index 647be50252..7010c7c831 100644 --- a/openair2/RRC/LTE/rrc_eNB_GTPV1U.c +++ b/openair2/RRC/LTE/rrc_eNB_GTPV1U.c @@ -36,6 +36,7 @@ #include "oai_asn1.h" #include "intertask_interface.h" +#include "pdcp.h" # include "common/ran_context.h" diff --git a/openair2/RRC/LTE/rrc_eNB_GTPV1U.h b/openair2/RRC/LTE/rrc_eNB_GTPV1U.h index f991cbd5f6..aff86729be 100644 --- a/openair2/RRC/LTE/rrc_eNB_GTPV1U.h +++ b/openair2/RRC/LTE/rrc_eNB_GTPV1U.h @@ -30,6 +30,7 @@ #ifndef RRC_ENB_GTPV1U_H_ #define RRC_ENB_GTPV1U_H_ +#include "rrc_defs.h" /*! \fn rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(const protocol_ctxt_t* const ctxt_pP, const gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP) *\brief Process GTPV1U_ENB_CREATE_TUNNEL_RESP message received from GTPV1U, retrieve the enb teid created. diff --git a/openair2/RRC/LTE/rrc_eNB_M2AP.c b/openair2/RRC/LTE/rrc_eNB_M2AP.c index 3b4818d534..16c003d471 100644 --- a/openair2/RRC/LTE/rrc_eNB_M2AP.c +++ b/openair2/RRC/LTE/rrc_eNB_M2AP.c @@ -35,6 +35,7 @@ # include "oai_asn1.h" # include "intertask_interface.h" # include "common/ran_context.h" +#include "pdcp.h" extern RAN_CONTEXT_t RC; diff --git a/openair2/RRC/LTE/rrc_vars.h b/openair2/RRC/LTE/rrc_vars.h index 693459f2ff..372517ee9d 100644 --- a/openair2/RRC/LTE/rrc_vars.h +++ b/openair2/RRC/LTE/rrc_vars.h @@ -60,20 +60,20 @@ struct LTE_LogicalChannelConfig__ul_SpecificParameters LCSRB2 = {3, }; struct LTE_LogicalChannelConfig__ext1 logicalChannelSR_Mask_r9_ext1 = { -logicalChannelSR_Mask_r9: +.logicalChannelSR_Mask_r9= &logicalChannelSR_Mask_r9 }; // These are the default SRB configurations from 36.331 (Chapter 9, p. 176-179 in v8.6) -LTE_LogicalChannelConfig_t SRB1_logicalChannelConfig_defaultValue = {ul_SpecificParameters: +LTE_LogicalChannelConfig_t SRB1_logicalChannelConfig_defaultValue = {.ul_SpecificParameters= &LCSRB1, - ext1: + .ext1= &logicalChannelSR_Mask_r9_ext1 }; -LTE_LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue = {ul_SpecificParameters: +LTE_LogicalChannelConfig_t SRB2_logicalChannelConfig_defaultValue = {.ul_SpecificParameters= &LCSRB2, - ext1: + .ext1= &logicalChannelSR_Mask_r9_ext1 }; diff --git a/openair2/RRC/NAS/nas_config.c b/openair2/RRC/NAS/nas_config.c index b50e52586a..5b852546c4 100644 --- a/openair2/RRC/NAS/nas_config.c +++ b/openair2/RRC/NAS/nas_config.c @@ -59,15 +59,17 @@ char *broadcastAddr ; void nas_getparams(void) { // this datamodel require this static because we partially keep data like baseNetAddress (malloc on a global) // but we loose the opther attributes in nasoptions between two calls if is is not static ! + // clang-format off static paramdef_t nasoptions[] = { /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ /* configuration parameters for netlink, includes network parameters when running in noS1 mode */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*--------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ - {"NetworkPrefix", NASHLP_NETPREFIX, 0, strptr:&baseNetAddress, defstrval:"10.0", TYPE_STRING, 0 }, - {"NetworkMask", NASHLP_NETMASK, 0, strptr:&netMask, defstrval:"255.255.255.0", TYPE_STRING, 0 }, - {"BroadcastAddr", NASHLP_BROADCASTADDR, 0, strptr:&broadcastAddr, defstrval:"10.0.255.255", TYPE_STRING, 0 }, + {"NetworkPrefix", NASHLP_NETPREFIX, 0, .strptr=&baseNetAddress, .defstrval="10.0", TYPE_STRING, 0 }, + {"NetworkMask", NASHLP_NETMASK, 0, .strptr=&netMask, .defstrval="255.255.255.0", TYPE_STRING, 0 }, + {"BroadcastAddr", NASHLP_BROADCASTADDR, 0, .strptr=&broadcastAddr, .defstrval="10.0.255.255", TYPE_STRING, 0 }, }; + // clang-format on config_get( nasoptions,sizeof(nasoptions)/sizeof(paramdef_t),"nas.noS1"); } diff --git a/openair2/RRC/NR/L2_nr_interface.c b/openair2/RRC/NR/L2_nr_interface.c index 0e56a5f572..4a88b153bd 100644 --- a/openair2/RRC/NR/L2_nr_interface.c +++ b/openair2/RRC/NR/L2_nr_interface.c @@ -162,8 +162,7 @@ int8_t nr_mac_rrc_bwp_switch_req(const module_id_t module_idP, const rnti_t rntiP, const int dl_bwp_id, const int ul_bwp_id) { - - struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[module_idP], rntiP); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(RC.nrrrc[module_idP], rntiP); protocol_ctxt_t ctxt; PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, GNB_FLAG_YES, rntiP, frameP, sub_frameP, 0); @@ -177,10 +176,7 @@ void nr_mac_gNB_rrc_ul_failure(const module_id_t Mod_instP, const frame_t frameP, const sub_frame_t subframeP, const rnti_t rntiP) { - struct rrc_gNB_ue_context_s *ue_context_p = NULL; - ue_context_p = rrc_gNB_get_ue_context( - RC.nrrrc[Mod_instP], - rntiP); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(RC.nrrrc[Mod_instP], rntiP); if (ue_context_p != NULL) { LOG_D(RRC,"Frame %d, Subframe %d: UE %x UL failure, activating timer\n",frameP,subframeP,rntiP); @@ -195,8 +191,7 @@ void nr_mac_gNB_rrc_ul_failure_reset(const module_id_t Mod_instP, const frame_t frameP, const sub_frame_t subframeP, const rnti_t rntiP) { - struct rrc_gNB_ue_context_s *ue_context_p = NULL; - ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[Mod_instP], rntiP); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(RC.nrrrc[Mod_instP], rntiP); if (ue_context_p != NULL) { LOG_W(RRC,"Frame %d, Subframe %d: UE %x UL failure reset, deactivating timer\n",frameP,subframeP,rntiP); ue_context_p->ue_context.ul_failure_timer=0; diff --git a/openair2/RRC/NR/MESSAGES/ASN.1/extract_asn1_from_spce.pl b/openair2/RRC/NR/MESSAGES/ASN.1/extract_asn1_from_spce.pl index bdcdef5939..e36d4d3aca 100755 --- a/openair2/RRC/NR/MESSAGES/ASN.1/extract_asn1_from_spce.pl +++ b/openair2/RRC/NR/MESSAGES/ASN.1/extract_asn1_from_spce.pl @@ -12,68 +12,62 @@ $NR_asn_output_file = "NR-RRC-38331.asn"; sub extract_asn1; open(INPUT_FILE, "< $input_file") or die "Can not open file $input_file"; +open(OUTPUT_FILE, "> $NR_asn_output_file") or die "Can not open file $NR_asn_output_file"; while () { # Process the NR-RRC-Definitions section if( m/NR-RRC-Definitions DEFINITIONS AUTOMATIC TAGS ::=/){ - open(OUTPUT_FILE, "> $NR_asn_output_file") or die "Can not open file $NR_asn_output_file"; - syswrite OUTPUT_FILE,"$_ \n"; - syswrite OUTPUT_FILE,"BEGIN\n\n"; + syswrite OUTPUT_FILE,"$_"; # Get all the text delimited by -- ASN1START and -- ASN1STOP extract_asn1(); syswrite OUTPUT_FILE,"END\n\n"; - while() { - if( m/PC5-RRC-Definitions DEFINITIONS AUTOMATIC TAGS ::=/){ - syswrite OUTPUT_FILE,"$_ \n"; - syswrite OUTPUT_FILE,"BEGIN\n\n"; + } elsif( m/PC5-RRC-Definitions DEFINITIONS AUTOMATIC TAGS ::=/){ + syswrite OUTPUT_FILE,"$_"; - # Get all the text delimited by -- ASN1START and -- ASN1STOP - extract_asn1(); + # Get all the text delimited by -- ASN1START and -- ASN1STOP + extract_asn1(); - syswrite OUTPUT_FILE,"END\n\n"; - - while() { - if( m/NR-UE-Variables DEFINITIONS AUTOMATIC TAGS ::=/){ - syswrite OUTPUT_FILE,"$_ \n"; - syswrite OUTPUT_FILE,"BEGIN\n\n"; + syswrite OUTPUT_FILE,"END\n\n"; - # Get all the text delimited by -- ASN1START and -- ASN1STOP - extract_asn1(); - syswrite OUTPUT_FILE,"END\n\n"; - while() { - if( m/NR-Sidelink-Preconf DEFINITIONS AUTOMATIC TAGS ::=/){ - syswrite OUTPUT_FILE,"$_ \n"; - syswrite OUTPUT_FILE,"BEGIN\n\n"; + } elsif( m/NR-UE-Variables DEFINITIONS AUTOMATIC TAGS ::=/){ + syswrite OUTPUT_FILE,"$_"; - # Get all the text delimited by -- ASN1START and -- ASN1STOP - extract_asn1(); + # Get all the text delimited by -- ASN1START and -- ASN1STOP + extract_asn1(); - syswrite OUTPUT_FILE,"END\n\n"; - while() { - if( m/NR-InterNodeDefinitions DEFINITIONS AUTOMATIC TAGS ::=/){ - syswrite OUTPUT_FILE,"$_ \n"; - syswrite OUTPUT_FILE,"BEGIN\n\n"; + syswrite OUTPUT_FILE,"END\n\n"; - # Get all the text delimited by -- ASN1START and -- ASN1STOP - extract_asn1(); + } elsif( m/NR-Sidelink-Preconf DEFINITIONS AUTOMATIC TAGS ::=/){ + syswrite OUTPUT_FILE,"$_"; - syswrite OUTPUT_FILE,"END\n\n"; - } - } - } - } - } - } - } - } - close(OUTPUT_FILE); + # Get all the text delimited by -- ASN1START and -- ASN1STOP + extract_asn1(); + + syswrite OUTPUT_FILE,"END\n\n"; + + } elsif( m/NR-Sidelink-DiscoveryMessage DEFINITIONS AUTOMATIC TAGS ::=/){ + syswrite OUTPUT_FILE,"$_"; + + # Get all the text delimited by -- ASN1START and -- ASN1STOP + extract_asn1(); + + syswrite OUTPUT_FILE,"END\n\n"; + + } elsif( m/NR-InterNodeDefinitions DEFINITIONS AUTOMATIC TAGS ::=/){ + syswrite OUTPUT_FILE,"$_"; + + # Get all the text delimited by -- ASN1START and -- ASN1STOP + extract_asn1(); + + syswrite OUTPUT_FILE,"END\n\n"; } } +close(OUTPUT_FILE); close(INPUT_FILE); # This subroutine copies the text delimited by -- ASN1START and -- ASN1STOP in INPUT_FILE @@ -81,7 +75,7 @@ close(INPUT_FILE); # It stops when it meets the keyword "END" sub extract_asn1 { my $line = ; - my $is_asn1 = 0; + my $is_asn1 = 1; while(($line ne "END\n") && ($line ne "END\r\n")){ if ($line =~ m/-- ASN1STOP/) { diff --git a/openair2/RRC/NR/MESSAGES/ASN.1/nr-rrc-17.3.0.asn1 b/openair2/RRC/NR/MESSAGES/ASN.1/nr-rrc-17.3.0.asn1 new file mode 100644 index 0000000000..5db0502a4d --- /dev/null +++ b/openair2/RRC/NR/MESSAGES/ASN.1/nr-rrc-17.3.0.asn1 @@ -0,0 +1,20709 @@ +-- TAG-NR-RRC-DEFINITIONS-START + +NR-RRC-Definitions DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- TAG-NR-RRC-DEFINITIONS-STOP +-- TAG-BCCH-BCH-MESSAGE-START + +BCCH-BCH-Message ::= SEQUENCE { + message BCCH-BCH-MessageType +} + +BCCH-BCH-MessageType ::= CHOICE { + mib MIB, + messageClassExtension SEQUENCE {} +} + +-- TAG-BCCH-BCH-MESSAGE-STOP +-- TAG-BCCH-DL-SCH-MESSAGE-START + +BCCH-DL-SCH-Message ::= SEQUENCE { + message BCCH-DL-SCH-MessageType +} + +BCCH-DL-SCH-MessageType ::= CHOICE { + c1 CHOICE { + systemInformation SystemInformation, + systemInformationBlockType1 SIB1 + }, + messageClassExtension SEQUENCE {} +} + +-- TAG-BCCH-DL-SCH-MESSAGE-STOP +-- TAG-DL-CCCH-MESSAGE-START + +DL-CCCH-Message ::= SEQUENCE { + message DL-CCCH-MessageType +} + +DL-CCCH-MessageType ::= CHOICE { + c1 CHOICE { + rrcReject RRCReject, + rrcSetup RRCSetup, + spare2 NULL, + spare1 NULL + }, + messageClassExtension SEQUENCE {} +} + +-- TAG-DL-CCCH-MESSAGE-STOP +-- TAG-DL-DCCH-MESSAGE-START + +DL-DCCH-Message ::= SEQUENCE { + message DL-DCCH-MessageType +} + +DL-DCCH-MessageType ::= CHOICE { + c1 CHOICE { + rrcReconfiguration RRCReconfiguration, + rrcResume RRCResume, + rrcRelease RRCRelease, + rrcReestablishment RRCReestablishment, + securityModeCommand SecurityModeCommand, + dlInformationTransfer DLInformationTransfer, + ueCapabilityEnquiry UECapabilityEnquiry, + counterCheck CounterCheck, + mobilityFromNRCommand MobilityFromNRCommand, + dlDedicatedMessageSegment-r16 DLDedicatedMessageSegment-r16, + ueInformationRequest-r16 UEInformationRequest-r16, + dlInformationTransferMRDC-r16 DLInformationTransferMRDC-r16, + loggedMeasurementConfiguration-r16 LoggedMeasurementConfiguration-r16, + spare3 NULL, spare2 NULL, spare1 NULL + }, + messageClassExtension SEQUENCE {} +} + +-- TAG-DL-DCCH-MESSAGE-STOP +-- TAG-MCCH-MESSAGE-START + +MCCH-Message-r17 ::= SEQUENCE { + message MCCH-MessageType-r17 +} + +MCCH-MessageType-r17 ::= CHOICE { + c1 CHOICE { + mbsBroadcastConfiguration-r17 MBSBroadcastConfiguration-r17, + spare1 NULL + }, + messageClassExtension SEQUENCE {} +} + +-- TAG-MCCH-MESSAGE-STOP +-- TAG-PCCH-PCH-MESSAGE-START + +PCCH-Message ::= SEQUENCE { + message PCCH-MessageType +} + +PCCH-MessageType ::= CHOICE { + c1 CHOICE { + paging Paging, + spare1 NULL + }, + messageClassExtension SEQUENCE {} +} + +-- TAG-PCCH-PCH-MESSAGE-STOP +-- TAG-UL-CCCH-MESSAGE-START + + +UL-CCCH-Message ::= SEQUENCE { + message UL-CCCH-MessageType +} + +UL-CCCH-MessageType ::= CHOICE { + c1 CHOICE { + rrcSetupRequest RRCSetupRequest, + rrcResumeRequest RRCResumeRequest, + rrcReestablishmentRequest RRCReestablishmentRequest, + rrcSystemInfoRequest RRCSystemInfoRequest + }, + messageClassExtension SEQUENCE {} +} + +-- TAG-UL-CCCH-MESSAGE-STOP +-- TAG-UL-CCCH1-MESSAGE-START + + +UL-CCCH1-Message ::= SEQUENCE { + message UL-CCCH1-MessageType +} + +UL-CCCH1-MessageType ::= CHOICE { + c1 CHOICE { + rrcResumeRequest1 RRCResumeRequest1, + spare3 NULL, + spare2 NULL, + spare1 NULL + + }, + messageClassExtension SEQUENCE {} +} + +-- TAG-UL-CCCH1-MESSAGE-STOP +-- TAG-UL-DCCH-MESSAGE-START + +UL-DCCH-Message ::= SEQUENCE { + message UL-DCCH-MessageType +} + +UL-DCCH-MessageType ::= CHOICE { + c1 CHOICE { + measurementReport MeasurementReport, + rrcReconfigurationComplete RRCReconfigurationComplete, + rrcSetupComplete RRCSetupComplete, + rrcReestablishmentComplete RRCReestablishmentComplete, + rrcResumeComplete RRCResumeComplete, + securityModeComplete SecurityModeComplete, + securityModeFailure SecurityModeFailure, + ulInformationTransfer ULInformationTransfer, + locationMeasurementIndication LocationMeasurementIndication, + ueCapabilityInformation UECapabilityInformation, + counterCheckResponse CounterCheckResponse, + ueAssistanceInformation UEAssistanceInformation, + failureInformation FailureInformation, + ulInformationTransferMRDC ULInformationTransferMRDC, + scgFailureInformation SCGFailureInformation, + scgFailureInformationEUTRA SCGFailureInformationEUTRA + }, + messageClassExtension CHOICE { + c2 CHOICE { + ulDedicatedMessageSegment-r16 ULDedicatedMessageSegment-r16, + dedicatedSIBRequest-r16 DedicatedSIBRequest-r16, + mcgFailureInformation-r16 MCGFailureInformation-r16, + ueInformationResponse-r16 UEInformationResponse-r16, + sidelinkUEInformationNR-r16 SidelinkUEInformationNR-r16, + ulInformationTransferIRAT-r16 ULInformationTransferIRAT-r16, + iabOtherInformation-r16 IABOtherInformation-r16, + mbsInterestIndication-r17 MBSInterestIndication-r17, + uePositioningAssistanceInfo-r17 UEPositioningAssistanceInfo-r17, + measurementReportAppLayer-r17 MeasurementReportAppLayer-r17, + spare6 NULL, spare5 NULL, spare4 NULL, spare3 NULL, spare2 NULL, spare1 NULL + }, + messageClassExtensionFuture-r16 SEQUENCE {} + } +} + +-- TAG-UL-DCCH-MESSAGE-STOP +-- TAG-COUNTERCHECK-START + + +CounterCheck ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + counterCheck CounterCheck-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +CounterCheck-IEs ::= SEQUENCE { + drb-CountMSB-InfoList DRB-CountMSB-InfoList, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +DRB-CountMSB-InfoList ::= SEQUENCE (SIZE (1..maxDRB)) OF DRB-CountMSB-Info + +DRB-CountMSB-Info ::= SEQUENCE { + drb-Identity DRB-Identity, + countMSB-Uplink INTEGER(0..33554431), + countMSB-Downlink INTEGER(0..33554431) +} + +-- TAG-COUNTERCHECK-STOP +-- TAG-COUNTERCHECKRESPONSE-START + +CounterCheckResponse ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + counterCheckResponse CounterCheckResponse-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +CounterCheckResponse-IEs ::= SEQUENCE { + drb-CountInfoList DRB-CountInfoList, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL + +} + +DRB-CountInfoList ::= SEQUENCE (SIZE (0..maxDRB)) OF DRB-CountInfo + +DRB-CountInfo ::= SEQUENCE { + drb-Identity DRB-Identity, + count-Uplink INTEGER(0..4294967295), + count-Downlink INTEGER(0..4294967295) +} + +-- TAG-COUNTERCHECKRESPONSE-STOP +-- TAG-DEDICATEDSIBREQUEST-START + +DedicatedSIBRequest-r16 ::= SEQUENCE { + criticalExtensions CHOICE { + dedicatedSIBRequest-r16 DedicatedSIBRequest-r16-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +DedicatedSIBRequest-r16-IEs ::= SEQUENCE { + onDemandSIB-RequestList-r16 SEQUENCE { + + requestedSIB-List-r16 SEQUENCE (SIZE (1..maxOnDemandSIB-r16)) OF SIB-ReqInfo-r16 OPTIONAL, + requestedPosSIB-List-r16 SEQUENCE (SIZE (1..maxOnDemandPosSIB-r16)) OF PosSIB-ReqInfo-r16 OPTIONAL + } OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +SIB-ReqInfo-r16 ::= ENUMERATED { sib12, sib13, sib14, sib20-v1700, sib21-v1700, spare3, spare2, spare1 } + +PosSIB-ReqInfo-r16 ::= SEQUENCE { + gnss-id-r16 GNSS-ID-r16 OPTIONAL, + sbas-id-r16 SBAS-ID-r16 OPTIONAL, + posSibType-r16 ENUMERATED { posSibType1-1, posSibType1-2, posSibType1-3, posSibType1-4, posSibType1-5, posSibType1-6, + posSibType1-7, posSibType1-8, posSibType2-1, posSibType2-2, posSibType2-3, posSibType2-4, + posSibType2-5, posSibType2-6, posSibType2-7, posSibType2-8, posSibType2-9, posSibType2-10, + posSibType2-11, posSibType2-12, posSibType2-13, posSibType2-14, posSibType2-15, + posSibType2-16, posSibType2-17, posSibType2-18, posSibType2-19, posSibType2-20, + posSibType2-21, posSibType2-22, posSibType2-23, posSibType3-1, posSibType4-1, + posSibType5-1, posSibType6-1, posSibType6-2, posSibType6-3,..., posSibType1-9-v1710, + posSibType1-10-v1710, posSibType2-24-v1710, posSibType2-25-v1710, + posSibType6-4-v1710, posSibType6-5-v1710, posSibType6-6-v1710 } +} + +-- TAG-DEDICATEDSIBREQUEST-STOP +-- TAG-DLDEDICATEDMESSAGESEGMENT-START + + +DLDedicatedMessageSegment-r16 ::= SEQUENCE { + criticalExtensions CHOICE { + dlDedicatedMessageSegment-r16 DLDedicatedMessageSegment-r16-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +DLDedicatedMessageSegment-r16-IEs ::= SEQUENCE { + segmentNumber-r16 INTEGER(0..4), + rrc-MessageSegmentContainer-r16 OCTET STRING, + rrc-MessageSegmentType-r16 ENUMERATED {notLastSegment, lastSegment}, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-DLDEDICATEDMESSAGESEGMENT-STOP +-- TAG-DLINFORMATIONTRANSFER-START + +DLInformationTransfer ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + dlInformationTransfer DLInformationTransfer-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +DLInformationTransfer-IEs ::= SEQUENCE { + dedicatedNAS-Message DedicatedNAS-Message OPTIONAL, -- Need N + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension DLInformationTransfer-v1610-IEs OPTIONAL +} + +DLInformationTransfer-v1610-IEs ::= SEQUENCE { + referenceTimeInfo-r16 ReferenceTimeInfo-r16 OPTIONAL, -- Need N + nonCriticalExtension DLInformationTransfer-v1700-IEs OPTIONAL +} + +DLInformationTransfer-v1700-IEs ::= SEQUENCE { + dedicatedInfoF1c-r17 DedicatedInfoF1c-r17 OPTIONAL, -- Need N + rxTxTimeDiff-gNB-r17 RxTxTimeDiff-r17 OPTIONAL, -- Need N + ta-PDC-r17 ENUMERATED {activate,deactivate} OPTIONAL, -- Need N + sib9Fallback-r17 ENUMERATED {true} OPTIONAL, -- Need N + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-DLINFORMATIONTRANSFER-STOP +-- TAG-DLINFORMATIONTRANSFERMRDC-START + +DLInformationTransferMRDC-r16 ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + dlInformationTransferMRDC-r16 DLInformationTransferMRDC-r16-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +DLInformationTransferMRDC-r16-IEs::= SEQUENCE { + dl-DCCH-MessageNR-r16 OCTET STRING OPTIONAL, -- Need N + dl-DCCH-MessageEUTRA-r16 OCTET STRING OPTIONAL, -- Need N + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-DLINFORMATIONTRANSFERMRDC-STOP +-- TAG-FAILUREINFORMATION-START + +FailureInformation ::= SEQUENCE { + criticalExtensions CHOICE { + failureInformation FailureInformation-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +FailureInformation-IEs ::= SEQUENCE { + failureInfoRLC-Bearer FailureInfoRLC-Bearer OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension FailureInformation-v1610-IEs OPTIONAL +} + +FailureInfoRLC-Bearer ::= SEQUENCE { + cellGroupId CellGroupId, + logicalChannelIdentity LogicalChannelIdentity, + failureType ENUMERATED {rlc-failure, spare3, spare2, spare1} +} + +FailureInformation-v1610-IEs ::= SEQUENCE { + failureInfoDAPS-r16 FailureInfoDAPS-r16 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +FailureInfoDAPS-r16 ::= SEQUENCE { + failureType-r16 ENUMERATED {daps-failure, spare3, spare2, spare1} +} + +-- TAG-FAILUREINFORMATION-STOP +-- TAG-IABOTHERINFORMATION-START + +IABOtherInformation-r16 ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + iabOtherInformation-r16 IABOtherInformation-r16-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +IABOtherInformation-r16-IEs ::= SEQUENCE { + ip-InfoType-r16 CHOICE { + iab-IP-Request-r16 SEQUENCE { + iab-IPv4-AddressNumReq-r16 IAB-IP-AddressNumReq-r16 OPTIONAL, + iab-IPv6-AddressReq-r16 CHOICE { + iab-IPv6-AddressNumReq-r16 IAB-IP-AddressNumReq-r16, + iab-IPv6-AddressPrefixReq-r16 IAB-IP-AddressPrefixReq-r16, + ... + } OPTIONAL + }, + iab-IP-Report-r16 SEQUENCE { + iab-IPv4-AddressReport-r16 IAB-IP-AddressAndTraffic-r16 OPTIONAL, + iab-IPv6-Report-r16 CHOICE { + iab-IPv6-AddressReport-r16 IAB-IP-AddressAndTraffic-r16, + iab-IPv6-PrefixReport-r16 IAB-IP-PrefixAndTraffic-r16, + ... + } OPTIONAL + }, + ... + }, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +IAB-IP-AddressNumReq-r16 ::= SEQUENCE { + all-Traffic-NumReq-r16 INTEGER (1..8) OPTIONAL, + f1-C-Traffic-NumReq-r16 INTEGER (1..8) OPTIONAL, + f1-U-Traffic-NumReq-r16 INTEGER (1..8) OPTIONAL, + non-F1-Traffic-NumReq-r16 INTEGER (1..8) OPTIONAL, + ... +} + +IAB-IP-AddressPrefixReq-r16 ::= SEQUENCE { + all-Traffic-PrefixReq-r16 ENUMERATED {true} OPTIONAL, + f1-C-Traffic-PrefixReq-r16 ENUMERATED {true} OPTIONAL, + f1-U-Traffic-PrefixReq-r16 ENUMERATED {true} OPTIONAL, + non-F1-Traffic-PrefixReq-r16 ENUMERATED {true} OPTIONAL, + ... +} + +IAB-IP-AddressAndTraffic-r16 ::= SEQUENCE { + all-Traffic-IAB-IP-Address-r16 SEQUENCE (SIZE(1..8)) OF IAB-IP-Address-r16 OPTIONAL, + f1-C-Traffic-IP-Address-r16 SEQUENCE (SIZE(1..8)) OF IAB-IP-Address-r16 OPTIONAL, + f1-U-Traffic-IP-Address-r16 SEQUENCE (SIZE(1..8)) OF IAB-IP-Address-r16 OPTIONAL, + non-F1-Traffic-IP-Address-r16 SEQUENCE (SIZE(1..8)) OF IAB-IP-Address-r16 OPTIONAL +} + +IAB-IP-PrefixAndTraffic-r16 ::= SEQUENCE { + all-Traffic-IAB-IP-Address-r16 IAB-IP-Address-r16 OPTIONAL, + f1-C-Traffic-IP-Address-r16 IAB-IP-Address-r16 OPTIONAL, + f1-U-Traffic-IP-Address-r16 IAB-IP-Address-r16 OPTIONAL, + non-F1-Traffic-IP-Address-r16 IAB-IP-Address-r16 OPTIONAL +} + +-- TAG-IABOTHERINFORMATION-STOP +-- TAG-LOCATIONMEASUREMENTINDICATION-START + +LocationMeasurementIndication ::= SEQUENCE { + criticalExtensions CHOICE { + locationMeasurementIndication LocationMeasurementIndication-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +LocationMeasurementIndication-IEs ::= SEQUENCE { + measurementIndication SetupRelease {LocationMeasurementInfo}, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +-- TAG-LOCATIONMEASUREMENTINDICATION-STOP +-- TAG-LOGGEDMEASUREMENTCONFIGURATION-START + +LoggedMeasurementConfiguration-r16 ::= SEQUENCE { + criticalExtensions CHOICE { + loggedMeasurementConfiguration-r16 LoggedMeasurementConfiguration-r16-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +LoggedMeasurementConfiguration-r16-IEs ::= SEQUENCE { + traceReference-r16 TraceReference-r16, + traceRecordingSessionRef-r16 OCTET STRING (SIZE (2)), + tce-Id-r16 OCTET STRING (SIZE (1)), + absoluteTimeInfo-r16 AbsoluteTimeInfo-r16, + areaConfiguration-r16 AreaConfiguration-r16 OPTIONAL, --Need R + plmn-IdentityList-r16 PLMN-IdentityList2-r16 OPTIONAL, --Need R + bt-NameList-r16 SetupRelease {BT-NameList-r16} OPTIONAL, --Need M + wlan-NameList-r16 SetupRelease {WLAN-NameList-r16} OPTIONAL, --Need M + sensor-NameList-r16 SetupRelease {Sensor-NameList-r16} OPTIONAL, --Need M + loggingDuration-r16 LoggingDuration-r16, + reportType CHOICE { + periodical LoggedPeriodicalReportConfig-r16, + eventTriggered LoggedEventTriggerConfig-r16, + ... + }, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension LoggedMeasurementConfiguration-v1700-IEs OPTIONAL +} + +LoggedMeasurementConfiguration-v1700-IEs ::= SEQUENCE { + sigLoggedMeasType-r17 ENUMERATED {true} OPTIONAL, -- Need R + earlyMeasIndication-r17 ENUMERATED {true} OPTIONAL, -- Need R + areaConfiguration-v1700 AreaConfiguration-v1700 OPTIONAL, --Need R + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +LoggedPeriodicalReportConfig-r16 ::= SEQUENCE { + loggingInterval-r16 LoggingInterval-r16, + ... + } + +LoggedEventTriggerConfig-r16 ::= SEQUENCE { + eventType-r16 EventType-r16, + loggingInterval-r16 LoggingInterval-r16, + ... +} + +EventType-r16 ::= CHOICE { + outOfCoverage NULL, + eventL1 SEQUENCE { + l1-Threshold MeasTriggerQuantity, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger + }, + ... +} + +-- TAG-LOGGEDMEASUREMENTCONFIGURATION-STOP +-- TAG-MBSBROADCASTCONFIGURATION-START + +MBSBroadcastConfiguration-r17 ::= SEQUENCE { + criticalExtensions CHOICE { + mbsBroadcastConfiguration-r17 MBSBroadcastConfiguration-r17-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +MBSBroadcastConfiguration-r17-IEs ::= SEQUENCE { + mbs-SessionInfoList-r17 MBS-SessionInfoList-r17 OPTIONAL, -- Need R + mbs-NeighbourCellList-r17 MBS-NeighbourCellList-r17 OPTIONAL, -- Need S + drx-ConfigPTM-List-r17 SEQUENCE (SIZE (1..maxNrofDRX-ConfigPTM-r17)) OF DRX-ConfigPTM-r17 OPTIONAL, -- Need R + pdsch-ConfigMTCH-r17 PDSCH-ConfigBroadcast-r17 OPTIONAL, -- Need S + mtch-SSB-MappingWindowList-r17 MTCH-SSB-MappingWindowList-r17 OPTIONAL, -- Need R + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-MBSBROADCASTCONFIGURATION-STOP +-- TAG-MBSINTERESTINDICATION-START + +MBSInterestIndication-r17 ::= SEQUENCE { + criticalExtensions CHOICE { + mbsInterestIndication-r17 MBSInterestIndication-r17-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +MBSInterestIndication-r17-IEs ::= SEQUENCE { + mbs-FreqList-r17 CarrierFreqListMBS-r17 OPTIONAL, + mbs-Priority-r17 ENUMERATED {true} OPTIONAL, + mbs-ServiceList-r17 MBS-ServiceList-r17 OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-MBSINTERESTINDICATION-STOP +-- TAG-MCGFAILUREINFORMATION-START + +MCGFailureInformation-r16 ::= SEQUENCE { + criticalExtensions CHOICE { + mcgFailureInformation-r16 MCGFailureInformation-r16-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +MCGFailureInformation-r16-IEs ::= SEQUENCE { + failureReportMCG-r16 FailureReportMCG-r16 OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +FailureReportMCG-r16 ::= SEQUENCE { + failureType-r16 ENUMERATED {t310-Expiry, randomAccessProblem, rlc-MaxNumRetx, + t312-Expiry-r16, lbt-Failure-r16, beamFailureRecoveryFailure-r16, + bh-RLF-r16, spare1} OPTIONAL, + measResultFreqList-r16 MeasResultList2NR OPTIONAL, + measResultFreqListEUTRA-r16 MeasResultList2EUTRA OPTIONAL, + measResultSCG-r16 OCTET STRING (CONTAINING MeasResultSCG-Failure) OPTIONAL, + measResultSCG-EUTRA-r16 OCTET STRING OPTIONAL, + measResultFreqListUTRA-FDD-r16 MeasResultList2UTRA OPTIONAL, + ... +} + +MeasResultList2UTRA ::= SEQUENCE (SIZE (1..maxFreq)) OF MeasResult2UTRA-FDD-r16 + +MeasResult2UTRA-FDD-r16 ::= SEQUENCE { + carrierFreq-r16 ARFCN-ValueUTRA-FDD-r16, + measResultNeighCellList-r16 MeasResultListUTRA-FDD-r16 +} + +MeasResultList2EUTRA ::= SEQUENCE (SIZE (1..maxFreq)) OF MeasResult2EUTRA-r16 + +-- TAG-MCGFAILUREINFORMATION-STOP +-- TAG-MEASUREMENTREPORT-START + +MeasurementReport ::= SEQUENCE { + criticalExtensions CHOICE { + measurementReport MeasurementReport-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +MeasurementReport-IEs ::= SEQUENCE { + measResults MeasResults, + + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +-- TAG-MEASUREMENTREPORT-STOP +-- TAG-MEASUREMENTREPORTAPPLAYER-START + +MeasurementReportAppLayer-r17 ::= SEQUENCE { + criticalExtensions CHOICE { + measurementReportAppLayer-r17 MeasurementReportAppLayer-r17-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +MeasurementReportAppLayer-r17-IEs ::= SEQUENCE { + measurementReportAppLayerList-r17 MeasurementReportAppLayerList-r17, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +MeasurementReportAppLayerList-r17 ::= SEQUENCE (SIZE (1..maxNrofAppLayerMeas-r17)) OF MeasReportAppLayer-r17 + +MeasReportAppLayer-r17 ::= SEQUENCE { + measConfigAppLayerId-r17 MeasConfigAppLayerId-r17, + measReportAppLayerContainer-r17 OCTET STRING OPTIONAL, + appLayerSessionStatus-r17 ENUMERATED {started, stopped} OPTIONAL, + ran-VisibleMeasurements-r17 RAN-VisibleMeasurements-r17 OPTIONAL +} + +RAN-VisibleMeasurements-r17 ::= SEQUENCE { + appLayerBufferLevelList-r17 SEQUENCE (SIZE (1..8)) OF AppLayerBufferLevel-r17 OPTIONAL, + playoutDelayForMediaStartup-r17 INTEGER (0..30000) OPTIONAL, + pdu-SessionIdList-r17 SEQUENCE (SIZE (1..maxNrofPDU-Sessions-r17)) OF PDU-SessionID OPTIONAL, + ... +} + +AppLayerBufferLevel-r17 ::= INTEGER (0..30000) + +-- TAG-MEASUREMENTREPORTAPPLAYER-STOP +-- TAG-MIB-START + +MIB ::= SEQUENCE { + systemFrameNumber BIT STRING (SIZE (6)), + subCarrierSpacingCommon ENUMERATED {scs15or60, scs30or120}, + ssb-SubcarrierOffset INTEGER (0..15), + dmrs-TypeA-Position ENUMERATED {pos2, pos3}, + pdcch-ConfigSIB1 PDCCH-ConfigSIB1, + cellBarred ENUMERATED {barred, notBarred}, + intraFreqReselection ENUMERATED {allowed, notAllowed}, + spare BIT STRING (SIZE (1)) +} + +-- TAG-MIB-STOP +-- TAG-MOBILITYFROMNRCOMMAND-START + +MobilityFromNRCommand ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + mobilityFromNRCommand MobilityFromNRCommand-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +MobilityFromNRCommand-IEs ::= SEQUENCE { + targetRAT-Type ENUMERATED { eutra, utra-fdd-v1610, spare2, spare1, ...}, + targetRAT-MessageContainer OCTET STRING, + nas-SecurityParamFromNR OCTET STRING OPTIONAL, -- Cond HO-ToEPCUTRAN + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension MobilityFromNRCommand-v1610-IEs OPTIONAL +} + +MobilityFromNRCommand-v1610-IEs ::= SEQUENCE { + voiceFallbackIndication-r16 ENUMERATED {true} OPTIONAL, -- Need N + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-MOBILITYFROMNRCOMMAND-STOP +-- TAG-PAGING-START + +Paging ::= SEQUENCE { + pagingRecordList PagingRecordList OPTIONAL, -- Need N + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension Paging-v1700-IEs OPTIONAL +} + +Paging-v1700-IEs ::= SEQUENCE { + pagingRecordList-v1700 PagingRecordList-v1700 OPTIONAL, -- Need N + pagingGroupList-r17 PagingGroupList-r17 OPTIONAL, -- Need N + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +PagingRecordList ::= SEQUENCE (SIZE(1..maxNrofPageRec)) OF PagingRecord + +PagingRecordList-v1700 ::= SEQUENCE (SIZE(1..maxNrofPageRec)) OF PagingRecord-v1700 + +PagingGroupList-r17 ::= SEQUENCE (SIZE(1..maxNrofPageGroup-r17)) OF TMGI-r17 + +PagingRecord ::= SEQUENCE { + ue-Identity PagingUE-Identity, + accessType ENUMERATED {non3GPP} OPTIONAL, -- Need N + ... +} + +PagingRecord-v1700 ::= SEQUENCE { + pagingCause-r17 ENUMERATED {voice} OPTIONAL -- Need N +} + +PagingUE-Identity ::= CHOICE { + ng-5G-S-TMSI NG-5G-S-TMSI, + fullI-RNTI I-RNTI-Value, + ... +} + +-- TAG-PAGING-STOP +-- TAG-RRCREESTABLISHMENT-START + +RRCReestablishment ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcReestablishment RRCReestablishment-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCReestablishment-IEs ::= SEQUENCE { + nextHopChainingCount NextHopChainingCount, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCReestablishment-v1700-IEs OPTIONAL +} + +RRCReestablishment-v1700-IEs ::= SEQUENCE { + sl-L2RemoteUE-Config-r17 SetupRelease {SL-L2RemoteUE-Config-r17} OPTIONAL, -- Cond L2RemoteUE + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-RRCREESTABLISHMENT-STOP +-- TAG-RRCREESTABLISHMENTCOMPLETE-START + +RRCReestablishmentComplete ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcReestablishmentComplete RRCReestablishmentComplete-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCReestablishmentComplete-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCReestablishmentComplete-v1610-IEs OPTIONAL +} + +RRCReestablishmentComplete-v1610-IEs ::= SEQUENCE { + ue-MeasurementsAvailable-r16 UE-MeasurementsAvailable-r16 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-RRCREESTABLISHMENTCOMPLETE-STOP +-- TAG-RRCREESTABLISHMENTREQUEST-START + + +RRCReestablishmentRequest ::= SEQUENCE { + rrcReestablishmentRequest RRCReestablishmentRequest-IEs +} + +RRCReestablishmentRequest-IEs ::= SEQUENCE { + ue-Identity ReestabUE-Identity, + reestablishmentCause ReestablishmentCause, + spare BIT STRING (SIZE (1)) +} + +ReestabUE-Identity ::= SEQUENCE { + c-RNTI RNTI-Value, + physCellId PhysCellId, + shortMAC-I ShortMAC-I +} + +ReestablishmentCause ::= ENUMERATED {reconfigurationFailure, handoverFailure, otherFailure, spare1} + +-- TAG-RRCREESTABLISHMENTREQUEST-STOP +-- TAG-RRCRECONFIGURATION-START + +RRCReconfiguration ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcReconfiguration RRCReconfiguration-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCReconfiguration-IEs ::= SEQUENCE { + radioBearerConfig RadioBearerConfig OPTIONAL, -- Need M + secondaryCellGroup OCTET STRING (CONTAINING CellGroupConfig) OPTIONAL, -- Cond SCG + measConfig MeasConfig OPTIONAL, -- Need M + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCReconfiguration-v1530-IEs OPTIONAL +} + +RRCReconfiguration-v1530-IEs ::= SEQUENCE { + masterCellGroup OCTET STRING (CONTAINING CellGroupConfig) OPTIONAL, -- Need M + fullConfig ENUMERATED {true} OPTIONAL, -- Cond FullConfig + dedicatedNAS-MessageList SEQUENCE (SIZE(1..maxDRB)) OF DedicatedNAS-Message OPTIONAL, -- Cond nonHO + masterKeyUpdate MasterKeyUpdate OPTIONAL, -- Cond MasterKeyChange + dedicatedSIB1-Delivery OCTET STRING (CONTAINING SIB1) OPTIONAL, -- Need N + dedicatedSystemInformationDelivery OCTET STRING (CONTAINING SystemInformation) OPTIONAL, -- Need N + otherConfig OtherConfig OPTIONAL, -- Need M + nonCriticalExtension RRCReconfiguration-v1540-IEs OPTIONAL +} + +RRCReconfiguration-v1540-IEs ::= SEQUENCE { + otherConfig-v1540 OtherConfig-v1540 OPTIONAL, -- Need M + nonCriticalExtension RRCReconfiguration-v1560-IEs OPTIONAL +} + +RRCReconfiguration-v1560-IEs ::= SEQUENCE { + mrdc-SecondaryCellGroupConfig SetupRelease { MRDC-SecondaryCellGroupConfig } OPTIONAL, -- Need M + radioBearerConfig2 OCTET STRING (CONTAINING RadioBearerConfig) OPTIONAL, -- Need M + sk-Counter SK-Counter OPTIONAL, -- Need N + nonCriticalExtension RRCReconfiguration-v1610-IEs OPTIONAL +} +RRCReconfiguration-v1610-IEs ::= SEQUENCE { + otherConfig-v1610 OtherConfig-v1610 OPTIONAL, -- Need M + bap-Config-r16 SetupRelease { BAP-Config-r16 } OPTIONAL, -- Need M + iab-IP-AddressConfigurationList-r16 IAB-IP-AddressConfigurationList-r16 OPTIONAL, -- Need M + conditionalReconfiguration-r16 ConditionalReconfiguration-r16 OPTIONAL, -- Need M + daps-SourceRelease-r16 ENUMERATED{true} OPTIONAL, -- Need N + t316-r16 SetupRelease {T316-r16} OPTIONAL, -- Need M + needForGapsConfigNR-r16 SetupRelease {NeedForGapsConfigNR-r16} OPTIONAL, -- Need M + onDemandSIB-Request-r16 SetupRelease { OnDemandSIB-Request-r16 } OPTIONAL, -- Need M + dedicatedPosSysInfoDelivery-r16 OCTET STRING (CONTAINING PosSystemInformation-r16-IEs) OPTIONAL, -- Need N + sl-ConfigDedicatedNR-r16 SetupRelease {SL-ConfigDedicatedNR-r16} OPTIONAL, -- Need M + sl-ConfigDedicatedEUTRA-Info-r16 SetupRelease {SL-ConfigDedicatedEUTRA-Info-r16} OPTIONAL, -- Need M + targetCellSMTC-SCG-r16 SSB-MTC OPTIONAL, -- Need S + nonCriticalExtension RRCReconfiguration-v1700-IEs OPTIONAL +} + +RRCReconfiguration-v1700-IEs ::= SEQUENCE { + otherConfig-v1700 OtherConfig-v1700 OPTIONAL, -- Need M + sl-L2RelayUE-Config-r17 SetupRelease { SL-L2RelayUE-Config-r17 } OPTIONAL, -- Need M + sl-L2RemoteUE-Config-r17 SetupRelease { SL-L2RemoteUE-Config-r17 } OPTIONAL, -- Need M + dedicatedPagingDelivery-r17 OCTET STRING (CONTAINING Paging) OPTIONAL, -- Cond PagingRelay + needForGapNCSG-ConfigNR-r17 SetupRelease {NeedForGapNCSG-ConfigNR-r17} OPTIONAL, -- Need M + needForGapNCSG-ConfigEUTRA-r17 SetupRelease {NeedForGapNCSG-ConfigEUTRA-r17} OPTIONAL, -- Need M + musim-GapConfig-r17 SetupRelease {MUSIM-GapConfig-r17} OPTIONAL, -- Need M + ul-GapFR2-Config-r17 SetupRelease { UL-GapFR2-Config-r17 } OPTIONAL, -- Need M + scg-State-r17 ENUMERATED { deactivated } OPTIONAL, -- Need N + appLayerMeasConfig-r17 AppLayerMeasConfig-r17 OPTIONAL, -- Need M + ue-TxTEG-RequestUL-TDOA-Config-r17 SetupRelease {UE-TxTEG-RequestUL-TDOA-Config-r17} OPTIONAL, -- Need M + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +MRDC-SecondaryCellGroupConfig ::= SEQUENCE { + mrdc-ReleaseAndAdd ENUMERATED {true} OPTIONAL, -- Need N + mrdc-SecondaryCellGroup CHOICE { + nr-SCG OCTET STRING (CONTAINING RRCReconfiguration), + eutra-SCG OCTET STRING + } +} + +BAP-Config-r16 ::= SEQUENCE { + bap-Address-r16 BIT STRING (SIZE (10)) OPTIONAL, -- Need M + defaultUL-BAP-RoutingID-r16 BAP-RoutingID-r16 OPTIONAL, -- Need M + defaultUL-BH-RLC-Channel-r16 BH-RLC-ChannelID-r16 OPTIONAL, -- Need M + flowControlFeedbackType-r16 ENUMERATED {perBH-RLC-Channel, perRoutingID, both} OPTIONAL, -- Need R + ... +} + +MasterKeyUpdate ::= SEQUENCE { + keySetChangeIndicator BOOLEAN, + nextHopChainingCount NextHopChainingCount, + nas-Container OCTET STRING OPTIONAL, -- Cond securityNASC + ... +} + +OnDemandSIB-Request-r16 ::= SEQUENCE { + onDemandSIB-RequestProhibitTimer-r16 ENUMERATED {s0, s0dot5, s1, s2, s5, s10, s20, s30} +} + +T316-r16 ::= ENUMERATED {ms50, ms100, ms200, ms300, ms400, ms500, ms600, ms1000, ms1500, ms2000} + +IAB-IP-AddressConfigurationList-r16 ::= SEQUENCE { + iab-IP-AddressToAddModList-r16 SEQUENCE (SIZE(1..maxIAB-IP-Address-r16)) OF IAB-IP-AddressConfiguration-r16 OPTIONAL, -- Need N + iab-IP-AddressToReleaseList-r16 SEQUENCE (SIZE(1..maxIAB-IP-Address-r16)) OF IAB-IP-AddressIndex-r16 OPTIONAL, -- Need N + ... +} + +IAB-IP-AddressConfiguration-r16 ::= SEQUENCE { + iab-IP-AddressIndex-r16 IAB-IP-AddressIndex-r16, + iab-IP-Address-r16 IAB-IP-Address-r16 OPTIONAL, -- Need M + iab-IP-Usage-r16 IAB-IP-Usage-r16 OPTIONAL, -- Need M + iab-donor-DU-BAP-Address-r16 BIT STRING (SIZE(10)) OPTIONAL, -- Need M +... +} + +SL-ConfigDedicatedEUTRA-Info-r16 ::= SEQUENCE { + sl-ConfigDedicatedEUTRA-r16 OCTET STRING OPTIONAL, -- Need M + sl-TimeOffsetEUTRA-List-r16 SEQUENCE (SIZE (8)) OF SL-TimeOffsetEUTRA-r16 OPTIONAL -- Need M +} + +SL-TimeOffsetEUTRA-r16 ::= ENUMERATED {ms0, ms0dot25, ms0dot5, ms0dot625, ms0dot75, ms1, ms1dot25, ms1dot5, ms1dot75, + ms2, ms2dot5, ms3, ms4, ms5, ms6, ms8, ms10, ms20} + +UE-TxTEG-RequestUL-TDOA-Config-r17 ::= CHOICE { + oneShot-r17 NULL, + periodicReporting-r17 ENUMERATED { ms160, ms320, ms1280, ms2560, ms61440, ms81920, ms368640, ms737280 } +} +-- TAG-RRCRECONFIGURATION-STOP +-- TAG-RRCRECONFIGURATIONCOMPLETE-START + +RRCReconfigurationComplete ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcReconfigurationComplete RRCReconfigurationComplete-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCReconfigurationComplete-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCReconfigurationComplete-v1530-IEs OPTIONAL +} + +RRCReconfigurationComplete-v1530-IEs ::= SEQUENCE { + uplinkTxDirectCurrentList UplinkTxDirectCurrentList OPTIONAL, + nonCriticalExtension RRCReconfigurationComplete-v1560-IEs OPTIONAL +} + +RRCReconfigurationComplete-v1560-IEs ::= SEQUENCE { + scg-Response CHOICE { + nr-SCG-Response OCTET STRING (CONTAINING RRCReconfigurationComplete), + eutra-SCG-Response OCTET STRING + } OPTIONAL, + nonCriticalExtension RRCReconfigurationComplete-v1610-IEs OPTIONAL +} + +RRCReconfigurationComplete-v1610-IEs ::= SEQUENCE { + ue-MeasurementsAvailable-r16 UE-MeasurementsAvailable-r16 OPTIONAL, + needForGapsInfoNR-r16 NeedForGapsInfoNR-r16 OPTIONAL, + nonCriticalExtension RRCReconfigurationComplete-v1640-IEs OPTIONAL +} + +RRCReconfigurationComplete-v1640-IEs ::= SEQUENCE { + uplinkTxDirectCurrentTwoCarrierList-r16 UplinkTxDirectCurrentTwoCarrierList-r16 OPTIONAL, + nonCriticalExtension RRCReconfigurationComplete-v1700-IEs OPTIONAL +} + +RRCReconfigurationComplete-v1700-IEs ::= SEQUENCE { + needForGapNCSG-InfoNR-r17 NeedForGapNCSG-InfoNR-r17 OPTIONAL, + needForGapNCSG-InfoEUTRA-r17 NeedForGapNCSG-InfoEUTRA-r17 OPTIONAL, + selectedCondRRCReconfig-r17 CondReconfigId-r16 OPTIONAL, + nonCriticalExtension RRCReconfigurationComplete-v1720-IEs OPTIONAL +} + +RRCReconfigurationComplete-v1720-IEs ::= SEQUENCE { + uplinkTxDirectCurrentMoreCarrierList-r17 UplinkTxDirectCurrentMoreCarrierList-r17 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-RRCRECONFIGURATIONCOMPLETE-STOP +-- TAG-RRCREJECT-START + +RRCReject ::= SEQUENCE { + criticalExtensions CHOICE { + rrcReject RRCReject-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCReject-IEs ::= SEQUENCE { + waitTime RejectWaitTime OPTIONAL, -- Need N + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +-- TAG-RRCREJECT-STOP +-- TAG-RRCRELEASE-START + +RRCRelease ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcRelease RRCRelease-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCRelease-IEs ::= SEQUENCE { + redirectedCarrierInfo RedirectedCarrierInfo OPTIONAL, -- Need N + cellReselectionPriorities CellReselectionPriorities OPTIONAL, -- Need R + suspendConfig SuspendConfig OPTIONAL, -- Need R + deprioritisationReq SEQUENCE { + deprioritisationType ENUMERATED {frequency, nr}, + deprioritisationTimer ENUMERATED {min5, min10, min15, min30} + } OPTIONAL, -- Need N + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCRelease-v1540-IEs OPTIONAL +} + +RRCRelease-v1540-IEs ::= SEQUENCE { + waitTime RejectWaitTime OPTIONAL, -- Need N + nonCriticalExtension RRCRelease-v1610-IEs OPTIONAL +} + +RRCRelease-v1610-IEs ::= SEQUENCE { + voiceFallbackIndication-r16 ENUMERATED {true} OPTIONAL, -- Need N + measIdleConfig-r16 SetupRelease {MeasIdleConfigDedicated-r16} OPTIONAL, -- Need M + nonCriticalExtension RRCRelease-v1650-IEs OPTIONAL +} + +RRCRelease-v1650-IEs ::= SEQUENCE { + mpsPriorityIndication-r16 ENUMERATED {true} OPTIONAL, -- Cond Redirection2 + nonCriticalExtension RRCRelease-v1710-IEs OPTIONAL +} + +RRCRelease-v1710-IEs ::= SEQUENCE { + noLastCellUpdate-r17 ENUMERATED {true} OPTIONAL, -- Need S + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +RedirectedCarrierInfo ::= CHOICE { + nr CarrierInfoNR, + eutra RedirectedCarrierInfo-EUTRA, + ... +} + +RedirectedCarrierInfo-EUTRA ::= SEQUENCE { + eutraFrequency ARFCN-ValueEUTRA, + cnType ENUMERATED {epc,fiveGC} OPTIONAL -- Need N +} + +CarrierInfoNR ::= SEQUENCE { + carrierFreq ARFCN-ValueNR, + ssbSubcarrierSpacing SubcarrierSpacing, + smtc SSB-MTC OPTIONAL, -- Need S + ... +} + +SuspendConfig ::= SEQUENCE { + fullI-RNTI I-RNTI-Value, + shortI-RNTI ShortI-RNTI-Value, + ran-PagingCycle PagingCycle, + ran-NotificationAreaInfo RAN-NotificationAreaInfo OPTIONAL, -- Need M + t380 PeriodicRNAU-TimerValue OPTIONAL, -- Need R + nextHopChainingCount NextHopChainingCount, + ..., + [[ + sl-UEIdentityRemote-r17 RNTI-Value OPTIONAL, -- Cond L2RemoteUE + sdt-Config-r17 SetupRelease { SDT-Config-r17 } OPTIONAL, -- Need M + srs-PosRRC-Inactive-r17 SetupRelease { SRS-PosRRC-Inactive-r17 } OPTIONAL, -- Need M + ran-ExtendedPagingCycle-r17 ExtendedPagingCycle-r17 OPTIONAL -- Cond RANPaging + ]] +} + +PeriodicRNAU-TimerValue ::= ENUMERATED { min5, min10, min20, min30, min60, min120, min360, min720} + +CellReselectionPriorities ::= SEQUENCE { + freqPriorityListEUTRA FreqPriorityListEUTRA OPTIONAL, -- Need M + freqPriorityListNR FreqPriorityListNR OPTIONAL, -- Need M + t320 ENUMERATED {min5, min10, min20, min30, min60, min120, min180, spare1} OPTIONAL, -- Need R + ..., + [[ + freqPriorityListDedicatedSlicing-r17 FreqPriorityListDedicatedSlicing-r17 OPTIONAL -- Need M + ]] +} + +PagingCycle ::= ENUMERATED {rf32, rf64, rf128, rf256} + +ExtendedPagingCycle-r17 ::= ENUMERATED {rf256, rf512, rf1024, spare1} + +FreqPriorityListEUTRA ::= SEQUENCE (SIZE (1..maxFreq)) OF FreqPriorityEUTRA + +FreqPriorityListNR ::= SEQUENCE (SIZE (1..maxFreq)) OF FreqPriorityNR + +FreqPriorityEUTRA ::= SEQUENCE { + carrierFreq ARFCN-ValueEUTRA, + cellReselectionPriority CellReselectionPriority, + cellReselectionSubPriority CellReselectionSubPriority OPTIONAL -- Need R +} + +FreqPriorityNR ::= SEQUENCE { + carrierFreq ARFCN-ValueNR, + cellReselectionPriority CellReselectionPriority, + cellReselectionSubPriority CellReselectionSubPriority OPTIONAL -- Need R +} + +RAN-NotificationAreaInfo ::= CHOICE { + cellList PLMN-RAN-AreaCellList, + ran-AreaConfigList PLMN-RAN-AreaConfigList, + ... +} + +PLMN-RAN-AreaCellList ::= SEQUENCE (SIZE (1.. maxPLMNIdentities)) OF PLMN-RAN-AreaCell + +PLMN-RAN-AreaCell ::= SEQUENCE { + plmn-Identity PLMN-Identity OPTIONAL, -- Need S + ran-AreaCells SEQUENCE (SIZE (1..32)) OF CellIdentity +} + +PLMN-RAN-AreaConfigList ::= SEQUENCE (SIZE (1..maxPLMNIdentities)) OF PLMN-RAN-AreaConfig + +PLMN-RAN-AreaConfig ::= SEQUENCE { + plmn-Identity PLMN-Identity OPTIONAL, -- Need S + ran-Area SEQUENCE (SIZE (1..16)) OF RAN-AreaConfig +} + +RAN-AreaConfig ::= SEQUENCE { + trackingAreaCode TrackingAreaCode, + ran-AreaCodeList SEQUENCE (SIZE (1..32)) OF RAN-AreaCode OPTIONAL -- Need R +} + +SDT-Config-r17 ::= SEQUENCE { + sdt-DRB-List-r17 SEQUENCE (SIZE (0..maxDRB)) OF DRB-Identity OPTIONAL, -- Need M + sdt-SRB2-Indication-r17 ENUMERATED {allowed} OPTIONAL, -- Need R + sdt-MAC-PHY-CG-Config-r17 SetupRelease {SDT-CG-Config-r17} OPTIONAL, -- Need M + sdt-DRB-ContinueROHC-r17 ENUMERATED { cell, rna } OPTIONAL -- Need S +} + +SDT-CG-Config-r17 ::= OCTET STRING (CONTAINING SDT-MAC-PHY-CG-Config-r17) + +SDT-MAC-PHY-CG-Config-r17 ::= SEQUENCE { + -- CG-SDT specific configuration + cg-SDT-ConfigLCH-RestrictionToAddModList-r17 SEQUENCE (SIZE(1..maxLC-ID)) OF CG-SDT-ConfigLCH-Restriction-r17 OPTIONAL, -- Need N + cg-SDT-ConfigLCH-RestrictionToReleaseList-r17 SEQUENCE (SIZE(1..maxLC-ID)) OF LogicalChannelIdentity OPTIONAL, -- Need N + cg-SDT-ConfigInitialBWP-NUL-r17 SetupRelease {BWP-UplinkDedicatedSDT-r17} OPTIONAL, -- Need M + cg-SDT-ConfigInitialBWP-SUL-r17 SetupRelease {BWP-UplinkDedicatedSDT-r17} OPTIONAL, -- Need M + cg-SDT-ConfigInitialBWP-DL-r17 BWP-DownlinkDedicatedSDT-r17 OPTIONAL, -- Need M + cg-SDT-TimeAlignmentTimer-r17 TimeAlignmentTimer OPTIONAL, -- Need M + cg-SDT-RSRP-ThresholdSSB-r17 RSRP-Range OPTIONAL, -- Need M + cg-SDT-TA-ValidationConfig-r17 SetupRelease { CG-SDT-TA-ValidationConfig-r17 } OPTIONAL, -- Need M + cg-SDT-CS-RNTI-r17 RNTI-Value OPTIONAL, -- Need M + ... +} + +CG-SDT-TA-ValidationConfig-r17 ::= SEQUENCE { + cg-SDT-RSRP-ChangeThreshold-r17 ENUMERATED { dB2, dB4, dB6, dB8, dB10, dB14, dB18, dB22, + dB26, dB30, dB34, spare5, spare4, spare3, spare2, spare1} +} + +BWP-DownlinkDedicatedSDT-r17 ::= SEQUENCE { + pdcch-Config-r17 SetupRelease { PDCCH-Config } OPTIONAL, -- Need M + pdsch-Config-r17 SetupRelease { PDSCH-Config } OPTIONAL, -- Need M + ... +} + +BWP-UplinkDedicatedSDT-r17 ::= SEQUENCE { + pusch-Config-r17 SetupRelease { PUSCH-Config } OPTIONAL, -- Need M + configuredGrantConfigToAddModList-r17 ConfiguredGrantConfigToAddModList-r16 OPTIONAL, -- Need N + configuredGrantConfigToReleaseList-r17 ConfiguredGrantConfigToReleaseList-r16 OPTIONAL, -- Need N + ... +} + +CG-SDT-ConfigLCH-Restriction-r17 ::= SEQUENCE { + logicalChannelIdentity-r17 LogicalChannelIdentity, + configuredGrantType1Allowed-r17 ENUMERATED {true} OPTIONAL, -- Need R + allowedCG-List-r17 SEQUENCE (SIZE (0.. maxNrofConfiguredGrantConfigMAC-1-r16)) OF ConfiguredGrantConfigIndexMAC-r16 + OPTIONAL -- Need R +} + +SRS-PosRRC-Inactive-r17 ::= OCTET STRING (CONTAINING SRS-PosRRC-InactiveConfig-r17) + +SRS-PosRRC-InactiveConfig-r17 ::= SEQUENCE { + srs-PosConfigNUL-r17 SRS-PosConfig-r17 OPTIONAL, -- Need R + srs-PosConfigSUL-r17 SRS-PosConfig-r17 OPTIONAL, -- Need R + bwp-NUL-r17 BWP OPTIONAL, -- Need S + bwp-SUL-r17 BWP OPTIONAL, -- Need S + inactivePosSRS-TimeAlignmentTimer-r17 TimeAlignmentTimer OPTIONAL, -- Need M + inactivePosSRS-RSRP-ChangeThreshold-r17 RSRP-ChangeThreshold-r17 OPTIONAL -- Need M +} + +RSRP-ChangeThreshold-r17 ::= ENUMERATED {dB4, dB6, dB8, dB10, dB14, dB18, dB22, dB26, dB30, dB34, spare6, spare5, spare4, spare3, spare2, spare1} + +SRS-PosConfig-r17 ::= SEQUENCE { + srs-PosResourceSetToReleaseList-r17 SEQUENCE (SIZE(1..maxNrofSRS-PosResourceSets-r16)) OF SRS-PosResourceSetId-r16 OPTIONAL,-- Need N + srs-PosResourceSetToAddModList-r17 SEQUENCE (SIZE(1..maxNrofSRS-PosResourceSets-r16)) OF SRS-PosResourceSet-r16 OPTIONAL,-- Need N + srs-PosResourceToReleaseList-r17 SEQUENCE (SIZE(1..maxNrofSRS-PosResources-r16)) OF SRS-PosResourceId-r16 OPTIONAL,-- Need N + srs-PosResourceToAddModList-r17 SEQUENCE (SIZE(1..maxNrofSRS-PosResources-r16)) OF SRS-PosResource-r16 OPTIONAL -- Need N +} + +-- TAG-RRCRELEASE-STOP +-- TAG-RRCRESUME-START + +RRCResume ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcResume RRCResume-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCResume-IEs ::= SEQUENCE { + radioBearerConfig RadioBearerConfig OPTIONAL, -- Need M + masterCellGroup OCTET STRING (CONTAINING CellGroupConfig) OPTIONAL, -- Need M + measConfig MeasConfig OPTIONAL, -- Need M + fullConfig ENUMERATED {true} OPTIONAL, -- Need N + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCResume-v1560-IEs OPTIONAL +} + +RRCResume-v1560-IEs ::= SEQUENCE { + radioBearerConfig2 OCTET STRING (CONTAINING RadioBearerConfig) OPTIONAL, -- Need M + sk-Counter SK-Counter OPTIONAL, -- Need N + nonCriticalExtension RRCResume-v1610-IEs OPTIONAL +} + +RRCResume-v1610-IEs ::= SEQUENCE { + idleModeMeasurementReq-r16 ENUMERATED {true} OPTIONAL, -- Need N + restoreMCG-SCells-r16 ENUMERATED {true} OPTIONAL, -- Need N + restoreSCG-r16 ENUMERATED {true} OPTIONAL, -- Need N + mrdc-SecondaryCellGroup-r16 CHOICE { + nr-SCG-r16 OCTET STRING (CONTAINING RRCReconfiguration), + eutra-SCG-r16 OCTET STRING + } OPTIONAL, -- Cond RestoreSCG + needForGapsConfigNR-r16 SetupRelease {NeedForGapsConfigNR-r16} OPTIONAL, -- Need M + nonCriticalExtension RRCResume-v1700-IEs OPTIONAL +} + +RRCResume-v1700-IEs ::= SEQUENCE { + sl-ConfigDedicatedNR-r17 SetupRelease {SL-ConfigDedicatedNR-r16} OPTIONAL, -- Cond L2RemoteUE + sl-L2RemoteUE-Config-r17 SetupRelease {SL-L2RemoteUE-Config-r17} OPTIONAL, -- Cond L2RemoteUE + needForGapNCSG-ConfigNR-r17 SetupRelease {NeedForGapNCSG-ConfigNR-r17} OPTIONAL, -- Need M + needForGapNCSG-ConfigEUTRA-r17 SetupRelease {NeedForGapNCSG-ConfigEUTRA-r17} OPTIONAL, -- Need M + scg-State-r17 ENUMERATED {deactivated} OPTIONAL, -- Need N + appLayerMeasConfig-r17 AppLayerMeasConfig-r17 OPTIONAL, -- Need M + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-RRCRESUME-STOP +-- TAG-RRCRESUMECOMPLETE-START + +RRCResumeComplete ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcResumeComplete RRCResumeComplete-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCResumeComplete-IEs ::= SEQUENCE { + dedicatedNAS-Message DedicatedNAS-Message OPTIONAL, + selectedPLMN-Identity INTEGER (1..maxPLMN) OPTIONAL, + uplinkTxDirectCurrentList UplinkTxDirectCurrentList OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCResumeComplete-v1610-IEs OPTIONAL +} + +RRCResumeComplete-v1610-IEs ::= SEQUENCE { + idleMeasAvailable-r16 ENUMERATED {true} OPTIONAL, + measResultIdleEUTRA-r16 MeasResultIdleEUTRA-r16 OPTIONAL, + measResultIdleNR-r16 MeasResultIdleNR-r16 OPTIONAL, + scg-Response-r16 CHOICE { + nr-SCG-Response OCTET STRING (CONTAINING RRCReconfigurationComplete), + eutra-SCG-Response OCTET STRING + } OPTIONAL, + ue-MeasurementsAvailable-r16 UE-MeasurementsAvailable-r16 OPTIONAL, + mobilityHistoryAvail-r16 ENUMERATED {true} OPTIONAL, + mobilityState-r16 ENUMERATED {normal, medium, high, spare} OPTIONAL, + needForGapsInfoNR-r16 NeedForGapsInfoNR-r16 OPTIONAL, + nonCriticalExtension RRCResumeComplete-v1640-IEs OPTIONAL +} + +RRCResumeComplete-v1640-IEs ::= SEQUENCE { + uplinkTxDirectCurrentTwoCarrierList-r16 UplinkTxDirectCurrentTwoCarrierList-r16 OPTIONAL, + nonCriticalExtension RRCResumeComplete-v1700-IEs OPTIONAL +} + +RRCResumeComplete-v1700-IEs ::= SEQUENCE { + needForGapNCSG-InfoNR-r17 NeedForGapNCSG-InfoNR-r17 OPTIONAL, + needForGapNCSG-InfoEUTRA-r17 NeedForGapNCSG-InfoEUTRA-r17 OPTIONAL, + nonCriticalExtension RRCResumeComplete-v1720-IEs OPTIONAL +} + +RRCResumeComplete-v1720-IEs ::= SEQUENCE { + uplinkTxDirectCurrentMoreCarrierList-r17 UplinkTxDirectCurrentMoreCarrierList-r17 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-RRCRESUMECOMPLETE-STOP +-- TAG-RRCRESUMEREQUEST-START + +RRCResumeRequest ::= SEQUENCE { + rrcResumeRequest RRCResumeRequest-IEs +} + +RRCResumeRequest-IEs ::= SEQUENCE { + resumeIdentity ShortI-RNTI-Value, + resumeMAC-I BIT STRING (SIZE (16)), + resumeCause ResumeCause, + spare BIT STRING (SIZE (1)) +} + +-- TAG-RRCRESUMEREQUEST-STOP +-- TAG-RRCRESUMEREQUEST1-START + +RRCResumeRequest1 ::= SEQUENCE { + rrcResumeRequest1 RRCResumeRequest1-IEs +} + +RRCResumeRequest1-IEs ::= SEQUENCE { + resumeIdentity I-RNTI-Value, + resumeMAC-I BIT STRING (SIZE (16)), + resumeCause ResumeCause, + spare BIT STRING (SIZE (1)) +} + +-- TAG-RRCRESUMEREQUEST1-STOP +-- TAG-RRCSETUP-START + +RRCSetup ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcSetup RRCSetup-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCSetup-IEs ::= SEQUENCE { + radioBearerConfig RadioBearerConfig, + masterCellGroup OCTET STRING (CONTAINING CellGroupConfig), + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCSetup-v1700-IEs OPTIONAL +} + +RRCSetup-v1700-IEs ::= SEQUENCE { + sl-ConfigDedicatedNR-r17 SL-ConfigDedicatedNR-r16 OPTIONAL, -- Cond L2RemoteUE + sl-L2RemoteUE-Config-r17 SL-L2RemoteUE-Config-r17 OPTIONAL, -- Cond L2RemoteUE + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-RRCSETUP-STOP +-- TAG-RRCSETUPCOMPLETE-START + +RRCSetupComplete ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcSetupComplete RRCSetupComplete-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCSetupComplete-IEs ::= SEQUENCE { + selectedPLMN-Identity INTEGER (1..maxPLMN), + registeredAMF RegisteredAMF OPTIONAL, + guami-Type ENUMERATED {native, mapped} OPTIONAL, + s-NSSAI-List SEQUENCE (SIZE (1..maxNrofS-NSSAI)) OF S-NSSAI OPTIONAL, + dedicatedNAS-Message DedicatedNAS-Message, + ng-5G-S-TMSI-Value CHOICE { + ng-5G-S-TMSI NG-5G-S-TMSI, + ng-5G-S-TMSI-Part2 BIT STRING (SIZE (9)) + } OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCSetupComplete-v1610-IEs OPTIONAL +} + +RRCSetupComplete-v1610-IEs ::= SEQUENCE { + iab-NodeIndication-r16 ENUMERATED {true} OPTIONAL, + idleMeasAvailable-r16 ENUMERATED {true} OPTIONAL, + ue-MeasurementsAvailable-r16 UE-MeasurementsAvailable-r16 OPTIONAL, + mobilityHistoryAvail-r16 ENUMERATED {true} OPTIONAL, + mobilityState-r16 ENUMERATED {normal, medium, high, spare} OPTIONAL, + nonCriticalExtension RRCSetupComplete-v1690-IEs OPTIONAL +} + +RRCSetupComplete-v1690-IEs ::= SEQUENCE { + ul-RRC-Segmentation-r16 ENUMERATED {true} OPTIONAL, + nonCriticalExtension RRCSetupComplete-v1700-IEs OPTIONAL +} + +RRCSetupComplete-v1700-IEs ::= SEQUENCE { + onboardingRequest-r17 ENUMERATED {true} OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +RegisteredAMF ::= SEQUENCE { + plmn-Identity PLMN-Identity OPTIONAL, + amf-Identifier AMF-Identifier +} + +-- TAG-RRCSETUPCOMPLETE-STOP +-- TAG-RRCSETUPREQUEST-START + +RRCSetupRequest ::= SEQUENCE { + rrcSetupRequest RRCSetupRequest-IEs +} + +RRCSetupRequest-IEs ::= SEQUENCE { + ue-Identity InitialUE-Identity, + establishmentCause EstablishmentCause, + spare BIT STRING (SIZE (1)) +} + +InitialUE-Identity ::= CHOICE { + ng-5G-S-TMSI-Part1 BIT STRING (SIZE (39)), + randomValue BIT STRING (SIZE (39)) +} + +EstablishmentCause ::= ENUMERATED { + emergency, highPriorityAccess, mt-Access, mo-Signalling, + mo-Data, mo-VoiceCall, mo-VideoCall, mo-SMS, mps-PriorityAccess, mcs-PriorityAccess, + spare6, spare5, spare4, spare3, spare2, spare1} + +-- TAG-RRCSETUPREQUEST-STOP +-- TAG-RRCSYSTEMINFOREQUEST-START + +RRCSystemInfoRequest ::= SEQUENCE { + criticalExtensions CHOICE { + rrcSystemInfoRequest RRCSystemInfoRequest-IEs, + criticalExtensionsFuture-r16 CHOICE { + rrcPosSystemInfoRequest-r16 RRC-PosSystemInfoRequest-r16-IEs, + criticalExtensionsFuture SEQUENCE {} + } + } +} + +RRCSystemInfoRequest-IEs ::= SEQUENCE { + requested-SI-List BIT STRING (SIZE (maxSI-Message)), --32bits + spare BIT STRING (SIZE (12)) +} + +RRC-PosSystemInfoRequest-r16-IEs ::= SEQUENCE { + requestedPosSI-List BIT STRING (SIZE (maxSI-Message)), --32bits + spare BIT STRING (SIZE (11)) +} + +-- TAG-RRCSYSTEMINFOREQUEST-STOP +-- TAG-SCGFAILUREINFORMATION-START + +SCGFailureInformation ::= SEQUENCE { + criticalExtensions CHOICE { + scgFailureInformation SCGFailureInformation-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +SCGFailureInformation-IEs ::= SEQUENCE { + failureReportSCG FailureReportSCG OPTIONAL, + nonCriticalExtension SCGFailureInformation-v1590-IEs OPTIONAL +} + +SCGFailureInformation-v1590-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +FailureReportSCG ::= SEQUENCE { + failureType ENUMERATED { + t310-Expiry, randomAccessProblem, + rlc-MaxNumRetx, + synchReconfigFailureSCG, scg-ReconfigFailure, + srb3-IntegrityFailure, other-r16, spare1}, + measResultFreqList MeasResultFreqList OPTIONAL, + measResultSCG-Failure OCTET STRING (CONTAINING MeasResultSCG-Failure) OPTIONAL, + ..., + [[ + locationInfo-r16 LocationInfo-r16 OPTIONAL, + failureType-v1610 ENUMERATED {scg-lbtFailure-r16, beamFailureRecoveryFailure-r16, + t312-Expiry-r16, bh-RLF-r16, beamFailure-r17, spare3, spare2, spare1} OPTIONAL + ]], + [[ + previousPSCellId-r17 SEQUENCE { + physCellId-r17 PhysCellId, + carrierFreq-r17 ARFCN-ValueNR + } OPTIONAL, + failedPSCellId-r17 SEQUENCE { + physCellId-r17 PhysCellId, + carrierFreq-r17 ARFCN-ValueNR + } OPTIONAL, + timeSCGFailure-r17 INTEGER (0..1023) OPTIONAL, + perRAInfoList-r17 PerRAInfoList-r16 OPTIONAL + ]] +} + +MeasResultFreqList ::= SEQUENCE (SIZE (1..maxFreq)) OF MeasResult2NR + + +-- TAG-SCGFAILUREINFORMATION-STOP +-- TAG-SCGFAILUREINFORMATIONEUTRA-START + +SCGFailureInformationEUTRA ::= SEQUENCE { + criticalExtensions CHOICE { + scgFailureInformationEUTRA SCGFailureInformationEUTRA-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +SCGFailureInformationEUTRA-IEs ::= SEQUENCE { + failureReportSCG-EUTRA FailureReportSCG-EUTRA OPTIONAL, + nonCriticalExtension SCGFailureInformationEUTRA-v1590-IEs OPTIONAL +} + +SCGFailureInformationEUTRA-v1590-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +FailureReportSCG-EUTRA ::= SEQUENCE { + failureType ENUMERATED { + t313-Expiry, randomAccessProblem,rlc-MaxNumRetx, + scg-ChangeFailure, spare4, + spare3, spare2, spare1}, + measResultFreqListMRDC MeasResultFreqListFailMRDC OPTIONAL, + measResultSCG-FailureMRDC OCTET STRING OPTIONAL, + ..., + [[ + locationInfo-r16 LocationInfo-r16 OPTIONAL + ]] +} + +MeasResultFreqListFailMRDC ::= SEQUENCE (SIZE (1.. maxFreq)) OF MeasResult2EUTRA + +-- TAG-SCGFAILUREINFORMATIONEUTRA-STOP +-- TAG-SECURITYMODECOMMAND-START + +SecurityModeCommand ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + securityModeCommand SecurityModeCommand-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +SecurityModeCommand-IEs ::= SEQUENCE { + securityConfigSMC SecurityConfigSMC, + + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +SecurityConfigSMC ::= SEQUENCE { + securityAlgorithmConfig SecurityAlgorithmConfig, + ... +} + +-- TAG-SECURITYMODECOMMAND-STOP +-- TAG-SECURITYMODECOMPLETE-START + +SecurityModeComplete ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + securityModeComplete SecurityModeComplete-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +SecurityModeComplete-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +-- TAG-SECURITYMODECOMPLETE-STOP +-- TAG-SECURITYMODEFAILURE-START + +SecurityModeFailure ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + securityModeFailure SecurityModeFailure-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +SecurityModeFailure-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +-- TAG-SECURITYMODEFAILURE-STOP +-- TAG-SIB1-START + +SIB1 ::= SEQUENCE { + cellSelectionInfo SEQUENCE { + q-RxLevMin Q-RxLevMin, + q-RxLevMinOffset INTEGER (1..8) OPTIONAL, -- Need S + q-RxLevMinSUL Q-RxLevMin OPTIONAL, -- Need R + q-QualMin Q-QualMin OPTIONAL, -- Need S + q-QualMinOffset INTEGER (1..8) OPTIONAL -- Need S + } OPTIONAL, -- Cond Standalone + cellAccessRelatedInfo CellAccessRelatedInfo, + connEstFailureControl ConnEstFailureControl OPTIONAL, -- Need R + si-SchedulingInfo SI-SchedulingInfo OPTIONAL, -- Need R + servingCellConfigCommon ServingCellConfigCommonSIB OPTIONAL, -- Need R + ims-EmergencySupport ENUMERATED {true} OPTIONAL, -- Need R + eCallOverIMS-Support ENUMERATED {true} OPTIONAL, -- Need R + ue-TimersAndConstants UE-TimersAndConstants OPTIONAL, -- Need R + uac-BarringInfo SEQUENCE { + uac-BarringForCommon UAC-BarringPerCatList OPTIONAL, -- Need S + uac-BarringPerPLMN-List UAC-BarringPerPLMN-List OPTIONAL, -- Need S + uac-BarringInfoSetList UAC-BarringInfoSetList, + uac-AccessCategory1-SelectionAssistanceInfo CHOICE { + plmnCommon UAC-AccessCategory1-SelectionAssistanceInfo, + individualPLMNList SEQUENCE (SIZE (2..maxPLMN)) OF UAC-AccessCategory1-SelectionAssistanceInfo + } OPTIONAL -- Need S + } OPTIONAL, -- Need R + useFullResumeID ENUMERATED {true} OPTIONAL, -- Need R + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SIB1-v1610-IEs OPTIONAL +} + +SIB1-v1610-IEs ::= SEQUENCE { + idleModeMeasurementsEUTRA-r16 ENUMERATED{true} OPTIONAL, -- Need R + idleModeMeasurementsNR-r16 ENUMERATED{true} OPTIONAL, -- Need R + posSI-SchedulingInfo-r16 PosSI-SchedulingInfo-r16 OPTIONAL, -- Need R + nonCriticalExtension SIB1-v1630-IEs OPTIONAL +} + +SIB1-v1630-IEs ::= SEQUENCE { + uac-BarringInfo-v1630 SEQUENCE { + uac-AC1-SelectAssistInfo-r16 SEQUENCE (SIZE (2..maxPLMN)) OF UAC-AC1-SelectAssistInfo-r16 + } OPTIONAL, -- Need R + nonCriticalExtension SIB1-v1700-IEs OPTIONAL +} + +SIB1-v1700-IEs ::= SEQUENCE { + hsdn-Cell-r17 ENUMERATED {true} OPTIONAL, -- Need R + uac-BarringInfo-v1700 SEQUENCE { + uac-BarringInfoSetList-v1700 UAC-BarringInfoSetList-v1700 + } OPTIONAL, -- Cond MINT + sdt-ConfigCommon-r17 SDT-ConfigCommonSIB-r17 OPTIONAL, -- Need R + redCap-ConfigCommon-r17 RedCap-ConfigCommonSIB-r17 OPTIONAL, -- Need R + featurePriorities-r17 SEQUENCE { + redCapPriority-r17 FeaturePriority-r17 OPTIONAL, -- Need R + slicingPriority-r17 FeaturePriority-r17 OPTIONAL, -- Need R + msg3-Repetitions-Priority-r17 FeaturePriority-r17 OPTIONAL, -- Need R + sdt-Priority-r17 FeaturePriority-r17 OPTIONAL -- Need R + } OPTIONAL, -- Need R + si-SchedulingInfo-v1700 SI-SchedulingInfo-v1700 OPTIONAL, -- Need R + hyperSFN-r17 BIT STRING (SIZE (10)) OPTIONAL, -- Need R + eDRX-AllowedIdle-r17 ENUMERATED {true} OPTIONAL, -- Need R + eDRX-AllowedInactive-r17 ENUMERATED {true} OPTIONAL, -- Cond EDRX-RC + intraFreqReselectionRedCap-r17 ENUMERATED {allowed, notAllowed} OPTIONAL, -- Need S + cellBarredNTN-r17 ENUMERATED {barred, notBarred} OPTIONAL, -- Need S + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +UAC-AccessCategory1-SelectionAssistanceInfo ::= ENUMERATED {a, b, c} + +UAC-AC1-SelectAssistInfo-r16 ::= ENUMERATED {a, b, c, notConfigured} + +SDT-ConfigCommonSIB-r17 ::= SEQUENCE { + sdt-RSRP-Threshold-r17 RSRP-Range OPTIONAL, -- Need R + sdt-LogicalChannelSR-DelayTimer-r17 ENUMERATED { sf20, sf40, sf64, sf128, sf512, sf1024, sf2560, spare1} OPTIONAL, -- Need R + sdt-DataVolumeThreshold-r17 ENUMERATED {byte32, byte100, byte200, byte400, byte600, byte800, byte1000, byte2000, byte4000, + byte8000, byte9000, byte10000, byte12000, byte24000, byte48000, byte96000}, + t319a-r17 ENUMERATED { ms100, ms200, ms300, ms400, ms600, ms1000, ms2000, + ms3000, ms4000, spare7, spare6, spare5, spare4, spare3, spare2, spare1} +} + +RedCap-ConfigCommonSIB-r17 ::= SEQUENCE { + halfDuplexRedCapAllowed-r17 ENUMERATED {true} OPTIONAL, -- Need R + cellBarredRedCap-r17 SEQUENCE { + cellBarredRedCap1Rx-r17 ENUMERATED {barred, notBarred}, + cellBarredRedCap2Rx-r17 ENUMERATED {barred, notBarred} + } OPTIONAL, -- Need R + ... +} + +FeaturePriority-r17 ::= INTEGER (0..7) + +-- TAG-SIB1-STOP +-- TAG-SIDELINKUEINFORMATIONNR-START + +SidelinkUEInformationNR-r16::= SEQUENCE { + criticalExtensions CHOICE { + sidelinkUEInformationNR-r16 SidelinkUEInformationNR-r16-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +SidelinkUEInformationNR-r16-IEs ::= SEQUENCE { + sl-RxInterestedFreqList-r16 SL-InterestedFreqList-r16 OPTIONAL, + sl-TxResourceReqList-r16 SL-TxResourceReqList-r16 OPTIONAL, + sl-FailureList-r16 SL-FailureList-r16 OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SidelinkUEInformationNR-v1700-IEs OPTIONAL +} + +SidelinkUEInformationNR-v1700-IEs ::= SEQUENCE { + sl-TxResourceReqList-v1700 SL-TxResourceReqList-v1700 OPTIONAL, + sl-RxDRX-ReportList-v1700 SL-RxDRX-ReportList-v1700 OPTIONAL, + sl-RxInterestedGC-BC-DestList-r17 SL-RxInterestedGC-BC-DestList-r17 OPTIONAL, + sl-RxInterestedFreqListDisc-r17 SL-InterestedFreqList-r16 OPTIONAL, + sl-TxResourceReqListDisc-r17 SL-TxResourceReqListDisc-r17 OPTIONAL, + sl-TxResourceReqListCommRelay-r17 SL-TxResourceReqListCommRelay-r17 OPTIONAL, + ue-Type-r17 ENUMERATED {relayUE, remoteUE} OPTIONAL, + sl-SourceIdentityRemoteUE-r17 SL-SourceIdentity-r17 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +SL-InterestedFreqList-r16 ::= SEQUENCE (SIZE (1..maxNrofFreqSL-r16)) OF INTEGER (1..maxNrofFreqSL-r16) + +SL-TxResourceReqList-r16 ::= SEQUENCE (SIZE (1..maxNrofSL-Dest-r16)) OF SL-TxResourceReq-r16 + +SL-TxResourceReq-r16 ::= SEQUENCE { + sl-DestinationIdentity-r16 SL-DestinationIdentity-r16, + sl-CastType-r16 ENUMERATED {broadcast, groupcast, unicast, spare1}, + sl-RLC-ModeIndicationList-r16 SEQUENCE (SIZE (1.. maxNrofSLRB-r16)) OF SL-RLC-ModeIndication-r16 OPTIONAL, + sl-QoS-InfoList-r16 SEQUENCE (SIZE (1..maxNrofSL-QFIsPerDest-r16)) OF SL-QoS-Info-r16 OPTIONAL, + sl-TypeTxSyncList-r16 SEQUENCE (SIZE (1..maxNrofFreqSL-r16)) OF SL-TypeTxSync-r16 OPTIONAL, + sl-TxInterestedFreqList-r16 SL-TxInterestedFreqList-r16 OPTIONAL, + sl-CapabilityInformationSidelink-r16 OCTET STRING OPTIONAL +} + +SL-TxResourceReqList-v1700 ::= SEQUENCE (SIZE (1..maxNrofSL-Dest-r16)) OF SL-TxResourceReq-v1700 + +SL-RxDRX-ReportList-v1700 ::= SEQUENCE (SIZE (1..maxNrofSL-Dest-r16)) OF SL-RxDRX-Report-v1700 + +SL-TxResourceReq-v1700 ::= SEQUENCE { + sl-DRX-InfoFromRxList-r17 SEQUENCE (SIZE (1..maxNrofSL-RxInfoSet-r17)) OF SL-DRX-ConfigUC-SemiStatic-r17 OPTIONAL, + sl-DRX-Indication-r17 ENUMERATED {on, off} OPTIONAL, + ... +} + +SL-RxDRX-Report-v1700 ::= SEQUENCE { + sl-DRX-ConfigFromTx-r17 SL-DRX-ConfigUC-SemiStatic-r17, + ...} + +SL-RxInterestedGC-BC-DestList-r17 ::= SEQUENCE (SIZE (1..maxNrofSL-Dest-r16)) OF SL-RxInterestedGC-BC-Dest-r17 + +SL-RxInterestedGC-BC-Dest-r17 ::= SEQUENCE { + sl-RxInterestedQoS-InfoList-r17 SEQUENCE (SIZE (1..maxNrofSL-QFIsPerDest-r16)) OF SL-QoS-Info-r16, + sl-DestinationIdentity-r16 SL-DestinationIdentity-r16 +} + +SL-TxResourceReqListDisc-r17 ::= SEQUENCE (SIZE (1..maxNrofSL-Dest-r16)) OF SL-TxResourceReqDisc-r17 + +SL-TxResourceReqDisc-r17 ::= SEQUENCE { + sl-DestinationIdentityDisc-r17 SL-DestinationIdentity-r16, + sl-SourceIdentityRelayUE-r17 SL-SourceIdentity-r17 OPTIONAL, + sl-CastTypeDisc-r17 ENUMERATED {broadcast, groupcast, unicast, spare1}, + sl-TxInterestedFreqListDisc-r17 SL-TxInterestedFreqList-r16, + sl-TypeTxSyncListDisc-r17 SEQUENCE (SIZE (1..maxNrofFreqSL-r16)) OF SL-TypeTxSync-r16, + sl-DiscoveryType-r17 ENUMERATED {relay, non-Relay}, + ... +} + +SL-TxResourceReqListCommRelay-r17 ::= SEQUENCE (SIZE (1..maxNrofSL-Dest-r16)) OF SL-TxResourceReqCommRelayInfo-r17 + +SL-TxResourceReqCommRelayInfo-r17 ::= SEQUENCE { + sl-RelayDRXConfig-r17 SL-TxResourceReq-v1700 OPTIONAL, + sl-TxResourceReqCommRelay-r17 SL-TxResourceReqCommRelay-r17 +} + +SL-TxResourceReqCommRelay-r17 ::= CHOICE { + sl-TxResourceReqL2U2N-Relay-r17 SL-TxResourceReqL2U2N-Relay-r17, + sl-TxResourceReqL3U2N-Relay-r17 SL-TxResourceReq-r16 +} + +SL-TxResourceReqL2U2N-Relay-r17 ::= SEQUENCE { + sl-DestinationIdentityL2U2N-r17 SL-DestinationIdentity-r16 OPTIONAL, + sl-TxInterestedFreqListL2U2N-r17 SL-TxInterestedFreqList-r16, + sl-TypeTxSyncListL2U2N-r17 SEQUENCE (SIZE (1..maxNrofFreqSL-r16)) OF SL-TypeTxSync-r16, + sl-LocalID-Request-r17 ENUMERATED {true} OPTIONAL, + sl-PagingIdentityRemoteUE-r17 SL-PagingIdentityRemoteUE-r17 OPTIONAL, + sl-CapabilityInformationSidelink-r17 OCTET STRING OPTIONAL, + ... +} + +SL-TxInterestedFreqList-r16 ::= SEQUENCE (SIZE (1..maxNrofFreqSL-r16)) OF INTEGER (1..maxNrofFreqSL-r16) + +SL-QoS-Info-r16 ::= SEQUENCE { + sl-QoS-FlowIdentity-r16 SL-QoS-FlowIdentity-r16, + sl-QoS-Profile-r16 SL-QoS-Profile-r16 OPTIONAL +} + +SL-RLC-ModeIndication-r16 ::= SEQUENCE { + sl-Mode-r16 CHOICE { + sl-AM-Mode-r16 NULL, + sl-UM-Mode-r16 NULL + }, + sl-QoS-InfoList-r16 SEQUENCE (SIZE (1..maxNrofSL-QFIsPerDest-r16)) OF SL-QoS-Info-r16 +} + +SL-FailureList-r16 ::= SEQUENCE (SIZE (1..maxNrofSL-Dest-r16)) OF SL-Failure-r16 + +SL-Failure-r16 ::= SEQUENCE { + sl-DestinationIdentity-r16 SL-DestinationIdentity-r16, + sl-Failure-r16 ENUMERATED {rlf,configFailure, drxReject-v1710, spare5, spare4, spare3, spare2, spare1} +} + +-- TAG-SIDELINKUEINFORMATIONNR-STOP +-- TAG-SYSTEMINFORMATION-START + +SystemInformation ::= SEQUENCE { + criticalExtensions CHOICE { + systemInformation SystemInformation-IEs, + criticalExtensionsFuture-r16 CHOICE { + posSystemInformation-r16 PosSystemInformation-r16-IEs, + criticalExtensionsFuture SEQUENCE {} + } + } +} + +SystemInformation-IEs ::= SEQUENCE { + sib-TypeAndInfo SEQUENCE (SIZE (1..maxSIB)) OF CHOICE { + sib2 SIB2, + sib3 SIB3, + sib4 SIB4, + sib5 SIB5, + sib6 SIB6, + sib7 SIB7, + sib8 SIB8, + sib9 SIB9, + ..., + sib10-v1610 SIB10-r16, + sib11-v1610 SIB11-r16, + sib12-v1610 SIB12-r16, + sib13-v1610 SIB13-r16, + sib14-v1610 SIB14-r16, + sib15-v1700 SIB15-r17, + sib16-v1700 SIB16-r17, + sib17-v1700 SIB17-r17, + sib18-v1700 SIB18-r17, + sib19-v1700 SIB19-r17, + sib20-v1700 SIB20-r17, + sib21-v1700 SIB21-r17 + }, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-SYSTEMINFORMATION-STOP +-- TAG-UEASSISTANCEINFORMATION-START + +UEAssistanceInformation ::= SEQUENCE { + criticalExtensions CHOICE { + ueAssistanceInformation UEAssistanceInformation-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +UEAssistanceInformation-IEs ::= SEQUENCE { + delayBudgetReport DelayBudgetReport OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UEAssistanceInformation-v1540-IEs OPTIONAL +} + +DelayBudgetReport::= CHOICE { + type1 ENUMERATED { + msMinus1280, msMinus640, msMinus320, msMinus160,msMinus80, msMinus60, msMinus40, + msMinus20, ms0, ms20,ms40, ms60, ms80, ms160, ms320, ms640, ms1280}, + ... +} + +UEAssistanceInformation-v1540-IEs ::= SEQUENCE { + overheatingAssistance OverheatingAssistance OPTIONAL, + nonCriticalExtension UEAssistanceInformation-v1610-IEs OPTIONAL +} + +OverheatingAssistance ::= SEQUENCE { + reducedMaxCCs ReducedMaxCCs-r16 OPTIONAL, + reducedMaxBW-FR1 ReducedMaxBW-FRx-r16 OPTIONAL, + reducedMaxBW-FR2 ReducedMaxBW-FRx-r16 OPTIONAL, + reducedMaxMIMO-LayersFR1 SEQUENCE { + reducedMIMO-LayersFR1-DL MIMO-LayersDL, + reducedMIMO-LayersFR1-UL MIMO-LayersUL + } OPTIONAL, + reducedMaxMIMO-LayersFR2 SEQUENCE { + reducedMIMO-LayersFR2-DL MIMO-LayersDL, + reducedMIMO-LayersFR2-UL MIMO-LayersUL + } OPTIONAL +} +OverheatingAssistance-r17 ::= SEQUENCE { + reducedMaxBW-FR2-2-r17 SEQUENCE { + reducedBW-FR2-2-DL-r17 ReducedAggregatedBandwidth-r17, + reducedBW-FR2-2-UL-r17 ReducedAggregatedBandwidth-r17 + } OPTIONAL, + reducedMaxMIMO-LayersFR2-2 SEQUENCE { + reducedMIMO-LayersFR2-2-DL MIMO-LayersDL, + reducedMIMO-LayersFR2-2-UL MIMO-LayersUL + } OPTIONAL +} + +ReducedAggregatedBandwidth ::= ENUMERATED {mhz0, mhz10, mhz20, mhz30, mhz40, mhz50, mhz60, mhz80, mhz100, mhz200, mhz300, mhz400} + +ReducedAggregatedBandwidth-r17 ::= ENUMERATED {mhz0, mhz100, mhz200, mhz400, mhz800, mhz1200, mhz1600, mhz2000} + +UEAssistanceInformation-v1610-IEs ::= SEQUENCE { + idc-Assistance-r16 IDC-Assistance-r16 OPTIONAL, + drx-Preference-r16 DRX-Preference-r16 OPTIONAL, + maxBW-Preference-r16 MaxBW-Preference-r16 OPTIONAL, + maxCC-Preference-r16 MaxCC-Preference-r16 OPTIONAL, + maxMIMO-LayerPreference-r16 MaxMIMO-LayerPreference-r16 OPTIONAL, + minSchedulingOffsetPreference-r16 MinSchedulingOffsetPreference-r16 OPTIONAL, + releasePreference-r16 ReleasePreference-r16 OPTIONAL, + sl-UE-AssistanceInformationNR-r16 SL-UE-AssistanceInformationNR-r16 OPTIONAL, + referenceTimeInfoPreference-r16 BOOLEAN OPTIONAL, + nonCriticalExtension UEAssistanceInformation-v1700-IEs OPTIONAL +} + +UEAssistanceInformation-v1700-IEs ::= SEQUENCE { + ul-GapFR2-Preference-r17 UL-GapFR2-Preference-r17 OPTIONAL, + musim-Assistance-r17 MUSIM-Assistance-r17 OPTIONAL, + overheatingAssistance-r17 OverheatingAssistance-r17 OPTIONAL, + maxBW-PreferenceFR2-2-r17 MaxBW-PreferenceFR2-2-r17 OPTIONAL, + maxMIMO-LayerPreferenceFR2-2-r17 MaxMIMO-LayerPreferenceFR2-2-r17 OPTIONAL, + minSchedulingOffsetPreferenceExt-r17 MinSchedulingOffsetPreferenceExt-r17 OPTIONAL, + rlm-MeasRelaxationState-r17 BOOLEAN OPTIONAL, + bfd-MeasRelaxationState-r17 BIT STRING (SIZE (1..maxNrofServingCells)) OPTIONAL, + nonSDT-DataIndication-r17 SEQUENCE { + resumeCause-r17 ResumeCause OPTIONAL + } OPTIONAL, + scg-DeactivationPreference-r17 ENUMERATED { scgDeactivationPreferred, noPreference } OPTIONAL, + uplinkData-r17 ENUMERATED { true } OPTIONAL, + rrm-MeasRelaxationFulfilment-r17 BOOLEAN OPTIONAL, + propagationDelayDifference-r17 PropagationDelayDifference-r17 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +IDC-Assistance-r16 ::= SEQUENCE { + affectedCarrierFreqList-r16 AffectedCarrierFreqList-r16 OPTIONAL, + affectedCarrierFreqCombList-r16 AffectedCarrierFreqCombList-r16 OPTIONAL, + ... +} + +AffectedCarrierFreqList-r16 ::= SEQUENCE (SIZE (1.. maxFreqIDC-r16)) OF AffectedCarrierFreq-r16 + +AffectedCarrierFreq-r16 ::= SEQUENCE { + carrierFreq-r16 ARFCN-ValueNR, + interferenceDirection-r16 ENUMERATED {nr, other, both, spare} +} + +AffectedCarrierFreqCombList-r16 ::= SEQUENCE (SIZE (1..maxCombIDC-r16)) OF AffectedCarrierFreqComb-r16 + +AffectedCarrierFreqComb-r16 ::= SEQUENCE { + affectedCarrierFreqComb-r16 SEQUENCE (SIZE (2..maxNrofServingCells)) OF ARFCN-ValueNR OPTIONAL, + victimSystemType-r16 VictimSystemType-r16 +} + +VictimSystemType-r16 ::= SEQUENCE { + gps-r16 ENUMERATED {true} OPTIONAL, + glonass-r16 ENUMERATED {true} OPTIONAL, + bds-r16 ENUMERATED {true} OPTIONAL, + galileo-r16 ENUMERATED {true} OPTIONAL, + navIC-r16 ENUMERATED {true} OPTIONAL, + wlan-r16 ENUMERATED {true} OPTIONAL, + bluetooth-r16 ENUMERATED {true} OPTIONAL, + ... +} + +DRX-Preference-r16 ::= SEQUENCE { + preferredDRX-InactivityTimer-r16 ENUMERATED { + ms0, ms1, ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, ms40, ms50, ms60, ms80, + ms100, ms200, ms300, ms500, ms750, ms1280, ms1920, ms2560, spare9, spare8, + spare7, spare6, spare5, spare4, spare3, spare2, spare1} OPTIONAL, + preferredDRX-LongCycle-r16 ENUMERATED { + ms10, ms20, ms32, ms40, ms60, ms64, ms70, ms80, ms128, ms160, ms256, ms320, ms512, + ms640, ms1024, ms1280, ms2048, ms2560, ms5120, ms10240, spare12, spare11, spare10, + spare9, spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1 } OPTIONAL, + preferredDRX-ShortCycle-r16 ENUMERATED { + ms2, ms3, ms4, ms5, ms6, ms7, ms8, ms10, ms14, ms16, ms20, ms30, ms32, + ms35, ms40, ms64, ms80, ms128, ms160, ms256, ms320, ms512, ms640, spare9, + spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1 } OPTIONAL, + preferredDRX-ShortCycleTimer-r16 INTEGER (1..16) OPTIONAL +} + +MaxBW-Preference-r16 ::= SEQUENCE { + reducedMaxBW-FR1-r16 ReducedMaxBW-FRx-r16 OPTIONAL, + reducedMaxBW-FR2-r16 ReducedMaxBW-FRx-r16 OPTIONAL +} + +MaxBW-PreferenceFR2-2-r17 ::= SEQUENCE { + reducedMaxBW-FR2-2-r17 SEQUENCE { + reducedBW-FR2-2-DL-r17 ReducedAggregatedBandwidth-r17 OPTIONAL, + reducedBW-FR2-2-UL-r17 ReducedAggregatedBandwidth-r17 OPTIONAL + } OPTIONAL +} + +MaxCC-Preference-r16 ::= SEQUENCE { + reducedMaxCCs-r16 ReducedMaxCCs-r16 OPTIONAL +} + +MaxMIMO-LayerPreference-r16 ::= SEQUENCE { + reducedMaxMIMO-LayersFR1-r16 SEQUENCE { + reducedMIMO-LayersFR1-DL-r16 INTEGER (1..8), + reducedMIMO-LayersFR1-UL-r16 INTEGER (1..4) + } OPTIONAL, + reducedMaxMIMO-LayersFR2-r16 SEQUENCE { + reducedMIMO-LayersFR2-DL-r16 INTEGER (1..8), + reducedMIMO-LayersFR2-UL-r16 INTEGER (1..4) + } OPTIONAL +} + +MaxMIMO-LayerPreferenceFR2-2-r17 ::= SEQUENCE { + reducedMaxMIMO-LayersFR2-2-r17 SEQUENCE { + reducedMIMO-LayersFR2-2-DL-r17 INTEGER (1..8), + reducedMIMO-LayersFR2-2-UL-r17 INTEGER (1..4) + } OPTIONAL +} + +MinSchedulingOffsetPreference-r16 ::= SEQUENCE { + preferredK0-r16 SEQUENCE { + preferredK0-SCS-15kHz-r16 ENUMERATED {sl1, sl2, sl4, sl6} OPTIONAL, + preferredK0-SCS-30kHz-r16 ENUMERATED {sl1, sl2, sl4, sl6} OPTIONAL, + preferredK0-SCS-60kHz-r16 ENUMERATED {sl2, sl4, sl8, sl12} OPTIONAL, + preferredK0-SCS-120kHz-r16 ENUMERATED {sl2, sl4, sl8, sl12} OPTIONAL + } OPTIONAL, + preferredK2-r16 SEQUENCE { + preferredK2-SCS-15kHz-r16 ENUMERATED {sl1, sl2, sl4, sl6} OPTIONAL, + preferredK2-SCS-30kHz-r16 ENUMERATED {sl1, sl2, sl4, sl6} OPTIONAL, + preferredK2-SCS-60kHz-r16 ENUMERATED {sl2, sl4, sl8, sl12} OPTIONAL, + preferredK2-SCS-120kHz-r16 ENUMERATED {sl2, sl4, sl8, sl12} OPTIONAL + } OPTIONAL +} + +MinSchedulingOffsetPreferenceExt-r17 ::= SEQUENCE { + preferredK0-r17 SEQUENCE { + preferredK0-SCS-480kHz-r17 ENUMERATED {sl8, sl16, sl32, sl48} OPTIONAL, + preferredK0-SCS-960kHz-r17 ENUMERATED {sl8, sl16, sl32, sl48} OPTIONAL + } OPTIONAL, + preferredK2-r17 SEQUENCE { + preferredK2-SCS-480kHz-r17 ENUMERATED {sl8, sl16, sl32, sl48} OPTIONAL, + preferredK2-SCS-960kHz-r17 ENUMERATED {sl8, sl16, sl32, sl48} OPTIONAL + } OPTIONAL +} + +MUSIM-Assistance-r17 ::= SEQUENCE { + musim-PreferredRRC-State-r17 ENUMERATED {idle, inactive, outOfConnected} OPTIONAL, + musim-GapPreferenceList-r17 MUSIM-GapPreferenceList-r17 OPTIONAL +} + +MUSIM-GapPreferenceList-r17 ::= SEQUENCE (SIZE (1..4)) OF MUSIM-GapInfo-r17 + +ReleasePreference-r16 ::= SEQUENCE { + preferredRRC-State-r16 ENUMERATED {idle, inactive, connected, outOfConnected} +} + +ReducedMaxBW-FRx-r16 ::= SEQUENCE { + reducedBW-DL-r16 ReducedAggregatedBandwidth, + reducedBW-UL-r16 ReducedAggregatedBandwidth +} + +ReducedMaxCCs-r16 ::= SEQUENCE { + reducedCCsDL-r16 INTEGER (0..31), + reducedCCsUL-r16 INTEGER (0..31) +} + +SL-UE-AssistanceInformationNR-r16 ::= SEQUENCE (SIZE (1..maxNrofTrafficPattern-r16)) OF SL-TrafficPatternInfo-r16 + +SL-TrafficPatternInfo-r16::= SEQUENCE { + trafficPeriodicity-r16 ENUMERATED {ms20, ms50, ms100, ms200, ms300, ms400, ms500, ms600, ms700, ms800, ms900, ms1000}, + timingOffset-r16 INTEGER (0..10239), + messageSize-r16 BIT STRING (SIZE (8)), + sl-QoS-FlowIdentity-r16 SL-QoS-FlowIdentity-r16 +} + +UL-GapFR2-Preference-r17::= SEQUENCE { + ul-GapFR2-PatternPreference-r17 INTEGER (0..3) OPTIONAL +} + +PropagationDelayDifference-r17 ::= SEQUENCE (SIZE (1..4)) OF INTEGER (-270..270) + +-- TAG-UEASSISTANCEINFORMATION-STOP +-- TAG-UECAPABILITYENQUIRY-START + +UECapabilityEnquiry ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + ueCapabilityEnquiry UECapabilityEnquiry-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +UECapabilityEnquiry-IEs ::= SEQUENCE { + ue-CapabilityRAT-RequestList UE-CapabilityRAT-RequestList, + lateNonCriticalExtension OCTET STRING OPTIONAL, + ue-CapabilityEnquiryExt OCTET STRING (CONTAINING UECapabilityEnquiry-v1560-IEs) OPTIONAL -- Need N +} + +UECapabilityEnquiry-v1560-IEs ::= SEQUENCE { + capabilityRequestFilterCommon UE-CapabilityRequestFilterCommon OPTIONAL, -- Need N + nonCriticalExtension UECapabilityEnquiry-v1610-IEs OPTIONAL +} + +UECapabilityEnquiry-v1610-IEs ::= SEQUENCE { + rrc-SegAllowed-r16 ENUMERATED {enabled} OPTIONAL, -- Need N + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-UECAPABILITYENQUIRY-STOP +-- TAG-UECAPABILITYINFORMATION-START + +UECapabilityInformation ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + ueCapabilityInformation UECapabilityInformation-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +UECapabilityInformation-IEs ::= SEQUENCE { + ue-CapabilityRAT-ContainerList UE-CapabilityRAT-ContainerList OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +-- TAG-UECAPABILITYINFORMATION-STOP +-- TAG-UEINFORMATIONREQUEST-START + +UEInformationRequest-r16 ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + ueInformationRequest-r16 UEInformationRequest-r16-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +UEInformationRequest-r16-IEs ::= SEQUENCE { + idleModeMeasurementReq-r16 ENUMERATED{true} OPTIONAL, -- Need N + logMeasReportReq-r16 ENUMERATED {true} OPTIONAL, -- Need N + connEstFailReportReq-r16 ENUMERATED {true} OPTIONAL, -- Need N + ra-ReportReq-r16 ENUMERATED {true} OPTIONAL, -- Need N + rlf-ReportReq-r16 ENUMERATED {true} OPTIONAL, -- Need N + mobilityHistoryReportReq-r16 ENUMERATED {true} OPTIONAL, -- Need N + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UEInformationRequest-v1700-IEs OPTIONAL +} + +UEInformationRequest-v1700-IEs ::= SEQUENCE { + successHO-ReportReq-r17 ENUMERATED {true} OPTIONAL, -- Need N + coarseLocationRequest-r17 ENUMERATED {true} OPTIONAL, -- Need N + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-UEINFORMATIONREQUEST-STOP +-- TAG-UEINFORMATIONRESPONSE-START + +UEInformationResponse-r16 ::= SEQUENCE { + rrc-TransactionIdentifier RRC-TransactionIdentifier, + criticalExtensions CHOICE { + ueInformationResponse-r16 UEInformationResponse-r16-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +UEInformationResponse-r16-IEs ::= SEQUENCE { + measResultIdleEUTRA-r16 MeasResultIdleEUTRA-r16 OPTIONAL, + measResultIdleNR-r16 MeasResultIdleNR-r16 OPTIONAL, + logMeasReport-r16 LogMeasReport-r16 OPTIONAL, + connEstFailReport-r16 ConnEstFailReport-r16 OPTIONAL, + ra-ReportList-r16 RA-ReportList-r16 OPTIONAL, + rlf-Report-r16 RLF-Report-r16 OPTIONAL, + mobilityHistoryReport-r16 MobilityHistoryReport-r16 OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UEInformationResponse-v1700-IEs OPTIONAL +} + +UEInformationResponse-v1700-IEs ::= SEQUENCE { + successHO-Report-r17 SuccessHO-Report-r17 OPTIONAL, + connEstFailReportList-r17 ConnEstFailReportList-r17 OPTIONAL, + coarseLocationInfo-r17 OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +LogMeasReport-r16 ::= SEQUENCE { + absoluteTimeStamp-r16 AbsoluteTimeInfo-r16, + traceReference-r16 TraceReference-r16, + traceRecordingSessionRef-r16 OCTET STRING (SIZE (2)), + tce-Id-r16 OCTET STRING (SIZE (1)), + logMeasInfoList-r16 LogMeasInfoList-r16, + logMeasAvailable-r16 ENUMERATED {true} OPTIONAL, + logMeasAvailableBT-r16 ENUMERATED {true} OPTIONAL, + logMeasAvailableWLAN-r16 ENUMERATED {true} OPTIONAL, + ... +} + +LogMeasInfoList-r16 ::= SEQUENCE (SIZE (1..maxLogMeasReport-r16)) OF LogMeasInfo-r16 + +LogMeasInfo-r16 ::= SEQUENCE { + locationInfo-r16 LocationInfo-r16 OPTIONAL, + relativeTimeStamp-r16 INTEGER (0..7200), + servCellIdentity-r16 CGI-Info-Logging-r16 OPTIONAL, + measResultServingCell-r16 MeasResultServingCell-r16 OPTIONAL, + measResultNeighCells-r16 SEQUENCE { + measResultNeighCellListNR MeasResultListLogging2NR-r16 OPTIONAL, + measResultNeighCellListEUTRA MeasResultList2EUTRA-r16 OPTIONAL + }, + anyCellSelectionDetected-r16 ENUMERATED {true} OPTIONAL, + ..., + [[ + inDeviceCoexDetected-r17 ENUMERATED {true} OPTIONAL + ]] +} + +ConnEstFailReport-r16 ::= SEQUENCE { + measResultFailedCell-r16 MeasResultFailedCell-r16, + locationInfo-r16 LocationInfo-r16 OPTIONAL, + measResultNeighCells-r16 SEQUENCE { + measResultNeighCellListNR MeasResultList2NR-r16 OPTIONAL, + measResultNeighCellListEUTRA MeasResultList2EUTRA-r16 OPTIONAL + }, + numberOfConnFail-r16 INTEGER (1..8), + perRAInfoList-r16 PerRAInfoList-r16, + timeSinceFailure-r16 TimeSinceFailure-r16, + ... +} + +ConnEstFailReportList-r17 ::= SEQUENCE (SIZE (1..maxCEFReport-r17)) OF ConnEstFailReport-r16 + +MeasResultServingCell-r16 ::= SEQUENCE { + resultsSSB-Cell MeasQuantityResults, + resultsSSB SEQUENCE{ + best-ssb-Index SSB-Index, + best-ssb-Results MeasQuantityResults, + numberOfGoodSSB INTEGER (1..maxNrofSSBs-r16) + } OPTIONAL +} + +MeasResultFailedCell-r16 ::= SEQUENCE { + cgi-Info CGI-Info-Logging-r16, + measResult-r16 SEQUENCE { + cellResults-r16 SEQUENCE{ + resultsSSB-Cell-r16 MeasQuantityResults + }, + rsIndexResults-r16 SEQUENCE{ + resultsSSB-Indexes-r16 ResultsPerSSB-IndexList + } + } +} + +RA-ReportList-r16 ::= SEQUENCE (SIZE (1..maxRAReport-r16)) OF RA-Report-r16 + +RA-Report-r16 ::= SEQUENCE { + cellId-r16 CHOICE { + cellGlobalId-r16 CGI-Info-Logging-r16, + pci-arfcn-r16 PCI-ARFCN-NR-r16 + }, + ra-InformationCommon-r16 RA-InformationCommon-r16 OPTIONAL, + raPurpose-r16 ENUMERATED {accessRelated, beamFailureRecovery, reconfigurationWithSync, ulUnSynchronized, + schedulingRequestFailure, noPUCCHResourceAvailable, requestForOtherSI, + msg3RequestForOtherSI-r17, spare8, spare7, spare6, spare5, spare4, spare3, + spare2, spare1}, + ..., + [[ + spCellID-r17 CGI-Info-Logging-r16 OPTIONAL + ]] +} + +RA-InformationCommon-r16 ::= SEQUENCE { + absoluteFrequencyPointA-r16 ARFCN-ValueNR, + locationAndBandwidth-r16 INTEGER (0..37949), + subcarrierSpacing-r16 SubcarrierSpacing, + msg1-FrequencyStart-r16 INTEGER (0..maxNrofPhysicalResourceBlocks-1) OPTIONAL, + msg1-FrequencyStartCFRA-r16 INTEGER (0..maxNrofPhysicalResourceBlocks-1) OPTIONAL, + msg1-SubcarrierSpacing-r16 SubcarrierSpacing OPTIONAL, + msg1-SubcarrierSpacingCFRA-r16 SubcarrierSpacing OPTIONAL, + msg1-FDM-r16 ENUMERATED {one, two, four, eight} OPTIONAL, + msg1-FDMCFRA-r16 ENUMERATED {one, two, four, eight} OPTIONAL, + perRAInfoList-r16 PerRAInfoList-r16, + ..., + [[ + perRAInfoList-v1660 PerRAInfoList-v1660 OPTIONAL + ]], + [[ + msg1-SCS-From-prach-ConfigurationIndex-r16 ENUMERATED {kHz1dot25, kHz5, spare2, spare1} OPTIONAL + ]], + [[ + msg1-SCS-From-prach-ConfigurationIndexCFRA-r16 ENUMERATED {kHz1dot25, kHz5, spare2, spare1} OPTIONAL + ]], + [[ + msgA-RO-FrequencyStart-r17 INTEGER (0..maxNrofPhysicalResourceBlocks-1) OPTIONAL, + msgA-RO-FrequencyStartCFRA-r17 INTEGER (0..maxNrofPhysicalResourceBlocks-1) OPTIONAL, + msgA-SubcarrierSpacing-r17 SubcarrierSpacing OPTIONAL, + msgA-RO-FDM-r17 ENUMERATED {one, two, four, eight} OPTIONAL, + msgA-RO-FDMCFRA-r17 ENUMERATED {one, two, four, eight} OPTIONAL, + msgA-SCS-From-prach-ConfigurationIndex-r17 ENUMERATED {kHz1dot25, kHz5, spare2, spare1} OPTIONAL, + msgA-TransMax-r17 ENUMERATED {n1, n2, n4, n6, n8, n10, n20, n50, n100, n200} OPTIONAL, + msgA-MCS-r17 INTEGER (0..15) OPTIONAL, + nrofPRBs-PerMsgA-PO-r17 INTEGER (1..32) OPTIONAL, + msgA-PUSCH-TimeDomainAllocation-r17 INTEGER (1..maxNrofUL-Allocations) OPTIONAL, + frequencyStartMsgA-PUSCH-r17 INTEGER (0..maxNrofPhysicalResourceBlocks-1) OPTIONAL, + nrofMsgA-PO-FDM-r17 ENUMERATED {one, two, four, eight} OPTIONAL, + dlPathlossRSRP-r17 RSRP-Range OPTIONAL, + intendedSIBs-r17 SEQUENCE (SIZE (1..maxSIB)) OF SIB-Type-r17 OPTIONAL, + ssbsForSI-Acquisition-r17 SEQUENCE (SIZE (1..maxNrofSSBs-r16)) OF SSB-Index OPTIONAL, + msgA-PUSCH-PayloadSize-r17 BIT STRING (SIZE (5)) OPTIONAL, + onDemandSISuccess-r17 ENUMERATED {true} OPTIONAL + ]] +} + +PerRAInfoList-r16 ::= SEQUENCE (SIZE (1..200)) OF PerRAInfo-r16 + +PerRAInfoList-v1660 ::= SEQUENCE (SIZE (1..200)) OF PerRACSI-RSInfo-v1660 + +PerRAInfo-r16 ::= CHOICE { + perRASSBInfoList-r16 PerRASSBInfo-r16, + perRACSI-RSInfoList-r16 PerRACSI-RSInfo-r16 +} + +PerRASSBInfo-r16 ::= SEQUENCE { + ssb-Index-r16 SSB-Index, + numberOfPreamblesSentOnSSB-r16 INTEGER (1..200), + perRAAttemptInfoList-r16 PerRAAttemptInfoList-r16 +} + +PerRACSI-RSInfo-r16 ::= SEQUENCE { + csi-RS-Index-r16 CSI-RS-Index, + numberOfPreamblesSentOnCSI-RS-r16 INTEGER (1..200) +} + +PerRACSI-RSInfo-v1660 ::= SEQUENCE { + csi-RS-Index-v1660 INTEGER (1..96) OPTIONAL +} + +PerRAAttemptInfoList-r16 ::= SEQUENCE (SIZE (1..200)) OF PerRAAttemptInfo-r16 + +PerRAAttemptInfo-r16 ::= SEQUENCE { + contentionDetected-r16 BOOLEAN OPTIONAL, + dlRSRPAboveThreshold-r16 BOOLEAN OPTIONAL, + ..., + [[ + fallbackToFourStepRA-r17 ENUMERATED {true} OPTIONAL + ]] +} + +SIB-Type-r17 ::= ENUMERATED {sibType2, sibType3, sibType4, sibType5, sibType9, sibType10-v1610, sibType11-v1610, sibType12-v1610, + sibType13-v1610, sibType14-v1610, spare6, spare5, spare4, spare3, spare2, spare1} + +RLF-Report-r16 ::= CHOICE { + nr-RLF-Report-r16 SEQUENCE { + measResultLastServCell-r16 MeasResultRLFNR-r16, + measResultNeighCells-r16 SEQUENCE { + measResultListNR-r16 MeasResultList2NR-r16 OPTIONAL, + measResultListEUTRA-r16 MeasResultList2EUTRA-r16 OPTIONAL + } OPTIONAL, + c-RNTI-r16 RNTI-Value, + previousPCellId-r16 CHOICE { + nrPreviousCell-r16 CGI-Info-Logging-r16, + eutraPreviousCell-r16 CGI-InfoEUTRALogging + } OPTIONAL, + failedPCellId-r16 CHOICE { + nrFailedPCellId-r16 CHOICE { + cellGlobalId-r16 CGI-Info-Logging-r16, + pci-arfcn-r16 PCI-ARFCN-NR-r16 + }, + eutraFailedPCellId-r16 CHOICE { + cellGlobalId-r16 CGI-InfoEUTRALogging, + pci-arfcn-r16 PCI-ARFCN-EUTRA-r16 + } + }, + reconnectCellId-r16 CHOICE { + nrReconnectCellId-r16 CGI-Info-Logging-r16, + eutraReconnectCellId-r16 CGI-InfoEUTRALogging + } OPTIONAL, + timeUntilReconnection-r16 TimeUntilReconnection-r16 OPTIONAL, + reestablishmentCellId-r16 CGI-Info-Logging-r16 OPTIONAL, + timeConnFailure-r16 INTEGER (0..1023) OPTIONAL, + timeSinceFailure-r16 TimeSinceFailure-r16, + connectionFailureType-r16 ENUMERATED {rlf, hof}, + rlf-Cause-r16 ENUMERATED {t310-Expiry, randomAccessProblem, rlc-MaxNumRetx, + beamFailureRecoveryFailure, lbtFailure-r16, + bh-rlfRecoveryFailure, t312-expiry-r17, spare1}, + locationInfo-r16 LocationInfo-r16 OPTIONAL, + noSuitableCellFound-r16 ENUMERATED {true} OPTIONAL, + ra-InformationCommon-r16 RA-InformationCommon-r16 OPTIONAL, + ..., + [[ + csi-rsRLMConfigBitmap-v1650 BIT STRING (SIZE (96)) OPTIONAL + ]], + [[ + lastHO-Type-r17 ENUMERATED {cho, daps, spare2, spare1} OPTIONAL, + timeConnSourceDAPS-Failure-r17 TimeConnSourceDAPS-Failure-r17 OPTIONAL, + timeSinceCHO-Reconfig-r17 TimeSinceCHO-Reconfig-r17 OPTIONAL, + choCellId-r17 CHOICE { + cellGlobalId-r17 CGI-Info-Logging-r16, + pci-arfcn-r17 PCI-ARFCN-NR-r16 + } OPTIONAL, + choCandidateCellList-r17 ChoCandidateCellList-r17 OPTIONAL + ]] + }, + eutra-RLF-Report-r16 SEQUENCE { + failedPCellId-EUTRA CGI-InfoEUTRALogging, + measResult-RLF-Report-EUTRA-r16 OCTET STRING, + ..., + [[ + measResult-RLF-Report-EUTRA-v1690 OCTET STRING OPTIONAL + ]] + } +} + +SuccessHO-Report-r17 ::= SEQUENCE { + sourceCellInfo-r17 SEQUENCE { + sourcePCellId-r17 CGI-Info-Logging-r16, + sourceCellMeas-r17 MeasResultSuccessHONR-r17 OPTIONAL, + rlf-InSourceDAPS-r17 ENUMERATED {true} OPTIONAL + }, + targetCellInfo-r17 SEQUENCE { + targetPCellId-r17 CGI-Info-Logging-r16, + targetCellMeas-r17 MeasResultSuccessHONR-r17 OPTIONAL + }, + measResultNeighCells-r17 SEQUENCE { + measResultListNR-r17 MeasResultList2NR-r16 OPTIONAL, + measResultListEUTRA-r17 MeasResultList2EUTRA-r16 OPTIONAL + } OPTIONAL, + locationInfo-r17 LocationInfo-r16 OPTIONAL, + timeSinceCHO-Reconfig-r17 TimeSinceCHO-Reconfig-r17 OPTIONAL, + shr-Cause-r17 SHR-Cause-r17 OPTIONAL, + ra-InformationCommon-r17 RA-InformationCommon-r16 OPTIONAL, + upInterruptionTimeAtHO-r17 UPInterruptionTimeAtHO-r17 OPTIONAL, + c-RNTI-r17 RNTI-Value OPTIONAL, + ... +} + +MeasResultList2NR-r16 ::= SEQUENCE(SIZE (1..maxFreq)) OF MeasResult2NR-r16 +MeasResultList2EUTRA-r16 ::= SEQUENCE(SIZE (1..maxFreq)) OF MeasResult2EUTRA-r16 + +MeasResult2NR-r16 ::= SEQUENCE { + ssbFrequency-r16 ARFCN-ValueNR OPTIONAL, + refFreqCSI-RS-r16 ARFCN-ValueNR OPTIONAL, + measResultList-r16 MeasResultListNR +} + +MeasResultListLogging2NR-r16 ::= SEQUENCE(SIZE (1..maxFreq)) OF MeasResultLogging2NR-r16 + +MeasResultLogging2NR-r16 ::= SEQUENCE { + carrierFreq-r16 ARFCN-ValueNR, + measResultListLoggingNR-r16 MeasResultListLoggingNR-r16 +} + +MeasResultListLoggingNR-r16 ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultLoggingNR-r16 + +MeasResultLoggingNR-r16 ::= SEQUENCE { + physCellId-r16 PhysCellId, + resultsSSB-Cell-r16 MeasQuantityResults, + numberOfGoodSSB-r16 INTEGER (1..maxNrofSSBs-r16) OPTIONAL +} + +MeasResult2EUTRA-r16 ::= SEQUENCE { + carrierFreq-r16 ARFCN-ValueEUTRA, + measResultList-r16 MeasResultListEUTRA +} + +MeasResultRLFNR-r16 ::= SEQUENCE { + measResult-r16 SEQUENCE { + cellResults-r16 SEQUENCE{ + resultsSSB-Cell-r16 MeasQuantityResults OPTIONAL, + resultsCSI-RS-Cell-r16 MeasQuantityResults OPTIONAL + }, + rsIndexResults-r16 SEQUENCE{ + resultsSSB-Indexes-r16 ResultsPerSSB-IndexList OPTIONAL, + ssbRLMConfigBitmap-r16 BIT STRING (SIZE (64)) OPTIONAL, + resultsCSI-RS-Indexes-r16 ResultsPerCSI-RS-IndexList OPTIONAL, + csi-rsRLMConfigBitmap-r16 BIT STRING (SIZE (96)) OPTIONAL + } OPTIONAL + } +} + +MeasResultSuccessHONR-r17::= SEQUENCE { + measResult-r17 SEQUENCE { + cellResults-r17 SEQUENCE{ + resultsSSB-Cell-r17 MeasQuantityResults OPTIONAL, + resultsCSI-RS-Cell-r17 MeasQuantityResults OPTIONAL + }, + rsIndexResults-r17 SEQUENCE{ + resultsSSB-Indexes-r17 ResultsPerSSB-IndexList OPTIONAL, + resultsCSI-RS-Indexes-r17 ResultsPerCSI-RS-IndexList OPTIONAL + } + } +} + +ChoCandidateCellList-r17 ::= SEQUENCE(SIZE (1..maxNrofCondCells-r16)) OF ChoCandidateCell-r17 + +ChoCandidateCell-r17 ::= CHOICE { + cellGlobalId-r17 CGI-Info-Logging-r16, + pci-arfcn-r17 PCI-ARFCN-NR-r16 +} + +SHR-Cause-r17 ::= SEQUENCE { + t304-cause-r17 ENUMERATED {true} OPTIONAL, + t310-cause-r17 ENUMERATED {true} OPTIONAL, + t312-cause-r17 ENUMERATED {true} OPTIONAL, + sourceDAPS-Failure-r17 ENUMERATED {true} OPTIONAL, + ... +} + +TimeSinceFailure-r16 ::= INTEGER (0..172800) + +MobilityHistoryReport-r16 ::= VisitedCellInfoList-r16 + +TimeUntilReconnection-r16 ::= INTEGER (0..172800) + +TimeSinceCHO-Reconfig-r17 ::= INTEGER (0..1023) + +TimeConnSourceDAPS-Failure-r17 ::= INTEGER (0..1023) + +UPInterruptionTimeAtHO-r17 ::= INTEGER (0..1023) + +-- TAG-UEINFORMATIONRESPONSE-STOP +-- TAG-UEPOSITIONINGASSISTANCEINFO-START + +UEPositioningAssistanceInfo-r17 ::= SEQUENCE { + criticalExtensions CHOICE { + uePositioningAssistanceInfo-r17 UEPositioningAssistanceInfo-r17-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +UEPositioningAssistanceInfo-r17-IEs ::= SEQUENCE { + ue-TxTEG-AssociationList-r17 UE-TxTEG-AssociationList-r17 OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UEPositioningAssistanceInfo-v1720-IEs OPTIONAL +} + +UEPositioningAssistanceInfo-v1720-IEs::= SEQUENCE { + ue-TxTEG-TimingErrorMarginValue-r17 ENUMERATED {tc0, tc2, tc4, tc6, tc8, tc12, tc16, tc20, tc24, tc32, tc40, tc48, tc56, + tc64, tc72, tc80} OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +UE-TxTEG-AssociationList-r17 ::= SEQUENCE (SIZE (1..maxNrOfTxTEGReport-r17)) OF UE-TxTEG-Association-r17 + +UE-TxTEG-Association-r17 ::= SEQUENCE { + ue-TxTEG-ID-r17 INTEGER (0..maxNrOfTxTEG-ID-1-r17), + nr-TimeStamp-r17 NR-TimeStamp-r17, + associatedSRS-PosResourceIdList-r17 SEQUENCE (SIZE(1..maxNrofSRS-PosResources-r16)) OF SRS-PosResourceId-r16, + servCellId-r17 ServCellIndex OPTIONAL +} + +NR-TimeStamp-r17 ::= SEQUENCE { + nr-SFN-r17 INTEGER (0..1023), + nr-Slot-r17 CHOICE { + scs15-r17 INTEGER (0..9), + scs30-r17 INTEGER (0..19), + scs60-r17 INTEGER (0..39), + scs120-r17 INTEGER (0..79) + }, + ... +} + +-- TAG-UEPOSITIONINGASSISTANCEINFO-STOP +-- TAG-ULDEDICATEDMESSAGESEGMENT-START + +ULDedicatedMessageSegment-r16 ::= SEQUENCE { + criticalExtensions CHOICE { + ulDedicatedMessageSegment-r16 ULDedicatedMessageSegment-r16-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +ULDedicatedMessageSegment-r16-IEs ::= SEQUENCE { + segmentNumber-r16 INTEGER (0..15), + rrc-MessageSegmentContainer-r16 OCTET STRING, + rrc-MessageSegmentType-r16 ENUMERATED {notLastSegment, lastSegment}, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-ULDEDICATEDMESSAGESEGMENT-STOP +-- TAG-ULINFORMATIONTRANSFER-START + +ULInformationTransfer ::= SEQUENCE { + criticalExtensions CHOICE { + ulInformationTransfer ULInformationTransfer-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +ULInformationTransfer-IEs ::= SEQUENCE { + dedicatedNAS-Message DedicatedNAS-Message OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension ULInformationTransfer-v1700-IEs OPTIONAL +} + +ULInformationTransfer-v1700-IEs ::= SEQUENCE { + dedicatedInfoF1c-r17 DedicatedInfoF1c-r17 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-ULINFORMATIONTRANSFER-STOP +-- TAG-ULINFORMATIONTRANSFERIRAT-START + +ULInformationTransferIRAT-r16 ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + ulInformationTransferIRAT-r16 ULInformationTransferIRAT-r16-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +ULInformationTransferIRAT-r16-IEs ::= SEQUENCE { + ul-DCCH-MessageEUTRA-r16 OCTET STRING OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-ULINFORMATIONTRANSFERIRAT-STOP +-- TAG-ULINFORMATIONTRANSFERMRDC-START + +ULInformationTransferMRDC ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE { + ulInformationTransferMRDC ULInformationTransferMRDC-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +ULInformationTransferMRDC-IEs::= SEQUENCE { + ul-DCCH-MessageNR OCTET STRING OPTIONAL, + ul-DCCH-MessageEUTRA OCTET STRING OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-ULINFORMATIONTRANSFERMRDC-STOP +-- TAG-SETUPRELEASE-START + +SetupRelease { ElementTypeParam } ::= CHOICE { + release NULL, + setup ElementTypeParam +} + +-- TAG-SETUPRELEASE-STOP +-- TAG-SIB2-START + +SIB2 ::= SEQUENCE { + cellReselectionInfoCommon SEQUENCE { + nrofSS-BlocksToAverage INTEGER (2..maxNrofSS-BlocksToAverage) OPTIONAL, -- Need S + absThreshSS-BlocksConsolidation ThresholdNR OPTIONAL, -- Need S + rangeToBestCell RangeToBestCell OPTIONAL, -- Need R + q-Hyst ENUMERATED { + dB0, dB1, dB2, dB3, dB4, dB5, dB6, dB8, dB10, + dB12, dB14, dB16, dB18, dB20, dB22, dB24}, + speedStateReselectionPars SEQUENCE { + mobilityStateParameters MobilityStateParameters, + q-HystSF SEQUENCE { + sf-Medium ENUMERATED {dB-6, dB-4, dB-2, dB0}, + sf-High ENUMERATED {dB-6, dB-4, dB-2, dB0} + } + } OPTIONAL, -- Need R + ... + }, + cellReselectionServingFreqInfo SEQUENCE { + s-NonIntraSearchP ReselectionThreshold OPTIONAL, -- Need S + s-NonIntraSearchQ ReselectionThresholdQ OPTIONAL, -- Need S + threshServingLowP ReselectionThreshold, + threshServingLowQ ReselectionThresholdQ OPTIONAL, -- Need R + cellReselectionPriority CellReselectionPriority, + cellReselectionSubPriority CellReselectionSubPriority OPTIONAL, -- Need R + ... + }, + intraFreqCellReselectionInfo SEQUENCE { + q-RxLevMin Q-RxLevMin, + q-RxLevMinSUL Q-RxLevMin OPTIONAL, -- Need R + q-QualMin Q-QualMin OPTIONAL, -- Need S + s-IntraSearchP ReselectionThreshold, + s-IntraSearchQ ReselectionThresholdQ OPTIONAL, -- Need S + t-ReselectionNR T-Reselection, + frequencyBandList MultiFrequencyBandListNR-SIB OPTIONAL, -- Need S + frequencyBandListSUL MultiFrequencyBandListNR-SIB OPTIONAL, -- Need R + p-Max P-Max OPTIONAL, -- Need S + smtc SSB-MTC OPTIONAL, -- Need S + ss-RSSI-Measurement SS-RSSI-Measurement OPTIONAL, -- Need R + ssb-ToMeasure SSB-ToMeasure OPTIONAL, -- Need S + deriveSSB-IndexFromCell BOOLEAN, + ..., + [[ + t-ReselectionNR-SF SpeedStateScaleFactors OPTIONAL -- Need N + ]], + [[ + smtc2-LP-r16 SSB-MTC2-LP-r16 OPTIONAL, -- Need R + ssb-PositionQCL-Common-r16 SSB-PositionQCL-Relation-r16 OPTIONAL -- Cond SharedSpectrum + ]], + [[ + ssb-PositionQCL-Common-r17 SSB-PositionQCL-Relation-r17 OPTIONAL -- Cond SharedSpectrum2 + ]], + [[ + smtc4list-r17 SSB-MTC4List-r17 OPTIONAL -- Need R + ]] + }, + ..., + [[ + relaxedMeasurement-r16 SEQUENCE { + lowMobilityEvaluation-r16 SEQUENCE { + s-SearchDeltaP-r16 ENUMERATED { + dB3, dB6, dB9, dB12, dB15, + spare3, spare2, spare1}, + t-SearchDeltaP-r16 ENUMERATED { + s5, s10, s20, s30, s60, s120, s180, + s240, s300, spare7, spare6, spare5, + spare4, spare3, spare2, spare1} + } OPTIONAL, -- Need R + cellEdgeEvaluation-r16 SEQUENCE { + s-SearchThresholdP-r16 ReselectionThreshold, + s-SearchThresholdQ-r16 ReselectionThresholdQ OPTIONAL -- Need R + } OPTIONAL, -- Need R + combineRelaxedMeasCondition-r16 ENUMERATED {true} OPTIONAL, -- Need R + highPriorityMeasRelax-r16 ENUMERATED {true} OPTIONAL -- Need R + } OPTIONAL -- Need R + ]], + [[ + cellEquivalentSize-r17 INTEGER(2..16) OPTIONAL, -- Cond HSDN + relaxedMeasurement-r17 SEQUENCE { + stationaryMobilityEvaluation-r17 SEQUENCE { + s-SearchDeltaP-Stationary-r17 ENUMERATED {dB2, dB3, dB6, dB9, dB12, dB15, spare2, spare1}, + t-SearchDeltaP-Stationary-r17 ENUMERATED {s5, s10, s20, s30, s60, s120, s180, s240, s300, spare7, spare6, spare5, + spare4, spare3, spare2, spare1} + }, + cellEdgeEvaluationWhileStationary-r17 SEQUENCE { + s-SearchThresholdP2-r17 ReselectionThreshold, + s-SearchThresholdQ2-r17 ReselectionThresholdQ OPTIONAL -- Need R + } OPTIONAL, -- Need R + combineRelaxedMeasCondition2-r17 ENUMERATED {true} OPTIONAL -- Need R + } OPTIONAL -- Need R + ]] +} + +RangeToBestCell ::= Q-OffsetRange + +-- TAG-SIB2-STOP +-- TAG-SIB3-START + +SIB3 ::= SEQUENCE { + intraFreqNeighCellList IntraFreqNeighCellList OPTIONAL, -- Need R + intraFreqExcludedCellList IntraFreqExcludedCellList OPTIONAL, -- Need R + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ + intraFreqNeighCellList-v1610 IntraFreqNeighCellList-v1610 OPTIONAL, -- Need R + intraFreqAllowedCellList-r16 IntraFreqAllowedCellList-r16 OPTIONAL, -- Cond SharedSpectrum2 + intraFreqCAG-CellList-r16 SEQUENCE (SIZE (1..maxPLMN)) OF IntraFreqCAG-CellListPerPLMN-r16 OPTIONAL -- Need R + ]], + [[ + intraFreqNeighHSDN-CellList-r17 IntraFreqNeighHSDN-CellList-r17 OPTIONAL, -- Need R + intraFreqNeighCellList-v1710 IntraFreqNeighCellList-v1710 OPTIONAL -- Need R + ]], + [[ + channelAccessMode2-r17 ENUMERATED {enabled} OPTIONAL -- Need R + ]] +} + +IntraFreqNeighCellList ::= SEQUENCE (SIZE (1..maxCellIntra)) OF IntraFreqNeighCellInfo + +IntraFreqNeighCellList-v1610::= SEQUENCE (SIZE (1..maxCellIntra)) OF IntraFreqNeighCellInfo-v1610 + +IntraFreqNeighCellList-v1710 ::= SEQUENCE (SIZE (1..maxCellIntra)) OF IntraFreqNeighCellInfo-v1710 + +IntraFreqNeighCellInfo ::= SEQUENCE { + physCellId PhysCellId, + q-OffsetCell Q-OffsetRange, + q-RxLevMinOffsetCell INTEGER (1..8) OPTIONAL, -- Need R + q-RxLevMinOffsetCellSUL INTEGER (1..8) OPTIONAL, -- Need R + q-QualMinOffsetCell INTEGER (1..8) OPTIONAL, -- Need R + ... +} + +IntraFreqNeighCellInfo-v1610 ::= SEQUENCE { + ssb-PositionQCL-r16 SSB-PositionQCL-Relation-r16 OPTIONAL -- Cond SharedSpectrum2 +} + +IntraFreqNeighCellInfo-v1710 ::= SEQUENCE { + ssb-PositionQCL-r17 SSB-PositionQCL-Relation-r17 OPTIONAL -- Cond SharedSpectrum2 +} + +IntraFreqExcludedCellList ::= SEQUENCE (SIZE (1..maxCellExcluded)) OF PCI-Range + +IntraFreqAllowedCellList-r16 ::= SEQUENCE (SIZE (1..maxCellAllowed)) OF PCI-Range + +IntraFreqCAG-CellListPerPLMN-r16 ::= SEQUENCE { + plmn-IdentityIndex-r16 INTEGER (1..maxPLMN), + cag-CellList-r16 SEQUENCE (SIZE (1..maxCAG-Cell-r16)) OF PCI-Range +} + +IntraFreqNeighHSDN-CellList-r17 ::= SEQUENCE (SIZE (1..maxCellIntra)) OF PCI-Range + +-- TAG-SIB3-STOP +-- TAG-SIB4-START + +SIB4 ::= SEQUENCE { + interFreqCarrierFreqList InterFreqCarrierFreqList, + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ + interFreqCarrierFreqList-v1610 InterFreqCarrierFreqList-v1610 OPTIONAL -- Need R + ]], + [[ + interFreqCarrierFreqList-v1700 InterFreqCarrierFreqList-v1700 OPTIONAL -- Need R + ]], + [[ + interFreqCarrierFreqList-v1720 InterFreqCarrierFreqList-v1720 OPTIONAL -- Need R + ]], + [[ + interFreqCarrierFreqList-v1730 InterFreqCarrierFreqList-v1730 OPTIONAL -- Need R + ]] +} + +InterFreqCarrierFreqList ::= SEQUENCE (SIZE (1..maxFreq)) OF InterFreqCarrierFreqInfo + +InterFreqCarrierFreqList-v1610 ::= SEQUENCE (SIZE (1..maxFreq)) OF InterFreqCarrierFreqInfo-v1610 + +InterFreqCarrierFreqList-v1700 ::= SEQUENCE (SIZE (1..maxFreq)) OF InterFreqCarrierFreqInfo-v1700 + +InterFreqCarrierFreqList-v1720 ::= SEQUENCE (SIZE (1..maxFreq)) OF InterFreqCarrierFreqInfo-v1720 + +InterFreqCarrierFreqList-v1730 ::= SEQUENCE (SIZE (1..maxFreq)) OF InterFreqCarrierFreqInfo-v1730 + +InterFreqCarrierFreqInfo ::= SEQUENCE { + dl-CarrierFreq ARFCN-ValueNR, + frequencyBandList MultiFrequencyBandListNR-SIB OPTIONAL, -- Cond Mandatory + frequencyBandListSUL MultiFrequencyBandListNR-SIB OPTIONAL, -- Need R + nrofSS-BlocksToAverage INTEGER (2..maxNrofSS-BlocksToAverage) OPTIONAL, -- Need S + absThreshSS-BlocksConsolidation ThresholdNR OPTIONAL, -- Need S + smtc SSB-MTC OPTIONAL, -- Need S + ssbSubcarrierSpacing SubcarrierSpacing, + ssb-ToMeasure SSB-ToMeasure OPTIONAL, -- Need S + deriveSSB-IndexFromCell BOOLEAN, + ss-RSSI-Measurement SS-RSSI-Measurement OPTIONAL, -- Need R + q-RxLevMin Q-RxLevMin, + q-RxLevMinSUL Q-RxLevMin OPTIONAL, -- Need R + q-QualMin Q-QualMin OPTIONAL, -- Need S + p-Max P-Max OPTIONAL, -- Need S + t-ReselectionNR T-Reselection, + t-ReselectionNR-SF SpeedStateScaleFactors OPTIONAL, -- Need S + threshX-HighP ReselectionThreshold, + threshX-LowP ReselectionThreshold, + threshX-Q SEQUENCE { + threshX-HighQ ReselectionThresholdQ, + threshX-LowQ ReselectionThresholdQ + } OPTIONAL, -- Cond RSRQ + cellReselectionPriority CellReselectionPriority OPTIONAL, -- Need R + cellReselectionSubPriority CellReselectionSubPriority OPTIONAL, -- Need R + q-OffsetFreq Q-OffsetRange DEFAULT dB0, + interFreqNeighCellList InterFreqNeighCellList OPTIONAL, -- Need R + interFreqExcludedCellList InterFreqExcludedCellList OPTIONAL, -- Need R + ... +} + +InterFreqCarrierFreqInfo-v1610 ::= SEQUENCE { + interFreqNeighCellList-v1610 InterFreqNeighCellList-v1610 OPTIONAL, -- Need R + smtc2-LP-r16 SSB-MTC2-LP-r16 OPTIONAL, -- Need R + interFreqAllowedCellList-r16 InterFreqAllowedCellList-r16 OPTIONAL, -- Cond SharedSpectrum2 + ssb-PositionQCL-Common-r16 SSB-PositionQCL-Relation-r16 OPTIONAL, -- Cond SharedSpectrum + interFreqCAG-CellList-r16 SEQUENCE (SIZE (1..maxPLMN)) OF InterFreqCAG-CellListPerPLMN-r16 OPTIONAL -- Need R +} + +InterFreqCarrierFreqInfo-v1700 ::= SEQUENCE { + interFreqNeighHSDN-CellList-r17 InterFreqNeighHSDN-CellList-r17 OPTIONAL, -- Need R + highSpeedMeasInterFreq-r17 ENUMERATED {true} OPTIONAL, -- Need R + redCapAccessAllowed-r17 ENUMERATED {true} OPTIONAL, -- Need R + ssb-PositionQCL-Common-r17 SSB-PositionQCL-Relation-r17 OPTIONAL, -- Cond SharedSpectrum + interFreqNeighCellList-v1710 InterFreqNeighCellList-v1710 OPTIONAL -- Cond SharedSpectrum2 +} + +InterFreqCarrierFreqInfo-v1720 ::= SEQUENCE { + smtc4list-r17 SSB-MTC4List-r17 OPTIONAL -- Need R +} + +InterFreqCarrierFreqInfo-v1730 ::= SEQUENCE { + channelAccessMode2-r17 ENUMERATED {enabled} OPTIONAL -- Need R +} + +InterFreqNeighHSDN-CellList-r17 ::= SEQUENCE (SIZE (1..maxCellInter)) OF PCI-Range + +InterFreqNeighCellList ::= SEQUENCE (SIZE (1..maxCellInter)) OF InterFreqNeighCellInfo + +InterFreqNeighCellList-v1610 ::= SEQUENCE (SIZE (1..maxCellInter)) OF InterFreqNeighCellInfo-v1610 + +InterFreqNeighCellList-v1710 ::= SEQUENCE (SIZE (1..maxCellInter)) OF InterFreqNeighCellInfo-v1710 + +InterFreqNeighCellInfo ::= SEQUENCE { + physCellId PhysCellId, + q-OffsetCell Q-OffsetRange, + q-RxLevMinOffsetCell INTEGER (1..8) OPTIONAL, -- Need R + q-RxLevMinOffsetCellSUL INTEGER (1..8) OPTIONAL, -- Need R + q-QualMinOffsetCell INTEGER (1..8) OPTIONAL, -- Need R + ... +} + +InterFreqNeighCellInfo-v1610 ::= SEQUENCE { + ssb-PositionQCL-r16 SSB-PositionQCL-Relation-r16 OPTIONAL -- Cond SharedSpectrum2 +} + +InterFreqNeighCellInfo-v1710 ::= SEQUENCE { + ssb-PositionQCL-r17 SSB-PositionQCL-Relation-r17 OPTIONAL -- Cond SharedSpectrum2 +} + +InterFreqExcludedCellList ::= SEQUENCE (SIZE (1..maxCellExcluded)) OF PCI-Range + +InterFreqAllowedCellList-r16 ::= SEQUENCE (SIZE (1..maxCellAllowed)) OF PCI-Range + +InterFreqCAG-CellListPerPLMN-r16 ::= SEQUENCE { + plmn-IdentityIndex-r16 INTEGER (1..maxPLMN), + cag-CellList-r16 SEQUENCE (SIZE (1..maxCAG-Cell-r16)) OF PCI-Range +} + +-- TAG-SIB4-STOP +-- TAG-SIB5-START + +SIB5 ::= SEQUENCE { + carrierFreqListEUTRA CarrierFreqListEUTRA OPTIONAL, -- Need R + t-ReselectionEUTRA T-Reselection, + t-ReselectionEUTRA-SF SpeedStateScaleFactors OPTIONAL, -- Need S + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ + carrierFreqListEUTRA-v1610 CarrierFreqListEUTRA-v1610 OPTIONAL -- Need R + ]], + [[ + carrierFreqListEUTRA-v1700 CarrierFreqListEUTRA-v1700 OPTIONAL, -- Need R + idleModeMeasVoiceFallback-r17 ENUMERATED{true} OPTIONAL -- Need R + ]] +} + +CarrierFreqListEUTRA ::= SEQUENCE (SIZE (1..maxEUTRA-Carrier)) OF CarrierFreqEUTRA + +CarrierFreqListEUTRA-v1610 ::= SEQUENCE (SIZE (1..maxEUTRA-Carrier)) OF CarrierFreqEUTRA-v1610 + +CarrierFreqListEUTRA-v1700 ::= SEQUENCE (SIZE (1..maxEUTRA-Carrier)) OF CarrierFreqEUTRA-v1700 + +CarrierFreqEUTRA ::= SEQUENCE { + carrierFreq ARFCN-ValueEUTRA, + eutra-multiBandInfoList EUTRA-MultiBandInfoList OPTIONAL, -- Need R + eutra-FreqNeighCellList EUTRA-FreqNeighCellList OPTIONAL, -- Need R + eutra-ExcludedCellList EUTRA-FreqExcludedCellList OPTIONAL, -- Need R + allowedMeasBandwidth EUTRA-AllowedMeasBandwidth, + presenceAntennaPort1 EUTRA-PresenceAntennaPort1, + cellReselectionPriority CellReselectionPriority OPTIONAL, -- Need R + cellReselectionSubPriority CellReselectionSubPriority OPTIONAL, -- Need R + threshX-High ReselectionThreshold, + threshX-Low ReselectionThreshold, + q-RxLevMin INTEGER (-70..-22), + q-QualMin INTEGER (-34..-3), + p-MaxEUTRA INTEGER (-30..33), + threshX-Q SEQUENCE { + threshX-HighQ ReselectionThresholdQ, + threshX-LowQ ReselectionThresholdQ + } OPTIONAL -- Cond RSRQ +} + +CarrierFreqEUTRA-v1610 ::= SEQUENCE { + highSpeedEUTRACarrier-r16 ENUMERATED {true} OPTIONAL -- Need R +} + +CarrierFreqEUTRA-v1700 ::= SEQUENCE { + eutra-FreqNeighHSDN-CellList-r17 EUTRA-FreqNeighHSDN-CellList-r17 OPTIONAL -- Need R +} + +EUTRA-FreqNeighHSDN-CellList-r17 ::= SEQUENCE (SIZE (1..maxCellEUTRA)) OF EUTRA-PhysCellIdRange + +EUTRA-FreqExcludedCellList ::= SEQUENCE (SIZE (1..maxEUTRA-CellExcluded)) OF EUTRA-PhysCellIdRange + +EUTRA-FreqNeighCellList ::= SEQUENCE (SIZE (1..maxCellEUTRA)) OF EUTRA-FreqNeighCellInfo + +EUTRA-FreqNeighCellInfo ::= SEQUENCE { + physCellId EUTRA-PhysCellId, + dummy EUTRA-Q-OffsetRange, + q-RxLevMinOffsetCell INTEGER (1..8) OPTIONAL, -- Need R + q-QualMinOffsetCell INTEGER (1..8) OPTIONAL -- Need R +} + +-- TAG-SIB5-STOP +-- TAG-SIB6-START + +SIB6 ::= SEQUENCE { + messageIdentifier BIT STRING (SIZE (16)), + serialNumber BIT STRING (SIZE (16)), + warningType OCTET STRING (SIZE (2)), + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +-- TAG-SIB6-STOP +-- TAG-SIB7-START + +SIB7 ::= SEQUENCE { + messageIdentifier BIT STRING (SIZE (16)), + serialNumber BIT STRING (SIZE (16)), + warningMessageSegmentType ENUMERATED {notLastSegment, lastSegment}, + warningMessageSegmentNumber INTEGER (0..63), + warningMessageSegment OCTET STRING, + dataCodingScheme OCTET STRING (SIZE (1)) OPTIONAL, -- Cond Segment1 + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +-- TAG-SIB7-STOP +-- TAG-SIB8-START + +SIB8 ::= SEQUENCE { + messageIdentifier BIT STRING (SIZE (16)), + serialNumber BIT STRING (SIZE (16)), + warningMessageSegmentType ENUMERATED {notLastSegment, lastSegment}, + warningMessageSegmentNumber INTEGER (0..63), + warningMessageSegment OCTET STRING, + dataCodingScheme OCTET STRING (SIZE (1)) OPTIONAL, -- Cond Segment1 + warningAreaCoordinatesSegment OCTET STRING OPTIONAL, -- Need R + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +-- TAG-SIB8-STOP +-- TAG-SIB9-START + +SIB9 ::= SEQUENCE { + timeInfo SEQUENCE { + timeInfoUTC INTEGER (0..549755813887), + dayLightSavingTime BIT STRING (SIZE (2)) OPTIONAL, -- Need R + leapSeconds INTEGER (-127..128) OPTIONAL, -- Need R + localTimeOffset INTEGER (-63..64) OPTIONAL -- Need R + } OPTIONAL, -- Need R + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ + referenceTimeInfo-r16 ReferenceTimeInfo-r16 OPTIONAL -- Need R + ]] +} + +-- TAG-SIB9-STOP +-- TAG-SIB10-START + +SIB10-r16 ::= SEQUENCE { + hrnn-List-r16 HRNN-List-r16 OPTIONAL, -- Need R + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +HRNN-List-r16 ::= SEQUENCE (SIZE (1..maxNPN-r16)) OF HRNN-r16 + +HRNN-r16 ::= SEQUENCE { + hrnn-r16 OCTET STRING (SIZE(1.. maxHRNN-Len-r16)) OPTIONAL -- Need R +} + +-- TAG-SIB10-STOP +-- TAG-SIB11-START + +SIB11-r16 ::= SEQUENCE { + measIdleConfigSIB-r16 MeasIdleConfigSIB-r16 OPTIONAL, -- Need S + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +-- TAG-SIB11-STOP +-- TAG-SIB12-START + +SIB12-r16 ::= SEQUENCE { + segmentNumber-r16 INTEGER (0..63), + segmentType-r16 ENUMERATED {notLastSegment, lastSegment}, + segmentContainer-r16 OCTET STRING +} + +SIB12-IEs-r16 ::= SEQUENCE { + sl-ConfigCommonNR-r16 SL-ConfigCommonNR-r16, + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ + sl-DRX-ConfigCommonGC-BC-r17 SL-DRX-ConfigGC-BC-r17 OPTIONAL, -- Need R + sl-DiscConfigCommon-r17 SL-DiscConfigCommon-r17 OPTIONAL, -- Need R + sl-L2U2N-Relay-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + sl-NonRelayDiscovery-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + sl-L3U2N-RelayDiscovery-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + sl-TimersAndConstantsRemoteUE-r17 UE-TimersAndConstantsRemoteUE-r17 OPTIONAL -- Need R + ]] +} + +SL-ConfigCommonNR-r16 ::= SEQUENCE { + sl-FreqInfoList-r16 SEQUENCE (SIZE (1..maxNrofFreqSL-r16)) OF SL-FreqConfigCommon-r16 OPTIONAL, -- Need R + sl-UE-SelectedConfig-r16 SL-UE-SelectedConfig-r16 OPTIONAL, -- Need R + sl-NR-AnchorCarrierFreqList-r16 SL-NR-AnchorCarrierFreqList-r16 OPTIONAL, -- Need R + sl-EUTRA-AnchorCarrierFreqList-r16 SL-EUTRA-AnchorCarrierFreqList-r16 OPTIONAL, -- Need R + sl-RadioBearerConfigList-r16 SEQUENCE (SIZE (1..maxNrofSLRB-r16)) OF SL-RadioBearerConfig-r16 OPTIONAL, -- Need R + sl-RLC-BearerConfigList-r16 SEQUENCE (SIZE (1..maxSL-LCID-r16)) OF SL-RLC-BearerConfig-r16 OPTIONAL, -- Need R + sl-MeasConfigCommon-r16 SL-MeasConfigCommon-r16 OPTIONAL, -- Need R + sl-CSI-Acquisition-r16 ENUMERATED {enabled} OPTIONAL, -- Need R + sl-OffsetDFN-r16 INTEGER (1..1000) OPTIONAL, -- Need R + t400-r16 ENUMERATED {ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000} OPTIONAL, -- Need R + sl-MaxNumConsecutiveDTX-r16 ENUMERATED {n1, n2, n3, n4, n6, n8, n16, n32} OPTIONAL, -- Need R + sl-SSB-PriorityNR-r16 INTEGER (1..8) OPTIONAL -- Need R +} + +SL-NR-AnchorCarrierFreqList-r16 ::= SEQUENCE (SIZE (1..maxFreqSL-NR-r16)) OF ARFCN-ValueNR + +SL-EUTRA-AnchorCarrierFreqList-r16 ::= SEQUENCE (SIZE (1..maxFreqSL-EUTRA-r16)) OF ARFCN-ValueEUTRA + +SL-DiscConfigCommon-r17 ::= SEQUENCE { + sl-RelayUE-ConfigCommon-r17 SL-RelayUE-Config-r17, + sl-RemoteUE-ConfigCommon-r17 SL-RemoteUE-Config-r17 +} + +-- TAG-SIB12-STOP +-- TAG-SIB13-START + +SIB13-r16 ::= SEQUENCE { + sl-V2X-ConfigCommon-r16 OCTET STRING, + dummy OCTET STRING, + tdd-Config-r16 OCTET STRING, + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +-- TAG-SIB13-STOP +-- TAG-SIB14-START + +SIB14-r16 ::= SEQUENCE { + sl-V2X-ConfigCommonExt-r16 OCTET STRING, + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +-- TAG-SIB14-STOP +-- TAG-SIB15-START + +SIB15-r17 ::= SEQUENCE { + commonPLMNsWithDisasterCondition-r17 SEQUENCE (SIZE (1..maxPLMN)) OF PLMN-Identity OPTIONAL, -- Need R + applicableDisasterInfoList-r17 SEQUENCE (SIZE (1..maxPLMN)) OF ApplicableDisasterInfo-r17 OPTIONAL, -- Need R + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +ApplicableDisasterInfo-r17 ::= CHOICE { + noDisasterRoaming-r17 NULL, + disasterRelatedIndication-r17 NULL, + commonPLMNs-r17 NULL, + dedicatedPLMNs-r17 SEQUENCE (SIZE (1..maxPLMN)) OF PLMN-Identity +} + +-- TAG-SIB15-STOP +-- TAG-SIB16-START + +SIB16-r17 ::= SEQUENCE { + freqPriorityListSlicing-r17 FreqPriorityListSlicing-r17 OPTIONAL, -- Need R + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +-- TAG-SIB16-STOP +-- TAG-SIB17-START + +SIB17-r17 ::= SEQUENCE { + segmentNumber-r17 INTEGER (0..63), + segmentType-r17 ENUMERATED {notLastSegment, lastSegment}, + segmentContainer-r17 OCTET STRING +} + +SIB17-IEs-r17 ::= SEQUENCE { + trs-ResourceSetConfig-r17 SEQUENCE (SIZE (1..maxNrofTRS-ResourceSets-r17)) OF TRS-ResourceSet-r17, + validityDuration-r17 ENUMERATED {t1, t2, t4, t8, t16, t32, t64, t128, t256, t512, infinity, spare5, spare4, spare3, spare2, + spare1} OPTIONAL, -- Need S + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +TRS-ResourceSet-r17 ::= SEQUENCE { + powerControlOffsetSS-r17 ENUMERATED {db-3, db0, db3, db6}, + scramblingID-Info-r17 CHOICE { + scramblingIDforCommon-r17 ScramblingId, + scramblingIDperResourceListWith2-r17 SEQUENCE (SIZE (2)) OF ScramblingId, + scramblingIDperResourceListWith4-r17 SEQUENCE (SIZE (4)) OF ScramblingId, + ... + }, + firstOFDMSymbolInTimeDomain-r17 INTEGER (0..9), + startingRB-r17 INTEGER (0..maxNrofPhysicalResourceBlocks-1), + nrofRBs-r17 INTEGER (24..maxNrofPhysicalResourceBlocksPlus1), + ssb-Index-r17 SSB-Index, + periodicityAndOffset-r17 CHOICE { + slots10 INTEGER (0..9), + slots20 INTEGER (0..19), + slots40 INTEGER (0..39), + slots80 INTEGER (0..79) + }, + frequencyDomainAllocation-r17 BIT STRING (SIZE (4)), + indBitID-r17 INTEGER (0..5), + nrofResources-r17 ENUMERATED {n2, n4} +} + +-- TAG-SIB17-STOP +-- TAG-SIB18-START + +SIB18-r17 ::= SEQUENCE { + gin-ElementList-r17 SEQUENCE (SIZE (1..maxGIN-r17)) OF GIN-Element-r17 OPTIONAL, -- Need R + gins-PerSNPN-List-r17 SEQUENCE (SIZE (1..maxNPN-r16)) OF GINs-PerSNPN-r17 OPTIONAL, -- Need S + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +GIN-Element-r17 ::= SEQUENCE { + plmn-Identity-r17 PLMN-Identity, + nid-List-r17 SEQUENCE (SIZE (1..maxGIN-r17)) OF NID-r16 +} + +GINs-PerSNPN-r17 ::= SEQUENCE { + supportedGINs-r17 BIT STRING (SIZE (1..maxGIN-r17)) OPTIONAL -- Need R +} +-- TAG-SIB18-STOP +-- TAG-SIB19-START + +SIB19-r17 ::= SEQUENCE { + ntn-Config-r17 NTN-Config-r17 OPTIONAL, -- Need R + t-Service-r17 INTEGER (0..549755813887) OPTIONAL, -- Need R + referenceLocation-r17 ReferenceLocation-r17 OPTIONAL, -- Need R + distanceThresh-r17 INTEGER(0..65525) OPTIONAL, -- Need R + ntn-NeighCellConfigList-r17 NTN-NeighCellConfigList-r17 OPTIONAL, -- Need R + lateNonCriticalExtension OCTET STRING OPTIONAL, + ..., + [[ + ntn-NeighCellConfigListExt-v1720 NTN-NeighCellConfigList-r17 OPTIONAL -- Need R + ]] +} + +NTN-NeighCellConfigList-r17 ::= SEQUENCE (SIZE(1..maxCellNTN-r17)) OF NTN-NeighCellConfig-r17 + +NTN-NeighCellConfig-r17 ::= SEQUENCE { + ntn-Config-r17 NTN-Config-r17 OPTIONAL, -- Need R + carrierFreq-r17 ARFCN-ValueNR OPTIONAL, -- Need R + physCellId-r17 PhysCellId OPTIONAL -- Need R +} + +-- TAG-SIB19-STOP +-- TAG-SIB20-START + +SIB20-r17 ::= SEQUENCE { + mcch-Config-r17 MCCH-Config-r17, + cfr-ConfigMCCH-MTCH-r17 CFR-ConfigMCCH-MTCH-r17 OPTIONAL, -- Need S + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +MCCH-Config-r17 ::= SEQUENCE { + mcch-RepetitionPeriodAndOffset-r17 MCCH-RepetitionPeriodAndOffset-r17, + mcch-WindowStartSlot-r17 INTEGER (0..79), + mcch-WindowDuration-r17 ENUMERATED {sl2, sl4, sl8, sl10, sl20, sl40,sl80, sl160} OPTIONAL, -- Need S + mcch-ModificationPeriod-r17 ENUMERATED {rf2, rf4, rf8, rf16, rf32, rf64, rf128, rf256, + rf512, rf1024, r2048, rf4096, rf8192, rf16384, rf32768, rf65536} +} + +MCCH-RepetitionPeriodAndOffset-r17 ::= CHOICE { + rf1-r17 INTEGER(0), + rf2-r17 INTEGER(0..1), + rf4-r17 INTEGER(0..3), + rf8-r17 INTEGER(0..7), + rf16-r17 INTEGER(0..15), + rf32-r17 INTEGER(0..31), + rf64-r17 INTEGER(0..63), + rf128-r17 INTEGER(0..127), + rf256-r17 INTEGER(0..255) +} + +-- TAG-SIB20-STOP +-- TAG-SIB21-START + +SIB21-r17 ::= SEQUENCE { + mbs-FSAI-IntraFreq-r17 MBS-FSAI-List-r17 OPTIONAL, -- Need R + mbs-FSAI-InterFreqList-r17 MBS-FSAI-InterFreqList-r17 OPTIONAL, -- Need R + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +MBS-FSAI-List-r17 ::= SEQUENCE (SIZE (1..maxFSAI-MBS-r17)) OF MBS-FSAI-r17 + +MBS-FSAI-InterFreqList-r17 ::= SEQUENCE (SIZE (1..maxFreq)) OF MBS-FSAI-InterFreq-r17 + +MBS-FSAI-InterFreq-r17 ::= SEQUENCE { + dl-CarrierFreq-r17 ARFCN-ValueNR, + mbs-FSAI-List-r17 MBS-FSAI-List-r17 +} + +MBS-FSAI-r17 ::= OCTET STRING (SIZE (3)) + +-- TAG-SIB21-STOP +-- TAG-POSSYSTEMINFORMATION-R16-IES-START + +PosSystemInformation-r16-IEs ::= SEQUENCE { + posSIB-TypeAndInfo-r16 SEQUENCE (SIZE (1..maxSIB)) OF CHOICE { + posSib1-1-r16 SIBpos-r16, + posSib1-2-r16 SIBpos-r16, + posSib1-3-r16 SIBpos-r16, + posSib1-4-r16 SIBpos-r16, + posSib1-5-r16 SIBpos-r16, + posSib1-6-r16 SIBpos-r16, + posSib1-7-r16 SIBpos-r16, + posSib1-8-r16 SIBpos-r16, + posSib2-1-r16 SIBpos-r16, + posSib2-2-r16 SIBpos-r16, + posSib2-3-r16 SIBpos-r16, + posSib2-4-r16 SIBpos-r16, + posSib2-5-r16 SIBpos-r16, + posSib2-6-r16 SIBpos-r16, + posSib2-7-r16 SIBpos-r16, + posSib2-8-r16 SIBpos-r16, + posSib2-9-r16 SIBpos-r16, + posSib2-10-r16 SIBpos-r16, + posSib2-11-r16 SIBpos-r16, + posSib2-12-r16 SIBpos-r16, + posSib2-13-r16 SIBpos-r16, + posSib2-14-r16 SIBpos-r16, + posSib2-15-r16 SIBpos-r16, + posSib2-16-r16 SIBpos-r16, + posSib2-17-r16 SIBpos-r16, + posSib2-18-r16 SIBpos-r16, + posSib2-19-r16 SIBpos-r16, + posSib2-20-r16 SIBpos-r16, + posSib2-21-r16 SIBpos-r16, + posSib2-22-r16 SIBpos-r16, + posSib2-23-r16 SIBpos-r16, + posSib3-1-r16 SIBpos-r16, + posSib4-1-r16 SIBpos-r16, + posSib5-1-r16 SIBpos-r16, + posSib6-1-r16 SIBpos-r16, + posSib6-2-r16 SIBpos-r16, + posSib6-3-r16 SIBpos-r16, + ... , + posSib1-9-v1700 SIBpos-r16, + posSib1-10-v1700 SIBpos-r16, + posSib2-24-v1700 SIBpos-r16, + posSib2-25-v1700 SIBpos-r16, + posSib6-4-v1700 SIBpos-r16, + posSib6-5-v1700 SIBpos-r16, + posSib6-6-v1700 SIBpos-r16 + }, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-POSSYSTEMINFORMATION-R16-IES-STOP +-- TAG-POSSI-SCHEDULINGINFO-START + +PosSI-SchedulingInfo-r16 ::= SEQUENCE { + posSchedulingInfoList-r16 SEQUENCE (SIZE (1..maxSI-Message)) OF PosSchedulingInfo-r16, + posSI-RequestConfig-r16 SI-RequestConfig OPTIONAL, -- Cond MSG-1 + posSI-RequestConfigSUL-r16 SI-RequestConfig OPTIONAL, -- Cond SUL-MSG-1 + ..., + [[ + posSI-RequestConfigRedCap-r17 SI-RequestConfig OPTIONAL -- Cond REDCAP-MSG-1 + ]] +} + +PosSchedulingInfo-r16 ::= SEQUENCE { + offsetToSI-Used-r16 ENUMERATED {true} OPTIONAL, -- Need R + posSI-Periodicity-r16 ENUMERATED {rf8, rf16, rf32, rf64, rf128, rf256, rf512}, + posSI-BroadcastStatus-r16 ENUMERATED {broadcasting, notBroadcasting}, + posSIB-MappingInfo-r16 PosSIB-MappingInfo-r16, + ... +} + +PosSIB-MappingInfo-r16 ::= SEQUENCE (SIZE (1..maxSIB)) OF PosSIB-Type-r16 + +PosSIB-Type-r16 ::= SEQUENCE { + encrypted-r16 ENUMERATED { true } OPTIONAL, -- Need R + gnss-id-r16 GNSS-ID-r16 OPTIONAL, -- Need R + sbas-id-r16 SBAS-ID-r16 OPTIONAL, -- Need R + posSibType-r16 ENUMERATED { posSibType1-1, posSibType1-2, posSibType1-3, posSibType1-4, posSibType1-5, posSibType1-6, + posSibType1-7, posSibType1-8, posSibType2-1, posSibType2-2, posSibType2-3, posSibType2-4, + posSibType2-5, posSibType2-6, posSibType2-7, posSibType2-8, posSibType2-9, posSibType2-10, + posSibType2-11, posSibType2-12, posSibType2-13, posSibType2-14, posSibType2-15, + posSibType2-16, posSibType2-17, posSibType2-18, posSibType2-19, posSibType2-20, + posSibType2-21, posSibType2-22, posSibType2-23, posSibType3-1, posSibType4-1, + posSibType5-1,posSibType6-1, posSibType6-2, posSibType6-3,... }, + areaScope-r16 ENUMERATED {true} OPTIONAL -- Need S +} + +GNSS-ID-r16 ::= SEQUENCE { + gnss-id-r16 ENUMERATED{gps, sbas, qzss, galileo, glonass, bds, ...}, + ... +} + +SBAS-ID-r16 ::= SEQUENCE { + sbas-id-r16 ENUMERATED { waas, egnos, msas, gagan, ...}, + ... +} + +-- TAG-POSSI-SCHEDULINGINFO-STOP +-- TAG-SIPOS-START + +SIBpos-r16 ::= SEQUENCE { + assistanceDataSIB-Element-r16 OCTET STRING, + lateNonCriticalExtension OCTET STRING OPTIONAL, + ... +} + +-- TAG-SIPOS-STOP +-- TAG-ADDITIONALSPECTRUMEMISSION-START + +AdditionalSpectrumEmission ::= INTEGER (0..7) + +-- TAG-ADDITIONALSPECTRUMEMISSION-STOP +-- TAG-ALPHA-START + +Alpha ::= ENUMERATED {alpha0, alpha04, alpha05, alpha06, alpha07, alpha08, alpha09, alpha1} + +-- TAG-ALPHA-STOP +-- TAG-AMF-IDENTIFIER-START + +AMF-Identifier ::= BIT STRING (SIZE (24)) + +-- TAG-AMF-IDENTIFIER-STOP +-- TAG-ARFCN-VALUEEUTRA-START + +ARFCN-ValueEUTRA ::= INTEGER (0..maxEARFCN) + +-- TAG-ARFCN-VALUEEUTRA-STOP +-- TAG-ARFCN-VALUENR-START + +ARFCN-ValueNR ::= INTEGER (0..maxNARFCN) + +-- TAG-ARFCN-VALUENR-STOP +-- TAG-ARFCN-ValueUTRA-FDD-START + +ARFCN-ValueUTRA-FDD-r16 ::= INTEGER (0..16383) + +-- TAG-ARFCN-ValueUTRA-FDD-STOP +-- TAG-AVAILABILITYCOMBINATIONSPERCELL-START + +AvailabilityCombinationsPerCell-r16 ::= SEQUENCE { + availabilityCombinationsPerCellIndex-r16 AvailabilityCombinationsPerCellIndex-r16, + iab-DU-CellIdentity-r16 CellIdentity, + positionInDCI-AI-r16 INTEGER(0..maxAI-DCI-PayloadSize-1-r16) OPTIONAL, -- Need M + availabilityCombinations-r16 SEQUENCE (SIZE (1..maxNrofAvailabilityCombinationsPerSet-r16)) OF AvailabilityCombination-r16, + ..., + [[ + availabilityCombinationsRB-Groups-r17 SEQUENCE (SIZE (1..maxNrofAvailabilityCombinationsPerSet-r16)) OF AvailabilityCombinationRB-Groups-r17 OPTIONAL -- Need M + ]], + [[ + positionInDCI-AI-RBGroups-v1720 INTEGER(0..maxAI-DCI-PayloadSize-1-r16) OPTIONAL -- Need M + ]] +} + +AvailabilityCombinationsPerCellIndex-r16 ::= INTEGER(0..maxNrofDUCells-r16) + +AvailabilityCombination-r16 ::= SEQUENCE { + availabilityCombinationId-r16 AvailabilityCombinationId-r16, + resourceAvailability-r16 SEQUENCE (SIZE (1..maxNrofResourceAvailabilityPerCombination-r16)) OF INTEGER (0..7) +} + +AvailabilityCombinationId-r16 ::= INTEGER (0..maxNrofAvailabilityCombinationsPerSet-1-r16) + +AvailabilityCombinationRB-Groups-r17 ::= SEQUENCE { + availabilityCombinationId-r17 AvailabilityCombinationId-r16, + rb-SetGroups-r17 SEQUENCE (SIZE (1..maxNrofRB-SetGroups-r17)) OF RB-SetGroup-r17 OPTIONAL, -- Need R + resourceAvailability-r17 SEQUENCE (SIZE (1..maxNrofResourceAvailabilityPerCombination-r16)) OF INTEGER (0..7) OPTIONAL -- Need R +} + +RB-SetGroup-r17 ::= SEQUENCE { + resourceAvailability-r17 SEQUENCE (SIZE (1..maxNrofResourceAvailabilityPerCombination-r16)) OF INTEGER (0..7) OPTIONAL, -- Need R + rb-Sets-r17 SEQUENCE (SIZE (1..maxNrofRB-Sets-r17)) OF INTEGER (0..7) OPTIONAL -- Need R +} + +-- TAG-AVAILABILITYCOMBINATIONSPERCELL-STOP +-- TAG-AVAILABILITYINDICATOR-START + +AvailabilityIndicator-r16 ::= SEQUENCE { + ai-RNTI-r16 AI-RNTI-r16, + dci-PayloadSizeAI-r16 INTEGER (1..maxAI-DCI-PayloadSize-r16), + availableCombToAddModList-r16 SEQUENCE (SIZE(1..maxNrofDUCells-r16)) OF AvailabilityCombinationsPerCell-r16 OPTIONAL, -- Need N + availableCombToReleaseList-r16 SEQUENCE (SIZE(1..maxNrofDUCells-r16)) OF AvailabilityCombinationsPerCellIndex-r16 OPTIONAL, -- Need N + ... +} + +AI-RNTI-r16 ::= RNTI-Value + +-- TAG-AVAILABILITYINDICATOR-STOP +-- TAG-BAPROUTINGID-START + +BAP-RoutingID-r16::= SEQUENCE{ + bap-Address-r16 BIT STRING (SIZE (10)), + bap-PathId-r16 BIT STRING (SIZE (10)) +} + +-- TAG-BAPROUTINGID-STOP +-- TAG-BEAMFAILURERECOVERYCONFIG-START + +BeamFailureRecoveryConfig ::= SEQUENCE { + rootSequenceIndex-BFR INTEGER (0..137) OPTIONAL, -- Need M + rach-ConfigBFR RACH-ConfigGeneric OPTIONAL, -- Need M + rsrp-ThresholdSSB RSRP-Range OPTIONAL, -- Need M + candidateBeamRSList SEQUENCE (SIZE(1..maxNrofCandidateBeams)) OF PRACH-ResourceDedicatedBFR OPTIONAL, -- Need M + ssb-perRACH-Occasion ENUMERATED {oneEighth, oneFourth, oneHalf, one, two, + four, eight, sixteen} OPTIONAL, -- Need M + ra-ssb-OccasionMaskIndex INTEGER (0..15) OPTIONAL, -- Need M + recoverySearchSpaceId SearchSpaceId OPTIONAL, -- Need R + ra-Prioritization RA-Prioritization OPTIONAL, -- Need R + beamFailureRecoveryTimer ENUMERATED {ms10, ms20, ms40, ms60, ms80, ms100, ms150, ms200} OPTIONAL, -- Need M + ..., + [[ + msg1-SubcarrierSpacing SubcarrierSpacing OPTIONAL -- Need M + ]], + [[ + ra-PrioritizationTwoStep-r16 RA-Prioritization OPTIONAL, -- Need R + candidateBeamRSListExt-v1610 SetupRelease{ CandidateBeamRSListExt-r16 } OPTIONAL -- Need M + ]], + [[ + spCell-BFR-CBRA-r16 ENUMERATED {true} OPTIONAL -- Need R + ]] +} + +PRACH-ResourceDedicatedBFR ::= CHOICE { + ssb BFR-SSB-Resource, + csi-RS BFR-CSIRS-Resource +} + +BFR-SSB-Resource ::= SEQUENCE { + ssb SSB-Index, + ra-PreambleIndex INTEGER (0..63), + ... +} + +BFR-CSIRS-Resource ::= SEQUENCE { + csi-RS NZP-CSI-RS-ResourceId, + ra-OccasionList SEQUENCE (SIZE(1..maxRA-OccasionsPerCSIRS)) OF INTEGER (0..maxRA-Occasions-1) OPTIONAL, -- Need R + ra-PreambleIndex INTEGER (0..63) OPTIONAL, -- Need R + ... +} + +CandidateBeamRSListExt-r16::= SEQUENCE (SIZE(1.. maxNrofCandidateBeamsExt-r16)) OF PRACH-ResourceDedicatedBFR + +-- TAG-BEAMFAILURERECOVERYCONFIG-STOP +-- TAG-BEAMFAILURERECOVERYRSCONFIG-START + +BeamFailureRecoveryRSConfig-r16 ::= SEQUENCE { + rsrp-ThresholdBFR-r16 RSRP-Range OPTIONAL, -- Need M + candidateBeamRS-List-r16 SEQUENCE (SIZE(1..maxNrofCandidateBeams-r16)) OF CandidateBeamRS-r16 OPTIONAL, -- Need M + ..., + [[ + candidateBeamRS-List2-r17 SEQUENCE (SIZE(1..maxNrofCandidateBeams-r16)) OF CandidateBeamRS-r16 OPTIONAL -- Need R + ]] +} + +-- TAG-BEAMFAILURERECOVERYRSCONFIG-STOP +-- TAG-BETAOFFSETS-START + +BetaOffsets ::= SEQUENCE { + betaOffsetACK-Index1 INTEGER(0..31) OPTIONAL, -- Need S + betaOffsetACK-Index2 INTEGER(0..31) OPTIONAL, -- Need S + betaOffsetACK-Index3 INTEGER(0..31) OPTIONAL, -- Need S + betaOffsetCSI-Part1-Index1 INTEGER(0..31) OPTIONAL, -- Need S + betaOffsetCSI-Part1-Index2 INTEGER(0..31) OPTIONAL, -- Need S + betaOffsetCSI-Part2-Index1 INTEGER(0..31) OPTIONAL, -- Need S + betaOffsetCSI-Part2-Index2 INTEGER(0..31) OPTIONAL -- Need S +} + +-- TAG-BETAOFFSETS-STOP +-- TAG-BETAOFFSETSCROSSPRI-START + +BetaOffsetsCrossPri-r17 ::= SEQUENCE (SIZE(3)) OF INTEGER(0..31) + +-- TAG-BETAOFFSETSCROSSPRI-STOP +-- TAG-BHLOGICALCHANNELIDENTITY-START + +BH-LogicalChannelIdentity-r16 ::= CHOICE { + bh-LogicalChannelIdentity-r16 LogicalChannelIdentity, + bh-LogicalChannelIdentityExt-r16 BH-LogicalChannelIdentity-Ext-r16 +} + +-- TAG-BHLOGICALCHANNELIDENTITY-STOP +-- TAG-BHLOGICALCHANNELIDENTITYEXT-START + +BH-LogicalChannelIdentity-Ext-r16 ::= INTEGER (320.. maxLC-ID-Iab-r16) + +-- TAG-BHLOGICALCHANNELIDENTITYEXT-STOP +-- TAG-BHRLCCHANNELCONFIG-START + +BH-RLC-ChannelConfig-r16::= SEQUENCE { + bh-LogicalChannelIdentity-r16 BH-LogicalChannelIdentity-r16 OPTIONAL, -- Cond LCH-SetupOnly + bh-RLC-ChannelID-r16 BH-RLC-ChannelID-r16, + reestablishRLC-r16 ENUMERATED {true} OPTIONAL, -- Need N + rlc-Config-r16 RLC-Config OPTIONAL, -- Cond LCH-Setup + mac-LogicalChannelConfig-r16 LogicalChannelConfig OPTIONAL, -- Cond LCH-Setup + ... +} + +-- TAG-BHRLCCHANNELCONFIG-STOP +-- TAG-BHRLCCHANNELID-START + +BH-RLC-ChannelID-r16 ::= BIT STRING (SIZE (16)) + +-- TAG-BHRLCCHANNELID-STOP +-- TAG-BSR-CONFIG-START + +BSR-Config ::= SEQUENCE { + periodicBSR-Timer ENUMERATED { sf1, sf5, sf10, sf16, sf20, sf32, sf40, sf64, + sf80, sf128, sf160, sf320, sf640, sf1280, sf2560, infinity }, + retxBSR-Timer ENUMERATED { sf10, sf20, sf40, sf80, sf160, sf320, sf640, sf1280, sf2560, + sf5120, sf10240, spare5, spare4, spare3, spare2, spare1}, + logicalChannelSR-DelayTimer ENUMERATED { sf20, sf40, sf64, sf128, sf512, sf1024, sf2560, spare1} OPTIONAL, -- Need R + ... +} + +-- TAG-BSR-CONFIG-STOP +-- TAG-BWP-START + +BWP ::= SEQUENCE { + locationAndBandwidth INTEGER (0..37949), + subcarrierSpacing SubcarrierSpacing, + cyclicPrefix ENUMERATED { extended } OPTIONAL -- Need R +} + +-- TAG-BWP-STOP +-- TAG-BWP-DOWNLINK-START + +BWP-Downlink ::= SEQUENCE { + bwp-Id BWP-Id, + bwp-Common BWP-DownlinkCommon OPTIONAL, -- Cond SetupOtherBWP + bwp-Dedicated BWP-DownlinkDedicated OPTIONAL, -- Cond SetupOtherBWP + ... +} + +-- TAG-BWP-DOWNLINK-STOP +-- TAG-BWP-DOWNLINKCOMMON-START + +BWP-DownlinkCommon ::= SEQUENCE { + genericParameters BWP, + pdcch-ConfigCommon SetupRelease { PDCCH-ConfigCommon } OPTIONAL, -- Need M + pdsch-ConfigCommon SetupRelease { PDSCH-ConfigCommon } OPTIONAL, -- Need M + ... +} + +-- TAG-BWP-DOWNLINKCOMMON-STOP +-- TAG-BWP-DOWNLINKDEDICATED-START + +BWP-DownlinkDedicated ::= SEQUENCE { + pdcch-Config SetupRelease { PDCCH-Config } OPTIONAL, -- Need M + pdsch-Config SetupRelease { PDSCH-Config } OPTIONAL, -- Need M + sps-Config SetupRelease { SPS-Config } OPTIONAL, -- Need M + radioLinkMonitoringConfig SetupRelease { RadioLinkMonitoringConfig } OPTIONAL, -- Need M + ..., + [[ + sps-ConfigToAddModList-r16 SPS-ConfigToAddModList-r16 OPTIONAL, -- Need N + sps-ConfigToReleaseList-r16 SPS-ConfigToReleaseList-r16 OPTIONAL, -- Need N + sps-ConfigDeactivationStateList-r16 SPS-ConfigDeactivationStateList-r16 OPTIONAL, -- Need R + beamFailureRecoverySCellConfig-r16 SetupRelease {BeamFailureRecoveryRSConfig-r16} OPTIONAL, -- Cond SCellOnly + sl-PDCCH-Config-r16 SetupRelease { PDCCH-Config } OPTIONAL, -- Need M + sl-V2X-PDCCH-Config-r16 SetupRelease { PDCCH-Config } OPTIONAL -- Need M + ]], + [[ + preConfGapStatus-r17 BIT STRING (SIZE (maxNrofGapId-r17)) OPTIONAL, -- Cond PreConfigMG + beamFailureRecoverySpCellConfig-r17 SetupRelease { BeamFailureRecoveryRSConfig-r16} OPTIONAL, -- Cond SpCellOnly + harq-FeedbackEnablingforSPSactive-r17 BOOLEAN OPTIONAL, -- Need R + cfr-ConfigMulticast-r17 SetupRelease { CFR-ConfigMulticast-r17 } OPTIONAL, -- Need M + dl-PPW-PreConfigToAddModList-r17 DL-PPW-PreConfigToAddModList-r17 OPTIONAL, -- Need N + dl-PPW-PreConfigToReleaseList-r17 DL-PPW-PreConfigToReleaseList-r17 OPTIONAL, -- Need N + nonCellDefiningSSB-r17 NonCellDefiningSSB-r17 OPTIONAL, -- Need R + servingCellMO-r17 MeasObjectId OPTIONAL -- Cond MeasObject-NCD-SSB + ]] +} + +SPS-ConfigToAddModList-r16 ::= SEQUENCE (SIZE (1..maxNrofSPS-Config-r16)) OF SPS-Config + +SPS-ConfigToReleaseList-r16 ::= SEQUENCE (SIZE (1..maxNrofSPS-Config-r16)) OF SPS-ConfigIndex-r16 + +SPS-ConfigDeactivationState-r16 ::= SEQUENCE (SIZE (1..maxNrofSPS-Config-r16)) OF SPS-ConfigIndex-r16 + +SPS-ConfigDeactivationStateList-r16 ::= SEQUENCE (SIZE (1..maxNrofSPS-DeactivationState)) OF SPS-ConfigDeactivationState-r16 + +DL-PPW-PreConfigToAddModList-r17 ::= SEQUENCE (SIZE (1..maxNrofPPW-Config-r17)) OF DL-PPW-PreConfig-r17 + +DL-PPW-PreConfigToReleaseList-r17 ::= SEQUENCE (SIZE (1..maxNrofPPW-Config-r17)) OF DL-PPW-ID-r17 + +-- TAG-BWP-DOWNLINKDEDICATED-STOP +-- TAG-BWP-ID-START + +BWP-Id ::= INTEGER (0..maxNrofBWPs) + +-- TAG-BWP-ID-STOP +-- TAG-BWP-UPLINK-START + +BWP-Uplink ::= SEQUENCE { + bwp-Id BWP-Id, + bwp-Common BWP-UplinkCommon OPTIONAL, -- Cond SetupOtherBWP + bwp-Dedicated BWP-UplinkDedicated OPTIONAL, -- Cond SetupOtherBWP + ... +} + +-- TAG-BWP-UPLINK-STOP +-- TAG-BWP-UPLINKCOMMON-START + +BWP-UplinkCommon ::= SEQUENCE { + genericParameters BWP, + rach-ConfigCommon SetupRelease { RACH-ConfigCommon } OPTIONAL, -- Need M + pusch-ConfigCommon SetupRelease { PUSCH-ConfigCommon } OPTIONAL, -- Need M + pucch-ConfigCommon SetupRelease { PUCCH-ConfigCommon } OPTIONAL, -- Need M + ..., + [[ + rach-ConfigCommonIAB-r16 SetupRelease { RACH-ConfigCommon } OPTIONAL, -- Need M + useInterlacePUCCH-PUSCH-r16 ENUMERATED {enabled} OPTIONAL, -- Need R + msgA-ConfigCommon-r16 SetupRelease { MsgA-ConfigCommon-r16 } OPTIONAL -- Cond SpCellOnly2 + ]], + [[ + enableRA-PrioritizationForSlicing-r17 BOOLEAN OPTIONAL, -- Cond RA-PrioSliceAI + additionalRACH-ConfigList-r17 SetupRelease { AdditionalRACH-ConfigList-r17 } OPTIONAL, -- Cond SpCellOnly2 + rsrp-ThresholdMsg3-r17 RSRP-Range OPTIONAL, -- Need R + numberOfMsg3-RepetitionsList-r17 SEQUENCE (SIZE (4)) OF NumberOfMsg3-Repetitions-r17 OPTIONAL, -- Cond Msg3Rep + mcs-Msg3-Repetitions-r17 SEQUENCE (SIZE (8)) OF INTEGER (0..31) OPTIONAL -- Cond Msg3Rep + ]] +} + +AdditionalRACH-ConfigList-r17 ::= SEQUENCE (SIZE(1..maxAdditionalRACH-r17)) OF AdditionalRACH-Config-r17 + +AdditionalRACH-Config-r17 ::= SEQUENCE { + rach-ConfigCommon-r17 RACH-ConfigCommon OPTIONAL, -- Need R + msgA-ConfigCommon-r17 MsgA-ConfigCommon-r16 OPTIONAL, -- Need R + ... +} + +NumberOfMsg3-Repetitions-r17::= ENUMERATED {n1, n2, n3, n4, n7, n8, n12, n16} + +-- TAG-BWP-UPLINKCOMMON-STOP +-- TAG-BWP-UPLINKDEDICATED-START + +BWP-UplinkDedicated ::= SEQUENCE { + pucch-Config SetupRelease { PUCCH-Config } OPTIONAL, -- Need M + pusch-Config SetupRelease { PUSCH-Config } OPTIONAL, -- Need M + configuredGrantConfig SetupRelease { ConfiguredGrantConfig } OPTIONAL, -- Need M + srs-Config SetupRelease { SRS-Config } OPTIONAL, -- Need M + beamFailureRecoveryConfig SetupRelease { BeamFailureRecoveryConfig } OPTIONAL, -- Cond SpCellOnly + ..., + [[ + sl-PUCCH-Config-r16 SetupRelease { PUCCH-Config } OPTIONAL, -- Need M + cp-ExtensionC2-r16 INTEGER (1..28) OPTIONAL, -- Need R + cp-ExtensionC3-r16 INTEGER (1..28) OPTIONAL, -- Need R + useInterlacePUCCH-PUSCH-r16 ENUMERATED {enabled} OPTIONAL, -- Need R + pucch-ConfigurationList-r16 SetupRelease { PUCCH-ConfigurationList-r16 } OPTIONAL, -- Need M + lbt-FailureRecoveryConfig-r16 SetupRelease { LBT-FailureRecoveryConfig-r16 } OPTIONAL, -- Need M + configuredGrantConfigToAddModList-r16 ConfiguredGrantConfigToAddModList-r16 OPTIONAL, -- Need N + configuredGrantConfigToReleaseList-r16 ConfiguredGrantConfigToReleaseList-r16 OPTIONAL, -- Need N + configuredGrantConfigType2DeactivationStateList-r16 ConfiguredGrantConfigType2DeactivationStateList-r16 OPTIONAL -- Need R + ]], + [[ + ul-TCI-StateList-r17 CHOICE { + explicitlist SEQUENCE { + ul-TCI-ToAddModList-r17 SEQUENCE (SIZE (1..maxUL-TCI-r17)) OF TCI-UL-State-r17 OPTIONAL, -- Need N + ul-TCI-ToReleaseList-r17 SEQUENCE (SIZE (1..maxUL-TCI-r17)) OF TCI-UL-State-Id-r17 OPTIONAL -- Need N + }, + unifiedTCI-StateRef-r17 ServingCellAndBWP-Id-r17 + } OPTIONAL, -- Need R + ul-powerControl-r17 Uplink-powerControlId-r17 OPTIONAL, -- Cond NoTCI-PC + pucch-ConfigurationListMulticast1-r17 SetupRelease { PUCCH-ConfigurationList-r16 } OPTIONAL, -- Need M + pucch-ConfigurationListMulticast2-r17 SetupRelease { PUCCH-ConfigurationList-r16 } OPTIONAL -- Need M + ]], + [[ + pucch-ConfigMulticast1-r17 SetupRelease { PUCCH-Config } OPTIONAL, -- Need M + pucch-ConfigMulticast2-r17 SetupRelease { PUCCH-Config } OPTIONAL -- Need M + ]], + [[ + pathlossReferenceRSToAddModList-r17 SEQUENCE (SIZE (1..maxNrofPathlossReferenceRSs-r17)) OF PathlossReferenceRS-r17 + OPTIONAL, -- Need N + pathlossReferenceRSToReleaseList-r17 SEQUENCE (SIZE (1..maxNrofPathlossReferenceRSs-r17)) OF PathlossReferenceRS-Id-r17 + OPTIONAL -- Need N + ]] +} + +ConfiguredGrantConfigToAddModList-r16 ::= SEQUENCE (SIZE (1..maxNrofConfiguredGrantConfig-r16)) OF ConfiguredGrantConfig + +ConfiguredGrantConfigToReleaseList-r16 ::= SEQUENCE (SIZE (1..maxNrofConfiguredGrantConfig-r16)) OF ConfiguredGrantConfigIndex-r16 + +ConfiguredGrantConfigType2DeactivationState-r16 ::= SEQUENCE (SIZE (1..maxNrofConfiguredGrantConfig-r16)) OF ConfiguredGrantConfigIndex-r16 + +ConfiguredGrantConfigType2DeactivationStateList-r16 ::= + SEQUENCE (SIZE (1..maxNrofCG-Type2DeactivationState)) OF ConfiguredGrantConfigType2DeactivationState-r16 + +-- TAG-BWP-UPLINKDEDICATED-STOP +-- TAG-CANDIDATEBEAMRS-START + + +CandidateBeamRS-r16 ::= SEQUENCE { + candidateBeamConfig-r16 CHOICE { + ssb-r16 SSB-Index, + csi-RS-r16 NZP-CSI-RS-ResourceId + }, + servingCellId ServCellIndex OPTIONAL -- Need R +} + +-- TAG-CANDIDATEBEAMRS-STOP +-- TAG-CELLACCESSRELATEDINFO-START + +CellAccessRelatedInfo ::= SEQUENCE { + plmn-IdentityInfoList PLMN-IdentityInfoList, + cellReservedForOtherUse ENUMERATED {true} OPTIONAL, -- Need R + ..., + [[ + cellReservedForFutureUse-r16 ENUMERATED {true} OPTIONAL, -- Need R + npn-IdentityInfoList-r16 NPN-IdentityInfoList-r16 OPTIONAL -- Need R + ]], + [[ + snpn-AccessInfoList-r17 SEQUENCE (SIZE (1..maxNPN-r16)) OF SNPN-AccessInfo-r17 OPTIONAL -- Need R + ]] +} + +SNPN-AccessInfo-r17 ::= SEQUENCE { + extCH-Supported-r17 ENUMERATED {true} OPTIONAL, -- Need R + extCH-WithoutConfigAllowed-r17 ENUMERATED {true} OPTIONAL, -- Need R + onboardingEnabled-r17 ENUMERATED {true} OPTIONAL, -- Need R + imsEmergencySupportForSNPN-r17 ENUMERATED {true} OPTIONAL -- Need R +} + +-- TAG-CELLACCESSRELATEDINFO-STOP +-- TAG-CELLACCESSRELATEDINFOEUTRA-5GC-START + +CellAccessRelatedInfo-EUTRA-5GC ::= SEQUENCE { + plmn-IdentityList-eutra-5gc PLMN-IdentityList-EUTRA-5GC, + trackingAreaCode-eutra-5gc TrackingAreaCode, + ranac-5gc RAN-AreaCode OPTIONAL, + cellIdentity-eutra-5gc CellIdentity-EUTRA-5GC +} + +PLMN-IdentityList-EUTRA-5GC::= SEQUENCE (SIZE (1..maxPLMN)) OF PLMN-Identity-EUTRA-5GC + +PLMN-Identity-EUTRA-5GC ::= CHOICE { + plmn-Identity-EUTRA-5GC PLMN-Identity, + plmn-index INTEGER (1..maxPLMN) +} + +CellIdentity-EUTRA-5GC ::= CHOICE { + cellIdentity-EUTRA BIT STRING (SIZE (28)), + cellId-index INTEGER (1..maxPLMN) +} + +-- TAG-CELLACCESSRELATEDINFOEUTRA-5GC-STOP +-- TAG-CELLACCESSRELATEDINFOEUTRA-EPC-START + +CellAccessRelatedInfo-EUTRA-EPC ::= SEQUENCE { + plmn-IdentityList-eutra-epc PLMN-IdentityList-EUTRA-EPC, + trackingAreaCode-eutra-epc BIT STRING (SIZE (16)), + cellIdentity-eutra-epc BIT STRING (SIZE (28)) +} + +PLMN-IdentityList-EUTRA-EPC::= SEQUENCE (SIZE (1..maxPLMN)) OF PLMN-Identity + +-- TAG-CELLACCESSRELATEDINFOEUTRA-EPC-STOP +-- TAG-CELLGROUPCONFIG-START + +-- Configuration of one Cell-Group: +CellGroupConfig ::= SEQUENCE { + cellGroupId CellGroupId, + rlc-BearerToAddModList SEQUENCE (SIZE(1..maxLC-ID)) OF RLC-BearerConfig OPTIONAL, -- Need N + rlc-BearerToReleaseList SEQUENCE (SIZE(1..maxLC-ID)) OF LogicalChannelIdentity OPTIONAL, -- Need N + mac-CellGroupConfig MAC-CellGroupConfig OPTIONAL, -- Need M + physicalCellGroupConfig PhysicalCellGroupConfig OPTIONAL, -- Need M + spCellConfig SpCellConfig OPTIONAL, -- Need M + sCellToAddModList SEQUENCE (SIZE (1..maxNrofSCells)) OF SCellConfig OPTIONAL, -- Need N + sCellToReleaseList SEQUENCE (SIZE (1..maxNrofSCells)) OF SCellIndex OPTIONAL, -- Need N + ..., + [[ + reportUplinkTxDirectCurrent ENUMERATED {true} OPTIONAL -- Cond BWP-Reconfig + ]], + [[ + bap-Address-r16 BIT STRING (SIZE (10)) OPTIONAL, -- Need M + bh-RLC-ChannelToAddModList-r16 SEQUENCE (SIZE(1..maxBH-RLC-ChannelID-r16)) OF BH-RLC-ChannelConfig-r16 OPTIONAL, -- Need N + bh-RLC-ChannelToReleaseList-r16 SEQUENCE (SIZE(1..maxBH-RLC-ChannelID-r16)) OF BH-RLC-ChannelID-r16 OPTIONAL, -- Need N + f1c-TransferPath-r16 ENUMERATED {lte, nr, both} OPTIONAL, -- Need M + simultaneousTCI-UpdateList1-r16 SEQUENCE (SIZE (1..maxNrofServingCellsTCI-r16)) OF ServCellIndex OPTIONAL, -- Need R + simultaneousTCI-UpdateList2-r16 SEQUENCE (SIZE (1..maxNrofServingCellsTCI-r16)) OF ServCellIndex OPTIONAL, -- Need R + simultaneousSpatial-UpdatedList1-r16 SEQUENCE (SIZE (1..maxNrofServingCellsTCI-r16)) OF ServCellIndex OPTIONAL, -- Need R + simultaneousSpatial-UpdatedList2-r16 SEQUENCE (SIZE (1..maxNrofServingCellsTCI-r16)) OF ServCellIndex OPTIONAL, -- Need R + uplinkTxSwitchingOption-r16 ENUMERATED {switchedUL, dualUL} OPTIONAL, -- Need R + uplinkTxSwitchingPowerBoosting-r16 ENUMERATED {enabled} OPTIONAL -- Need R + ]], + [[ + reportUplinkTxDirectCurrentTwoCarrier-r16 ENUMERATED {true} OPTIONAL -- Need N + ]], + [[ + f1c-TransferPathNRDC-r17 ENUMERATED {mcg, scg, both} OPTIONAL, -- Need M + uplinkTxSwitching-2T-Mode-r17 ENUMERATED {enabled} OPTIONAL, -- Cond 2Tx + uplinkTxSwitching-DualUL-TxState-r17 ENUMERATED {oneT, twoT} OPTIONAL, -- Cond 2Tx + uu-RelayRLC-ChannelToAddModList-r17 SEQUENCE (SIZE(1..maxUu-RelayRLC-ChannelID-r17)) OF Uu-RelayRLC-ChannelConfig-r17 + OPTIONAL, -- Need N + uu-RelayRLC-ChannelToReleaseList-r17 SEQUENCE (SIZE(1..maxUu-RelayRLC-ChannelID-r17)) OF Uu-RelayRLC-ChannelID-r17 + OPTIONAL, -- Need N + simultaneousU-TCI-UpdateList1-r17 SEQUENCE (SIZE (1..maxNrofServingCellsTCI-r16)) OF ServCellIndex OPTIONAL, -- Need R + simultaneousU-TCI-UpdateList2-r17 SEQUENCE (SIZE (1..maxNrofServingCellsTCI-r16)) OF ServCellIndex OPTIONAL, -- Need R + simultaneousU-TCI-UpdateList3-r17 SEQUENCE (SIZE (1..maxNrofServingCellsTCI-r16)) OF ServCellIndex OPTIONAL, -- Need R + simultaneousU-TCI-UpdateList4-r17 SEQUENCE (SIZE (1..maxNrofServingCellsTCI-r16)) OF ServCellIndex OPTIONAL, -- Need R + rlc-BearerToReleaseListExt-r17 SEQUENCE (SIZE(1..maxLC-ID)) OF LogicalChannelIdentityExt-r17 OPTIONAL, -- Need N + iab-ResourceConfigToAddModList-r17 SEQUENCE (SIZE(1..maxNrofIABResourceConfig-r17)) OF IAB-ResourceConfig-r17 OPTIONAL, -- Need N + iab-ResourceConfigToReleaseList-r17 SEQUENCE (SIZE(1..maxNrofIABResourceConfig-r17)) OF IAB-ResourceConfigID-r17 OPTIONAL -- Need N + ]], + [[ + reportUplinkTxDirectCurrentMoreCarrier-r17 ReportUplinkTxDirectCurrentMoreCarrier-r17 OPTIONAL -- Need N + ]] +} + +-- Serving cell specific MAC and PHY parameters for a SpCell: +SpCellConfig ::= SEQUENCE { + servCellIndex ServCellIndex OPTIONAL, -- Cond SCG + reconfigurationWithSync ReconfigurationWithSync OPTIONAL, -- Cond ReconfWithSync + rlf-TimersAndConstants SetupRelease { RLF-TimersAndConstants } OPTIONAL, -- Need M + rlmInSyncOutOfSyncThreshold ENUMERATED {n1} OPTIONAL, -- Need S + spCellConfigDedicated ServingCellConfig OPTIONAL, -- Need M + ..., + [[ + lowMobilityEvaluationConnected-r17 SEQUENCE { + s-SearchDeltaP-Connected-r17 ENUMERATED {dB3, dB6, dB9, dB12, dB15, spare3, spare2, spare1}, + t-SearchDeltaP-Connected-r17 ENUMERATED {s5, s10, s20, s30, s60, s120, s180, s240, s300, spare7, spare6, spare5, + spare4, spare3, spare2, spare1} + } OPTIONAL, -- Need R + goodServingCellEvaluationRLM-r17 GoodServingCellEvaluation-r17 OPTIONAL, -- Need R + goodServingCellEvaluationBFD-r17 GoodServingCellEvaluation-r17 OPTIONAL, -- Need R + deactivatedSCG-Config-r17 SetupRelease { DeactivatedSCG-Config-r17 } OPTIONAL -- Cond SCG-Opt + ]] +} + +ReconfigurationWithSync ::= SEQUENCE { + spCellConfigCommon ServingCellConfigCommon OPTIONAL, -- Need M + newUE-Identity RNTI-Value, + t304 ENUMERATED {ms50, ms100, ms150, ms200, ms500, ms1000, ms2000, ms10000}, + rach-ConfigDedicated CHOICE { + uplink RACH-ConfigDedicated, + supplementaryUplink RACH-ConfigDedicated + } OPTIONAL, -- Need N + ..., + [[ + smtc SSB-MTC OPTIONAL -- Need S + ]], + [[ + daps-UplinkPowerConfig-r16 DAPS-UplinkPowerConfig-r16 OPTIONAL -- Need N + ]], + [[ + sl-PathSwitchConfig-r17 SL-PathSwitchConfig-r17 OPTIONAL -- Cond DirectToIndirect-PathSwitch + ]] +} + +DAPS-UplinkPowerConfig-r16 ::= SEQUENCE { + p-DAPS-Source-r16 P-Max, + p-DAPS-Target-r16 P-Max, + uplinkPowerSharingDAPS-Mode-r16 ENUMERATED {semi-static-mode1, semi-static-mode2, dynamic } +} + +SCellConfig ::= SEQUENCE { + sCellIndex SCellIndex, + sCellConfigCommon ServingCellConfigCommon OPTIONAL, -- Cond SCellAdd + sCellConfigDedicated ServingCellConfig OPTIONAL, -- Cond SCellAddMod + ..., + [[ + smtc SSB-MTC OPTIONAL -- Need S + ]], + [[ + sCellState-r16 ENUMERATED {activated} OPTIONAL, -- Cond SCellAddSync + secondaryDRX-GroupConfig-r16 ENUMERATED {true} OPTIONAL -- Cond DRX-Config2 + ]], + [[ + preConfGapStatus-r17 BIT STRING (SIZE (maxNrofGapId-r17)) OPTIONAL, -- Cond PreConfigMG + goodServingCellEvaluationBFD-r17 GoodServingCellEvaluation-r17 OPTIONAL, -- Need R + sCellSIB20-r17 SetupRelease { SCellSIB20-r17 } OPTIONAL -- Need M + ]] + +} + +SCellSIB20-r17 ::= OCTET STRING (CONTAINING SystemInformation) + +DeactivatedSCG-Config-r17 ::= SEQUENCE { + bfd-and-RLM-r17 BOOLEAN, + ... +} + +GoodServingCellEvaluation-r17 ::= SEQUENCE { + offset-r17 ENUMERATED {db2, db4, db6, db8} OPTIONAL -- Need S +} + +SL-PathSwitchConfig-r17 ::= SEQUENCE { + targetRelayUE-Identity-r17 SL-SourceIdentity-r17, + t420-r17 ENUMERATED {ms50, ms100, ms150, ms200, ms500, ms1000, ms2000, ms10000}, + ... +} + +IAB-ResourceConfig-r17 ::= SEQUENCE { + iab-ResourceConfigID-r17 IAB-ResourceConfigID-r17, + slotList-r17 SEQUENCE (SIZE (1..5120)) OF INTEGER (0..5119) OPTIONAL, -- Need M + periodicitySlotList-r17 ENUMERATED {ms0p5, ms0p625, ms1, ms1p25, ms2, ms2p5, ms5, ms10, ms20, ms40, ms80, ms160} OPTIONAL, -- Need M + slotListSubcarrierSpacing-r17 SubcarrierSpacing OPTIONAL, -- Need M + ... +} +IAB-ResourceConfigID-r17 ::= INTEGER(0..maxNrofIABResourceConfig-1-r17) + +ReportUplinkTxDirectCurrentMoreCarrier-r17 ::= SEQUENCE (SIZE(1.. maxSimultaneousBands)) OF IntraBandCC-CombinationReqList-r17 + +IntraBandCC-CombinationReqList-r17::= SEQUENCE { + servCellIndexList-r17 SEQUENCE (SIZE(1.. maxNrofServingCells)) OF ServCellIndex, + cc-CombinationList-r17 SEQUENCE (SIZE(1.. maxNrofReqComDC-Location-r17)) OF IntraBandCC-Combination-r17 +} + +IntraBandCC-Combination-r17::= SEQUENCE (SIZE(1.. maxNrofServingCells)) OF CC-State-r17 + +CC-State-r17::= SEQUENCE { + dlCarrier-r17 CarrierState-r17 OPTIONAL, -- Need N + ulCarrier-r17 CarrierState-r17 OPTIONAL -- Need N +} + +CarrierState-r17::= CHOICE { + deActivated-r17 NULL, + activeBWP-r17 INTEGER (0..maxNrofBWPs) +} + +-- TAG-CELLGROUPCONFIG-STOP +-- TAG-CELLGROUPID-START + +CellGroupId ::= INTEGER (0.. maxSecondaryCellGroups) + +-- TAG-CELLGROUPID-STOP +-- TAG-CELLIDENTITY-START + +CellIdentity ::= BIT STRING (SIZE (36)) + +-- TAG-CELLIDENTITY-STOP +-- TAG-CELLRESELECTIONPRIORITY-START + +CellReselectionPriority ::= INTEGER (0..7) + +-- TAG-CELLRESELECTIONPRIORITY-STOP +-- TAG-CELLRESELECTIONSUBPRIORITY-START + +CellReselectionSubPriority ::= ENUMERATED {oDot2, oDot4, oDot6, oDot8} + +-- TAG-CELLRESELECTIONSUBPRIORITY-STOP +-- TAG-CFR-CONFIGMULTICAST-START + +CFR-ConfigMulticast-r17::= SEQUENCE { + locationAndBandwidthMulticast-r17 INTEGER (0..37949) OPTIONAL, -- Need S + pdcch-ConfigMulticast-r17 PDCCH-Config OPTIONAL, -- Need M + pdsch-ConfigMulticast-r17 PDSCH-Config OPTIONAL, -- Need M + sps-ConfigMulticastToAddModList-r17 SPS-ConfigMulticastToAddModList-r17 OPTIONAL, -- Need N + sps-ConfigMulticastToReleaseList-r17 SPS-ConfigMulticastToReleaseList-r17 OPTIONAL -- Need N +} + +SPS-ConfigMulticastToAddModList-r17 ::= SEQUENCE (SIZE (1..8)) OF SPS-Config + +SPS-ConfigMulticastToReleaseList-r17 ::= SEQUENCE (SIZE (1..8)) OF SPS-ConfigIndex-r16 + +-- TAG-CFR-CONFIGMULTICAST-STOP +-- TAG-CGI-INFOEUTRA-START + +CGI-InfoEUTRA ::= SEQUENCE { + cgi-info-EPC SEQUENCE { + cgi-info-EPC-legacy CellAccessRelatedInfo-EUTRA-EPC, + cgi-info-EPC-list SEQUENCE (SIZE (1..maxPLMN)) OF CellAccessRelatedInfo-EUTRA-EPC OPTIONAL + } OPTIONAL, + cgi-info-5GC SEQUENCE (SIZE (1..maxPLMN)) OF CellAccessRelatedInfo-EUTRA-5GC OPTIONAL, + freqBandIndicator FreqBandIndicatorEUTRA, + multiBandInfoList MultiBandInfoListEUTRA OPTIONAL, + freqBandIndicatorPriority ENUMERATED {true} OPTIONAL +} + +-- TAG-CGI-INFOEUTRA-STOP +-- TAG-CGI-INFOEUTRALOGGING-START + +CGI-InfoEUTRALogging ::= SEQUENCE { + plmn-Identity-eutra-5gc PLMN-Identity OPTIONAL, + trackingAreaCode-eutra-5gc TrackingAreaCode OPTIONAL, + cellIdentity-eutra-5gc BIT STRING (SIZE (28)) OPTIONAL, + plmn-Identity-eutra-epc PLMN-Identity OPTIONAL, + trackingAreaCode-eutra-epc BIT STRING (SIZE (16)) OPTIONAL, + cellIdentity-eutra-epc BIT STRING (SIZE (28)) OPTIONAL +} + +-- TAG-CGI-INFOEUTRALOGGING-STOP +-- TAG-CGI-INFO-NR-START + +CGI-InfoNR ::= SEQUENCE { + plmn-IdentityInfoList PLMN-IdentityInfoList OPTIONAL, + frequencyBandList MultiFrequencyBandListNR OPTIONAL, + noSIB1 SEQUENCE { + ssb-SubcarrierOffset INTEGER (0..15), + pdcch-ConfigSIB1 PDCCH-ConfigSIB1 + } OPTIONAL, + ..., + [[ + npn-IdentityInfoList-r16 NPN-IdentityInfoList-r16 OPTIONAL + ]], + [[ + cellReservedForOtherUse-r16 ENUMERATED {true} OPTIONAL + ]] +} + +-- TAG-CGI-INFO-NR-STOP +-- TAG-CGI-INFO-LOGGING-START + +CGI-Info-Logging-r16 ::= SEQUENCE { + plmn-Identity-r16 PLMN-Identity, + cellIdentity-r16 CellIdentity, + trackingAreaCode-r16 TrackingAreaCode OPTIONAL +} + +-- TAG-CGI-INFO-LOGGING-STOP +-- TAG-CLI-RSSI-RANGE-START + +CLI-RSSI-Range-r16 ::= INTEGER(0..76) + +-- TAG-CLI-RSSI-RANGE-STOP +-- TAG-CODEBOOKCONFIG-START + +CodebookConfig ::= SEQUENCE { + codebookType CHOICE { + type1 SEQUENCE { + subType CHOICE { + typeI-SinglePanel SEQUENCE { + nrOfAntennaPorts CHOICE { + two SEQUENCE { + twoTX-CodebookSubsetRestriction BIT STRING (SIZE (6)) + }, + moreThanTwo SEQUENCE { + n1-n2 CHOICE { + two-one-TypeI-SinglePanel-Restriction BIT STRING (SIZE (8)), + two-two-TypeI-SinglePanel-Restriction BIT STRING (SIZE (64)), + four-one-TypeI-SinglePanel-Restriction BIT STRING (SIZE (16)), + three-two-TypeI-SinglePanel-Restriction BIT STRING (SIZE (96)), + six-one-TypeI-SinglePanel-Restriction BIT STRING (SIZE (24)), + four-two-TypeI-SinglePanel-Restriction BIT STRING (SIZE (128)), + eight-one-TypeI-SinglePanel-Restriction BIT STRING (SIZE (32)), + four-three-TypeI-SinglePanel-Restriction BIT STRING (SIZE (192)), + six-two-TypeI-SinglePanel-Restriction BIT STRING (SIZE (192)), + twelve-one-TypeI-SinglePanel-Restriction BIT STRING (SIZE (48)), + four-four-TypeI-SinglePanel-Restriction BIT STRING (SIZE (256)), + eight-two-TypeI-SinglePanel-Restriction BIT STRING (SIZE (256)), + sixteen-one-TypeI-SinglePanel-Restriction BIT STRING (SIZE (64)) + }, + typeI-SinglePanel-codebookSubsetRestriction-i2 BIT STRING (SIZE (16)) OPTIONAL -- Need R + } + }, + typeI-SinglePanel-ri-Restriction BIT STRING (SIZE (8)) + }, + typeI-MultiPanel SEQUENCE { + ng-n1-n2 CHOICE { + two-two-one-TypeI-MultiPanel-Restriction BIT STRING (SIZE (8)), + two-four-one-TypeI-MultiPanel-Restriction BIT STRING (SIZE (16)), + four-two-one-TypeI-MultiPanel-Restriction BIT STRING (SIZE (8)), + two-two-two-TypeI-MultiPanel-Restriction BIT STRING (SIZE (64)), + two-eight-one-TypeI-MultiPanel-Restriction BIT STRING (SIZE (32)), + four-four-one-TypeI-MultiPanel-Restriction BIT STRING (SIZE (16)), + two-four-two-TypeI-MultiPanel-Restriction BIT STRING (SIZE (128)), + four-two-two-TypeI-MultiPanel-Restriction BIT STRING (SIZE (64)) + }, + ri-Restriction BIT STRING (SIZE (4)) + } + }, + codebookMode INTEGER (1..2) + + }, + type2 SEQUENCE { + subType CHOICE { + typeII SEQUENCE { + n1-n2-codebookSubsetRestriction CHOICE { + two-one BIT STRING (SIZE (16)), + two-two BIT STRING (SIZE (43)), + four-one BIT STRING (SIZE (32)), + three-two BIT STRING (SIZE (59)), + six-one BIT STRING (SIZE (48)), + four-two BIT STRING (SIZE (75)), + eight-one BIT STRING (SIZE (64)), + four-three BIT STRING (SIZE (107)), + six-two BIT STRING (SIZE (107)), + twelve-one BIT STRING (SIZE (96)), + four-four BIT STRING (SIZE (139)), + eight-two BIT STRING (SIZE (139)), + sixteen-one BIT STRING (SIZE (128)) + }, + typeII-RI-Restriction BIT STRING (SIZE (2)) + }, + typeII-PortSelection SEQUENCE { + portSelectionSamplingSize ENUMERATED {n1, n2, n3, n4} OPTIONAL, -- Need R + typeII-PortSelectionRI-Restriction BIT STRING (SIZE (2)) + } + }, + phaseAlphabetSize ENUMERATED {n4, n8}, + subbandAmplitude BOOLEAN, + numberOfBeams ENUMERATED {two, three, four} + } + } +} + +CodebookConfig-r16 ::= SEQUENCE { + codebookType CHOICE { + type2 SEQUENCE { + subType CHOICE { + typeII-r16 SEQUENCE { + n1-n2-codebookSubsetRestriction-r16 CHOICE { + two-one BIT STRING (SIZE (16)), + two-two BIT STRING (SIZE (43)), + four-one BIT STRING (SIZE (32)), + three-two BIT STRING (SIZE (59)), + six-one BIT STRING (SIZE (48)), + four-two BIT STRING (SIZE (75)), + eight-one BIT STRING (SIZE (64)), + four-three BIT STRING (SIZE (107)), + six-two BIT STRING (SIZE (107)), + twelve-one BIT STRING (SIZE (96)), + four-four BIT STRING (SIZE (139)), + eight-two BIT STRING (SIZE (139)), + sixteen-one BIT STRING (SIZE (128)) + }, + typeII-RI-Restriction-r16 BIT STRING (SIZE(4)) + }, + typeII-PortSelection-r16 SEQUENCE { + portSelectionSamplingSize-r16 ENUMERATED {n1, n2, n3, n4}, + typeII-PortSelectionRI-Restriction-r16 BIT STRING (SIZE (4)) + } + }, + numberOfPMI-SubbandsPerCQI-Subband-r16 INTEGER (1..2), + paramCombination-r16 INTEGER (1..8) + } + } +} + +CodebookConfig-r17 ::= SEQUENCE { + codebookType CHOICE { + type1 SEQUENCE { + typeI-SinglePanel-Group1-r17 SEQUENCE { + nrOfAntennaPorts CHOICE { + two SEQUENCE { + twoTX-CodebookSubsetRestriction1-r17 BIT STRING (SIZE (6)) + }, + moreThanTwo SEQUENCE { + n1-n2 CHOICE { + two-one-TypeI-SinglePanel-Restriction1-r17 BIT STRING (SIZE (8)), + two-two-TypeI-SinglePanel-Restriction1-r17 BIT STRING (SIZE (64)), + four-one-TypeI-SinglePanel-Restriction1-r17 BIT STRING (SIZE (16)), + three-two-TypeI-SinglePanel-Restriction1-r17 BIT STRING (SIZE (96)), + six-one-TypeI-SinglePanel-Restriction1-r17 BIT STRING (SIZE (24)), + four-two-TypeI-SinglePanel-Restriction1-r17 BIT STRING (SIZE (128)), + eight-one-TypeI-SinglePanel-Restriction1-r17 BIT STRING (SIZE (32)), + four-three-TypeI-SinglePanel-Restriction1-r17 BIT STRING (SIZE (192)), + six-two-TypeI-SinglePanel-Restriction1-r17 BIT STRING (SIZE (192)), + twelve-one-TypeI-SinglePanel-Restriction1-r17 BIT STRING (SIZE (48)), + four-four-TypeI-SinglePanel-Restriction1-r17 BIT STRING (SIZE (256)), + eight-two-TypeI-SinglePanel-Restriction1-r17 BIT STRING (SIZE (256)), + sixteen-one-TypeI-SinglePanel-Restriction1-r17 BIT STRING (SIZE (64)) + } + } + } + } OPTIONAL, -- Need R + typeI-SinglePanel-Group2-r17 SEQUENCE { + nrOfAntennaPorts CHOICE { + two SEQUENCE { + twoTX-CodebookSubsetRestriction2-r17 BIT STRING (SIZE (6)) + }, + moreThanTwo SEQUENCE { + n1-n2 CHOICE { + two-one-TypeI-SinglePanel-Restriction2-r17 BIT STRING (SIZE (8)), + two-two-TypeI-SinglePanel-Restriction2-r17 BIT STRING (SIZE (64)), + four-one-TypeI-SinglePanel-Restriction2-r17 BIT STRING (SIZE (16)), + three-two-TypeI-SinglePanel-Restriction2-r17 BIT STRING (SIZE (96)), + six-one-TypeI-SinglePanel-Restriction2-r17 BIT STRING (SIZE (24)), + four-two-TypeI-SinglePanel-Restriction2-r17 BIT STRING (SIZE (128)), + eight-one-TypeI-SinglePanel-Restriction2-r17 BIT STRING (SIZE (32)), + four-three-TypeI-SinglePanel-Restriction2-r17 BIT STRING (SIZE (192)), + six-two-TypeI-SinglePanel-Restriction2-r17 BIT STRING (SIZE (192)), + twelve-one-TypeI-SinglePanel-Restriction2-r17 BIT STRING (SIZE (48)), + four-four-TypeI-SinglePanel-Restriction2-r17 BIT STRING (SIZE (256)), + eight-two-TypeI-SinglePanel-Restriction2-r17 BIT STRING (SIZE (256)), + sixteen-one-TypeI-SinglePanel-Restriction2-r17 BIT STRING (SIZE (64)) + } + } + } + } OPTIONAL, -- Need R + typeI-SinglePanel-ri-RestrictionSTRP-r17 BIT STRING (SIZE (8)) OPTIONAL, -- Need R + typeI-SinglePanel-ri-RestrictionSDM-r17 BIT STRING (SIZE (4)) OPTIONAL -- Need R + }, + type2 SEQUENCE { + typeII-PortSelection-r17 SEQUENCE { + paramCombination-r17 INTEGER (1..8), + valueOfN-r17 ENUMERATED {n2, n4} OPTIONAL, -- Need R + numberOfPMI-SubbandsPerCQI-Subband-r17 INTEGER(1..2) OPTIONAL, -- Need R + typeII-PortSelectionRI-Restriction-r17 BIT STRING (SIZE (4)) + } + } + } +} + +CodebookConfig-v1730 ::= SEQUENCE { + codebookType CHOICE { + type1 SEQUENCE { + codebookMode INTEGER (1..2) OPTIONAL -- Need R + } + } +} + +-- TAG-CODEBOOKCONFIG-STOP +-- TAG-COMMONLOCATIONINFO-START + +CommonLocationInfo-r16 ::= SEQUENCE { + gnss-TOD-msec-r16 OCTET STRING OPTIONAL, + locationTimestamp-r16 OCTET STRING OPTIONAL, + locationCoordinate-r16 OCTET STRING OPTIONAL, + locationError-r16 OCTET STRING OPTIONAL, + locationSource-r16 OCTET STRING OPTIONAL, + velocityEstimate-r16 OCTET STRING OPTIONAL +} + +-- TAG-COMMONLOCATIONINFO-STOP +-- TAG-CONDRECONFIGID-START + +CondReconfigId-r16 ::= INTEGER (1.. maxNrofCondCells-r16) + +-- TAG-CONDRECONFIGID-STOP +-- TAG-CONDRECONFIGTOADDMODLIST-START + +CondReconfigToAddModList-r16 ::= SEQUENCE (SIZE (1.. maxNrofCondCells-r16)) OF CondReconfigToAddMod-r16 + +CondReconfigToAddMod-r16 ::= SEQUENCE { + condReconfigId-r16 CondReconfigId-r16, + condExecutionCond-r16 SEQUENCE (SIZE (1..2)) OF MeasId OPTIONAL, -- Need M + condRRCReconfig-r16 OCTET STRING (CONTAINING RRCReconfiguration) OPTIONAL, -- Cond condReconfigAdd + ..., + [[ + condExecutionCondSCG-r17 OCTET STRING (CONTAINING CondReconfigExecCondSCG-r17) OPTIONAL -- Need M + ]] +} + +CondReconfigExecCondSCG-r17 ::= SEQUENCE (SIZE (1..2)) OF MeasId + +-- TAG-CONDRECONFIGTOADDMODLIST-STOP +-- TAG-CONDITIONALRECONFIGURATION-START + +ConditionalReconfiguration-r16 ::= SEQUENCE { + attemptCondReconfig-r16 ENUMERATED {true} OPTIONAL, -- Cond CHO + condReconfigToRemoveList-r16 CondReconfigToRemoveList-r16 OPTIONAL, -- Need N + condReconfigToAddModList-r16 CondReconfigToAddModList-r16 OPTIONAL, -- Need N + ... +} + +CondReconfigToRemoveList-r16 ::= SEQUENCE (SIZE (1.. maxNrofCondCells-r16)) OF CondReconfigId-r16 + +-- TAG-CONDITIONALRECONFIGURATION-STOP +-- TAG-CONFIGUREDGRANTCONFIG-START + +ConfiguredGrantConfig ::= SEQUENCE { + frequencyHopping ENUMERATED {intraSlot, interSlot} OPTIONAL, -- Need S + cg-DMRS-Configuration DMRS-UplinkConfig, + mcs-Table ENUMERATED {qam256, qam64LowSE} OPTIONAL, -- Need S + mcs-TableTransformPrecoder ENUMERATED {qam256, qam64LowSE} OPTIONAL, -- Need S + uci-OnPUSCH SetupRelease { CG-UCI-OnPUSCH } OPTIONAL, -- Need M + resourceAllocation ENUMERATED { resourceAllocationType0, resourceAllocationType1, dynamicSwitch }, + rbg-Size ENUMERATED {config2} OPTIONAL, -- Need S + powerControlLoopToUse ENUMERATED {n0, n1}, + p0-PUSCH-Alpha P0-PUSCH-AlphaSetId, + transformPrecoder ENUMERATED {enabled, disabled} OPTIONAL, -- Need S + nrofHARQ-Processes INTEGER(1..16), + repK ENUMERATED {n1, n2, n4, n8}, + repK-RV ENUMERATED {s1-0231, s2-0303, s3-0000} OPTIONAL, -- Need R + periodicity ENUMERATED { + sym2, sym7, sym1x14, sym2x14, sym4x14, sym5x14, sym8x14, sym10x14, sym16x14, sym20x14, + sym32x14, sym40x14, sym64x14, sym80x14, sym128x14, sym160x14, sym256x14, sym320x14, sym512x14, + sym640x14, sym1024x14, sym1280x14, sym2560x14, sym5120x14, + sym6, sym1x12, sym2x12, sym4x12, sym5x12, sym8x12, sym10x12, sym16x12, sym20x12, sym32x12, + sym40x12, sym64x12, sym80x12, sym128x12, sym160x12, sym256x12, sym320x12, sym512x12, sym640x12, + sym1280x12, sym2560x12 + }, + configuredGrantTimer INTEGER (1..64) OPTIONAL, -- Need R + rrc-ConfiguredUplinkGrant SEQUENCE { + timeDomainOffset INTEGER (0..5119), + timeDomainAllocation INTEGER (0..15), + frequencyDomainAllocation BIT STRING (SIZE(18)), + antennaPort INTEGER (0..31), + dmrs-SeqInitialization INTEGER (0..1) OPTIONAL, -- Need R + precodingAndNumberOfLayers INTEGER (0..63), + srs-ResourceIndicator INTEGER (0..15) OPTIONAL, -- Need R + mcsAndTBS INTEGER (0..31), + frequencyHoppingOffset INTEGER (1.. maxNrofPhysicalResourceBlocks-1) OPTIONAL, -- Need R + pathlossReferenceIndex INTEGER (0..maxNrofPUSCH-PathlossReferenceRSs-1), + ..., + [[ + pusch-RepTypeIndicator-r16 ENUMERATED {pusch-RepTypeA,pusch-RepTypeB} OPTIONAL, -- Need M + frequencyHoppingPUSCH-RepTypeB-r16 ENUMERATED {interRepetition, interSlot} OPTIONAL, -- Cond RepTypeB + timeReferenceSFN-r16 ENUMERATED {sfn512} OPTIONAL -- Need S + ]], + [[ + pathlossReferenceIndex2-r17 INTEGER (0..maxNrofPUSCH-PathlossReferenceRSs-1) OPTIONAL, -- Need R + srs-ResourceIndicator2-r17 INTEGER (0..15) OPTIONAL, -- Need R + precodingAndNumberOfLayers2-r17 INTEGER (0..63) OPTIONAL, -- Need R + timeDomainAllocation-v1710 INTEGER (16..63) OPTIONAL, -- Need M + timeDomainOffset-r17 INTEGER (0..40959) OPTIONAL, -- Need R + cg-SDT-Configuration-r17 CG-SDT-Configuration-r17 OPTIONAL -- Need M + ]] + } OPTIONAL, -- Need R + ..., + [[ + cg-RetransmissionTimer-r16 INTEGER (1..64) OPTIONAL, -- Need R + cg-minDFI-Delay-r16 ENUMERATED + {sym7, sym1x14, sym2x14, sym3x14, sym4x14, sym5x14, sym6x14, sym7x14, sym8x14, + sym9x14, sym10x14, sym11x14, sym12x14, sym13x14, sym14x14,sym15x14, sym16x14 + } OPTIONAL, -- Need R + cg-nrofPUSCH-InSlot-r16 INTEGER (1..7) OPTIONAL, -- Need R + cg-nrofSlots-r16 INTEGER (1..40) OPTIONAL, -- Need R + cg-StartingOffsets-r16 CG-StartingOffsets-r16 OPTIONAL, -- Need R + cg-UCI-Multiplexing-r16 ENUMERATED {enabled} OPTIONAL, -- Need R + cg-COT-SharingOffset-r16 INTEGER (1..39) OPTIONAL, -- Need R + betaOffsetCG-UCI-r16 INTEGER (0..31) OPTIONAL, -- Need R + cg-COT-SharingList-r16 SEQUENCE (SIZE (1..1709)) OF CG-COT-Sharing-r16 OPTIONAL, -- Need R + harq-ProcID-Offset-r16 INTEGER (0..15) OPTIONAL, -- Need M + harq-ProcID-Offset2-r16 INTEGER (0..15) OPTIONAL, -- Need M + configuredGrantConfigIndex-r16 ConfiguredGrantConfigIndex-r16 OPTIONAL, -- Cond CG-List + configuredGrantConfigIndexMAC-r16 ConfiguredGrantConfigIndexMAC-r16 OPTIONAL, -- Cond CG-IndexMAC + periodicityExt-r16 INTEGER (1..5120) OPTIONAL, -- Need R + startingFromRV0-r16 ENUMERATED {on, off} OPTIONAL, -- Need R + phy-PriorityIndex-r16 ENUMERATED {p0, p1} OPTIONAL, -- Need R + autonomousTx-r16 ENUMERATED {enabled} OPTIONAL -- Cond LCH-BasedPrioritization + ]], + [[ + cg-betaOffsetsCrossPri0-r17 SetupRelease { BetaOffsetsCrossPriSelCG-r17 } OPTIONAL, -- Need M + cg-betaOffsetsCrossPri1-r17 SetupRelease { BetaOffsetsCrossPriSelCG-r17 } OPTIONAL, -- Need M + mappingPattern-r17 ENUMERATED {cyclicMapping, sequentialMapping} OPTIONAL, -- Cond SRSsets + sequenceOffsetForRV-r17 INTEGER (0..3) OPTIONAL, -- Need R + p0-PUSCH-Alpha2-r17 P0-PUSCH-AlphaSetId OPTIONAL, -- Need R + powerControlLoopToUse2-r17 ENUMERATED {n0, n1} OPTIONAL, -- Need R + cg-COT-SharingList-r17 SEQUENCE (SIZE (1..50722)) OF CG-COT-Sharing-r17 OPTIONAL, -- Need R + periodicityExt-r17 INTEGER (1..40960) OPTIONAL, -- Need R + repK-v1710 ENUMERATED {n12, n16, n24, n32} OPTIONAL, -- Need R + nrofHARQ-Processes-v1700 INTEGER(17..32) OPTIONAL, -- Need M + harq-ProcID-Offset2-v1700 INTEGER (16..31) OPTIONAL, -- Need R + configuredGrantTimer-v1700 INTEGER(33..288) OPTIONAL, -- Need R + cg-minDFI-Delay-v1710 INTEGER (238..3584) OPTIONAL -- Need R + ]], + [[ + harq-ProcID-Offset-v1730 INTEGER (16..31) OPTIONAL, -- Need R + cg-nrofSlots-r17 INTEGER (1..320) OPTIONAL -- Need R + ]] +} + +CG-UCI-OnPUSCH ::= CHOICE { + dynamic SEQUENCE (SIZE (1..4)) OF BetaOffsets, + semiStatic BetaOffsets +} + +CG-COT-Sharing-r16 ::= CHOICE { + noCOT-Sharing-r16 NULL, + cot-Sharing-r16 SEQUENCE { + duration-r16 INTEGER (1..39), + offset-r16 INTEGER (1..39), + channelAccessPriority-r16 INTEGER (1..4) + } +} + +CG-COT-Sharing-r17 ::= CHOICE { + noCOT-Sharing-r17 NULL, + cot-Sharing-r17 SEQUENCE { + duration-r17 INTEGER (1..319), + offset-r17 INTEGER (1..319) + } +} + +CG-StartingOffsets-r16 ::= SEQUENCE { + cg-StartingFullBW-InsideCOT-r16 SEQUENCE (SIZE (1..7)) OF INTEGER (0..6) OPTIONAL, -- Need R + cg-StartingFullBW-OutsideCOT-r16 SEQUENCE (SIZE (1..7)) OF INTEGER (0..6) OPTIONAL, -- Need R + cg-StartingPartialBW-InsideCOT-r16 INTEGER (0..6) OPTIONAL, -- Need R + cg-StartingPartialBW-OutsideCOT-r16 INTEGER (0..6) OPTIONAL -- Need R +} + +BetaOffsetsCrossPriSelCG-r17 ::= CHOICE { + dynamic-r17 SEQUENCE (SIZE (1..4)) OF BetaOffsetsCrossPri-r17, + semiStatic-r17 BetaOffsetsCrossPri-r17 +} + +CG-SDT-Configuration-r17 ::= SEQUENCE { + cg-SDT-RetransmissionTimer INTEGER (1..64) OPTIONAL, -- Need R + sdt-SSB-Subset-r17 CHOICE { + shortBitmap-r17 BIT STRING (SIZE (4)), + mediumBitmap-r17 BIT STRING (SIZE (8)), + longBitmap-r17 BIT STRING (SIZE (64)) + } OPTIONAL, -- Need S + sdt-SSB-PerCG-PUSCH-r17 ENUMERATED {oneEighth, oneFourth, half, one, two, four, eight, sixteen} OPTIONAL, -- Need M + sdt-P0-PUSCH-r17 INTEGER (-16..15) OPTIONAL, -- Need M + sdt-Alpha-r17 ENUMERATED {alpha0, alpha04, alpha05, alpha06, alpha07, alpha08, alpha09, alpha1} OPTIONAL, -- Need M + sdt-DMRS-Ports-r17 CHOICE { + dmrsType1-r17 BIT STRING (SIZE (8)), + dmrsType2-r17 BIT STRING (SIZE (12)) + } OPTIONAL, -- Need M + sdt-NrofDMRS-Sequences-r17 INTEGER (1..2) OPTIONAL -- Need M +} + +-- TAG-CONFIGUREDGRANTCONFIG-STOP +-- TAG-CONFIGUREDGRANTCONFIGINDEX-START + +ConfiguredGrantConfigIndex-r16 ::= INTEGER (0.. maxNrofConfiguredGrantConfig-1-r16) + +-- TAG-CONFIGUREDGRANTCONFIGINDEX-STOP +-- TAG-CONFIGUREDGRANTCONFIGINDEXMAC-START + +ConfiguredGrantConfigIndexMAC-r16 ::= INTEGER (0.. maxNrofConfiguredGrantConfigMAC-1-r16) + +-- TAG-CONFIGUREDGRANTCONFIGINDEXMAC-STOP +-- TAG-CONNESTFAILURECONTROL-START + +ConnEstFailureControl ::= SEQUENCE { + connEstFailCount ENUMERATED {n1, n2, n3, n4}, + connEstFailOffsetValidity ENUMERATED {s30, s60, s120, s240, s300, s420, s600, s900}, + connEstFailOffset INTEGER (0..15) OPTIONAL -- Need S +} + +-- TAG-CONNESTFAILURECONTROL-STOP +-- TAG-CONTROLRESOURCESET-START + +ControlResourceSet ::= SEQUENCE { + controlResourceSetId ControlResourceSetId, + frequencyDomainResources BIT STRING (SIZE (45)), + duration INTEGER (1..maxCoReSetDuration), + cce-REG-MappingType CHOICE { + interleaved SEQUENCE { + reg-BundleSize ENUMERATED {n2, n3, n6}, + interleaverSize ENUMERATED {n2, n3, n6}, + shiftIndex INTEGER(0..maxNrofPhysicalResourceBlocks-1) OPTIONAL -- Need S + }, + nonInterleaved NULL + }, + precoderGranularity ENUMERATED {sameAsREG-bundle, allContiguousRBs}, + tci-StatesPDCCH-ToAddList SEQUENCE(SIZE (1..maxNrofTCI-StatesPDCCH)) OF TCI-StateId OPTIONAL, -- Cond NotSIB-initialBWP + tci-StatesPDCCH-ToReleaseList SEQUENCE(SIZE (1..maxNrofTCI-StatesPDCCH)) OF TCI-StateId OPTIONAL, -- Cond NotSIB-initialBWP + tci-PresentInDCI ENUMERATED {enabled} OPTIONAL, -- Need S + pdcch-DMRS-ScramblingID INTEGER (0..65535) OPTIONAL, -- Need S + ..., + [[ + rb-Offset-r16 INTEGER (0..5) OPTIONAL, -- Need S + tci-PresentDCI-1-2-r16 INTEGER (1..3) OPTIONAL, -- Need S + coresetPoolIndex-r16 INTEGER (0..1) OPTIONAL, -- Need S + controlResourceSetId-v1610 ControlResourceSetId-v1610 OPTIONAL -- Need S + ]], + [[ + followUnifiedTCI-State-r17 ENUMERATED {enabled} OPTIONAL -- Need R + ]] +} + +-- TAG-CONTROLRESOURCESET-STOP +-- TAG-CONTROLRESOURCESETID-START + +ControlResourceSetId ::= INTEGER (0..maxNrofControlResourceSets-1) + +ControlResourceSetId-r16 ::= INTEGER (0..maxNrofControlResourceSets-1-r16) + +ControlResourceSetId-v1610 ::= INTEGER (maxNrofControlResourceSets..maxNrofControlResourceSets-1-r16) + +-- TAG-CONTROLRESOURCESETID-STOP +-- TAG-CONTROLRESOURCESETZERO-START + +ControlResourceSetZero ::= INTEGER (0..15) + +-- TAG-CONTROLRESOURCESETZERO-STOP +-- TAG-CROSSCARRIERSCHEDULINGCONFIG-START + +CrossCarrierSchedulingConfig ::= SEQUENCE { + schedulingCellInfo CHOICE { + own SEQUENCE { -- Cross carrier scheduling: scheduling cell + cif-Presence BOOLEAN + }, + other SEQUENCE { -- Cross carrier scheduling: scheduled cell + schedulingCellId ServCellIndex, + cif-InSchedulingCell INTEGER (1..7) + } + }, + ..., + [[ + carrierIndicatorSize-r16 SEQUENCE { + carrierIndicatorSizeDCI-1-2-r16 INTEGER (0..3), + carrierIndicatorSizeDCI-0-2-r16 INTEGER (0..3) + } OPTIONAL, -- Cond CIF-PRESENCE + enableDefaultBeamForCCS-r16 ENUMERATED {enabled} OPTIONAL -- Need S + ]], + [[ + ccs-BlindDetectionSplit-r17 ENUMERATED {oneSeventh, threeFourteenth, twoSeventh, threeSeventh, + oneHalf, fourSeventh, fiveSeventh, spare1} OPTIONAL -- Need R + ]] +} + +-- TAG-CROSSCARRIERSCHEDULINGCONFIG-STOP +-- TAG-CSI-APERIODICTRIGGERSTATELIST-START + +CSI-AperiodicTriggerStateList ::= SEQUENCE (SIZE (1..maxNrOfCSI-AperiodicTriggers)) OF CSI-AperiodicTriggerState + +CSI-AperiodicTriggerState ::= SEQUENCE { + associatedReportConfigInfoList SEQUENCE (SIZE(1..maxNrofReportConfigPerAperiodicTrigger)) OF CSI-AssociatedReportConfigInfo, + ..., + [[ + ap-CSI-MultiplexingMode-r17 ENUMERATED {enabled} OPTIONAL -- Need R + ]] +} + +CSI-AssociatedReportConfigInfo ::= SEQUENCE { + reportConfigId CSI-ReportConfigId, + resourcesForChannel CHOICE { + nzp-CSI-RS SEQUENCE { + resourceSet INTEGER (1..maxNrofNZP-CSI-RS-ResourceSetsPerConfig), + qcl-info SEQUENCE (SIZE(1..maxNrofAP-CSI-RS-ResourcesPerSet)) OF TCI-StateId + OPTIONAL -- Cond Aperiodic + }, + csi-SSB-ResourceSet INTEGER (1..maxNrofCSI-SSB-ResourceSetsPerConfig) + }, + csi-IM-ResourcesForInterference INTEGER(1..maxNrofCSI-IM-ResourceSetsPerConfig) OPTIONAL, -- Cond CSI-IM-ForInterference + nzp-CSI-RS-ResourcesForInterference INTEGER (1..maxNrofNZP-CSI-RS-ResourceSetsPerConfig) OPTIONAL, -- Cond NZP-CSI-RS-ForInterference + ..., + [[ + resourcesForChannel2-r17 CHOICE { + nzp-CSI-RS2-r17 SEQUENCE { + resourceSet2-r17 INTEGER (1..maxNrofNZP-CSI-RS-ResourceSetsPerConfig), + qcl-info2-r17 SEQUENCE (SIZE(1..maxNrofAP-CSI-RS-ResourcesPerSet)) OF TCI-StateId + OPTIONAL -- Cond Aperiodic + }, + csi-SSB-ResourceSet2-r17 INTEGER (1..maxNrofCSI-SSB-ResourceSetsPerConfigExt) + } OPTIONAL, -- Cond NoUnifiedTCI + csi-SSB-ResourceSetExt INTEGER (1..maxNrofCSI-SSB-ResourceSetsPerConfigExt) OPTIONAL -- Need R + ]] +} + +-- TAG-CSI-APERIODICTRIGGERSTATELIST-STOP +-- TAG-CSI-FREQUENCYOCCUPATION-START + +CSI-FrequencyOccupation ::= SEQUENCE { + startingRB INTEGER (0..maxNrofPhysicalResourceBlocks-1), + nrofRBs INTEGER (24..maxNrofPhysicalResourceBlocksPlus1), + ... +} + +-- TAG-CSI-FREQUENCYOCCUPATION-STOP +-- TAG-CSI-IM-RESOURCE-START + +CSI-IM-Resource ::= SEQUENCE { + csi-IM-ResourceId CSI-IM-ResourceId, + csi-IM-ResourceElementPattern CHOICE { + pattern0 SEQUENCE { + subcarrierLocation-p0 ENUMERATED { s0, s2, s4, s6, s8, s10 }, + symbolLocation-p0 INTEGER (0..12) + }, + pattern1 SEQUENCE { + subcarrierLocation-p1 ENUMERATED { s0, s4, s8 }, + symbolLocation-p1 INTEGER (0..13) + } + } OPTIONAL, -- Need M + freqBand CSI-FrequencyOccupation OPTIONAL, -- Need M + periodicityAndOffset CSI-ResourcePeriodicityAndOffset OPTIONAL, -- Cond PeriodicOrSemiPersistent + ... +} + +-- TAG-CSI-IM-RESOURCE-STOP +-- TAG-CSI-IM-RESOURCEID-START + +CSI-IM-ResourceId ::= INTEGER (0..maxNrofCSI-IM-Resources-1) + +-- TAG-CSI-IM-RESOURCEID-STOP +-- TAG-CSI-IM-RESOURCESET-START + +CSI-IM-ResourceSet ::= SEQUENCE { + csi-IM-ResourceSetId CSI-IM-ResourceSetId, + csi-IM-Resources SEQUENCE (SIZE(1..maxNrofCSI-IM-ResourcesPerSet)) OF CSI-IM-ResourceId, + ... +} +-- TAG-CSI-IM-RESOURCESET-STOP +-- TAG-CSI-IM-RESOURCESETID-START + +CSI-IM-ResourceSetId ::= INTEGER (0..maxNrofCSI-IM-ResourceSets-1) + +-- TAG-CSI-IM-RESOURCESETID-STOP +-- TAG-CSI-MEASCONFIG-START + +CSI-MeasConfig ::= SEQUENCE { + nzp-CSI-RS-ResourceToAddModList SEQUENCE (SIZE (1..maxNrofNZP-CSI-RS-Resources)) OF NZP-CSI-RS-Resource OPTIONAL, -- Need N + nzp-CSI-RS-ResourceToReleaseList SEQUENCE (SIZE (1..maxNrofNZP-CSI-RS-Resources)) OF NZP-CSI-RS-ResourceId OPTIONAL, -- Need N + nzp-CSI-RS-ResourceSetToAddModList SEQUENCE (SIZE (1..maxNrofNZP-CSI-RS-ResourceSets)) OF NZP-CSI-RS-ResourceSet + OPTIONAL, -- Need N + nzp-CSI-RS-ResourceSetToReleaseList SEQUENCE (SIZE (1..maxNrofNZP-CSI-RS-ResourceSets)) OF NZP-CSI-RS-ResourceSetId + OPTIONAL, -- Need N + csi-IM-ResourceToAddModList SEQUENCE (SIZE (1..maxNrofCSI-IM-Resources)) OF CSI-IM-Resource OPTIONAL, -- Need N + csi-IM-ResourceToReleaseList SEQUENCE (SIZE (1..maxNrofCSI-IM-Resources)) OF CSI-IM-ResourceId OPTIONAL, -- Need N + csi-IM-ResourceSetToAddModList SEQUENCE (SIZE (1..maxNrofCSI-IM-ResourceSets)) OF CSI-IM-ResourceSet OPTIONAL, -- Need N + csi-IM-ResourceSetToReleaseList SEQUENCE (SIZE (1..maxNrofCSI-IM-ResourceSets)) OF CSI-IM-ResourceSetId OPTIONAL, -- Need N + csi-SSB-ResourceSetToAddModList SEQUENCE (SIZE (1..maxNrofCSI-SSB-ResourceSets)) OF CSI-SSB-ResourceSet OPTIONAL, -- Need N + csi-SSB-ResourceSetToReleaseList SEQUENCE (SIZE (1..maxNrofCSI-SSB-ResourceSets)) OF CSI-SSB-ResourceSetId OPTIONAL, -- Need N + csi-ResourceConfigToAddModList SEQUENCE (SIZE (1..maxNrofCSI-ResourceConfigurations)) OF CSI-ResourceConfig + OPTIONAL, -- Need N + csi-ResourceConfigToReleaseList SEQUENCE (SIZE (1..maxNrofCSI-ResourceConfigurations)) OF CSI-ResourceConfigId + OPTIONAL, -- Need N + csi-ReportConfigToAddModList SEQUENCE (SIZE (1..maxNrofCSI-ReportConfigurations)) OF CSI-ReportConfig OPTIONAL, -- Need N + csi-ReportConfigToReleaseList SEQUENCE (SIZE (1..maxNrofCSI-ReportConfigurations)) OF CSI-ReportConfigId + OPTIONAL, -- Need N + reportTriggerSize INTEGER (0..6) OPTIONAL, -- Need M + aperiodicTriggerStateList SetupRelease { CSI-AperiodicTriggerStateList } OPTIONAL, -- Need M + semiPersistentOnPUSCH-TriggerStateList SetupRelease { CSI-SemiPersistentOnPUSCH-TriggerStateList } OPTIONAL, -- Need M + ..., + [[ + reportTriggerSizeDCI-0-2-r16 INTEGER (0..6) OPTIONAL -- Need R + ]], + [[ + sCellActivationRS-ConfigToAddModList-r17 SEQUENCE (SIZE (1..maxNrofSCellActRS-r17)) OF SCellActivationRS-Config-r17 OPTIONAL, -- Need N + sCellActivationRS-ConfigToReleaseList-r17 SEQUENCE (SIZE (1..maxNrofSCellActRS-r17)) OF SCellActivationRS-ConfigId-r17 OPTIONAL -- Need N + ]] +} + +-- TAG-CSI-MEASCONFIG-STOP +-- TAG-CSI-REPORTCONFIG-START + +CSI-ReportConfig ::= SEQUENCE { + reportConfigId CSI-ReportConfigId, + carrier ServCellIndex OPTIONAL, -- Need S + resourcesForChannelMeasurement CSI-ResourceConfigId, + csi-IM-ResourcesForInterference CSI-ResourceConfigId OPTIONAL, -- Need R + nzp-CSI-RS-ResourcesForInterference CSI-ResourceConfigId OPTIONAL, -- Need R + reportConfigType CHOICE { + periodic SEQUENCE { + reportSlotConfig CSI-ReportPeriodicityAndOffset, + pucch-CSI-ResourceList SEQUENCE (SIZE (1..maxNrofBWPs)) OF PUCCH-CSI-Resource + }, + semiPersistentOnPUCCH SEQUENCE { + reportSlotConfig CSI-ReportPeriodicityAndOffset, + pucch-CSI-ResourceList SEQUENCE (SIZE (1..maxNrofBWPs)) OF PUCCH-CSI-Resource + }, + semiPersistentOnPUSCH SEQUENCE { + reportSlotConfig ENUMERATED {sl5, sl10, sl20, sl40, sl80, sl160, sl320}, + reportSlotOffsetList SEQUENCE (SIZE (1.. maxNrofUL-Allocations)) OF INTEGER(0..32), + p0alpha P0-PUSCH-AlphaSetId + }, + aperiodic SEQUENCE { + reportSlotOffsetList SEQUENCE (SIZE (1..maxNrofUL-Allocations)) OF INTEGER(0..32) + } + }, + reportQuantity CHOICE { + none NULL, + cri-RI-PMI-CQI NULL, + cri-RI-i1 NULL, + cri-RI-i1-CQI SEQUENCE { + pdsch-BundleSizeForCSI ENUMERATED {n2, n4} OPTIONAL -- Need S + }, + cri-RI-CQI NULL, + cri-RSRP NULL, + ssb-Index-RSRP NULL, + cri-RI-LI-PMI-CQI NULL + }, + reportFreqConfiguration SEQUENCE { + cqi-FormatIndicator ENUMERATED { widebandCQI, subbandCQI } OPTIONAL, -- Need R + pmi-FormatIndicator ENUMERATED { widebandPMI, subbandPMI } OPTIONAL, -- Need R + csi-ReportingBand CHOICE { + subbands3 BIT STRING(SIZE(3)), + subbands4 BIT STRING(SIZE(4)), + subbands5 BIT STRING(SIZE(5)), + subbands6 BIT STRING(SIZE(6)), + subbands7 BIT STRING(SIZE(7)), + subbands8 BIT STRING(SIZE(8)), + subbands9 BIT STRING(SIZE(9)), + subbands10 BIT STRING(SIZE(10)), + subbands11 BIT STRING(SIZE(11)), + subbands12 BIT STRING(SIZE(12)), + subbands13 BIT STRING(SIZE(13)), + subbands14 BIT STRING(SIZE(14)), + subbands15 BIT STRING(SIZE(15)), + subbands16 BIT STRING(SIZE(16)), + subbands17 BIT STRING(SIZE(17)), + subbands18 BIT STRING(SIZE(18)), + ..., + subbands19-v1530 BIT STRING(SIZE(19)) + } OPTIONAL -- Need S + + } OPTIONAL, -- Need R + timeRestrictionForChannelMeasurements ENUMERATED {configured, notConfigured}, + timeRestrictionForInterferenceMeasurements ENUMERATED {configured, notConfigured}, + codebookConfig CodebookConfig OPTIONAL, -- Need R + dummy ENUMERATED {n1, n2} OPTIONAL, -- Need R + groupBasedBeamReporting CHOICE { + enabled NULL, + disabled SEQUENCE { + nrofReportedRS ENUMERATED {n1, n2, n3, n4} OPTIONAL -- Need S + } + }, + cqi-Table ENUMERATED {table1, table2, table3, table4-r17} OPTIONAL, -- Need R + subbandSize ENUMERATED {value1, value2}, + non-PMI-PortIndication SEQUENCE (SIZE (1..maxNrofNZP-CSI-RS-ResourcesPerConfig)) OF PortIndexFor8Ranks OPTIONAL, -- Need R + ..., + [[ + semiPersistentOnPUSCH-v1530 SEQUENCE { + reportSlotConfig-v1530 ENUMERATED {sl4, sl8, sl16} + } OPTIONAL -- Need R + ]], + [[ + semiPersistentOnPUSCH-v1610 SEQUENCE { + reportSlotOffsetListDCI-0-2-r16 SEQUENCE (SIZE (1.. maxNrofUL-Allocations-r16)) OF INTEGER(0..32) OPTIONAL, -- Need R + reportSlotOffsetListDCI-0-1-r16 SEQUENCE (SIZE (1.. maxNrofUL-Allocations-r16)) OF INTEGER(0..32) OPTIONAL -- Need R + } OPTIONAL, -- Need R + aperiodic-v1610 SEQUENCE { + reportSlotOffsetListDCI-0-2-r16 SEQUENCE (SIZE (1.. maxNrofUL-Allocations-r16)) OF INTEGER(0..32) OPTIONAL, -- Need R + reportSlotOffsetListDCI-0-1-r16 SEQUENCE (SIZE (1.. maxNrofUL-Allocations-r16)) OF INTEGER(0..32) OPTIONAL -- Need R + } OPTIONAL, -- Need R + reportQuantity-r16 CHOICE { + cri-SINR-r16 NULL, + ssb-Index-SINR-r16 NULL + } OPTIONAL, -- Need R + codebookConfig-r16 CodebookConfig-r16 OPTIONAL -- Need R + ]], + [[ + cqi-BitsPerSubband-r17 ENUMERATED {bits4} OPTIONAL, -- Need R + groupBasedBeamReporting-v1710 SEQUENCE { + nrofReportedGroups-r17 ENUMERATED {n1, n2, n3, n4} + } OPTIONAL, -- Need R + codebookConfig-r17 CodebookConfig-r17 OPTIONAL, -- Need R + sharedCMR-r17 ENUMERATED {enable} OPTIONAL, -- Need R + csi-ReportMode-r17 ENUMERATED {mode1, mode2} OPTIONAL, -- Need R + numberOfSingleTRP-CSI-Mode1-r17 ENUMERATED {n0, n1, n2} OPTIONAL, -- Need R + reportQuantity-r17 CHOICE { + cri-RSRP-Index-r17 NULL, + ssb-Index-RSRP-Index-r17 NULL, + cri-SINR-Index-r17 NULL, + ssb-Index-SINR-Index-r17 NULL + } OPTIONAL -- Need R + ]], + [[ + semiPersistentOnPUSCH-v1720 SEQUENCE { + reportSlotOffsetList-r17 SEQUENCE (SIZE (1.. maxNrofUL-Allocations-r16)) OF INTEGER(0..128) OPTIONAL, -- Need R + reportSlotOffsetListDCI-0-2-r17 SEQUENCE (SIZE (1.. maxNrofUL-Allocations-r16)) OF INTEGER(0..128) OPTIONAL, -- Need R + reportSlotOffsetListDCI-0-1-r17 SEQUENCE (SIZE (1.. maxNrofUL-Allocations-r16)) OF INTEGER(0..128) OPTIONAL -- Need R + } OPTIONAL, -- Need R + aperiodic-v1720 SEQUENCE { + reportSlotOffsetList-r17 SEQUENCE (SIZE (1.. maxNrofUL-Allocations-r16)) OF INTEGER(0..128) OPTIONAL, -- Need R + reportSlotOffsetListDCI-0-2-r17 SEQUENCE (SIZE (1.. maxNrofUL-Allocations-r16)) OF INTEGER(0..128) OPTIONAL, -- Need R + reportSlotOffsetListDCI-0-1-r17 SEQUENCE (SIZE (1.. maxNrofUL-Allocations-r16)) OF INTEGER(0..128) OPTIONAL -- Need R + } OPTIONAL -- Need R + ]], + [[ + codebookConfig-v1730 CodebookConfig-v1730 OPTIONAL -- Need R + ]] +} + +CSI-ReportPeriodicityAndOffset ::= CHOICE { + slots4 INTEGER(0..3), + slots5 INTEGER(0..4), + slots8 INTEGER(0..7), + slots10 INTEGER(0..9), + slots16 INTEGER(0..15), + slots20 INTEGER(0..19), + slots40 INTEGER(0..39), + slots80 INTEGER(0..79), + slots160 INTEGER(0..159), + slots320 INTEGER(0..319) +} + +PUCCH-CSI-Resource ::= SEQUENCE { + uplinkBandwidthPartId BWP-Id, + pucch-Resource PUCCH-ResourceId +} + +PortIndexFor8Ranks ::= CHOICE { + portIndex8 SEQUENCE{ + rank1-8 PortIndex8 OPTIONAL, -- Need R + rank2-8 SEQUENCE(SIZE(2)) OF PortIndex8 OPTIONAL, -- Need R + rank3-8 SEQUENCE(SIZE(3)) OF PortIndex8 OPTIONAL, -- Need R + rank4-8 SEQUENCE(SIZE(4)) OF PortIndex8 OPTIONAL, -- Need R + rank5-8 SEQUENCE(SIZE(5)) OF PortIndex8 OPTIONAL, -- Need R + rank6-8 SEQUENCE(SIZE(6)) OF PortIndex8 OPTIONAL, -- Need R + rank7-8 SEQUENCE(SIZE(7)) OF PortIndex8 OPTIONAL, -- Need R + rank8-8 SEQUENCE(SIZE(8)) OF PortIndex8 OPTIONAL -- Need R + }, + portIndex4 SEQUENCE{ + rank1-4 PortIndex4 OPTIONAL, -- Need R + rank2-4 SEQUENCE(SIZE(2)) OF PortIndex4 OPTIONAL, -- Need R + rank3-4 SEQUENCE(SIZE(3)) OF PortIndex4 OPTIONAL, -- Need R + rank4-4 SEQUENCE(SIZE(4)) OF PortIndex4 OPTIONAL -- Need R + }, + portIndex2 SEQUENCE{ + rank1-2 PortIndex2 OPTIONAL, -- Need R + rank2-2 SEQUENCE(SIZE(2)) OF PortIndex2 OPTIONAL -- Need R + }, + portIndex1 NULL +} + +PortIndex8::= INTEGER (0..7) +PortIndex4::= INTEGER (0..3) +PortIndex2::= INTEGER (0..1) + +-- TAG-CSI-REPORTCONFIG-STOP +-- TAG-CSI-REPORTCONFIGID-START + +CSI-ReportConfigId ::= INTEGER (0..maxNrofCSI-ReportConfigurations-1) + +-- TAG-CSI-REPORTCONFIGID-STOP +-- TAG-CSI-RESOURCECONFIG-START + +CSI-ResourceConfig ::= SEQUENCE { + csi-ResourceConfigId CSI-ResourceConfigId, + csi-RS-ResourceSetList CHOICE { + nzp-CSI-RS-SSB SEQUENCE { + nzp-CSI-RS-ResourceSetList SEQUENCE (SIZE (1..maxNrofNZP-CSI-RS-ResourceSetsPerConfig)) OF NZP-CSI-RS-ResourceSetId + OPTIONAL, -- Need R + csi-SSB-ResourceSetList SEQUENCE (SIZE (1..maxNrofCSI-SSB-ResourceSetsPerConfig)) OF CSI-SSB-ResourceSetId OPTIONAL -- Need R + }, + csi-IM-ResourceSetList SEQUENCE (SIZE (1..maxNrofCSI-IM-ResourceSetsPerConfig)) OF CSI-IM-ResourceSetId + }, + + bwp-Id BWP-Id, + resourceType ENUMERATED { aperiodic, semiPersistent, periodic }, + ..., + [[ + csi-SSB-ResourceSetListExt-r17 CSI-SSB-ResourceSetId OPTIONAL -- Need R + ]] +} + +-- TAG-CSI-RESOURCECONFIG-STOP +-- TAG-CSI-RESOURCECONFIGID-START + +CSI-ResourceConfigId ::= INTEGER (0..maxNrofCSI-ResourceConfigurations-1) + +-- TAG-CSI-RESOURCECONFIGID-STOP +-- TAG-CSI-RESOURCEPERIODICITYANDOFFSET-START + +CSI-ResourcePeriodicityAndOffset ::= CHOICE { + slots4 INTEGER (0..3), + slots5 INTEGER (0..4), + slots8 INTEGER (0..7), + slots10 INTEGER (0..9), + slots16 INTEGER (0..15), + slots20 INTEGER (0..19), + slots32 INTEGER (0..31), + slots40 INTEGER (0..39), + slots64 INTEGER (0..63), + slots80 INTEGER (0..79), + slots160 INTEGER (0..159), + slots320 INTEGER (0..319), + slots640 INTEGER (0..639) +} + +-- TAG-CSI-RESOURCEPERIODICITYANDOFFSET-STOP +-- TAG-CSI-RS-RESOURCECONFIGMOBILITY-START + +CSI-RS-ResourceConfigMobility ::= SEQUENCE { + subcarrierSpacing SubcarrierSpacing, + csi-RS-CellList-Mobility SEQUENCE (SIZE (1..maxNrofCSI-RS-CellsRRM)) OF CSI-RS-CellMobility, + ..., + [[ + refServCellIndex ServCellIndex OPTIONAL -- Need S + ]] + + +} + +CSI-RS-CellMobility ::= SEQUENCE { + cellId PhysCellId, + csi-rs-MeasurementBW SEQUENCE { + nrofPRBs ENUMERATED { size24, size48, size96, size192, size264}, + startPRB INTEGER(0..2169) + }, + density ENUMERATED {d1,d3} OPTIONAL, -- Need R + csi-rs-ResourceList-Mobility SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesRRM)) OF CSI-RS-Resource-Mobility +} + +CSI-RS-Resource-Mobility ::= SEQUENCE { + csi-RS-Index CSI-RS-Index, + slotConfig CHOICE { + ms4 INTEGER (0..31), + ms5 INTEGER (0..39), + ms10 INTEGER (0..79), + ms20 INTEGER (0..159), + ms40 INTEGER (0..319) + }, + associatedSSB SEQUENCE { + ssb-Index SSB-Index, + isQuasiColocated BOOLEAN + } OPTIONAL, -- Need R + frequencyDomainAllocation CHOICE { + row1 BIT STRING (SIZE (4)), + row2 BIT STRING (SIZE (12)) + }, + firstOFDMSymbolInTimeDomain INTEGER (0..13), + sequenceGenerationConfig INTEGER (0..1023), + ..., + [[ + slotConfig-r17 CHOICE { + ms4 INTEGER (0..255), + ms5 INTEGER (0..319), + ms10 INTEGER (0..639), + ms20 INTEGER (0..1279), + ms40 INTEGER (0..2559) + } OPTIONAL -- Need R + ]] +} + +CSI-RS-Index ::= INTEGER (0..maxNrofCSI-RS-ResourcesRRM-1) + +-- TAG-CSI-RS-RESOURCECONFIGMOBILITY-STOP +-- TAG-CSI-RS-RESOURCEMAPPING-START + +CSI-RS-ResourceMapping ::= SEQUENCE { + frequencyDomainAllocation CHOICE { + row1 BIT STRING (SIZE (4)), + row2 BIT STRING (SIZE (12)), + row4 BIT STRING (SIZE (3)), + other BIT STRING (SIZE (6)) + }, + nrofPorts ENUMERATED {p1,p2,p4,p8,p12,p16,p24,p32}, + firstOFDMSymbolInTimeDomain INTEGER (0..13), + firstOFDMSymbolInTimeDomain2 INTEGER (2..12) OPTIONAL, -- Need R + cdm-Type ENUMERATED {noCDM, fd-CDM2, cdm4-FD2-TD2, cdm8-FD2-TD4}, + density CHOICE { + dot5 ENUMERATED {evenPRBs, oddPRBs}, + one NULL, + three NULL, + spare NULL + }, + freqBand CSI-FrequencyOccupation, + ... +} + +-- TAG-CSI-RS-RESOURCEMAPPING-STOP +-- TAG-CSI-SEMIPERSISTENTONPUSCHTRIGGERSTATELIST-START + +CSI-SemiPersistentOnPUSCH-TriggerStateList ::= SEQUENCE(SIZE (1..maxNrOfSemiPersistentPUSCH-Triggers)) OF CSI-SemiPersistentOnPUSCH-TriggerState + +CSI-SemiPersistentOnPUSCH-TriggerState ::= SEQUENCE { + associatedReportConfigInfo CSI-ReportConfigId, + ..., + [[ + sp-CSI-MultiplexingMode-r17 ENUMERATED {enabled} OPTIONAL -- Need R + ]] +} + +-- TAG-CSI-SEMIPERSISTENTONPUSCHTRIGGERSTATELIST-STOP +-- TAG-CSI-SSB-RESOURCESET-START + +CSI-SSB-ResourceSet ::= SEQUENCE { + csi-SSB-ResourceSetId CSI-SSB-ResourceSetId, + csi-SSB-ResourceList SEQUENCE (SIZE(1..maxNrofCSI-SSB-ResourcePerSet)) OF SSB-Index, + ..., + [[ + servingAdditionalPCIList-r17 SEQUENCE (SIZE(1..maxNrofCSI-SSB-ResourcePerSet)) OF ServingAdditionalPCIIndex-r17 OPTIONAL -- Need R + ]] +} + +ServingAdditionalPCIIndex-r17 ::= INTEGER(0..maxNrofAdditionalPCI-r17) + +-- TAG-CSI-SSB-RESOURCESET-STOP +-- TAG-CSI-SSB-RESOURCESETID-START + +CSI-SSB-ResourceSetId ::= INTEGER (0..maxNrofCSI-SSB-ResourceSets-1) + +-- TAG-CSI-SSB-RESOURCESETID-STOP +-- TAG-DEDICATED-NAS-MESSAGE-START + +DedicatedNAS-Message ::= OCTET STRING + +-- TAG-DEDICATED-NAS-MESSAGE-STOP +-- TAG-DL-PPW-PRECONFIG-START + +DL-PPW-PreConfig-r17 ::= SEQUENCE { + dl-PPW-ID-r17 DL-PPW-ID-r17, + dl-PPW-PeriodicityAndStartSlot-r17 DL-PPW-PeriodicityAndStartSlot-r17, + length-r17 INTEGER (1..160), + type-r17 ENUMERATED {type1A, type1B, type2} OPTIONAL, -- Cond MultiType + priority-r17 ENUMERATED {st1, st2, st3} OPTIONAL -- Cond MultiState +} + +DL-PPW-ID-r17 ::= INTEGER (0..maxNrofPPW-ID-1-r17) + +DL-PPW-PeriodicityAndStartSlot-r17 ::= CHOICE { + scs15 CHOICE { + n4 INTEGER (0..3), + n5 INTEGER (0..4), + n8 INTEGER (0..7), + n10 INTEGER (0..9), + n16 INTEGER (0..15), + n20 INTEGER (0..19), + n32 INTEGER (0..31), + n40 INTEGER (0..39), + n64 INTEGER (0..63), + n80 INTEGER (0..79), + n160 INTEGER (0..159), + n320 INTEGER (0..319), + n640 INTEGER (0..639), + n1280 INTEGER (0..1279), + n2560 INTEGER (0..2559), + n5120 INTEGER (0..5119), + n10240 INTEGER (0..10239), + ... + }, + scs30 CHOICE { + n8 INTEGER (0..7), + n10 INTEGER (0..9), + n16 INTEGER (0..15), + n20 INTEGER (0..19), + n32 INTEGER (0..31), + n40 INTEGER (0..39), + n64 INTEGER (0..63), + n80 INTEGER (0..79), + n128 INTEGER (0..127), + n160 INTEGER (0..159), + n320 INTEGER (0..319), + n640 INTEGER (0..639), + n1280 INTEGER (0..1279), + n2560 INTEGER (0..2559), + n5120 INTEGER (0..5119), + n10240 INTEGER (0..10239), + n20480 INTEGER (0..20479), + ... + }, + scs60 CHOICE { + n16 INTEGER (0..15), + n20 INTEGER (0..19), + n32 INTEGER (0..31), + n40 INTEGER (0..39), + n64 INTEGER (0..63), + n80 INTEGER (0..79), + n128 INTEGER (0..127), + n160 INTEGER (0..159), + n256 INTEGER (0..255), + n320 INTEGER (0..319), + n640 INTEGER (0..639), + n1280 INTEGER (0..1279), + n2560 INTEGER (0..2559), + n5120 INTEGER (0..5119), + n10240 INTEGER (0..10239), + n20480 INTEGER (0..20479), + n40960 INTEGER (0..40959), + ... + }, + scs120 CHOICE { + n32 INTEGER (0..31), + n40 INTEGER (0..39), + n64 INTEGER (0..63), + n80 INTEGER (0..79), + n128 INTEGER (0..127), + n160 INTEGER (0..159), + n256 INTEGER (0..255), + n320 INTEGER (0..319), + n512 INTEGER (0..511), + n640 INTEGER (0..639), + n1280 INTEGER (0..1279), + n2560 INTEGER (0..2559), + n5120 INTEGER (0..5119), + n10240 INTEGER (0..10239), + n20480 INTEGER (0..20479), + n40960 INTEGER (0..40959), + n81920 INTEGER (0..81919), + ... + }, + ... +} + +-- TAG-DL-PPW-PRECONFIG-STOP +-- TAG-DMRS-BUNDLINGPUCCH-CONFIG-START + +DMRS-BundlingPUCCH-Config-r17 ::= SEQUENCE { + pucch-DMRS-Bundling-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + pucch-TimeDomainWindowLength-r17 INTEGER (2..8) OPTIONAL, -- Need S + pucch-WindowRestart-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + pucch-FrequencyHoppingInterval-r17 ENUMERATED {s2, s4, s5, s10} OPTIONAL, -- Need S + ... +} + +-- TAG-DMRS-BUNDLINGPUCCH-CONFIG-STOP +-- TAG-DMRS-BUNDLINGPUSCH-CONFIG-START + +DMRS-BundlingPUSCH-Config-r17 ::= SEQUENCE { + pusch-DMRS-Bundling-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + pusch-TimeDomainWindowLength-r17 INTEGER (2..32) OPTIONAL, -- Need S + pusch-WindowRestart-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + pusch-FrequencyHoppingInterval-r17 ENUMERATED {s2, s4, s5, s6, s8, s10, s12, s14, s16, s20} OPTIONAL, -- Need S + ... +} + +-- TAG-DMRS-BUNDLINGPUSCH-CONFIG-STOP +-- TAG-DMRS-DOWNLINKCONFIG-START + +DMRS-DownlinkConfig ::= SEQUENCE { + dmrs-Type ENUMERATED {type2} OPTIONAL, -- Need S + dmrs-AdditionalPosition ENUMERATED {pos0, pos1, pos3} OPTIONAL, -- Need S + maxLength ENUMERATED {len2} OPTIONAL, -- Need S + scramblingID0 INTEGER (0..65535) OPTIONAL, -- Need S + scramblingID1 INTEGER (0..65535) OPTIONAL, -- Need S + phaseTrackingRS SetupRelease { PTRS-DownlinkConfig } OPTIONAL, -- Need M + ..., + [[ + dmrs-Downlink-r16 ENUMERATED {enabled} OPTIONAL -- Need R + ]] + +} + +-- TAG-DMRS-DOWNLINKCONFIG-STOP +-- TAG-DMRS-UPLINKCONFIG-START + +DMRS-UplinkConfig ::= SEQUENCE { + dmrs-Type ENUMERATED {type2} OPTIONAL, -- Need S + dmrs-AdditionalPosition ENUMERATED {pos0, pos1, pos3} OPTIONAL, -- Need S + phaseTrackingRS SetupRelease { PTRS-UplinkConfig } OPTIONAL, -- Need M + maxLength ENUMERATED {len2} OPTIONAL, -- Need S + transformPrecodingDisabled SEQUENCE { + scramblingID0 INTEGER (0..65535) OPTIONAL, -- Need S + scramblingID1 INTEGER (0..65535) OPTIONAL, -- Need S + ..., + [[ + dmrs-Uplink-r16 ENUMERATED {enabled} OPTIONAL -- Need R + ]] + } OPTIONAL, -- Need R + transformPrecodingEnabled SEQUENCE { + nPUSCH-Identity INTEGER(0..1007) OPTIONAL, -- Need S + sequenceGroupHopping ENUMERATED {disabled} OPTIONAL, -- Need S + sequenceHopping ENUMERATED {enabled} OPTIONAL, -- Need S + ..., + [[ + dmrs-UplinkTransformPrecoding-r16 SetupRelease {DMRS-UplinkTransformPrecoding-r16} OPTIONAL -- Need M + ]] + } OPTIONAL, -- Need R + ... +} + +DMRS-UplinkTransformPrecoding-r16 ::= SEQUENCE { + pi2BPSK-ScramblingID0 INTEGER(0..65535) OPTIONAL, -- Need S + pi2BPSK-ScramblingID1 INTEGER(0..65535) OPTIONAL -- Need S +} + +-- TAG-DMRS-UPLINKCONFIG-STOP +-- TAG-DOWNLINKCONFIGCOMMON-START + +DownlinkConfigCommon ::= SEQUENCE { + frequencyInfoDL FrequencyInfoDL OPTIONAL, -- Cond InterFreqHOAndServCellAdd + initialDownlinkBWP BWP-DownlinkCommon OPTIONAL, -- Cond ServCellAdd + ..., + [[ + initialDownlinkBWP-RedCap-r17 BWP-DownlinkCommon OPTIONAL -- Need R + + ]] +} + +-- TAG-DOWNLINKCONFIGCOMMON-STOP +-- TAG-DOWNLINKCONFIGCOMMONSIB-START + +DownlinkConfigCommonSIB ::= SEQUENCE { + frequencyInfoDL FrequencyInfoDL-SIB, + initialDownlinkBWP BWP-DownlinkCommon, + bcch-Config BCCH-Config, + pcch-Config PCCH-Config, + ..., + [[ + pei-Config-r17 PEI-Config-r17 OPTIONAL, -- Need R + initialDownlinkBWP-RedCap-r17 BWP-DownlinkCommon OPTIONAL -- Need R + ]] +} + + +BCCH-Config ::= SEQUENCE { + modificationPeriodCoeff ENUMERATED {n2, n4, n8, n16}, + ... +} + + +PCCH-Config ::= SEQUENCE { + defaultPagingCycle PagingCycle, + nAndPagingFrameOffset CHOICE { + oneT NULL, + halfT INTEGER (0..1), + quarterT INTEGER (0..3), + oneEighthT INTEGER (0..7), + oneSixteenthT INTEGER (0..15) + }, + ns ENUMERATED {four, two, one}, + firstPDCCH-MonitoringOccasionOfPO CHOICE { + sCS15KHZoneT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..139), + sCS30KHZoneT-SCS15KHZhalfT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..279), + sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..559), + sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..1119), + sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..2239), + sCS480KHZoneT-SCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..4479), + sCS480KHZhalfT-SCS120KHZoneEighthT-SCS60KHZoneSixteenthT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..8959), + sCS480KHZquarterT-SCS120KHZoneSixteenthT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..17919) + } OPTIONAL, -- Need R + ..., + [[ + nrofPDCCH-MonitoringOccasionPerSSB-InPO-r16 INTEGER (2..4) OPTIONAL -- Cond SharedSpectrum2 + ]], + [[ + ranPagingInIdlePO-r17 ENUMERATED {true} OPTIONAL, -- Need R + + firstPDCCH-MonitoringOccasionOfPO-v1710 CHOICE { + sCS480KHZoneEighthT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..35839), + sCS480KHZoneSixteenthT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..71679) +} OPTIONAL -- Need R + ]] +} + +PEI-Config-r17 ::= SEQUENCE { + po-NumPerPEI-r17 ENUMERATED {po1, po2, po4, po8}, + payloadSizeDCI-2-7-r17 INTEGER (1..maxDCI-2-7-Size-r17), + pei-FrameOffset-r17 INTEGER (0..16), + subgroupConfig-r17 SubgroupConfig-r17, + lastUsedCellOnly-r17 ENUMERATED {true} OPTIONAL, -- Need R + ... +} + +SubgroupConfig-r17 ::= SEQUENCE { + subgroupsNumPerPO-r17 INTEGER (1.. maxNrofPagingSubgroups-r17), + subgroupsNumForUEID-r17 INTEGER (1.. maxNrofPagingSubgroups-r17) OPTIONAL, -- Need S + ... +} + +-- TAG-DOWNLINKCONFIGCOMMONSIB-STOP +-- TAG-DOWNLINKPREEMPTION-START + +DownlinkPreemption ::= SEQUENCE { + int-RNTI RNTI-Value, + timeFrequencySet ENUMERATED {set0, set1}, + dci-PayloadSize INTEGER (0..maxINT-DCI-PayloadSize), + int-ConfigurationPerServingCell SEQUENCE (SIZE (1..maxNrofServingCells)) OF INT-ConfigurationPerServingCell, + ... +} + +INT-ConfigurationPerServingCell ::= SEQUENCE { + servingCellId ServCellIndex, + positionInDCI INTEGER (0..maxINT-DCI-PayloadSize-1) +} + +-- TAG-DOWNLINKPREEMPTION-STOP +-- TAG-DRB-IDENTITY-START + +DRB-Identity ::= INTEGER (1..32) + +-- TAG-DRB-IDENTITY-STOP +-- TAG-DRX-CONFIG-START + +DRX-Config ::= SEQUENCE { + drx-onDurationTimer CHOICE { + subMilliSeconds INTEGER (1..31), + milliSeconds ENUMERATED { + ms1, ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, ms40, ms50, ms60, + ms80, ms100, ms200, ms300, ms400, ms500, ms600, ms800, ms1000, ms1200, + ms1600, spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1 } + }, + drx-InactivityTimer ENUMERATED { + ms0, ms1, ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, ms40, ms50, ms60, ms80, + ms100, ms200, ms300, ms500, ms750, ms1280, ms1920, ms2560, spare9, spare8, + spare7, spare6, spare5, spare4, spare3, spare2, spare1}, + drx-HARQ-RTT-TimerDL INTEGER (0..56), + drx-HARQ-RTT-TimerUL INTEGER (0..56), + drx-RetransmissionTimerDL ENUMERATED { + sl0, sl1, sl2, sl4, sl6, sl8, sl16, sl24, sl33, sl40, sl64, sl80, sl96, sl112, sl128, + sl160, sl320, spare15, spare14, spare13, spare12, spare11, spare10, spare9, + spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1}, + drx-RetransmissionTimerUL ENUMERATED { + sl0, sl1, sl2, sl4, sl6, sl8, sl16, sl24, sl33, sl40, sl64, sl80, sl96, sl112, sl128, + sl160, sl320, spare15, spare14, spare13, spare12, spare11, spare10, spare9, + spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1 }, + drx-LongCycleStartOffset CHOICE { + ms10 INTEGER(0..9), + ms20 INTEGER(0..19), + ms32 INTEGER(0..31), + ms40 INTEGER(0..39), + ms60 INTEGER(0..59), + ms64 INTEGER(0..63), + ms70 INTEGER(0..69), + ms80 INTEGER(0..79), + ms128 INTEGER(0..127), + ms160 INTEGER(0..159), + ms256 INTEGER(0..255), + ms320 INTEGER(0..319), + ms512 INTEGER(0..511), + ms640 INTEGER(0..639), + ms1024 INTEGER(0..1023), + ms1280 INTEGER(0..1279), + ms2048 INTEGER(0..2047), + ms2560 INTEGER(0..2559), + ms5120 INTEGER(0..5119), + ms10240 INTEGER(0..10239) + }, + shortDRX SEQUENCE { + drx-ShortCycle ENUMERATED { + ms2, ms3, ms4, ms5, ms6, ms7, ms8, ms10, ms14, ms16, ms20, ms30, ms32, + ms35, ms40, ms64, ms80, ms128, ms160, ms256, ms320, ms512, ms640, spare9, + spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1 }, + drx-ShortCycleTimer INTEGER (1..16) + } OPTIONAL, -- Need R + drx-SlotOffset INTEGER (0..31) +} + +DRX-ConfigExt-v1700 ::= SEQUENCE { + drx-HARQ-RTT-TimerDL-r17 INTEGER (0..448), + drx-HARQ-RTT-TimerUL-r17 INTEGER (0..448) +} + +-- TAG-DRX-CONFIG-STOP +-- TAG-DRX-CONFIGSECONDARYGROUP-START + +DRX-ConfigSecondaryGroup-r16 ::= SEQUENCE { + drx-onDurationTimer-r16 CHOICE { + subMilliSeconds INTEGER (1..31), + milliSeconds ENUMERATED { + ms1, ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, ms40, ms50, ms60, + ms80, ms100, ms200, ms300, ms400, ms500, ms600, ms800, ms1000, ms1200, + ms1600, spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1 } + }, + drx-InactivityTimer-r16 ENUMERATED { + ms0, ms1, ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, ms40, ms50, ms60, ms80, + ms100, ms200, ms300, ms500, ms750, ms1280, ms1920, ms2560, spare9, spare8, + spare7, spare6, spare5, spare4, spare3, spare2, spare1} +} + +-- TAG-DRX-CONFIGSECONDARYGROUP-STOP +-- TAG-DRX-CONFIGSL-START + +DRX-ConfigSL-r17 ::= SEQUENCE { + drx-HARQ-RTT-TimerSL-r17 INTEGER (0..56), + drx-RetransmissionTimerSL-r17 ENUMERATED {sl0, sl1, sl2, sl4, sl6, sl8, sl16, sl24, sl33, sl40, sl64, sl80, sl96, sl112, sl128, + sl160, sl320, spare15, spare14, spare13, spare12, spare11, spare10, spare9, spare8, + spare7, spare6, spare5, spare4, spare3, spare2, spare1} +} + +-- TAG-DRX-CONFIGSL-STOP +-- TAG-EPHEMERISINFO-START + +EphemerisInfo-r17 ::= CHOICE { + positionVelocity-r17 PositionVelocity-r17, + orbital-r17 Orbital-r17 +} + +PositionVelocity-r17 ::= SEQUENCE { + positionX-r17 PositionStateVector-r17, + positionY-r17 PositionStateVector-r17, + positionZ-r17 PositionStateVector-r17, + velocityVX-r17 VelocityStateVector-r17, + velocityVY-r17 VelocityStateVector-r17, + velocityVZ-r17 VelocityStateVector-r17 +} + +Orbital-r17 ::= SEQUENCE { + semiMajorAxis-r17 INTEGER (0..8589934591), + eccentricity-r17 INTEGER (0..1048575), + periapsis-r17 INTEGER (0..268435455), + longitude-r17 INTEGER (0..268435455), + inclination-r17 INTEGER (-67108864..67108863), + meanAnomaly-r17 INTEGER (0..268435455) +} + +PositionStateVector-r17 ::= INTEGER (-33554432..33554431) + +VelocityStateVector-r17 ::= INTEGER (-131072..131071) + +-- TAG-EPHEMERISINFO-STOP +-- TAG-FEATURECOMBINATION-START + +FeatureCombination-r17 ::= SEQUENCE { + redCap-r17 ENUMERATED {true} OPTIONAL, -- Need R + smallData-r17 ENUMERATED {true} OPTIONAL, -- Need R + nsag-r17 NSAG-List-r17 OPTIONAL, -- Need R + msg3-Repetitions-r17 ENUMERATED {true} OPTIONAL, -- Need R + spare4 ENUMERATED {true} OPTIONAL, -- Need R + spare3 ENUMERATED {true} OPTIONAL, -- Need R + spare2 ENUMERATED {true} OPTIONAL, -- Need R + spare1 ENUMERATED {true} OPTIONAL -- Need R +} + +NSAG-List-r17 ::= SEQUENCE (SIZE (1.. maxSliceInfo-r17)) OF NSAG-ID-r17 + +-- TAG-FEATURECOMBINATION-STOP +-- TAG-FEATURECOMBINATIONPREAMBLES-START + +FeatureCombinationPreambles-r17 ::= SEQUENCE { + featureCombination-r17 FeatureCombination-r17, + startPreambleForThisPartition-r17 INTEGER (0..63), + numberOfPreamblesPerSSB-ForThisPartition-r17 INTEGER (1..64), + ssb-SharedRO-MaskIndex-r17 INTEGER (1..15) OPTIONAL, -- Need S + groupBconfigured-r17 SEQUENCE { + ra-SizeGroupA-r17 ENUMERATED {b56, b144, b208, b256, b282, b480, b640, + b800, b1000, b72, spare6, spare5,spare4, spare3, spare2, spare1}, + messagePowerOffsetGroupB-r17 ENUMERATED { minusinfinity, dB0, dB5, dB8, dB10, dB12, dB15, dB18}, + numberOfRA-PreamblesGroupA-r17 INTEGER (1..64) + } OPTIONAL, -- Need R + separateMsgA-PUSCH-Config-r17 MsgA-PUSCH-Config-r16 OPTIONAL, -- Cond MsgAConfigCommon + msgA-RSRP-Threshold-r17 RSRP-Range OPTIONAL, -- Need R + rsrp-ThresholdSSB-r17 RSRP-Range OPTIONAL, -- Need R + deltaPreamble-r17 INTEGER (-1..6) OPTIONAL, -- Need R + ... +} + +-- TAG-FEATURECOMBINATIONPREAMBLES-STOP +-- TAG-FILTERCOEFFICIENT-START + +FilterCoefficient ::= ENUMERATED { fc0, fc1, fc2, fc3, fc4, fc5, fc6, fc7, fc8, fc9, fc11, fc13, fc15, fc17, fc19, spare1, ...} + +-- TAG-FILTERCOEFFICIENT-STOP +-- TAG-FREQBANDINDICATORNR-START + +FreqBandIndicatorNR ::= INTEGER (1..1024) + +-- TAG-FREQBANDINDICATORNR-STOP +-- TAG-FREQPRIORITYLISTDEDICATEDSLICING-START + +FreqPriorityListDedicatedSlicing-r17 ::= SEQUENCE (SIZE (1.. maxFreq)) OF FreqPriorityDedicatedSlicing-r17 + +FreqPriorityDedicatedSlicing-r17 ::= SEQUENCE { + dl-ExplicitCarrierFreq-r17 ARFCN-ValueNR, + sliceInfoListDedicated-r17 SliceInfoListDedicated-r17 OPTIONAL -- Cond Mandatory +} + +SliceInfoListDedicated-r17 ::= SEQUENCE (SIZE (1..maxSliceInfo-r17)) OF SliceInfoDedicated-r17 + +SliceInfoDedicated-r17 ::= SEQUENCE { + nsag-IdentityInfo-r17 NSAG-IdentityInfo-r17, + nsag-CellReselectionPriority-r17 CellReselectionPriority OPTIONAL, -- Need R + nsag-CellReselectionSubPriority-r17 CellReselectionSubPriority OPTIONAL -- Need R +} + +-- TAG-FREQPRIORITYLISTDEDICATEDSLICING-STOP +-- TAG-FREQPRIORITYLISTSLICING-START + +FreqPriorityListSlicing-r17 ::= SEQUENCE (SIZE (1..maxFreqPlus1)) OF FreqPrioritySlicing-r17 + +FreqPrioritySlicing-r17 ::= SEQUENCE { + dl-ImplicitCarrierFreq-r17 INTEGER (0..maxFreq), + sliceInfoList-r17 SliceInfoList-r17 OPTIONAL -- Cond Mandatory +} + +SliceInfoList-r17 ::= SEQUENCE (SIZE (1..maxSliceInfo-r17)) OF SliceInfo-r17 + +SliceInfo-r17 ::= SEQUENCE { + nsag-IdentityInfo-r17 NSAG-IdentityInfo-r17, + nsag-CellReselectionPriority-r17 CellReselectionPriority OPTIONAL, -- Need R + nsag-CellReselectionSubPriority-r17 CellReselectionSubPriority OPTIONAL, -- Need R + sliceCellListNR-r17 CHOICE { + sliceAllowedCellListNR-r17 SliceCellListNR-r17, + sliceExcludedCellListNR-r17 SliceCellListNR-r17 + } OPTIONAL -- Need R +} + +SliceCellListNR-r17 ::= SEQUENCE (SIZE (1..maxCellSlice-r17)) OF PCI-Range + +-- TAG-FREQPRIORITYLISTSLICING-STOP +-- TAG-FREQUENCYINFODL-START + +FrequencyInfoDL ::= SEQUENCE { + absoluteFrequencySSB ARFCN-ValueNR OPTIONAL, -- Cond SpCellAdd + frequencyBandList MultiFrequencyBandListNR, + absoluteFrequencyPointA ARFCN-ValueNR, + scs-SpecificCarrierList SEQUENCE (SIZE (1..maxSCSs)) OF SCS-SpecificCarrier, + ... +} + +-- TAG-FREQUENCYINFODL-STOP +-- TAG-FREQUENCYINFODL-SIB-START + +FrequencyInfoDL-SIB ::= SEQUENCE { + frequencyBandList MultiFrequencyBandListNR-SIB, + offsetToPointA INTEGER (0..2199), + scs-SpecificCarrierList SEQUENCE (SIZE (1..maxSCSs)) OF SCS-SpecificCarrier +} + +-- TAG-FREQUENCYINFODL-SIB-STOP +-- TAG-FREQUENCYINFOUL-START + +FrequencyInfoUL ::= SEQUENCE { + frequencyBandList MultiFrequencyBandListNR OPTIONAL, -- Cond FDD-OrSUL + absoluteFrequencyPointA ARFCN-ValueNR OPTIONAL, -- Cond FDD-OrSUL + scs-SpecificCarrierList SEQUENCE (SIZE (1..maxSCSs)) OF SCS-SpecificCarrier, + additionalSpectrumEmission AdditionalSpectrumEmission OPTIONAL, -- Need S + p-Max P-Max OPTIONAL, -- Need S + frequencyShift7p5khz ENUMERATED {true} OPTIONAL, -- Cond FDD-TDD-OrSUL-Optional + ... +} + +-- TAG-FREQUENCYINFOUL-STOP +-- TAG-FREQUENCYINFOUL-SIB-START + +FrequencyInfoUL-SIB ::= SEQUENCE { + frequencyBandList MultiFrequencyBandListNR-SIB OPTIONAL, -- Cond FDD-OrSUL + absoluteFrequencyPointA ARFCN-ValueNR OPTIONAL, -- Cond FDD-OrSUL + scs-SpecificCarrierList SEQUENCE (SIZE (1..maxSCSs)) OF SCS-SpecificCarrier, + p-Max P-Max OPTIONAL, -- Need S + frequencyShift7p5khz ENUMERATED {true} OPTIONAL, -- Cond FDD-TDD-OrSUL-Optional + ... +} + +-- TAG-FREQUENCYINFOUL-SIB-STOP +-- TAG-GAPPRIORITY-START + +GapPriority-r17 ::= INTEGER (1..maxNrOfGapPri-r17) + +-- TAG-GAPPRIORITY-STOP +-- TAG-HIGHSPEEDCONFIG-START + +HighSpeedConfig-r16 ::= SEQUENCE { + highSpeedMeasFlag-r16 ENUMERATED {true} OPTIONAL, -- Cond SpCellOnly + highSpeedDemodFlag-r16 ENUMERATED {true} OPTIONAL, -- Need R + ... +} + +HighSpeedConfig-v1700 ::= SEQUENCE { + highSpeedMeasCA-Scell-r17 ENUMERATED {true} OPTIONAL, -- Cond SCellOnly + highSpeedMeasInterFreq-r17 ENUMERATED {true} OPTIONAL, -- Cond SpCellOnly2 + highSpeedDemodCA-Scell-r17 ENUMERATED {true} OPTIONAL, -- Need R + ... +} + +HighSpeedConfigFR2-r17 ::= SEQUENCE { + highSpeedMeasFlagFR2-r17 ENUMERATED {set1, set2} OPTIONAL, -- Need R + highSpeedDeploymentTypeFR2-r17 ENUMERATED {unidirectional, bidirectional} OPTIONAL, -- Need R + highSpeedLargeOneStepUL-TimingFR2-r17 ENUMERATED {true} OPTIONAL, -- Need R + ... +} + +-- TAG-HIGHSPEEDCONFIG-STOP +-- TAG-HYSTERESIS-START + +Hysteresis ::= INTEGER (0..30) + +-- TAG-HYSTERESIS-STOP +-- TAG-HYSTERESISLOCATION-START + +HysteresisLocation-r17 ::= INTEGER (0..32768) + +-- TAG-HYSTERESISLOCATION-STOP +-- TAG-INVALIDSYMBOLPATTERN-START + +InvalidSymbolPattern-r16 ::= SEQUENCE { + symbols-r16 CHOICE { + oneSlot BIT STRING (SIZE (14)), + twoSlots BIT STRING (SIZE (28)) + }, + periodicityAndPattern-r16 CHOICE { + n2 BIT STRING (SIZE (2)), + n4 BIT STRING (SIZE (4)), + n5 BIT STRING (SIZE (5)), + n8 BIT STRING (SIZE (8)), + n10 BIT STRING (SIZE (10)), + n20 BIT STRING (SIZE (20)), + n40 BIT STRING (SIZE (40)) + } OPTIONAL, -- Need M + ... +} + +-- TAG-INVALIDSYMBOLPATTERN-STOP +-- TAG-I-RNTI-VALUE-START + +I-RNTI-Value ::= BIT STRING (SIZE(40)) + +-- TAG-I-RNTI-VALUE-STOP +-- TAG-LBT-FAILURERECOVERYCONFIG-START + +LBT-FailureRecoveryConfig-r16 ::= SEQUENCE { + lbt-FailureInstanceMaxCount-r16 ENUMERATED {n4, n8, n16, n32, n64, n128}, + lbt-FailureDetectionTimer-r16 ENUMERATED {ms10, ms20, ms40, ms80, ms160, ms320}, + ... +} + +-- TAG-LBT-FAILURERECOVERYCONFIG-STOP +-- TAG-LOCATIONINFO-START + +LocationInfo-r16 ::= SEQUENCE { + commonLocationInfo-r16 CommonLocationInfo-r16 OPTIONAL, + bt-LocationInfo-r16 LogMeasResultListBT-r16 OPTIONAL, + wlan-LocationInfo-r16 LogMeasResultListWLAN-r16 OPTIONAL, + sensor-LocationInfo-r16 Sensor-LocationInfo-r16 OPTIONAL, + ... +} + +-- TAG-LOCATIONINFO-STOP +-- TAG-LOCATIONMEASUREMENTINFO-START + +LocationMeasurementInfo ::= CHOICE { + eutra-RSTD EUTRA-RSTD-InfoList, + ..., + eutra-FineTimingDetection NULL, + nr-PRS-Measurement-r16 NR-PRS-MeasurementInfoList-r16 +} + +EUTRA-RSTD-InfoList ::= SEQUENCE (SIZE (1..maxInterRAT-RSTD-Freq)) OF EUTRA-RSTD-Info + +EUTRA-RSTD-Info ::= SEQUENCE { + carrierFreq ARFCN-ValueEUTRA, + measPRS-Offset INTEGER (0..39), + ... +} + +NR-PRS-MeasurementInfoList-r16 ::= SEQUENCE (SIZE (1..maxFreqLayers)) OF NR-PRS-MeasurementInfo-r16 + +NR-PRS-MeasurementInfo-r16 ::= SEQUENCE { + dl-PRS-PointA-r16 ARFCN-ValueNR, + nr-MeasPRS-RepetitionAndOffset-r16 CHOICE { + ms20-r16 INTEGER (0..19), + ms40-r16 INTEGER (0..39), + ms80-r16 INTEGER (0..79), + ms160-r16 INTEGER (0..159), + ... + }, + nr-MeasPRS-length-r16 ENUMERATED {ms1dot5, ms3, ms3dot5, ms4, ms5dot5, ms6, ms10, ms20}, + ... +} + +-- TAG-LOCATIONMEASUREMENTINFO-STOP +-- TAG-LOGICALCHANNELCONFIG-START + +LogicalChannelConfig ::= SEQUENCE { + ul-SpecificParameters SEQUENCE { + priority INTEGER (1..16), + prioritisedBitRate ENUMERATED {kBps0, kBps8, kBps16, kBps32, kBps64, kBps128, kBps256, kBps512, + kBps1024, kBps2048, kBps4096, kBps8192, kBps16384, kBps32768, kBps65536, infinity}, + bucketSizeDuration ENUMERATED {ms5, ms10, ms20, ms50, ms100, ms150, ms300, ms500, ms1000, + spare7, spare6, spare5, spare4, spare3,spare2, spare1}, + allowedServingCells SEQUENCE (SIZE (1..maxNrofServingCells-1)) OF ServCellIndex + OPTIONAL, -- Cond PDCP-CADuplication + allowedSCS-List SEQUENCE (SIZE (1..maxSCSs)) OF SubcarrierSpacing OPTIONAL, -- Need R + maxPUSCH-Duration ENUMERATED {ms0p02, ms0p04, ms0p0625, ms0p125, ms0p25, ms0p5, ms0p01-v1700, spare1} + OPTIONAL, -- Need R + configuredGrantType1Allowed ENUMERATED {true} OPTIONAL, -- Need R + logicalChannelGroup INTEGER (0..maxLCG-ID) OPTIONAL, -- Need R + schedulingRequestID SchedulingRequestId OPTIONAL, -- Need R + logicalChannelSR-Mask BOOLEAN, + logicalChannelSR-DelayTimerApplied BOOLEAN, + ..., + bitRateQueryProhibitTimer ENUMERATED {s0, s0dot4, s0dot8, s1dot6, s3, s6, s12, s30} OPTIONAL, -- Need R + [[ + allowedCG-List-r16 SEQUENCE (SIZE (0.. maxNrofConfiguredGrantConfigMAC-1-r16)) OF ConfiguredGrantConfigIndexMAC-r16 + OPTIONAL, -- Need S + allowedPHY-PriorityIndex-r16 ENUMERATED {p0, p1} OPTIONAL -- Need S + ]], + [[ + logicalChannelGroupIAB-Ext-r17 INTEGER (0..maxLCG-ID-IAB-r17) OPTIONAL, -- Need R + allowedHARQ-mode-r17 ENUMERATED {harqModeA, harqModeB} OPTIONAL -- Need R + ]] + } OPTIONAL, -- Cond UL + ..., + [[ + channelAccessPriority-r16 INTEGER (1..4) OPTIONAL, -- Need R + bitRateMultiplier-r16 ENUMERATED {x40, x70, x100, x200} OPTIONAL -- Need R + ]] +} + +-- TAG-LOGICALCHANNELCONFIG-STOP +-- TAG-LOGICALCHANNELIDENTITY-START + +LogicalChannelIdentity ::= INTEGER (1..maxLC-ID) + +-- TAG-LOGICALCHANNELIDENTITY-STOP +-- TAG-LTE-NEIGHCELLSCRS-ASSISTINFOLIST-START + +LTE-NeighCellsCRS-AssistInfoList-r17 ::= SEQUENCE (SIZE (1..maxNrofCRS-IM-InterfCell-r17)) OF LTE-NeighCellsCRS-AssistInfo-r17 + +LTE-NeighCellsCRS-AssistInfo-r17 ::= SEQUENCE { + neighCarrierBandwidthDL-r17 ENUMERATED {n6, n15, n25, n50, n75, n100, spare2, spare1} OPTIONAL, -- Cond CRS-IM + neighCarrierFreqDL-r17 INTEGER (0..16383) OPTIONAL, -- Need S + neighCellId-r17 EUTRA-PhysCellId OPTIONAL, -- Need S + neighCRS-muting-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + neighMBSFN-SubframeConfigList-r17 EUTRA-MBSFN-SubframeConfigList OPTIONAL, -- Need S + neighNrofCRS-Ports-r17 ENUMERATED {n1, n2, n4} OPTIONAL, -- Need S + neighV-Shift-r17 ENUMERATED {n0, n1, n2, n3, n4, n5} OPTIONAL -- Cond NotCellID +} + +-- TAG-LTE-NEIGHCELLSCRS-ASSISTINFOLIST-STOP +-- TAG-MAC-CELLGROUPCONFIG-START + +MAC-CellGroupConfig ::= SEQUENCE { + drx-Config SetupRelease { DRX-Config } OPTIONAL, -- Need M + schedulingRequestConfig SchedulingRequestConfig OPTIONAL, -- Need M + bsr-Config BSR-Config OPTIONAL, -- Need M + tag-Config TAG-Config OPTIONAL, -- Need M + phr-Config SetupRelease { PHR-Config } OPTIONAL, -- Need M + skipUplinkTxDynamic BOOLEAN, + ..., + [[ + csi-Mask BOOLEAN OPTIONAL, -- Need M + dataInactivityTimer SetupRelease { DataInactivityTimer } OPTIONAL -- Cond MCG-Only + ]], + [[ + usePreBSR-r16 ENUMERATED {true} OPTIONAL, -- Need R + schedulingRequestID-LBT-SCell-r16 SchedulingRequestId OPTIONAL, -- Need R + lch-BasedPrioritization-r16 ENUMERATED {enabled} OPTIONAL, -- Need R + schedulingRequestID-BFR-SCell-r16 SchedulingRequestId OPTIONAL, -- Need R + drx-ConfigSecondaryGroup-r16 SetupRelease { DRX-ConfigSecondaryGroup-r16 } OPTIONAL -- Need M + ]], + [[ + enhancedSkipUplinkTxDynamic-r16 ENUMERATED {true} OPTIONAL, -- Need R + enhancedSkipUplinkTxConfigured-r16 ENUMERATED {true} OPTIONAL -- Need R + ]], + [[ + intraCG-Prioritization-r17 ENUMERATED {enabled} OPTIONAL, -- Cond LCH-PrioWithReTxTimer + drx-ConfigSL-r17 SetupRelease { DRX-ConfigSL-r17 } OPTIONAL, -- Need M + drx-ConfigExt-v1700 SetupRelease { DRX-ConfigExt-v1700 } OPTIONAL, -- Need M + schedulingRequestID-BFR-r17 SchedulingRequestId OPTIONAL, -- Need R + schedulingRequestID-BFR2-r17 SchedulingRequestId OPTIONAL, -- Need R + schedulingRequestConfig-v1700 SchedulingRequestConfig-v1700 OPTIONAL, -- Need M + tar-Config-r17 SetupRelease { TAR-Config-r17 } OPTIONAL, -- Need M + g-RNTI-ConfigToAddModList-r17 SEQUENCE (SIZE (1..maxG-RNTI-r17)) OF MBS-RNTI-SpecificConfig-r17 OPTIONAL, -- Need N + g-RNTI-ConfigToReleaseList-r17 SEQUENCE (SIZE (1..maxG-RNTI-r17)) OF MBS-RNTI-SpecificConfigId-r17 OPTIONAL, -- Need N + g-CS-RNTI-ConfigToAddModList-r17 SEQUENCE (SIZE (1..maxG-CS-RNTI-r17)) OF MBS-RNTI-SpecificConfig-r17 OPTIONAL, -- Need N + g-CS-RNTI-ConfigToReleaseList-r17 SEQUENCE (SIZE (1..maxG-CS-RNTI-r17)) OF MBS-RNTI-SpecificConfigId-r17 OPTIONAL, -- Need N + allowCSI-SRS-Tx-MulticastDRX-Active-r17 BOOLEAN OPTIONAL -- Need M + ]], + [[ + schedulingRequestID-PosMG-Request-r17 SchedulingRequestId OPTIONAL, -- Need R + drx-LastTransmissionUL-r17 ENUMERATED {enabled} OPTIONAL -- Need R + ]] +} + +DataInactivityTimer ::= ENUMERATED {s1, s2, s3, s5, s7, s10, s15, s20, s40, s50, s60, s80, s100, s120, s150, s180} + +MBS-RNTI-SpecificConfig-r17 ::= SEQUENCE { + mbs-RNTI-SpecificConfigId-r17 MBS-RNTI-SpecificConfigId-r17, + groupCommon-RNTI-r17 CHOICE { + g-RNTI RNTI-Value, + g-CS-RNTI RNTI-Value + }, + drx-ConfigPTM-r17 SetupRelease { DRX-ConfigPTM-r17 } OPTIONAL, -- Need M + harq-FeedbackEnablerMulticast-r17 ENUMERATED {dci-enabler, enabled} OPTIONAL, -- Need S + harq-FeedbackOptionMulticast-r17 ENUMERATED {ack-nack, nack-only} OPTIONAL, -- Cond HARQFeedback + pdsch-AggregationFactor-r17 ENUMERATED {n2, n4, n8} OPTIONAL -- Cond G-RNTI +} + +MBS-RNTI-SpecificConfigId-r17 ::= INTEGER (0..maxG-RNTI-1-r17) + +-- TAG-MAC-CELLGROUPCONFIG-STOP +-- TAG-MEASCONFIG-START + +MeasConfig ::= SEQUENCE { + measObjectToRemoveList MeasObjectToRemoveList OPTIONAL, -- Need N + measObjectToAddModList MeasObjectToAddModList OPTIONAL, -- Need N + reportConfigToRemoveList ReportConfigToRemoveList OPTIONAL, -- Need N + reportConfigToAddModList ReportConfigToAddModList OPTIONAL, -- Need N + measIdToRemoveList MeasIdToRemoveList OPTIONAL, -- Need N + measIdToAddModList MeasIdToAddModList OPTIONAL, -- Need N + s-MeasureConfig CHOICE { + ssb-RSRP RSRP-Range, + csi-RSRP RSRP-Range + } OPTIONAL, -- Need M + quantityConfig QuantityConfig OPTIONAL, -- Need M + measGapConfig MeasGapConfig OPTIONAL, -- Need M + measGapSharingConfig MeasGapSharingConfig OPTIONAL, -- Need M + ..., + [[ + interFrequencyConfig-NoGap-r16 ENUMERATED {true} OPTIONAL -- Need R + ]] +} + +MeasObjectToRemoveList ::= SEQUENCE (SIZE (1..maxNrofObjectId)) OF MeasObjectId + +MeasIdToRemoveList ::= SEQUENCE (SIZE (1..maxNrofMeasId)) OF MeasId + +ReportConfigToRemoveList ::= SEQUENCE (SIZE (1..maxReportConfigId)) OF ReportConfigId + +-- TAG-MEASCONFIG-STOP +-- TAG-MEASGAPCONFIG-START + +MeasGapConfig ::= SEQUENCE { + gapFR2 SetupRelease { GapConfig } OPTIONAL, -- Need M + ..., + [[ + gapFR1 SetupRelease { GapConfig } OPTIONAL, -- Need M + gapUE SetupRelease { GapConfig } OPTIONAL -- Need M + ]], + [[ + gapToAddModList-r17 SEQUENCE (SIZE (1..maxNrofGapId-r17)) OF GapConfig-r17 OPTIONAL, -- Need N + gapToReleaseList-r17 SEQUENCE (SIZE (1..maxNrofGapId-r17)) OF MeasGapId-r17 OPTIONAL, -- Need N + posMeasGapPreConfigToAddModList-r17 PosMeasGapPreConfigToAddModList-r17 OPTIONAL, -- Need N + posMeasGapPreConfigToReleaseList-r17 PosMeasGapPreConfigToReleaseList-r17 OPTIONAL -- Need N + ]] + +} + +GapConfig ::= SEQUENCE { + gapOffset INTEGER (0..159), + mgl ENUMERATED {ms1dot5, ms3, ms3dot5, ms4, ms5dot5, ms6}, + mgrp ENUMERATED {ms20, ms40, ms80, ms160}, + mgta ENUMERATED {ms0, ms0dot25, ms0dot5}, + ..., + [[ + refServCellIndicator ENUMERATED {pCell, pSCell, mcg-FR2} OPTIONAL -- Cond NEDCorNRDC + ]], + [[ + refFR2ServCellAsyncCA-r16 ServCellIndex OPTIONAL, -- Cond AsyncCA + mgl-r16 ENUMERATED {ms10, ms20} OPTIONAL -- Cond PRS + ]] +} + +GapConfig-r17 ::= SEQUENCE { + measGapId-r17 MeasGapId-r17, + gapType-r17 ENUMERATED {perUE, perFR1, perFR2}, + gapOffset-r17 INTEGER (0..159), + mgl-r17 ENUMERATED {ms1, ms1dot5, ms2, ms3, ms3dot5, ms4, ms5, ms5dot5, ms6, ms10, ms20}, + mgrp-r17 ENUMERATED {ms20, ms40, ms80, ms160}, + mgta-r17 ENUMERATED {ms0, ms0dot25, ms0dot5, ms0dot75}, + refServCellIndicator-r17 ENUMERATED {pCell, pSCell, mcg-FR2} OPTIONAL, -- Cond NEDCorNRDC + refFR2-ServCellAsyncCA-r17 ServCellIndex OPTIONAL, -- Cond AsyncCA + preConfigInd-r17 ENUMERATED {true} OPTIONAL, -- Need R + ncsgInd-r17 ENUMERATED {true} OPTIONAL, -- Need R + gapAssociationPRS-r17 ENUMERATED {true} OPTIONAL, -- Need R + gapSharing-r17 MeasGapSharingScheme OPTIONAL, -- Need R + gapPriority-r17 GapPriority-r17 OPTIONAL, -- Need R + ... +} + +PosMeasGapPreConfigToAddModList-r17 ::= SEQUENCE (SIZE (1..maxNrofPreConfigPosGapId-r17)) OF PosGapConfig-r17 + +PosMeasGapPreConfigToReleaseList-r17 ::= SEQUENCE (SIZE (1..maxNrofPreConfigPosGapId-r17)) OF MeasPosPreConfigGapId-r17 + +PosGapConfig-r17 ::= SEQUENCE { + measPosPreConfigGapId-r17 MeasPosPreConfigGapId-r17, + gapOffset-r17 INTEGER (0..159), + mgl-r17 ENUMERATED {ms1dot5, ms3, ms3dot5, ms4, ms5dot5, ms6, ms10, ms20}, + mgrp-r17 ENUMERATED {ms20, ms40, ms80, ms160}, + mgta-r17 ENUMERATED {ms0, ms0dot25, ms0dot5}, + gapType-r17 ENUMERATED {perUE, perFR1, perFR2}, + ... +} + +MeasPosPreConfigGapId-r17 ::= INTEGER (1..maxNrofPreConfigPosGapId-r17) + +-- TAG-MEASGAPCONFIG-STOP +-- TAG-MEASGAPID-START + +MeasGapId-r17 ::= INTEGER (1..maxNrofGapId-r17) + +-- TAG-MEASGAPID-STOP +-- TAG-MEASGAPSHARINGCONFIG-START + +MeasGapSharingConfig ::= SEQUENCE { + gapSharingFR2 SetupRelease { MeasGapSharingScheme } OPTIONAL, -- Need M + ..., + [[ + gapSharingFR1 SetupRelease { MeasGapSharingScheme } OPTIONAL, --Need M + gapSharingUE SetupRelease { MeasGapSharingScheme } OPTIONAL --Need M + ]] +} + +MeasGapSharingScheme::= ENUMERATED {scheme00, scheme01, scheme10, scheme11} + +-- TAG-MEASGAPSHARINGCONFIG-STOP +-- TAG-MEASID-START + +MeasId ::= INTEGER (1..maxNrofMeasId) + +-- TAG-MEASID-STOP +-- TAG-MEASIDLECONFIG-START + +MeasIdleConfigSIB-r16 ::= SEQUENCE { + measIdleCarrierListNR-r16 SEQUENCE (SIZE (1..maxFreqIdle-r16)) OF MeasIdleCarrierNR-r16 OPTIONAL, -- Need S + measIdleCarrierListEUTRA-r16 SEQUENCE (SIZE (1..maxFreqIdle-r16)) OF MeasIdleCarrierEUTRA-r16 OPTIONAL, -- Need S + ... +} + +MeasIdleConfigDedicated-r16 ::= SEQUENCE { + measIdleCarrierListNR-r16 SEQUENCE (SIZE (1..maxFreqIdle-r16)) OF MeasIdleCarrierNR-r16 OPTIONAL, -- Need N + measIdleCarrierListEUTRA-r16 SEQUENCE (SIZE (1..maxFreqIdle-r16)) OF MeasIdleCarrierEUTRA-r16 OPTIONAL, -- Need N + measIdleDuration-r16 ENUMERATED{sec10, sec30, sec60, sec120, sec180, sec240, sec300, spare}, + validityAreaList-r16 ValidityAreaList-r16 OPTIONAL, -- Need N + ... +} + +ValidityAreaList-r16 ::= SEQUENCE (SIZE (1..maxFreqIdle-r16)) OF ValidityArea-r16 + +ValidityArea-r16 ::= SEQUENCE { + carrierFreq-r16 ARFCN-ValueNR, + validityCellList-r16 ValidityCellList OPTIONAL -- Need N +} + +ValidityCellList ::= SEQUENCE (SIZE (1.. maxCellMeasIdle-r16)) OF PCI-Range + +MeasIdleCarrierNR-r16 ::= SEQUENCE { + carrierFreq-r16 ARFCN-ValueNR, + ssbSubcarrierSpacing-r16 SubcarrierSpacing, + frequencyBandList MultiFrequencyBandListNR OPTIONAL, -- Need R + measCellListNR-r16 CellListNR-r16 OPTIONAL, -- Need R + reportQuantities-r16 ENUMERATED {rsrp, rsrq, both}, + qualityThreshold-r16 SEQUENCE { + idleRSRP-Threshold-NR-r16 RSRP-Range OPTIONAL, -- Need R + idleRSRQ-Threshold-NR-r16 RSRQ-Range OPTIONAL -- Need R + } OPTIONAL, -- Need R + ssb-MeasConfig-r16 SEQUENCE { + nrofSS-BlocksToAverage-r16 INTEGER (2..maxNrofSS-BlocksToAverage) OPTIONAL, -- Need S + absThreshSS-BlocksConsolidation-r16 ThresholdNR OPTIONAL, -- Need S + smtc-r16 SSB-MTC OPTIONAL, -- Need S + ssb-ToMeasure-r16 SSB-ToMeasure OPTIONAL, -- Need S + deriveSSB-IndexFromCell-r16 BOOLEAN, + ss-RSSI-Measurement-r16 SS-RSSI-Measurement OPTIONAL -- Need S + } OPTIONAL, -- Need S + beamMeasConfigIdle-r16 BeamMeasConfigIdle-NR-r16 OPTIONAL, -- Need R + ... +} + +MeasIdleCarrierEUTRA-r16 ::= SEQUENCE { + carrierFreqEUTRA-r16 ARFCN-ValueEUTRA, + allowedMeasBandwidth-r16 EUTRA-AllowedMeasBandwidth, + measCellListEUTRA-r16 CellListEUTRA-r16 OPTIONAL, -- Need R + reportQuantitiesEUTRA-r16 ENUMERATED {rsrp, rsrq, both}, + qualityThresholdEUTRA-r16 SEQUENCE { + idleRSRP-Threshold-EUTRA-r16 RSRP-RangeEUTRA OPTIONAL, -- Need R + idleRSRQ-Threshold-EUTRA-r16 RSRQ-RangeEUTRA-r16 OPTIONAL -- Need R + } OPTIONAL, -- Need S + ... +} + +CellListNR-r16 ::= SEQUENCE (SIZE (1..maxCellMeasIdle-r16)) OF PCI-Range + +CellListEUTRA-r16 ::= SEQUENCE (SIZE (1..maxCellMeasIdle-r16)) OF EUTRA-PhysCellIdRange + +BeamMeasConfigIdle-NR-r16 ::= SEQUENCE { + reportQuantityRS-Indexes-r16 ENUMERATED {rsrp, rsrq, both}, + maxNrofRS-IndexesToReport-r16 INTEGER (1.. maxNrofIndexesToReport), + includeBeamMeasurements-r16 BOOLEAN +} + +RSRQ-RangeEUTRA-r16 ::= INTEGER (-30..46) + +-- TAG-MEASIDLECONFIG-STOP +-- TAG-MEASIDTOADDMODLIST-START + +MeasIdToAddModList ::= SEQUENCE (SIZE (1..maxNrofMeasId)) OF MeasIdToAddMod + +MeasIdToAddMod ::= SEQUENCE { + measId MeasId, + measObjectId MeasObjectId, + reportConfigId ReportConfigId +} + +-- TAG-MEASIDTOADDMODLIST-STOP +-- TAG-MEASOBJECTCLI-START + +MeasObjectCLI-r16 ::= SEQUENCE { + cli-ResourceConfig-r16 CLI-ResourceConfig-r16, + ... +} + +CLI-ResourceConfig-r16 ::= SEQUENCE { + srs-ResourceConfig-r16 SetupRelease { SRS-ResourceListConfigCLI-r16 } OPTIONAL, -- Need M + rssi-ResourceConfig-r16 SetupRelease { RSSI-ResourceListConfigCLI-r16 } OPTIONAL -- Need M +} + +SRS-ResourceListConfigCLI-r16 ::= SEQUENCE (SIZE (1.. maxNrofCLI-SRS-Resources-r16)) OF SRS-ResourceConfigCLI-r16 + +RSSI-ResourceListConfigCLI-r16 ::= SEQUENCE (SIZE (1.. maxNrofCLI-RSSI-Resources-r16)) OF RSSI-ResourceConfigCLI-r16 + +SRS-ResourceConfigCLI-r16 ::= SEQUENCE { + srs-Resource-r16 SRS-Resource, + srs-SCS-r16 SubcarrierSpacing, + refServCellIndex-r16 ServCellIndex OPTIONAL, -- Need S + refBWP-r16 BWP-Id, + ... +} + +RSSI-ResourceConfigCLI-r16 ::= SEQUENCE { + rssi-ResourceId-r16 RSSI-ResourceId-r16, + rssi-SCS-r16 SubcarrierSpacing, + startPRB-r16 INTEGER (0..2169), + nrofPRBs-r16 INTEGER (4..maxNrofPhysicalResourceBlocksPlus1), + startPosition-r16 INTEGER (0..13), + nrofSymbols-r16 INTEGER (1..14), + rssi-PeriodicityAndOffset-r16 RSSI-PeriodicityAndOffset-r16, + refServCellIndex-r16 ServCellIndex OPTIONAL, -- Need S + ... +} + +RSSI-ResourceId-r16 ::= INTEGER (0.. maxNrofCLI-RSSI-Resources-1-r16) + +RSSI-PeriodicityAndOffset-r16 ::= CHOICE { + sl10 INTEGER(0..9), + sl20 INTEGER(0..19), + sl40 INTEGER(0..39), + sl80 INTEGER(0..79), + sl160 INTEGER(0..159), + sl320 INTEGER(0..319), + s1640 INTEGER(0..639), + ... +} + +-- TAG-MEASOBJECTCLI-STOP +-- TAG-MEASOBJECTEUTRA-START + +MeasObjectEUTRA::= SEQUENCE { + carrierFreq ARFCN-ValueEUTRA, + allowedMeasBandwidth EUTRA-AllowedMeasBandwidth, + cellsToRemoveListEUTRAN EUTRA-CellIndexList OPTIONAL, -- Need N + cellsToAddModListEUTRAN SEQUENCE (SIZE (1..maxCellMeasEUTRA)) OF EUTRA-Cell OPTIONAL, -- Need N + excludedCellsToRemoveListEUTRAN EUTRA-CellIndexList OPTIONAL, -- Need N + excludedCellsToAddModListEUTRAN SEQUENCE (SIZE (1..maxCellMeasEUTRA)) OF EUTRA-ExcludedCell OPTIONAL, -- Need N + eutra-PresenceAntennaPort1 EUTRA-PresenceAntennaPort1, + eutra-Q-OffsetRange EUTRA-Q-OffsetRange OPTIONAL, -- Need R + widebandRSRQ-Meas BOOLEAN, + ..., + [[ + associatedMeasGap-r17 MeasGapId-r17 OPTIONAL -- Need R + ]] +} + +EUTRA-CellIndexList ::= SEQUENCE (SIZE (1..maxCellMeasEUTRA)) OF EUTRA-CellIndex + +EUTRA-CellIndex ::= INTEGER (1..maxCellMeasEUTRA) + + +EUTRA-Cell ::= SEQUENCE { + cellIndexEUTRA EUTRA-CellIndex, + physCellId EUTRA-PhysCellId, + cellIndividualOffset EUTRA-Q-OffsetRange +} + + +EUTRA-ExcludedCell ::= SEQUENCE { + cellIndexEUTRA EUTRA-CellIndex, + physCellIdRange EUTRA-PhysCellIdRange +} + +-- TAG-MEASOBJECTEUTRA-STOP +-- TAG-MEASOBJECTID-START + +MeasObjectId ::= INTEGER (1..maxNrofObjectId) + +-- TAG-MEASOBJECTID-STOP +-- TAG-MEASOBJECTNR-START + +MeasObjectNR ::= SEQUENCE { + ssbFrequency ARFCN-ValueNR OPTIONAL, -- Cond SSBorAssociatedSSB + ssbSubcarrierSpacing SubcarrierSpacing OPTIONAL, -- Cond SSBorAssociatedSSB + smtc1 SSB-MTC OPTIONAL, -- Cond SSBorAssociatedSSB + smtc2 SSB-MTC2 OPTIONAL, -- Cond IntraFreqConnected + refFreqCSI-RS ARFCN-ValueNR OPTIONAL, -- Cond CSI-RS + referenceSignalConfig ReferenceSignalConfig, + absThreshSS-BlocksConsolidation ThresholdNR OPTIONAL, -- Need R + absThreshCSI-RS-Consolidation ThresholdNR OPTIONAL, -- Need R + nrofSS-BlocksToAverage INTEGER (2..maxNrofSS-BlocksToAverage) OPTIONAL, -- Need R + nrofCSI-RS-ResourcesToAverage INTEGER (2..maxNrofCSI-RS-ResourcesToAverage) OPTIONAL, -- Need R + quantityConfigIndex INTEGER (1..maxNrofQuantityConfig), + offsetMO Q-OffsetRangeList, + cellsToRemoveList PCI-List OPTIONAL, -- Need N + cellsToAddModList CellsToAddModList OPTIONAL, -- Need N + excludedCellsToRemoveList PCI-RangeIndexList OPTIONAL, -- Need N + excludedCellsToAddModList SEQUENCE (SIZE (1..maxNrofPCI-Ranges)) OF PCI-RangeElement OPTIONAL, -- Need N + allowedCellsToRemoveList PCI-RangeIndexList OPTIONAL, -- Need N + allowedCellsToAddModList SEQUENCE (SIZE (1..maxNrofPCI-Ranges)) OF PCI-RangeElement OPTIONAL, -- Need N + ..., + [[ + freqBandIndicatorNR FreqBandIndicatorNR OPTIONAL, -- Need R + measCycleSCell ENUMERATED {sf160, sf256, sf320, sf512, sf640, sf1024, sf1280} OPTIONAL -- Need R + ]], + [[ + smtc3list-r16 SSB-MTC3List-r16 OPTIONAL, -- Need R + rmtc-Config-r16 SetupRelease {RMTC-Config-r16} OPTIONAL, -- Need M + t312-r16 SetupRelease { T312-r16 } OPTIONAL -- Need M + ]], + [[ + associatedMeasGapSSB-r17 MeasGapId-r17 OPTIONAL, -- Need R + associatedMeasGapCSIRS-r17 MeasGapId-r17 OPTIONAL, -- Need R + smtc4list-r17 SSB-MTC4List-r17 OPTIONAL, -- Need R + measCyclePSCell-r17 ENUMERATED {ms160, ms256, ms320, ms512, ms640, ms1024, ms1280, spare1} + OPTIONAL, -- Cond SCG + cellsToAddModListExt-v1710 CellsToAddModListExt-v1710 OPTIONAL -- Need N + ]], + [[ + associatedMeasGapSSB2-v1720 MeasGapId-r17 OPTIONAL, -- Cond AssociatedGapSSB + associatedMeasGapCSIRS2-v1720 MeasGapId-r17 OPTIONAL -- Cond AssociatedGapCSIRS + ]] +} + +SSB-MTC3List-r16::= SEQUENCE (SIZE(1..4)) OF SSB-MTC3-r16 + +SSB-MTC4List-r17::= SEQUENCE (SIZE(1..3)) OF SSB-MTC4-r17 + +T312-r16 ::= ENUMERATED { ms0, ms50, ms100, ms200, ms300, ms400, ms500, ms1000} + +ReferenceSignalConfig::= SEQUENCE { + ssb-ConfigMobility SSB-ConfigMobility OPTIONAL, -- Need M + csi-rs-ResourceConfigMobility SetupRelease { CSI-RS-ResourceConfigMobility } OPTIONAL -- Need M +} + +SSB-ConfigMobility::= SEQUENCE { + ssb-ToMeasure SetupRelease { SSB-ToMeasure } OPTIONAL, -- Need M + deriveSSB-IndexFromCell BOOLEAN, + ss-RSSI-Measurement SS-RSSI-Measurement OPTIONAL, -- Need M + ..., + [[ + ssb-PositionQCL-Common-r16 SSB-PositionQCL-Relation-r16 OPTIONAL, -- Cond SharedSpectrum + ssb-PositionQCL-CellsToAddModList-r16 SSB-PositionQCL-CellsToAddModList-r16 OPTIONAL, -- Need N + ssb-PositionQCL-CellsToRemoveList-r16 PCI-List OPTIONAL -- Need N + ]], + [[ + deriveSSB-IndexFromCellInter-r17 ServCellIndex OPTIONAL, -- Need R + ssb-PositionQCL-Common-r17 SSB-PositionQCL-Relation-r17 OPTIONAL, -- Cond SharedSpectrum2 + ssb-PositionQCL-Cells-r17 SetupRelease {SSB-PositionQCL-CellList-r17} OPTIONAL -- Need M + ]], + [[ + cca-CellsToAddModList-r17 PCI-List OPTIONAL, -- Need N + cca-CellsToRemoveList-r17 PCI-List OPTIONAL -- Need N + ]] +} + +Q-OffsetRangeList ::= SEQUENCE { + rsrpOffsetSSB Q-OffsetRange DEFAULT dB0, + rsrqOffsetSSB Q-OffsetRange DEFAULT dB0, + sinrOffsetSSB Q-OffsetRange DEFAULT dB0, + rsrpOffsetCSI-RS Q-OffsetRange DEFAULT dB0, + rsrqOffsetCSI-RS Q-OffsetRange DEFAULT dB0, + sinrOffsetCSI-RS Q-OffsetRange DEFAULT dB0 +} + + +ThresholdNR ::= SEQUENCE{ + thresholdRSRP RSRP-Range OPTIONAL, -- Need R + thresholdRSRQ RSRQ-Range OPTIONAL, -- Need R + thresholdSINR SINR-Range OPTIONAL -- Need R +} + +CellsToAddModList ::= SEQUENCE (SIZE (1..maxNrofCellMeas)) OF CellsToAddMod + +CellsToAddModListExt-v1710 ::= SEQUENCE (SIZE (1..maxNrofCellMeas)) OF CellsToAddModExt-v1710 + +CellsToAddMod ::= SEQUENCE { + physCellId PhysCellId, + cellIndividualOffset Q-OffsetRangeList +} + +CellsToAddModExt-v1710 ::= SEQUENCE { + ntn-PolarizationDL-r17 ENUMERATED {rhcp,lhcp,linear} OPTIONAL, -- Need R + ntn-PolarizationUL-r17 ENUMERATED {rhcp,lhcp,linear} OPTIONAL -- Need R +} + +RMTC-Config-r16 ::= SEQUENCE { + rmtc-Periodicity-r16 ENUMERATED {ms40, ms80, ms160, ms320, ms640}, + rmtc-SubframeOffset-r16 INTEGER(0..639) OPTIONAL, -- Need M + measDurationSymbols-r16 ENUMERATED {sym1, sym14or12, sym28or24, sym42or36, sym70or60}, + rmtc-Frequency-r16 ARFCN-ValueNR, + ref-SCS-CP-r16 ENUMERATED {kHz15, kHz30, kHz60-NCP, kHz60-ECP}, + ..., + [[ + rmtc-Bandwidth-r17 ENUMERATED {mhz100, mhz400, mhz800, mhz1600, mhz2000} OPTIONAL, -- Need R + measDurationSymbols-v1700 ENUMERATED {sym140, sym560, sym1120} OPTIONAL, -- Need R + ref-SCS-CP-v1700 ENUMERATED {kHz120, kHz480, kHz960} OPTIONAL, -- Need R + tci-StateInfo-r17 SEQUENCE { + tci-StateId-r17 TCI-StateId, + ref-ServCellId-r17 ServCellIndex OPTIONAL -- Need R + } OPTIONAL -- Need R + ]], + [[ + ref-BWPId-r17 BWP-Id OPTIONAL -- Need R + ]] +} + +SSB-PositionQCL-CellsToAddModList-r16 ::= SEQUENCE (SIZE (1..maxNrofCellMeas)) OF SSB-PositionQCL-CellsToAddMod-r16 + +SSB-PositionQCL-CellsToAddMod-r16 ::= SEQUENCE { + physCellId-r16 PhysCellId, + ssb-PositionQCL-r16 SSB-PositionQCL-Relation-r16 +} + +SSB-PositionQCL-CellList-r17 ::= SEQUENCE (SIZE (1..maxNrofCellMeas)) OF SSB-PositionQCL-Cell-r17 + +SSB-PositionQCL-Cell-r17 ::= SEQUENCE { + physCellId-r17 PhysCellId, + ssb-PositionQCL-r17 SSB-PositionQCL-Relation-r17 +} + +-- TAG-MEASOBJECTNR-STOP +-- TAG-MEASOBJECTNR-SL-START + +MeasObjectNR-SL-r16 ::= SEQUENCE { + tx-PoolMeasToRemoveList-r16 Tx-PoolMeasList-r16 OPTIONAL, -- Need N + tx-PoolMeasToAddModList-r16 Tx-PoolMeasList-r16 OPTIONAL -- Need N +} + +Tx-PoolMeasList-r16 ::= SEQUENCE (SIZE (1..maxNrofSL-PoolToMeasureNR-r16)) OF SL-ResourcePoolID-r16 + +-- TAG-MEASOBJECTNR-SL-STOP +-- TAG-MEASOBJECTRXTXDIFF-START + + +MeasObjectRxTxDiff-r17 ::= SEQUENCE { + dl-Ref-r17 CHOICE { + prs-Ref-r17 NULL, + csi-RS-Ref-r17 NULL, + ... + } OPTIONAL, -- Need R + ... +} + +-- TAG-MEASOBJECTRXTXDIFF-STOP +-- TAG-MEASOBJECTTOADDMODLIST-START + +MeasObjectToAddModList ::= SEQUENCE (SIZE (1..maxNrofObjectId)) OF MeasObjectToAddMod + +MeasObjectToAddMod ::= SEQUENCE { + measObjectId MeasObjectId, + measObject CHOICE { + measObjectNR MeasObjectNR, + ..., + measObjectEUTRA MeasObjectEUTRA, + measObjectUTRA-FDD-r16 MeasObjectUTRA-FDD-r16, + measObjectNR-SL-r16 MeasObjectNR-SL-r16, + measObjectCLI-r16 MeasObjectCLI-r16, + measObjectRxTxDiff-r17 MeasObjectRxTxDiff-r17, + measObjectRelay-r17 SL-MeasObject-r16 + } +} + +-- TAG-MEASOBJECTTOADDMODLIST-STOP +-- TAG-MEASOBJECTUTRA-FDD-START + +MeasObjectUTRA-FDD-r16 ::= SEQUENCE { + carrierFreq-r16 ARFCN-ValueUTRA-FDD-r16, + utra-FDD-Q-OffsetRange-r16 UTRA-FDD-Q-OffsetRange-r16 OPTIONAL, -- Need R + cellsToRemoveList-r16 UTRA-FDD-CellIndexList-r16 OPTIONAL, -- Need N + cellsToAddModList-r16 CellsToAddModListUTRA-FDD-r16 OPTIONAL, -- Need N + ... +} + +CellsToAddModListUTRA-FDD-r16 ::= SEQUENCE (SIZE (1..maxCellMeasUTRA-FDD-r16)) OF CellsToAddModUTRA-FDD-r16 + +CellsToAddModUTRA-FDD-r16 ::= SEQUENCE { + cellIndexUTRA-FDD-r16 UTRA-FDD-CellIndex-r16, + physCellId-r16 PhysCellIdUTRA-FDD-r16 +} + +UTRA-FDD-CellIndexList-r16 ::= SEQUENCE (SIZE (1..maxCellMeasUTRA-FDD-r16)) OF UTRA-FDD-CellIndex-r16 + +UTRA-FDD-CellIndex-r16 ::= INTEGER (1..maxCellMeasUTRA-FDD-r16) + +-- TAG-MEASOBJECTUTRA-FDD-STOP +-- TAG-MEASRESULTCELLLISTSFTD-NR-START + +MeasResultCellListSFTD-NR ::= SEQUENCE (SIZE (1..maxCellSFTD)) OF MeasResultCellSFTD-NR + +MeasResultCellSFTD-NR ::= SEQUENCE { + physCellId PhysCellId, + sfn-OffsetResult INTEGER (0..1023), + frameBoundaryOffsetResult INTEGER (-30720..30719), + rsrp-Result RSRP-Range OPTIONAL +} + +-- TAG-MEASRESULTCELLLISTSFTD-NR-STOP +-- TAG-MEASRESULTCELLLISTSFTD-EUTRA-START + +MeasResultCellListSFTD-EUTRA ::= SEQUENCE (SIZE (1..maxCellSFTD)) OF MeasResultSFTD-EUTRA + +MeasResultSFTD-EUTRA ::= SEQUENCE { + eutra-PhysCellId EUTRA-PhysCellId, + sfn-OffsetResult INTEGER (0..1023), + frameBoundaryOffsetResult INTEGER (-30720..30719), + rsrp-Result RSRP-Range OPTIONAL +} + +-- TAG-MEASRESULTCELLLISTSFTD-EUTRA-STOP +-- TAG-MEASRESULTS-START + +MeasResults ::= SEQUENCE { + measId MeasId, + measResultServingMOList MeasResultServMOList, + measResultNeighCells CHOICE { + measResultListNR MeasResultListNR, + ..., + measResultListEUTRA MeasResultListEUTRA, + measResultListUTRA-FDD-r16 MeasResultListUTRA-FDD-r16, + sl-MeasResultsCandRelay-r17 OCTET STRING -- Contains PC5 SL-MeasResultListRelay-r17 + } OPTIONAL, + ..., + [[ + measResultServFreqListEUTRA-SCG MeasResultServFreqListEUTRA-SCG OPTIONAL, + measResultServFreqListNR-SCG MeasResultServFreqListNR-SCG OPTIONAL, + measResultSFTD-EUTRA MeasResultSFTD-EUTRA OPTIONAL, + measResultSFTD-NR MeasResultCellSFTD-NR OPTIONAL + ]], + [[ + measResultCellListSFTD-NR MeasResultCellListSFTD-NR OPTIONAL + ]], + [[ + measResultForRSSI-r16 MeasResultForRSSI-r16 OPTIONAL, + locationInfo-r16 LocationInfo-r16 OPTIONAL, + ul-PDCP-DelayValueResultList-r16 UL-PDCP-DelayValueResultList-r16 OPTIONAL, + measResultsSL-r16 MeasResultsSL-r16 OPTIONAL, + measResultCLI-r16 MeasResultCLI-r16 OPTIONAL + ]], + [[ + measResultRxTxTimeDiff-r17 MeasResultRxTxTimeDiff-r17 OPTIONAL, + sl-MeasResultServingRelay-r17 OCTET STRING OPTIONAL, + -- Contains PC5 SL-MeasResultRelay-r17 + ul-PDCP-ExcessDelayResultList-r17 UL-PDCP-ExcessDelayResultList-r17 OPTIONAL, + coarseLocationInfo-r17 OCTET STRING OPTIONAL + ]] +} + +MeasResultServMOList ::= SEQUENCE (SIZE (1..maxNrofServingCells)) OF MeasResultServMO + +MeasResultServMO ::= SEQUENCE { + servCellId ServCellIndex, + measResultServingCell MeasResultNR, + measResultBestNeighCell MeasResultNR OPTIONAL, + ... +} + +MeasResultListNR ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultNR + +MeasResultNR ::= SEQUENCE { + physCellId PhysCellId OPTIONAL, + measResult SEQUENCE { + cellResults SEQUENCE{ + resultsSSB-Cell MeasQuantityResults OPTIONAL, + resultsCSI-RS-Cell MeasQuantityResults OPTIONAL + }, + rsIndexResults SEQUENCE{ + resultsSSB-Indexes ResultsPerSSB-IndexList OPTIONAL, + resultsCSI-RS-Indexes ResultsPerCSI-RS-IndexList OPTIONAL + } OPTIONAL + }, + ..., + [[ + cgi-Info CGI-InfoNR OPTIONAL + ]] , + [[ + choCandidate-r17 ENUMERATED {true} OPTIONAL, + choConfig-r17 SEQUENCE (SIZE (1..2)) OF CondTriggerConfig-r16 OPTIONAL, + triggeredEvent-r17 SEQUENCE { + timeBetweenEvents-r17 TimeBetweenEvent-r17 OPTIONAL, + firstTriggeredEvent ENUMERATED {condFirstEvent, condSecondEvent} OPTIONAL + } OPTIONAL + ]] +} + +MeasResultListEUTRA ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultEUTRA + +MeasResultEUTRA ::= SEQUENCE { + eutra-PhysCellId PhysCellId, + measResult MeasQuantityResultsEUTRA, + + cgi-Info CGI-InfoEUTRA OPTIONAL, + ... +} + +MultiBandInfoListEUTRA ::= SEQUENCE (SIZE (1..maxMultiBands)) OF FreqBandIndicatorEUTRA + +MeasQuantityResults ::= SEQUENCE { + rsrp RSRP-Range OPTIONAL, + rsrq RSRQ-Range OPTIONAL, + sinr SINR-Range OPTIONAL +} + +MeasQuantityResultsEUTRA ::= SEQUENCE { + rsrp RSRP-RangeEUTRA OPTIONAL, + rsrq RSRQ-RangeEUTRA OPTIONAL, + sinr SINR-RangeEUTRA OPTIONAL +} + +ResultsPerSSB-IndexList::= SEQUENCE (SIZE (1..maxNrofIndexesToReport2)) OF ResultsPerSSB-Index + +ResultsPerSSB-Index ::= SEQUENCE { + ssb-Index SSB-Index, + ssb-Results MeasQuantityResults OPTIONAL +} + +ResultsPerCSI-RS-IndexList::= SEQUENCE (SIZE (1..maxNrofIndexesToReport2)) OF ResultsPerCSI-RS-Index + +ResultsPerCSI-RS-Index ::= SEQUENCE { + csi-RS-Index CSI-RS-Index, + csi-RS-Results MeasQuantityResults OPTIONAL +} +MeasResultServFreqListEUTRA-SCG ::= SEQUENCE (SIZE (1..maxNrofServingCellsEUTRA)) OF MeasResult2EUTRA + +MeasResultServFreqListNR-SCG ::= SEQUENCE (SIZE (1..maxNrofServingCells)) OF MeasResult2NR + +MeasResultListUTRA-FDD-r16 ::= SEQUENCE (SIZE (1..maxCellReport)) OF MeasResultUTRA-FDD-r16 + +MeasResultUTRA-FDD-r16 ::= SEQUENCE { + physCellId-r16 PhysCellIdUTRA-FDD-r16, + measResult-r16 SEQUENCE { + utra-FDD-RSCP-r16 INTEGER (-5..91) OPTIONAL, + utra-FDD-EcN0-r16 INTEGER (0..49) OPTIONAL + } +} + +MeasResultForRSSI-r16 ::= SEQUENCE { + rssi-Result-r16 RSSI-Range-r16, + channelOccupancy-r16 INTEGER (0..100) +} + +MeasResultCLI-r16 ::= SEQUENCE { + measResultListSRS-RSRP-r16 MeasResultListSRS-RSRP-r16 OPTIONAL, + measResultListCLI-RSSI-r16 MeasResultListCLI-RSSI-r16 OPTIONAL +} + +MeasResultListSRS-RSRP-r16 ::= SEQUENCE (SIZE (1.. maxCLI-Report-r16)) OF MeasResultSRS-RSRP-r16 + +MeasResultSRS-RSRP-r16 ::= SEQUENCE { + srs-ResourceId-r16 SRS-ResourceId, + srs-RSRP-Result-r16 SRS-RSRP-Range-r16 +} + +MeasResultListCLI-RSSI-r16 ::= SEQUENCE (SIZE (1.. maxCLI-Report-r16)) OF MeasResultCLI-RSSI-r16 + +MeasResultCLI-RSSI-r16 ::= SEQUENCE { + rssi-ResourceId-r16 RSSI-ResourceId-r16, + cli-RSSI-Result-r16 CLI-RSSI-Range-r16 +} + +UL-PDCP-DelayValueResultList-r16 ::= SEQUENCE (SIZE (1..maxDRB)) OF UL-PDCP-DelayValueResult-r16 + +UL-PDCP-DelayValueResult-r16 ::= SEQUENCE { + drb-Id-r16 DRB-Identity, + averageDelay-r16 INTEGER (0..10000), + ... +} + +UL-PDCP-ExcessDelayResultList-r17 ::= SEQUENCE (SIZE (1..maxDRB)) OF UL-PDCP-ExcessDelayResult-r17 + +UL-PDCP-ExcessDelayResult-r17 ::= SEQUENCE { + drb-Id-r17 DRB-Identity, + excessDelay-r17 INTEGER (0..31), + ... +} + +TimeBetweenEvent-r17 ::= INTEGER (0..1023) + +-- TAG-MEASRESULTS-STOP +-- TAG-MEASRESULT2EUTRA-START + +MeasResult2EUTRA ::= SEQUENCE { + carrierFreq ARFCN-ValueEUTRA, + measResultServingCell MeasResultEUTRA OPTIONAL, + measResultBestNeighCell MeasResultEUTRA OPTIONAL, + ... +} + +-- TAG-MEASRESULT2EUTRA-STOP +-- TAG-MEASRESULT2NR-START + +MeasResult2NR ::= SEQUENCE { + ssbFrequency ARFCN-ValueNR OPTIONAL, + refFreqCSI-RS ARFCN-ValueNR OPTIONAL, + measResultServingCell MeasResultNR OPTIONAL, + measResultNeighCellListNR MeasResultListNR OPTIONAL, + ... +} + +-- TAG-MEASRESULT2NR-STOP +-- TAG-MEASRESULTIDLEEUTRA-START + +MeasResultIdleEUTRA-r16 ::= SEQUENCE { + measResultsPerCarrierListIdleEUTRA-r16 SEQUENCE (SIZE (1.. maxFreqIdle-r16)) OF MeasResultsPerCarrierIdleEUTRA-r16, + ... +} + +MeasResultsPerCarrierIdleEUTRA-r16 ::= SEQUENCE { + carrierFreqEUTRA-r16 ARFCN-ValueEUTRA, + measResultsPerCellListIdleEUTRA-r16 SEQUENCE (SIZE (1..maxCellMeasIdle-r16)) OF MeasResultsPerCellIdleEUTRA-r16, + ... +} + +MeasResultsPerCellIdleEUTRA-r16 ::= SEQUENCE { + eutra-PhysCellId-r16 EUTRA-PhysCellId, + measIdleResultEUTRA-r16 SEQUENCE { + rsrp-ResultEUTRA-r16 RSRP-RangeEUTRA OPTIONAL, + rsrq-ResultEUTRA-r16 RSRQ-RangeEUTRA-r16 OPTIONAL + }, + ... +} + +-- TAG-MEASRESULTIDLEEUTRA-STOP +-- TAG-MEASRESULTIDLENR-START + +MeasResultIdleNR-r16 ::= SEQUENCE { + measResultServingCell-r16 SEQUENCE { + rsrp-Result-r16 RSRP-Range OPTIONAL, + rsrq-Result-r16 RSRQ-Range OPTIONAL, + resultsSSB-Indexes-r16 ResultsPerSSB-IndexList-r16 OPTIONAL + }, + measResultsPerCarrierListIdleNR-r16 SEQUENCE (SIZE (1.. maxFreqIdle-r16)) OF MeasResultsPerCarrierIdleNR-r16 OPTIONAL, + ... +} + +MeasResultsPerCarrierIdleNR-r16 ::= SEQUENCE { + carrierFreq-r16 ARFCN-ValueNR, + measResultsPerCellListIdleNR-r16 SEQUENCE (SIZE (1..maxCellMeasIdle-r16)) OF MeasResultsPerCellIdleNR-r16, + ... +} + +MeasResultsPerCellIdleNR-r16 ::= SEQUENCE { + physCellId-r16 PhysCellId, + measIdleResultNR-r16 SEQUENCE { + rsrp-Result-r16 RSRP-Range OPTIONAL, + rsrq-Result-r16 RSRQ-Range OPTIONAL, + resultsSSB-Indexes-r16 ResultsPerSSB-IndexList-r16 OPTIONAL + }, + ... +} + +ResultsPerSSB-IndexList-r16 ::= SEQUENCE (SIZE (1.. maxNrofIndexesToReport)) OF ResultsPerSSB-IndexIdle-r16 + +ResultsPerSSB-IndexIdle-r16 ::= SEQUENCE { + ssb-Index-r16 SSB-Index, + ssb-Results-r16 SEQUENCE { + ssb-RSRP-Result-r16 RSRP-Range OPTIONAL, + ssb-RSRQ-Result-r16 RSRQ-Range OPTIONAL + } OPTIONAL +} + +-- TAG-MEASRESULTIDLENR-STOP +-- TAG-MEASRESULTRXTXTIMEDIFF-START + +MeasResultRxTxTimeDiff-r17 ::= SEQUENCE { + rxTxTimeDiff-ue-r17 RxTxTimeDiff-r17 OPTIONAL, + ... +} + +-- TAG-MEASRESULTRXTXTIMEDIFF-STOP +-- TAG-MEASRESULTSCG-FAILURE-START + +MeasResultSCG-Failure ::= SEQUENCE { + measResultPerMOList MeasResultList2NR, + ..., + [[ + locationInfo-r16 LocationInfo-r16 OPTIONAL + ]] +} + +MeasResultList2NR ::= SEQUENCE (SIZE (1..maxFreq)) OF MeasResult2NR + +-- TAG-MEASRESULTSCG-FAILURE-STOP +-- TAG-MEASRESULTSSL-START + +MeasResultsSL-r16 ::= SEQUENCE { + measResultsListSL-r16 CHOICE { + measResultNR-SL-r16 MeasResultNR-SL-r16, + ... + }, + ... +} + +MeasResultNR-SL-r16 ::= SEQUENCE { + measResultListCBR-NR-r16 SEQUENCE (SIZE (1.. maxNrofSL-PoolToMeasureNR-r16)) OF MeasResultCBR-NR-r16, + ... +} + +MeasResultCBR-NR-r16 ::= SEQUENCE { + sl-poolReportIdentity-r16 SL-ResourcePoolID-r16, + sl-CBR-ResultsNR-r16 SL-CBR-r16, + ... +} + +-- TAG-MEASRESULTSSL-STOP +-- TAG-MEASTRIGGERQUANTITYEUTRA-START + +MeasTriggerQuantityEUTRA::= CHOICE { + rsrp RSRP-RangeEUTRA, + rsrq RSRQ-RangeEUTRA, + sinr SINR-RangeEUTRA +} + +RSRP-RangeEUTRA ::= INTEGER (0..97) + +RSRQ-RangeEUTRA ::= INTEGER (0..34) + +SINR-RangeEUTRA ::= INTEGER (0..127) + +-- TAG-MEASTRIGGERQUANTITYEUTRA-STOP +-- TAG-MOBILITYSTATEPARAMETERS-START + +MobilityStateParameters ::= SEQUENCE{ + t-Evaluation ENUMERATED { + s30, s60, s120, s180, s240, spare3, spare2, spare1}, + t-HystNormal ENUMERATED { + s30, s60, s120, s180, s240, spare3, spare2, spare1}, + n-CellChangeMedium INTEGER (1..16), + n-CellChangeHigh INTEGER (1..16) +} + +-- TAG-MOBILITYSTATEPARAMETERS-STOP +-- TAG-MRB-IDENTITY-START + +MRB-Identity-r17 ::= INTEGER (1..512) + +-- TAG-MRB-IDENTITY-STOP +-- TAG-MSGACONFIGCOMMON-START + +MsgA-ConfigCommon-r16 ::= SEQUENCE { + rach-ConfigCommonTwoStepRA-r16 RACH-ConfigCommonTwoStepRA-r16, + msgA-PUSCH-Config-r16 MsgA-PUSCH-Config-r16 OPTIONAL --Cond InitialBWPConfig +} + +-- TAG-MSGACONFIGCOMMON-STOP +-- TAG-MSGA-PUSCH-CONFIG-START + +MsgA-PUSCH-Config-r16 ::= SEQUENCE { + msgA-PUSCH-ResourceGroupA-r16 MsgA-PUSCH-Resource-r16 OPTIONAL, -- Cond InitialBWPConfig + msgA-PUSCH-ResourceGroupB-r16 MsgA-PUSCH-Resource-r16 OPTIONAL, -- Cond GroupBConfigured + msgA-TransformPrecoder-r16 ENUMERATED {enabled, disabled} OPTIONAL, -- Need R + msgA-DataScramblingIndex-r16 INTEGER (0..1023) OPTIONAL, -- Need S + msgA-DeltaPreamble-r16 INTEGER (-1..6) OPTIONAL -- Need R +} + +MsgA-PUSCH-Resource-r16 ::= SEQUENCE { + msgA-MCS-r16 INTEGER (0..15), + nrofSlotsMsgA-PUSCH-r16 INTEGER (1..4), + nrofMsgA-PO-PerSlot-r16 ENUMERATED {one, two, three, six}, + msgA-PUSCH-TimeDomainOffset-r16 INTEGER (1..32), + msgA-PUSCH-TimeDomainAllocation-r16 INTEGER (1..maxNrofUL-Allocations) OPTIONAL, -- Need S + startSymbolAndLengthMsgA-PO-r16 INTEGER (0..127) OPTIONAL, -- Need S + mappingTypeMsgA-PUSCH-r16 ENUMERATED {typeA, typeB} OPTIONAL, -- Need S + guardPeriodMsgA-PUSCH-r16 INTEGER (0..3) OPTIONAL, -- Need R + guardBandMsgA-PUSCH-r16 INTEGER (0..1), + frequencyStartMsgA-PUSCH-r16 INTEGER (0..maxNrofPhysicalResourceBlocks-1), + nrofPRBs-PerMsgA-PO-r16 INTEGER (1..32), + nrofMsgA-PO-FDM-r16 ENUMERATED {one, two, four, eight}, + msgA-IntraSlotFrequencyHopping-r16 ENUMERATED {enabled} OPTIONAL, -- Need R + msgA-HoppingBits-r16 BIT STRING (SIZE(2)) OPTIONAL, -- Cond FreqHopConfigured + msgA-DMRS-Config-r16 MsgA-DMRS-Config-r16, + nrofDMRS-Sequences-r16 INTEGER (1..2), + msgA-Alpha-r16 ENUMERATED {alpha0, alpha04, alpha05, alpha06, + alpha07, alpha08, alpha09, alpha1} OPTIONAL, -- Need S + interlaceIndexFirstPO-MsgA-PUSCH-r16 INTEGER (1..10) OPTIONAL, -- Need R + nrofInterlacesPerMsgA-PO-r16 INTEGER (1..10) OPTIONAL, -- Need R + ... +} + +MsgA-DMRS-Config-r16 ::= SEQUENCE { + msgA-DMRS-AdditionalPosition-r16 ENUMERATED {pos0, pos1, pos3} OPTIONAL, -- Need S + msgA-MaxLength-r16 ENUMERATED {len2} OPTIONAL, -- Need S + msgA-PUSCH-DMRS-CDM-Group-r16 INTEGER (0..1) OPTIONAL, -- Need S + msgA-PUSCH-NrofPorts-r16 INTEGER (0..1) OPTIONAL, -- Need S + msgA-ScramblingID0-r16 INTEGER (0..65535) OPTIONAL, -- Need S + msgA-ScramblingID1-r16 INTEGER (0..65535) OPTIONAL -- Need S +} + +-- TAG-MSGA-PUSCH-CONFIG-STOP +-- TAG-MULTIFREQUENCYBANDLISTNR-START + +MultiFrequencyBandListNR ::= SEQUENCE (SIZE (1..maxNrofMultiBands)) OF FreqBandIndicatorNR + +-- TAG-MULTIFREQUENCYBANDLISTNR-STOP +-- TAG-MULTIFREQUENCYBANDLISTNR-SIB-START + +MultiFrequencyBandListNR-SIB ::= SEQUENCE (SIZE (1.. maxNrofMultiBands)) OF NR-MultiBandInfo + +NR-MultiBandInfo ::= SEQUENCE { + freqBandIndicatorNR FreqBandIndicatorNR OPTIONAL, -- Cond OptULNotSIB2 + nr-NS-PmaxList NR-NS-PmaxList OPTIONAL -- Need S +} + +-- TAG-MULTIFREQUENCYBANDLISTNR-SIB-STOP +-- TAG-MUSIM-GAPCONFIG-START + +MUSIM-GapConfig-r17 ::= SEQUENCE { + musim-GapToReleaseList-r17 SEQUENCE (SIZE (1..3)) OF MUSIM-GapId-r17 OPTIONAL, -- Need N + musim-GapToAddModList-r17 SEQUENCE (SIZE (1..3)) OF MUSIM-Gap-r17 OPTIONAL, -- Need N + musim-AperiodicGap-r17 MUSIM-GapInfo-r17 OPTIONAL, -- Need N + ... +} +MUSIM-Gap-r17 ::= SEQUENCE { + musim-GapId-r17 MUSIM-GapId-r17, + musim-GapInfo-r17 MUSIM-GapInfo-r17 + +} + +-- TAG-MUSIM-GAPCONFIG-STOP +-- TAG-MUSIM-GAPID-START + +MUSIM-GapId-r17 ::= INTEGER (0..2) + +-- TAG-MUSIM-GAPID-STOP +-- TAG-MUSIM-GAPINFO-START + +MUSIM-GapInfo-r17 ::= SEQUENCE { + musim-Starting-SFN-AndSubframe-r17 MUSIM-Starting-SFN-AndSubframe-r17 OPTIONAL, -- Cond aperiodic + musim-GapLength-r17 ENUMERATED {ms3, ms4, ms6, ms10, ms20} OPTIONAL, -- Cond gapSetup + musim-GapRepetitionAndOffset-r17 CHOICE { + ms20-r17 INTEGER (0..19), + ms40-r17 INTEGER (0..39), + ms80-r17 INTEGER (0..79), + ms160-r17 INTEGER (0..159), + ms320-r17 INTEGER (0..319), + ms640-r17 INTEGER (0..639), + ms1280-r17 INTEGER (0..1279), + ms2560-r17 INTEGER (0..2559), + ms5120-r17 INTEGER (0..5119), + ... + } OPTIONAL -- Cond periodic +} + +MUSIM-Starting-SFN-AndSubframe-r17 ::= SEQUENCE { + starting-SFN-r17 INTEGER (0..1023), + startingSubframe-r17 INTEGER (0..9) +} + +-- TAG-MUSIM-GAPINFO-STOP +-- TAG-NeedForGapsConfigNR-START + +NeedForGapsConfigNR-r16 ::= SEQUENCE { + requestedTargetBandFilterNR-r16 SEQUENCE (SIZE (1..maxBands)) OF FreqBandIndicatorNR OPTIONAL -- Need R +} + +-- TAG-NeedForGapsConfigNR-STOP +-- TAG-NeedForGapsInfoNR-START + +NeedForGapsInfoNR-r16 ::= SEQUENCE { + intraFreq-needForGap-r16 NeedForGapsIntraFreqList-r16, + interFreq-needForGap-r16 NeedForGapsBandListNR-r16 +} + +NeedForGapsIntraFreqList-r16 ::= SEQUENCE (SIZE (1.. maxNrofServingCells)) OF NeedForGapsIntraFreq-r16 + +NeedForGapsBandListNR-r16 ::= SEQUENCE (SIZE (1..maxBands)) OF NeedForGapsNR-r16 + +NeedForGapsIntraFreq-r16 ::= SEQUENCE { + servCellId-r16 ServCellIndex, + gapIndicationIntra-r16 ENUMERATED {gap, no-gap} +} + +NeedForGapsNR-r16 ::= SEQUENCE { + bandNR-r16 FreqBandIndicatorNR, + gapIndication-r16 ENUMERATED {gap, no-gap} +} + +-- TAG-NeedForGapsInfoNR-STOP +-- TAG-NeedForGapNCSG-ConfigEUTRA-START + +NeedForGapNCSG-ConfigEUTRA-r17 ::= SEQUENCE { + requestedTargetBandFilterNCSG-EUTRA-r17 SEQUENCE (SIZE (1..maxBandsEUTRA)) OF FreqBandIndicatorEUTRA OPTIONAL -- Need R +} + +-- TAG-NeedForGapNCSG-ConfigEUTRA-STOP +-- TAG-NEEDFORGAPNCSG-CONFIGNR-START + +NeedForGapNCSG-ConfigNR-r17 ::= SEQUENCE { + requestedTargetBandFilterNCSG-NR-r17 SEQUENCE (SIZE (1..maxBands)) OF FreqBandIndicatorNR OPTIONAL -- Need R +} + +-- TAG-NEEDFORGAPNCSG-CONFIGNR-STOP +-- TAG-NEEDFORGAPNCSG-INFOEUTRA-START + +NeedForGapNCSG-InfoEUTRA-r17 ::= SEQUENCE { + needForNCSG-EUTRA-r17 SEQUENCE (SIZE (1..maxBandsEUTRA)) OF NeedForNCSG-EUTRA-r17 +} + +NeedForNCSG-EUTRA-r17 ::= SEQUENCE { + bandEUTRA-r17 FreqBandIndicatorEUTRA, + gapIndication-r17 ENUMERATED {gap, ncsg, nogap-noncsg} +} + +-- TAG-NEEDFORGAPNCSG-INFOEUTRA-STOP +-- TAG-NEEDFORGAPNCSG-INFONR-START + +NeedForGapNCSG-InfoNR-r17 ::= SEQUENCE { + intraFreq-needForNCSG-r17 NeedForNCSG-IntraFreqList-r17, + interFreq-needForNCSG-r17 NeedForNCSG-BandListNR-r17 +} + +NeedForNCSG-IntraFreqList-r17 ::= SEQUENCE (SIZE (1.. maxNrofServingCells)) OF NeedForNCSG-IntraFreq-r17 + +NeedForNCSG-BandListNR-r17 ::= SEQUENCE (SIZE (1..maxBands)) OF NeedForNCSG-NR-r17 + +NeedForNCSG-IntraFreq-r17 ::= SEQUENCE { + servCellId-r17 ServCellIndex, + gapIndicationIntra-r17 ENUMERATED {gap, ncsg, nogap-noncsg} +} + +NeedForNCSG-NR-r17 ::= SEQUENCE { + bandNR-r17 FreqBandIndicatorNR, + gapIndication-r17 ENUMERATED {gap, ncsg, nogap-noncsg} +} + +-- TAG-NEEDFORGAPNCSG-INFONR-STOP +-- TAG-NEXTHOPCHAININGCOUNT-START + +NextHopChainingCount ::= INTEGER (0..7) + +-- TAG-NEXTHOPCHAININGCOUNT-STOP +-- TAG-NG-5G-S-TMSI-START + +NG-5G-S-TMSI ::= BIT STRING (SIZE (48)) + +-- TAG-NG-5G-S-TMSI-STOP +-- TAG-NONCELLDEFININGSSB-START + +NonCellDefiningSSB-r17 ::= SEQUENCE { + absoluteFrequencySSB-r17 ARFCN-ValueNR, + ssb-Periodicity-r17 ENUMERATED { ms5, ms10, ms20, ms40, ms80, ms160, spare2, spare1 } OPTIONAL, -- Need S + ssb-TimeOffset-r17 ENUMERATED { ms5, ms10, ms15, ms20, ms40, ms80, spare2, spare1 } OPTIONAL, -- Need S + ... +} + +-- TAG-NONCELLDEFININGSSB-STOP +-- TAG-NPN-IDENTITY-START + +NPN-Identity-r16 ::= CHOICE { + pni-npn-r16 SEQUENCE { + plmn-Identity-r16 PLMN-Identity, + cag-IdentityList-r16 SEQUENCE (SIZE (1..maxNPN-r16)) OF CAG-IdentityInfo-r16 + }, + snpn-r16 SEQUENCE { + plmn-Identity-r16 PLMN-Identity, + nid-List-r16 SEQUENCE (SIZE (1..maxNPN-r16)) OF NID-r16 + } +} + +CAG-IdentityInfo-r16 ::= SEQUENCE { + cag-Identity-r16 BIT STRING (SIZE (32)), + manualCAGselectionAllowed-r16 ENUMERATED {true} OPTIONAL -- Need R +} + +NID-r16 ::= BIT STRING (SIZE (44)) + +-- TAG-NPN-IDENTITY-STOP +-- TAG-NPN-IDENTITYINFOLIST-START + +NPN-IdentityInfoList-r16 ::= SEQUENCE (SIZE (1..maxNPN-r16)) OF NPN-IdentityInfo-r16 + + +NPN-IdentityInfo-r16 ::= SEQUENCE { + npn-IdentityList-r16 SEQUENCE (SIZE (1..maxNPN-r16)) OF NPN-Identity-r16, + trackingAreaCode-r16 TrackingAreaCode, + ranac-r16 RAN-AreaCode OPTIONAL, -- Need R + cellIdentity-r16 CellIdentity, + cellReservedForOperatorUse-r16 ENUMERATED {reserved, notReserved}, + iab-Support-r16 ENUMERATED {true} OPTIONAL, -- Need S + ..., + [[ + gNB-ID-Length-r17 INTEGER (22..32) OPTIONAL -- Need R + ]] +} + +-- TAG-NPN-IDENTITYINFOLIST-STOP +-- TAG-NR-DL-PRS-PDC-INFO-START + +NR-DL-PRS-PDC-Info-r17 ::= SEQUENCE { + nr-DL-PRS-PDC-ResourceSet-r17 NR-DL-PRS-PDC-ResourceSet-r17 OPTIONAL, -- Need R + ... +} + +NR-DL-PRS-PDC-ResourceSet-r17 ::= SEQUENCE { + periodicityAndOffset-r17 NR-DL-PRS-Periodicity-and-ResourceSetSlotOffset-r17, + numSymbols-r17 ENUMERATED {n2, n4, n6, n12, spare4, spare3, spare2, spare1}, + dl-PRS-ResourceBandwidth-r17 INTEGER (1..63), + dl-PRS-StartPRB-r17 INTEGER (0..2176), + resourceList-r17 SEQUENCE (SIZE (1..maxNrofPRS-ResourcesPerSet-r17)) OF NR-DL-PRS-Resource-r17, + repFactorAndTimeGap-r17 RepFactorAndTimeGap-r17 OPTIONAL, -- Need S + ... +} + +NR-DL-PRS-Periodicity-and-ResourceSetSlotOffset-r17 ::= CHOICE { + scs15-r17 CHOICE { + n4-r17 INTEGER (0..3), + n5-r17 INTEGER (0..4), + n8-r17 INTEGER (0..7), + n10-r17 INTEGER (0..9), + n16-r17 INTEGER (0..15), + n20-r17 INTEGER (0..19), + n32-r17 INTEGER (0..31), + n40-r17 INTEGER (0..39), + n64-r17 INTEGER (0..63), + n80-r17 INTEGER (0..79), + n160-r17 INTEGER (0..159), + n320-r17 INTEGER (0..319), + n640-r17 INTEGER (0..639), + n1280-r17 INTEGER (0..1279), + n2560-r17 INTEGER (0..2559), + n5120-r17 INTEGER (0..5119), + n10240-r17 INTEGER (0..10239), + ... + }, + scs30-r17 CHOICE { + n8-r17 INTEGER (0..7), + n10-r17 INTEGER (0..9), + n16-r17 INTEGER (0..15), + n20-r17 INTEGER (0..19), + n32-r17 INTEGER (0..31), + n40-r17 INTEGER (0..39), + n64-r17 INTEGER (0..63), + n80-r17 INTEGER (0..79), + n128-r17 INTEGER (0..127), + n160-r17 INTEGER (0..159), + n320-r17 INTEGER (0..319), + n640-r17 INTEGER (0..639), + n1280-r17 INTEGER (0..1279), + n2560-r17 INTEGER (0..2559), + n5120-r17 INTEGER (0..5119), + n10240-r17 INTEGER (0..10239), + n20480-r17 INTEGER (0..20479), + ... + }, + scs60-r17 CHOICE { + n16-r17 INTEGER (0..15), + n20-r17 INTEGER (0..19), + n32-r17 INTEGER (0..31), + n40-r17 INTEGER (0..39), + n64-r17 INTEGER (0..63), + n80-r17 INTEGER (0..79), + n128-r17 INTEGER (0..127), + n160-r17 INTEGER (0..159), + n256-r17 INTEGER (0..255), + n320-r17 INTEGER (0..319), + n640-r17 INTEGER (0..639), + n1280-r17 INTEGER (0..1279), + n2560-r17 INTEGER (0..2559), + n5120-r17 INTEGER (0..5119), + n10240-r17 INTEGER (0..10239), + n20480-r17 INTEGER (0..20479), + n40960-r17 INTEGER (0..40959), + ... + }, + scs120-r17 CHOICE { + n32-r17 INTEGER (0..31), + n40-r17 INTEGER (0..39), + n64-r17 INTEGER (0..63), + n80-r17 INTEGER (0..79), + n128-r17 INTEGER (0..127), + n160-r17 INTEGER (0..159), + n256-r17 INTEGER (0..255), + n320-r17 INTEGER (0..319), + n512-r17 INTEGER (0..511), + n640-r17 INTEGER (0..639), + n1280-r17 INTEGER (0..1279), + n2560-r17 INTEGER (0..2559), + n5120-r17 INTEGER (0..5119), + n10240-r17 INTEGER (0..10239), + n20480-r17 INTEGER (0..20479), + n40960-r17 INTEGER (0..40959), + n81920-r17 INTEGER (0..81919), + ... + }, + ... +} + +NR-DL-PRS-Resource-r17 ::= SEQUENCE { + nr-DL-PRS-ResourceID-r17 NR-DL-PRS-ResourceID-r17, + dl-PRS-SequenceID-r17 INTEGER (0..4095), + dl-PRS-CombSizeN-AndReOffset-r17 CHOICE { + n2-r17 INTEGER (0..1), + n4-r17 INTEGER (0..3), + n6-r17 INTEGER (0..5), + n12-r17 INTEGER (0..11), + ... + }, + dl-PRS-ResourceSlotOffset-r17 INTEGER (0..maxNrofPRS-ResourceOffsetValue-1-r17), + dl-PRS-ResourceSymbolOffset-r17 INTEGER (0..12), + dl-PRS-QCL-Info-r17 DL-PRS-QCL-Info-r17 OPTIONAL, -- Need N + ... +} + +DL-PRS-QCL-Info-r17 ::= CHOICE { + ssb-r17 SEQUENCE { + ssb-Index-r17 INTEGER (0..63), + rs-Type-r17 ENUMERATED {typeC, typeD, typeC-plus-typeD}, + ... + }, + dl-PRS-r17 SEQUENCE { + qcl-DL-PRS-ResourceID-r17 NR-DL-PRS-ResourceID-r17, + ... + }, + ... +} + +NR-DL-PRS-ResourceID-r17 ::= INTEGER (0..maxNrofPRS-ResourcesPerSet-1-r17) + +RepFactorAndTimeGap-r17 ::= SEQUENCE { + repetitionFactor-r17 ENUMERATED {n2, n4, n6, n8, n16, n32, spare2, spare1}, + timeGap-r17 ENUMERATED {s1, s2, s4, s8, s16, s32, spare2, spare1} +} + +-- TAG-NR-DL-PRS-PDC-INFO-STOP +-- TAG-NR-NS-PMAXLIST-START + +NR-NS-PmaxList ::= SEQUENCE (SIZE (1..maxNR-NS-Pmax)) OF NR-NS-PmaxValue + +NR-NS-PmaxValue ::= SEQUENCE { + additionalPmax P-Max OPTIONAL, -- Need N + additionalSpectrumEmission AdditionalSpectrumEmission +} + +-- TAG-NR-NS-PMAXLIST-STOP +-- TAG-NSAG-ID-START + +NSAG-ID-r17 ::= BIT STRING (SIZE (8)) + +-- TAG-NSAG-ID-STOP +-- TAG-NSAG-IDENTITYINFO-START + +NSAG-IdentityInfo-r17 ::= SEQUENCE { + nsag-ID-r17 NSAG-ID-r17, + trackingAreaCode-r17 TrackingAreaCode OPTIONAL -- Need R +} + +-- TAG-NSAG-IDENTITYINFO-STOP +-- TAG-NTN-CONFIG-START + +NTN-Config-r17 ::= SEQUENCE { + epochTime-r17 EpochTime-r17 OPTIONAL, -- Need R + ntn-UlSyncValidityDuration-r17 ENUMERATED{ s5, s10, s15, s20, s25, s30, s35, + s40, s45, s50, s55, s60, s120, s180, s240, s900} OPTIONAL, -- Cond SIB19 + cellSpecificKoffset-r17 INTEGER(1..1023) OPTIONAL, -- Need R + kmac-r17 INTEGER(1..512) OPTIONAL, -- Need R + ta-Info-r17 TA-Info-r17 OPTIONAL, -- Need R + ntn-PolarizationDL-r17 ENUMERATED {rhcp,lhcp,linear} OPTIONAL, -- Need R + ntn-PolarizationUL-r17 ENUMERATED {rhcp,lhcp,linear} OPTIONAL, -- Need R + ephemerisInfo-r17 EphemerisInfo-r17 OPTIONAL, -- Need R + ta-Report-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + ... +} + +EpochTime-r17 ::= SEQUENCE { + sfn-r17 INTEGER(0..1023), + subFrameNR-r17 INTEGER(0..9) +} + +TA-Info-r17 ::= SEQUENCE { + ta-Common-r17 INTEGER(0..66485757), + ta-CommonDrift-r17 INTEGER(-257303..257303) OPTIONAL, -- Need R + ta-CommonDriftVariant-r17 INTEGER(0..28949) OPTIONAL -- Need R +} + +-- TAG-NTN-CONFIG-STOP +-- TAG-NZP-CSI-RS-RESOURCE-START + +NZP-CSI-RS-Resource ::= SEQUENCE { + nzp-CSI-RS-ResourceId NZP-CSI-RS-ResourceId, + resourceMapping CSI-RS-ResourceMapping, + powerControlOffset INTEGER (-8..15), + powerControlOffsetSS ENUMERATED{db-3, db0, db3, db6} OPTIONAL, -- Need R + scramblingID ScramblingId, + periodicityAndOffset CSI-ResourcePeriodicityAndOffset OPTIONAL, -- Cond PeriodicOrSemiPersistent + qcl-InfoPeriodicCSI-RS TCI-StateId OPTIONAL, -- Cond Periodic + ... +} + +-- TAG-NZP-CSI-RS-RESOURCE-STOP +-- TAG-NZP-CSI-RS-RESOURCEID-START + +NZP-CSI-RS-ResourceId ::= INTEGER (0..maxNrofNZP-CSI-RS-Resources-1) + +-- TAG-NZP-CSI-RS-RESOURCEID-STOP +-- TAG-NZP-CSI-RS-RESOURCESET-START + +NZP-CSI-RS-ResourceSet ::= SEQUENCE { + nzp-CSI-ResourceSetId NZP-CSI-RS-ResourceSetId, + nzp-CSI-RS-Resources SEQUENCE (SIZE (1..maxNrofNZP-CSI-RS-ResourcesPerSet)) OF NZP-CSI-RS-ResourceId, + repetition ENUMERATED { on, off } OPTIONAL, -- Need S + aperiodicTriggeringOffset INTEGER(0..6) OPTIONAL, -- Need S + trs-Info ENUMERATED {true} OPTIONAL, -- Need R + ..., + [[ + aperiodicTriggeringOffset-r16 INTEGER(0..31) OPTIONAL -- Need S + ]], + [[ + pdc-Info-r17 ENUMERATED {true} OPTIONAL, -- Need R + cmrGroupingAndPairing-r17 CMRGroupingAndPairing-r17 OPTIONAL, -- Need R + aperiodicTriggeringOffset-r17 INTEGER (0..124) OPTIONAL, -- Need S + aperiodicTriggeringOffsetL2-r17 INTEGER(0..31) OPTIONAL -- Need R + ]] +} + +CMRGroupingAndPairing-r17 ::= SEQUENCE { + nrofResourcesGroup1-r17 INTEGER (1..7), + pair1OfNZP-CSI-RS-r17 NZP-CSI-RS-Pairing-r17 OPTIONAL, -- Need R + pair2OfNZP-CSI-RS-r17 NZP-CSI-RS-Pairing-r17 OPTIONAL -- Need R +} + +NZP-CSI-RS-Pairing-r17 ::= SEQUENCE { + nzp-CSI-RS-ResourceId1-r17 INTEGER (1..7), + nzp-CSI-RS-ResourceId2-r17 INTEGER (1..7) +} + +-- TAG-NZP-CSI-RS-RESOURCESET-STOP +-- TAG-NZP-CSI-RS-RESOURCESETID-START + +NZP-CSI-RS-ResourceSetId ::= INTEGER (0..maxNrofNZP-CSI-RS-ResourceSets-1) + +-- TAG-NZP-CSI-RS-RESOURCESETID-STOP +-- TAG-P-MAX-START + +P-Max ::= INTEGER (-30..33) + +-- TAG-P-MAX-STOP +-- TAG-PATHLOSSREFERENCERS-START + +PathlossReferenceRS-r17 ::= SEQUENCE { + pathlossReferenceRS-Id-r17 PathlossReferenceRS-Id-r17, + referenceSignal-r17 CHOICE { + ssb-Index SSB-Index, + csi-RS-Index NZP-CSI-RS-ResourceId + }, + additionalPCI-r17 AdditionalPCIIndex-r17 OPTIONAL -- Cond RS-SSB +} + + +-- TAG-PATHLOSSREFERENCERS-STOP +-- TAG-PATHLOSSREFERENCERS-ID-START + +PathlossReferenceRS-Id-r17 ::= INTEGER (0..maxNrofPathlossReferenceRSs-1-r17) + +-- TAG-PATHLOSSREFERENCERS-ID-STOP +-- TAG-PCIARFCNEUTRA-START + +PCI-ARFCN-EUTRA-r16 ::= SEQUENCE { + physCellId-r16 EUTRA-PhysCellId, + carrierFreq-r16 ARFCN-ValueEUTRA +} + +-- TAG-PCIARFCNEUTRA-STOP +-- TAG-PCIARFCNNR-START + +PCI-ARFCN-NR-r16 ::= SEQUENCE { + physCellId-r16 PhysCellId, + carrierFreq-r16 ARFCN-ValueNR +} + +-- TAG-PCIARFCNNR-STOP +-- TAG-PCI-LIST-START + +PCI-List ::= SEQUENCE (SIZE (1..maxNrofCellMeas)) OF PhysCellId + +-- TAG-PCI-LIST-STOP +-- TAG-PCI-RANGE-START + +PCI-Range ::= SEQUENCE { + start PhysCellId, + range ENUMERATED {n4, n8, n12, n16, n24, n32, n48, n64, n84, + n96, n128, n168, n252, n504, n1008,spare1} OPTIONAL -- Need S +} + +-- TAG-PCI-RANGE-STOP +-- TAG-PCI-RANGEELEMENT-START + +PCI-RangeElement ::= SEQUENCE { + pci-RangeIndex PCI-RangeIndex, + pci-Range PCI-Range +} + +-- TAG-PCI-RANGEELEMENT-STOP +-- TAG-PCI-RANGEINDEX-START + +PCI-RangeIndex ::= INTEGER (1..maxNrofPCI-Ranges) + +-- TAG-PCI-RANGEINDEX-STOP +-- TAG-PCI-RANGEINDEXLIST-START + +PCI-RangeIndexList ::= SEQUENCE (SIZE (1..maxNrofPCI-Ranges)) OF PCI-RangeIndex + +-- TAG-PCI-RANGEINDEXLIST-STOP +-- TAG-PDCCH-CONFIG-START + +PDCCH-Config ::= SEQUENCE { + controlResourceSetToAddModList SEQUENCE(SIZE (1..3)) OF ControlResourceSet OPTIONAL, -- Need N + controlResourceSetToReleaseList SEQUENCE(SIZE (1..3)) OF ControlResourceSetId OPTIONAL, -- Need N + searchSpacesToAddModList SEQUENCE(SIZE (1..10)) OF SearchSpace OPTIONAL, -- Need N + searchSpacesToReleaseList SEQUENCE(SIZE (1..10)) OF SearchSpaceId OPTIONAL, -- Need N + downlinkPreemption SetupRelease { DownlinkPreemption } OPTIONAL, -- Need M + tpc-PUSCH SetupRelease { PUSCH-TPC-CommandConfig } OPTIONAL, -- Need M + tpc-PUCCH SetupRelease { PUCCH-TPC-CommandConfig } OPTIONAL, -- Need M + tpc-SRS SetupRelease { SRS-TPC-CommandConfig} OPTIONAL, -- Need M + ..., + [[ + controlResourceSetToAddModListSizeExt-v1610 SEQUENCE (SIZE (1..2)) OF ControlResourceSet OPTIONAL, -- Need N + controlResourceSetToReleaseListSizeExt-r16 SEQUENCE (SIZE (1..5)) OF ControlResourceSetId-r16 OPTIONAL, -- Need N + searchSpacesToAddModListExt-r16 SEQUENCE(SIZE (1..10)) OF SearchSpaceExt-r16 OPTIONAL, -- Need N + uplinkCancellation-r16 SetupRelease { UplinkCancellation-r16 } OPTIONAL, -- Need M + monitoringCapabilityConfig-r16 ENUMERATED { r15monitoringcapability,r16monitoringcapability } OPTIONAL, -- Need M + searchSpaceSwitchConfig-r16 SearchSpaceSwitchConfig-r16 OPTIONAL -- Need R + ]], + [[ + searchSpacesToAddModListExt-v1700 SEQUENCE(SIZE (1..10)) OF SearchSpaceExt-v1700 OPTIONAL, -- Need N + monitoringCapabilityConfig-v1710 ENUMERATED { r17monitoringcapability } OPTIONAL, -- Need M + searchSpaceSwitchConfig-r17 SearchSpaceSwitchConfig-r17 OPTIONAL, -- Need R + pdcch-SkippingDurationList-r17 SEQUENCE(SIZE (1..3)) OF SCS-SpecificDuration-r17 OPTIONAL -- Need R + ]] +} + +SearchSpaceSwitchConfig-r16 ::= SEQUENCE { + cellGroupsForSwitchList-r16 SEQUENCE(SIZE (1..4)) OF CellGroupForSwitch-r16 OPTIONAL, -- Need R + searchSpaceSwitchDelay-r16 INTEGER (10..52) OPTIONAL -- Need R +} + +SearchSpaceSwitchConfig-r17 ::= SEQUENCE { + searchSpaceSwitchTimer-r17 SCS-SpecificDuration-r17 OPTIONAL, -- Need R + searchSpaceSwitchDelay-r17 INTEGER (10..52) OPTIONAL -- Need R +} + +CellGroupForSwitch-r16 ::= SEQUENCE(SIZE (1..16)) OF ServCellIndex + +SCS-SpecificDuration-r17 ::= INTEGER (1..166) + +-- TAG-PDCCH-CONFIG-STOP +-- TAG-PDCCH-CONFIGCOMMON-START + +PDCCH-ConfigCommon ::= SEQUENCE { + controlResourceSetZero ControlResourceSetZero OPTIONAL, -- Cond InitialBWP-Only + commonControlResourceSet ControlResourceSet OPTIONAL, -- Need R + searchSpaceZero SearchSpaceZero OPTIONAL, -- Cond InitialBWP-Only + commonSearchSpaceList SEQUENCE (SIZE(1..4)) OF SearchSpace OPTIONAL, -- Need R + searchSpaceSIB1 SearchSpaceId OPTIONAL, -- Need S + searchSpaceOtherSystemInformation SearchSpaceId OPTIONAL, -- Need S + pagingSearchSpace SearchSpaceId OPTIONAL, -- Need S + ra-SearchSpace SearchSpaceId OPTIONAL, -- Need S + ..., + [[ + firstPDCCH-MonitoringOccasionOfPO CHOICE { + sCS15KHZoneT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..139), + sCS30KHZoneT-SCS15KHZhalfT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..279), + sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..559), + sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..1119), + sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..2239), + sCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..4479), + sCS120KHZoneEighthT-SCS60KHZoneSixteenthT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..8959), + sCS120KHZoneSixteenthT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..17919) + } OPTIONAL -- Cond OtherBWP + ]], + [[ + commonSearchSpaceListExt-r16 SEQUENCE (SIZE(1..4)) OF SearchSpaceExt-r16 OPTIONAL -- Need R + ]], + [[ + sdt-SearchSpace-r17 CHOICE { + newSearchSpace SearchSpace, + existingSearchSpace SearchSpaceId + } OPTIONAL, -- Need R + searchSpaceMCCH-r17 SearchSpaceId OPTIONAL, -- Need R + searchSpaceMTCH-r17 SearchSpaceId OPTIONAL, -- Need S + commonSearchSpaceListExt2-r17 SEQUENCE (SIZE(1..4)) OF SearchSpaceExt-v1700 OPTIONAL, -- Need R + firstPDCCH-MonitoringOccasionOfPO-v1710 CHOICE { + sCS480KHZoneEighthT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..35839), + sCS480KHZoneSixteenthT SEQUENCE (SIZE (1..maxPO-perPF)) OF INTEGER (0..71679) + } OPTIONAL, -- Need R + pei-ConfigBWP-r17 SEQUENCE { + pei-SearchSpace-r17 SearchSpaceId, + firstPDCCH-MonitoringOccasionOfPEI-O-r17 CHOICE { + sCS15KHZoneT SEQUENCE (SIZE (1..maxPEI-perPF-r17)) OF INTEGER (0..139), + sCS30KHZoneT-SCS15KHZhalfT SEQUENCE (SIZE (1..maxPEI-perPF-r17)) OF INTEGER (0..279), + sCS60KHZoneT-SCS30KHZhalfT-SCS15KHZquarterT SEQUENCE (SIZE (1..maxPEI-perPF-r17)) OF INTEGER (0..559), + sCS120KHZoneT-SCS60KHZhalfT-SCS30KHZquarterT-SCS15KHZoneEighthT SEQUENCE (SIZE (1..maxPEI-perPF-r17)) OF INTEGER (0..1119), + sCS120KHZhalfT-SCS60KHZquarterT-SCS30KHZoneEighthT-SCS15KHZoneSixteenthT SEQUENCE (SIZE (1..maxPEI-perPF-r17)) OF INTEGER (0..2239), + sCS480KHZoneT-SCS120KHZquarterT-SCS60KHZoneEighthT-SCS30KHZoneSixteenthT SEQUENCE (SIZE (1..maxPEI-perPF-r17)) OF INTEGER (0..4479), + sCS480KHZhalfT-SCS120KHZoneEighthT-SCS60KHZoneSixteenthT SEQUENCE (SIZE (1..maxPEI-perPF-r17)) OF INTEGER (0..8959), + sCS480KHZquarterT-SCS120KHZoneSixteenthT SEQUENCE (SIZE (1..maxPEI-perPF-r17)) OF INTEGER (0..17919), + sCS480KHZoneEighthT SEQUENCE (SIZE (1..maxPEI-perPF-r17)) OF INTEGER (0..35839), + sCS480KHZoneSixteenthT SEQUENCE (SIZE (1..maxPEI-perPF-r17)) OF INTEGER (0..71679) + } + } OPTIONAL -- Cond InitialBWP-Paging + ]], + [[ + followUnifiedTCI-State-v1720 ENUMERATED {enabled} OPTIONAL -- Need R + ]] +} + +-- TAG-PDCCH-CONFIGCOMMON-STOP +-- TAG-PDCCH-CONFIGSIB1-START + +PDCCH-ConfigSIB1 ::= SEQUENCE { + controlResourceSetZero ControlResourceSetZero, + searchSpaceZero SearchSpaceZero +} + +-- TAG-PDCCH-CONFIGSIB1-STOP +-- TAG-PDCCH-SERVINGCELLCONFIG-START + +PDCCH-ServingCellConfig ::= SEQUENCE { + slotFormatIndicator SetupRelease { SlotFormatIndicator } OPTIONAL, -- Need M + ..., + [[ + availabilityIndicator-r16 SetupRelease {AvailabilityIndicator-r16} OPTIONAL, -- Need M + searchSpaceSwitchTimer-r16 INTEGER (1..80) OPTIONAL -- Need R + ]], + [[ + searchSpaceSwitchTimer-v1710 INTEGER (81..1280) OPTIONAL -- Need R + ]] +} + +-- TAG-PDCCH-SERVINGCELLCONFIG-STOP +-- TAG-PDCP-CONFIG-START + +PDCP-Config ::= SEQUENCE { + drb SEQUENCE { + discardTimer ENUMERATED {ms10, ms20, ms30, ms40, ms50, ms60, ms75, ms100, ms150, ms200, + ms250, ms300, ms500, ms750, ms1500, infinity} OPTIONAL, -- Cond Setup + pdcp-SN-SizeUL ENUMERATED {len12bits, len18bits} OPTIONAL, -- Cond Setup1 + pdcp-SN-SizeDL ENUMERATED {len12bits, len18bits} OPTIONAL, -- Cond Setup2 + headerCompression CHOICE { + notUsed NULL, + rohc SEQUENCE { + maxCID INTEGER (1..16383) DEFAULT 15, + profiles SEQUENCE { + profile0x0001 BOOLEAN, + profile0x0002 BOOLEAN, + profile0x0003 BOOLEAN, + profile0x0004 BOOLEAN, + profile0x0006 BOOLEAN, + profile0x0101 BOOLEAN, + profile0x0102 BOOLEAN, + profile0x0103 BOOLEAN, + profile0x0104 BOOLEAN + }, + drb-ContinueROHC ENUMERATED { true } OPTIONAL -- Need N + }, + uplinkOnlyROHC SEQUENCE { + maxCID INTEGER (1..16383) DEFAULT 15, + profiles SEQUENCE { + profile0x0006 BOOLEAN + }, + drb-ContinueROHC ENUMERATED { true } OPTIONAL -- Need N + }, + ... + }, + integrityProtection ENUMERATED { enabled } OPTIONAL, -- Cond ConnectedTo5GC1 + statusReportRequired ENUMERATED { true } OPTIONAL, -- Cond Rlc-AM-UM + outOfOrderDelivery ENUMERATED { true } OPTIONAL -- Need R + } OPTIONAL, -- Cond DRB + moreThanOneRLC SEQUENCE { + primaryPath SEQUENCE { + cellGroup CellGroupId OPTIONAL, -- Need R + logicalChannel LogicalChannelIdentity OPTIONAL -- Need R + }, + ul-DataSplitThreshold UL-DataSplitThreshold OPTIONAL, -- Cond SplitBearer + pdcp-Duplication BOOLEAN OPTIONAL -- Need R + } OPTIONAL, -- Cond MoreThanOneRLC + + t-Reordering ENUMERATED { + ms0, ms1, ms2, ms4, ms5, ms8, ms10, ms15, ms20, ms30, ms40, + ms50, ms60, ms80, ms100, ms120, ms140, ms160, ms180, ms200, ms220, + ms240, ms260, ms280, ms300, ms500, ms750, ms1000, ms1250, + ms1500, ms1750, ms2000, ms2250, ms2500, ms2750, + ms3000, spare28, spare27, spare26, spare25, spare24, + spare23, spare22, spare21, spare20, + spare19, spare18, spare17, spare16, spare15, spare14, + spare13, spare12, spare11, spare10, spare09, + spare08, spare07, spare06, spare05, spare04, spare03, + spare02, spare01 } OPTIONAL, -- Need S + ..., + [[ + cipheringDisabled ENUMERATED {true} OPTIONAL -- Cond ConnectedTo5GC + ]], + [[ + discardTimerExt-r16 SetupRelease { DiscardTimerExt-r16 } OPTIONAL, -- Cond DRB2 + moreThanTwoRLC-DRB-r16 SEQUENCE { + splitSecondaryPath-r16 LogicalChannelIdentity OPTIONAL, -- Cond SplitBearer2 + duplicationState-r16 SEQUENCE (SIZE (3)) OF BOOLEAN OPTIONAL -- Need S + } OPTIONAL, -- Cond MoreThanTwoRLC-DRB + ethernetHeaderCompression-r16 SetupRelease { EthernetHeaderCompression-r16 } OPTIONAL -- Need M + ]], + [[ + survivalTimeStateSupport-r17 ENUMERATED {true} OPTIONAL, -- Cond Drb-Duplication + uplinkDataCompression-r17 SetupRelease { UplinkDataCompression-r17 } OPTIONAL, -- Cond Rlc-AM + discardTimerExt2-r17 SetupRelease { DiscardTimerExt2-r17 } OPTIONAL, -- Need M + initialRX-DELIV-r17 BIT STRING (SIZE (32)) OPTIONAL -- Cond MRB-Initialization + ]] +} + +EthernetHeaderCompression-r16 ::= SEQUENCE { + ehc-Common-r16 SEQUENCE { + ehc-CID-Length-r16 ENUMERATED { bits7, bits15 }, + ... + }, + ehc-Downlink-r16 SEQUENCE { + drb-ContinueEHC-DL-r16 ENUMERATED { true } OPTIONAL, -- Need N + ... + } OPTIONAL, -- Need M + ehc-Uplink-r16 SEQUENCE { + maxCID-EHC-UL-r16 INTEGER (1..32767), + drb-ContinueEHC-UL-r16 ENUMERATED { true } OPTIONAL, -- Need N + ... + } OPTIONAL -- Need M +} + +UL-DataSplitThreshold ::= ENUMERATED { + b0, b100, b200, b400, b800, b1600, b3200, b6400, b12800, b25600, b51200, b102400, b204800, + b409600, b819200, b1228800, b1638400, b2457600, b3276800, b4096000, b4915200, b5734400, + b6553600, infinity, spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1} + +DiscardTimerExt-r16 ::= ENUMERATED {ms0dot5, ms1, ms2, ms4, ms6, ms8, spare2, spare1} + +DiscardTimerExt2-r17 ::= ENUMERATED {ms2000, spare3, spare2, spare1} + +UplinkDataCompression-r17 ::= CHOICE { + newSetup SEQUENCE { + bufferSize-r17 ENUMERATED {kbyte2, kbyte4, kbyte8, spare1}, + dictionary-r17 ENUMERATED {sip-SDP, operator} OPTIONAL -- Need N + }, + drb-ContinueUDC NULL +} + +-- TAG-PDCP-CONFIG-STOP +-- TAG-PDSCH-CONFIG-START + +PDSCH-Config ::= SEQUENCE { + dataScramblingIdentityPDSCH INTEGER (0..1023) OPTIONAL, -- Need S + dmrs-DownlinkForPDSCH-MappingTypeA SetupRelease { DMRS-DownlinkConfig } OPTIONAL, -- Need M + dmrs-DownlinkForPDSCH-MappingTypeB SetupRelease { DMRS-DownlinkConfig } OPTIONAL, -- Need M + + tci-StatesToAddModList SEQUENCE (SIZE(1..maxNrofTCI-States)) OF TCI-State OPTIONAL, -- Need N + tci-StatesToReleaseList SEQUENCE (SIZE(1..maxNrofTCI-States)) OF TCI-StateId OPTIONAL, -- Need N + vrb-ToPRB-Interleaver ENUMERATED {n2, n4} OPTIONAL, -- Need S + resourceAllocation ENUMERATED { resourceAllocationType0, resourceAllocationType1, dynamicSwitch}, + pdsch-TimeDomainAllocationList SetupRelease { PDSCH-TimeDomainResourceAllocationList } OPTIONAL, -- Need M + pdsch-AggregationFactor ENUMERATED { n2, n4, n8 } OPTIONAL, -- Need S + rateMatchPatternToAddModList SEQUENCE (SIZE (1..maxNrofRateMatchPatterns)) OF RateMatchPattern OPTIONAL, -- Need N + rateMatchPatternToReleaseList SEQUENCE (SIZE (1..maxNrofRateMatchPatterns)) OF RateMatchPatternId OPTIONAL, -- Need N + rateMatchPatternGroup1 RateMatchPatternGroup OPTIONAL, -- Need R + rateMatchPatternGroup2 RateMatchPatternGroup OPTIONAL, -- Need R + + rbg-Size ENUMERATED {config1, config2}, + mcs-Table ENUMERATED {qam256, qam64LowSE} OPTIONAL, -- Need S + maxNrofCodeWordsScheduledByDCI ENUMERATED {n1, n2} OPTIONAL, -- Need R + + prb-BundlingType CHOICE { + staticBundling SEQUENCE { + bundleSize ENUMERATED { n4, wideband } OPTIONAL -- Need S + }, + dynamicBundling SEQUENCE { + bundleSizeSet1 ENUMERATED { n4, wideband, n2-wideband, n4-wideband } OPTIONAL, -- Need S + bundleSizeSet2 ENUMERATED { n4, wideband } OPTIONAL -- Need S + } + }, + zp-CSI-RS-ResourceToAddModList SEQUENCE (SIZE (1..maxNrofZP-CSI-RS-Resources)) OF ZP-CSI-RS-Resource + OPTIONAL, -- Need N + zp-CSI-RS-ResourceToReleaseList SEQUENCE (SIZE (1..maxNrofZP-CSI-RS-Resources)) OF ZP-CSI-RS-ResourceId + OPTIONAL, -- Need N + aperiodic-ZP-CSI-RS-ResourceSetsToAddModList SEQUENCE (SIZE (1..maxNrofZP-CSI-RS-ResourceSets)) OF ZP-CSI-RS-ResourceSet + OPTIONAL, -- Need N + aperiodic-ZP-CSI-RS-ResourceSetsToReleaseList SEQUENCE (SIZE (1..maxNrofZP-CSI-RS-ResourceSets)) OF ZP-CSI-RS-ResourceSetId + OPTIONAL, -- Need N + sp-ZP-CSI-RS-ResourceSetsToAddModList SEQUENCE (SIZE (1..maxNrofZP-CSI-RS-ResourceSets)) OF ZP-CSI-RS-ResourceSet + OPTIONAL, -- Need N + sp-ZP-CSI-RS-ResourceSetsToReleaseList SEQUENCE (SIZE (1..maxNrofZP-CSI-RS-ResourceSets)) OF ZP-CSI-RS-ResourceSetId + OPTIONAL, -- Need N + p-ZP-CSI-RS-ResourceSet SetupRelease { ZP-CSI-RS-ResourceSet } + OPTIONAL, -- Need M + ..., + [[ + maxMIMO-Layers-r16 SetupRelease { MaxMIMO-LayersDL-r16 } OPTIONAL, -- Need M + minimumSchedulingOffsetK0-r16 SetupRelease { MinSchedulingOffsetK0-Values-r16 } OPTIONAL, -- Need M + + -- Start of the parameters for DCI format 1_2 introduced in V16.1.0 + antennaPortsFieldPresenceDCI-1-2-r16 ENUMERATED {enabled} OPTIONAL, -- Need S + aperiodicZP-CSI-RS-ResourceSetsToAddModListDCI-1-2-r16 SEQUENCE (SIZE (1..maxNrofZP-CSI-RS-ResourceSets)) OF ZP-CSI-RS-ResourceSet + OPTIONAL, -- Need N + aperiodicZP-CSI-RS-ResourceSetsToReleaseListDCI-1-2-r16 SEQUENCE (SIZE (1..maxNrofZP-CSI-RS-ResourceSets)) OF ZP-CSI-RS-ResourceSetId + OPTIONAL, -- Need N + dmrs-DownlinkForPDSCH-MappingTypeA-DCI-1-2-r16 SetupRelease { DMRS-DownlinkConfig } OPTIONAL, -- Need M + dmrs-DownlinkForPDSCH-MappingTypeB-DCI-1-2-r16 SetupRelease { DMRS-DownlinkConfig } OPTIONAL, -- Need M + dmrs-SequenceInitializationDCI-1-2-r16 ENUMERATED {enabled} OPTIONAL, -- Need S + harq-ProcessNumberSizeDCI-1-2-r16 INTEGER (0..4) OPTIONAL, -- Need R + mcs-TableDCI-1-2-r16 ENUMERATED {qam256, qam64LowSE} OPTIONAL, -- Need S + numberOfBitsForRV-DCI-1-2-r16 INTEGER (0..2) OPTIONAL, -- Need R + pdsch-TimeDomainAllocationListDCI-1-2-r16 SetupRelease { PDSCH-TimeDomainResourceAllocationList-r16 } + OPTIONAL, -- Need M + prb-BundlingTypeDCI-1-2-r16 CHOICE { + staticBundling-r16 SEQUENCE { + bundleSize-r16 ENUMERATED { n4, wideband } OPTIONAL -- Need S + }, + dynamicBundling-r16 SEQUENCE { + bundleSizeSet1-r16 ENUMERATED { n4, wideband, n2-wideband, n4-wideband } OPTIONAL, -- Need S + bundleSizeSet2-r16 ENUMERATED { n4, wideband } OPTIONAL -- Need S + } + } OPTIONAL, -- Need R + priorityIndicatorDCI-1-2-r16 ENUMERATED {enabled} OPTIONAL, -- Need S + rateMatchPatternGroup1DCI-1-2-r16 RateMatchPatternGroup OPTIONAL, -- Need R + rateMatchPatternGroup2DCI-1-2-r16 RateMatchPatternGroup OPTIONAL, -- Need R + resourceAllocationType1GranularityDCI-1-2-r16 ENUMERATED {n2,n4,n8,n16} OPTIONAL, -- Need S + vrb-ToPRB-InterleaverDCI-1-2-r16 ENUMERATED {n2, n4} OPTIONAL, -- Need S + referenceOfSLIVDCI-1-2-r16 ENUMERATED {enabled} OPTIONAL, -- Need S + resourceAllocationDCI-1-2-r16 ENUMERATED { resourceAllocationType0, resourceAllocationType1, dynamicSwitch} + OPTIONAL, -- Need M + -- End of the parameters for DCI format 1_2 introduced in V16.1.0 + + priorityIndicatorDCI-1-1-r16 ENUMERATED {enabled} OPTIONAL, -- Need S + dataScramblingIdentityPDSCH2-r16 INTEGER (0..1023) OPTIONAL, -- Need R + pdsch-TimeDomainAllocationList-r16 SetupRelease { PDSCH-TimeDomainResourceAllocationList-r16 } OPTIONAL, -- Need M + repetitionSchemeConfig-r16 SetupRelease { RepetitionSchemeConfig-r16} OPTIONAL -- Need M + ]], + [[ + repetitionSchemeConfig-v1630 SetupRelease { RepetitionSchemeConfig-v1630} OPTIONAL -- Need M + ]], + [[ + pdsch-HARQ-ACK-OneShotFeedbackDCI-1-2-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + pdsch-HARQ-ACK-EnhType3DCI-1-2-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + pdsch-HARQ-ACK-EnhType3DCI-Field-1-2-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + pdsch-HARQ-ACK-RetxDCI-1-2-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + pucch-sSCellDynDCI-1-2-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + dl-OrJointTCI-StateList-r17 CHOICE { + explicitlist SEQUENCE { + dl-OrJointTCI-StateToAddModList-r17 SEQUENCE (SIZE (1..maxNrofTCI-States)) OF TCI-State + OPTIONAL, -- Need N + dl-OrJointTCI-StateToReleaseList-r17 SEQUENCE (SIZE (1..maxNrofTCI-States)) OF TCI-StateId + OPTIONAL -- Need N + }, + unifiedTCI-StateRef-r17 ServingCellAndBWP-Id-r17 + } OPTIONAL, -- Need R + beamAppTime-r17 ENUMERATED {n1, n2, n4, n7, n14, n28, n42, n56, n70, n84, n98, n112, n224, n336, spare2, + spare1} OPTIONAL, -- Need R + dummy SetupRelease { Dummy-TDRA-List } OPTIONAL, -- Need M + dmrs-FD-OCC-DisabledForRank1-PDSCH-r17 ENUMERATED {true} OPTIONAL, -- Need R + minimumSchedulingOffsetK0-r17 SetupRelease { MinSchedulingOffsetK0-Values-r17 } OPTIONAL, -- Need M + harq-ProcessNumberSizeDCI-1-2-v1700 INTEGER (0..5) OPTIONAL, -- Need R + harq-ProcessNumberSizeDCI-1-1-r17 INTEGER (5) OPTIONAL, -- Need R + mcs-Table-r17 ENUMERATED {qam1024} OPTIONAL, -- Need R + mcs-TableDCI-1-2-r17 ENUMERATED {qam1024} OPTIONAL, -- Need R + xOverheadMulticast-r17 ENUMERATED {xOh6, xOh12, xOh18} OPTIONAL, -- Need S + priorityIndicatorDCI-4-2-r17 ENUMERATED {enabled} OPTIONAL, -- Need S + sizeDCI-4-2-r17 INTEGER (20..maxDCI-4-2-Size-r17) OPTIONAL -- Need R + ]], + [[ + pdsch-TimeDomainAllocationListForMultiPDSCH-r17 SetupRelease { MultiPDSCH-TDRA-List-r17 } OPTIONAL -- Need M + ]] +} + +RateMatchPatternGroup ::= SEQUENCE (SIZE (1..maxNrofRateMatchPatternsPerGroup)) OF CHOICE { + cellLevel RateMatchPatternId, + bwpLevel RateMatchPatternId +} + +MinSchedulingOffsetK0-Values-r16 ::= SEQUENCE (SIZE (1..maxNrOfMinSchedulingOffsetValues-r16)) OF INTEGER (0..maxK0-SchedulingOffset-r16) + +MinSchedulingOffsetK0-Values-r17 ::= SEQUENCE (SIZE (1..maxNrOfMinSchedulingOffsetValues-r16)) OF INTEGER (0..maxK0-SchedulingOffset-r17) + +MaxMIMO-LayersDL-r16 ::= INTEGER (1..8) + +-- TAG-PDSCH-CONFIG-STOP +-- TAG-PDSCH-CONFIGCOMMON-START + +PDSCH-ConfigCommon ::= SEQUENCE { + pdsch-TimeDomainAllocationList PDSCH-TimeDomainResourceAllocationList OPTIONAL, -- Need R + ... +} + +-- TAG-PDSCH-CONFIGCOMMON-STOP +-- TAG-PDSCH-SERVINGCELLCONFIG-START + +PDSCH-ServingCellConfig ::= SEQUENCE { + codeBlockGroupTransmission SetupRelease { PDSCH-CodeBlockGroupTransmission } OPTIONAL, -- Need M + xOverhead ENUMERATED { xOh6, xOh12, xOh18 } OPTIONAL, -- Need S + nrofHARQ-ProcessesForPDSCH ENUMERATED {n2, n4, n6, n10, n12, n16} OPTIONAL, -- Need S + pucch-Cell ServCellIndex OPTIONAL, -- Cond SCellAddOnly + ..., + [[ + maxMIMO-Layers INTEGER (1..8) OPTIONAL, -- Need M + processingType2Enabled BOOLEAN OPTIONAL -- Need M + ]], + [[ + pdsch-CodeBlockGroupTransmissionList-r16 SetupRelease { PDSCH-CodeBlockGroupTransmissionList-r16 } OPTIONAL -- Need M + ]], + [[ + downlinkHARQ-FeedbackDisabled-r17 SetupRelease { DownlinkHARQ-FeedbackDisabled-r17 } OPTIONAL, -- Need M + nrofHARQ-ProcessesForPDSCH-v1700 ENUMERATED {n32} OPTIONAL -- Need R + ]] +} + +PDSCH-CodeBlockGroupTransmission ::= SEQUENCE { + maxCodeBlockGroupsPerTransportBlock ENUMERATED {n2, n4, n6, n8}, + codeBlockGroupFlushIndicator BOOLEAN, + ... +} + +PDSCH-CodeBlockGroupTransmissionList-r16 ::= SEQUENCE (SIZE (1..2)) OF PDSCH-CodeBlockGroupTransmission + +DownlinkHARQ-FeedbackDisabled-r17 ::= BIT STRING (SIZE (32)) + +-- TAG-PDSCH-SERVINGCELLCONFIG-STOP +-- TAG-PDSCH-TIMEDOMAINRESOURCEALLOCATIONLIST-START + + +PDSCH-TimeDomainResourceAllocationList ::= SEQUENCE (SIZE(1..maxNrofDL-Allocations)) OF PDSCH-TimeDomainResourceAllocation + +PDSCH-TimeDomainResourceAllocation ::= SEQUENCE { + k0 INTEGER(0..32) OPTIONAL, -- Need S + mappingType ENUMERATED {typeA, typeB}, + startSymbolAndLength INTEGER (0..127) +} + +PDSCH-TimeDomainResourceAllocationList-r16 ::= SEQUENCE (SIZE(1..maxNrofDL-Allocations)) OF PDSCH-TimeDomainResourceAllocation-r16 + +PDSCH-TimeDomainResourceAllocation-r16 ::= SEQUENCE { + k0-r16 INTEGER(0..32) OPTIONAL, -- Need S + mappingType-r16 ENUMERATED {typeA, typeB}, + startSymbolAndLength-r16 INTEGER (0..127), + repetitionNumber-r16 ENUMERATED {n2, n3, n4, n5, n6, n7, n8, n16} OPTIONAL, -- Cond Formats1-0and1-1 + ..., + [[ + k0-v1710 INTEGER(33..128) OPTIONAL -- Need S + ]], + [[ + repetitionNumber-v1730 ENUMERATED {n2, n3, n4, n5, n6, n7, n8, n16} OPTIONAL -- Cond Format1-2 + ]] +} + +Dummy-TDRA-List ::= SEQUENCE (SIZE(1.. maxNrofDL-Allocations)) OF MultiPDSCH-TDRA-r17 + +MultiPDSCH-TDRA-List-r17 ::= SEQUENCE (SIZE(1.. maxNrofDL-AllocationsExt-r17)) OF MultiPDSCH-TDRA-r17 + +MultiPDSCH-TDRA-r17 ::= SEQUENCE { + pdsch-TDRA-List-r17 SEQUENCE (SIZE(1..maxNrofMultiplePDSCHs-r17)) OF PDSCH-TimeDomainResourceAllocation-r16, + ... +} + +-- TAG-PDSCH-TIMEDOMAINRESOURCEALLOCATIONLIST-STOP +-- TAG-PHR-CONFIG-START + +PHR-Config ::= SEQUENCE { + phr-PeriodicTimer ENUMERATED {sf10, sf20, sf50, sf100, sf200,sf500, sf1000, infinity}, + phr-ProhibitTimer ENUMERATED {sf0, sf10, sf20, sf50, sf100,sf200, sf500, sf1000}, + phr-Tx-PowerFactorChange ENUMERATED {dB1, dB3, dB6, infinity}, + multiplePHR BOOLEAN, + dummy BOOLEAN, + phr-Type2OtherCell BOOLEAN, + phr-ModeOtherCG ENUMERATED {real, virtual}, + ..., + [[ + mpe-Reporting-FR2-r16 SetupRelease { MPE-Config-FR2-r16 } OPTIONAL -- Need M + ]], + [[ + mpe-Reporting-FR2-r17 SetupRelease { MPE-Config-FR2-r17 } OPTIONAL, -- Need M + twoPHRMode-r17 ENUMERATED {enabled} OPTIONAL -- Need R + ]] +} + +MPE-Config-FR2-r16 ::= SEQUENCE { + mpe-ProhibitTimer-r16 ENUMERATED {sf0, sf10, sf20, sf50, sf100, sf200, sf500, sf1000}, + mpe-Threshold-r16 ENUMERATED {dB3, dB6, dB9, dB12} +} + +MPE-Config-FR2-r17 ::= SEQUENCE { + mpe-ProhibitTimer-r17 ENUMERATED {sf0, sf10, sf20, sf50, sf100, sf200, sf500, sf1000}, + mpe-Threshold-r17 ENUMERATED {dB3, dB6, dB9, dB12}, + numberOfN-r17 INTEGER(1..4), + ... +} + +-- TAG-PHR-CONFIG-STOP +-- TAG-PHYSCELLID-START + +PhysCellId ::= INTEGER (0..1007) + +-- TAG-PHYSCELLID-STOP +-- TAG-PHYSICALCELLGROUPCONFIG-START + +PhysicalCellGroupConfig ::= SEQUENCE { + harq-ACK-SpatialBundlingPUCCH ENUMERATED {true} OPTIONAL, -- Need S + harq-ACK-SpatialBundlingPUSCH ENUMERATED {true} OPTIONAL, -- Need S + p-NR-FR1 P-Max OPTIONAL, -- Need R + pdsch-HARQ-ACK-Codebook ENUMERATED {semiStatic, dynamic}, + tpc-SRS-RNTI RNTI-Value OPTIONAL, -- Need R + tpc-PUCCH-RNTI RNTI-Value OPTIONAL, -- Need R + tpc-PUSCH-RNTI RNTI-Value OPTIONAL, -- Need R + sp-CSI-RNTI RNTI-Value OPTIONAL, -- Need R + cs-RNTI SetupRelease { RNTI-Value } OPTIONAL, -- Need M + ..., + [[ + mcs-C-RNTI RNTI-Value OPTIONAL, -- Need R + p-UE-FR1 P-Max OPTIONAL -- Cond MCG-Only + ]], + [[ + xScale ENUMERATED {dB0, dB6, spare2, spare1} OPTIONAL -- Cond SCG-Only + ]], + [[ + pdcch-BlindDetection SetupRelease { PDCCH-BlindDetection } OPTIONAL -- Need M + ]], + [[ + dcp-Config-r16 SetupRelease { DCP-Config-r16 } OPTIONAL, -- Need M + harq-ACK-SpatialBundlingPUCCH-secondaryPUCCHgroup-r16 ENUMERATED {enabled, disabled} OPTIONAL, -- Cond twoPUCCHgroup + harq-ACK-SpatialBundlingPUSCH-secondaryPUCCHgroup-r16 ENUMERATED {enabled, disabled} OPTIONAL, -- Cond twoPUCCHgroup + pdsch-HARQ-ACK-Codebook-secondaryPUCCHgroup-r16 ENUMERATED {semiStatic, dynamic} OPTIONAL, -- Cond twoPUCCHgroup + p-NR-FR2-r16 P-Max OPTIONAL, -- Need R + p-UE-FR2-r16 P-Max OPTIONAL, -- Cond MCG-Only + nrdc-PCmode-FR1-r16 ENUMERATED {semi-static-mode1, semi-static-mode2, dynamic} OPTIONAL, -- Cond MCG-Only + nrdc-PCmode-FR2-r16 ENUMERATED {semi-static-mode1, semi-static-mode2, dynamic} OPTIONAL, -- Cond MCG-Only + pdsch-HARQ-ACK-Codebook-r16 ENUMERATED {enhancedDynamic} OPTIONAL, -- Need R + nfi-TotalDAI-Included-r16 ENUMERATED {true} OPTIONAL, -- Need R + ul-TotalDAI-Included-r16 ENUMERATED {true} OPTIONAL, -- Need R + pdsch-HARQ-ACK-OneShotFeedback-r16 ENUMERATED {true} OPTIONAL, -- Need R + pdsch-HARQ-ACK-OneShotFeedbackNDI-r16 ENUMERATED {true} OPTIONAL, -- Need R + pdsch-HARQ-ACK-OneShotFeedbackCBG-r16 ENUMERATED {true} OPTIONAL, -- Need R + downlinkAssignmentIndexDCI-0-2-r16 ENUMERATED { enabled } OPTIONAL, -- Need S + downlinkAssignmentIndexDCI-1-2-r16 ENUMERATED {n1, n2, n4} OPTIONAL, -- Need S + pdsch-HARQ-ACK-CodebookList-r16 SetupRelease {PDSCH-HARQ-ACK-CodebookList-r16} OPTIONAL, -- Need M + ackNackFeedbackMode-r16 ENUMERATED {joint, separate} OPTIONAL, -- Need R + pdcch-BlindDetectionCA-CombIndicator-r16 SetupRelease { PDCCH-BlindDetectionCA-CombIndicator-r16 } OPTIONAL, -- Need M + pdcch-BlindDetection2-r16 SetupRelease { PDCCH-BlindDetection2-r16 } OPTIONAL, -- Need M + pdcch-BlindDetection3-r16 SetupRelease { PDCCH-BlindDetection3-r16 } OPTIONAL, -- Need M + bdFactorR-r16 ENUMERATED {n1} OPTIONAL -- Need R + ]], + [[ + -- start of enhanced Type3 feedback + pdsch-HARQ-ACK-EnhType3ToAddModList-r17 SEQUENCE (SIZE(1..maxNrofEnhType3HARQ-ACK-r17)) OF PDSCH-HARQ-ACK-EnhType3-r17 + OPTIONAL, -- Need N + pdsch-HARQ-ACK-EnhType3ToReleaseList-r17 SEQUENCE (SIZE(1..maxNrofEnhType3HARQ-ACK-r17)) OF PDSCH-HARQ-ACK-EnhType3Index-r17 + OPTIONAL, -- Need N + pdsch-HARQ-ACK-EnhType3SecondaryToAddModList-r17 SEQUENCE (SIZE(1..maxNrofEnhType3HARQ-ACK-r17)) OF PDSCH-HARQ-ACK-EnhType3-r17 + OPTIONAL, -- Need N + pdsch-HARQ-ACK-EnhType3SecondaryToReleaseList-r17 SEQUENCE (SIZE(1..maxNrofEnhType3HARQ-ACK-r17)) OF PDSCH-HARQ-ACK-EnhType3Index-r17 + OPTIONAL, -- Need N + pdsch-HARQ-ACK-EnhType3DCI-FieldSecondaryPUCCHgroup-r17 ENUMERATED {enabled} OPTIONAL, -- Cond twoPUCCHgroup + pdsch-HARQ-ACK-EnhType3DCI-Field-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + -- end of enhanced Type3 feedback + + -- start of triggering of HARQ-ACK re-transmission on a PUCCH resource + pdsch-HARQ-ACK-Retx-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + pdsch-HARQ-ACK-RetxSecondaryPUCCHgroup-r17 ENUMERATED {enabled} OPTIONAL, -- Cond twoPUCCHgroup + -- end of triggering of HARQ-ACK re-transmission on a PUCCH resource + + -- start of PUCCH Cell switching + pucch-sSCell-r17 SCellIndex OPTIONAL, -- Need R + pucch-sSCellSecondaryPUCCHgroup-r17 SCellIndex OPTIONAL, -- Cond twoPUCCHgroup + pucch-sSCellDyn-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + pucch-sSCellDynSecondaryPUCCHgroup-r17 ENUMERATED {enabled} OPTIONAL, -- Cond twoPUCCHgroup + pucch-sSCellPattern-r17 SEQUENCE (SIZE(1..maxNrofSlots)) OF INTEGER (0..1) OPTIONAL, -- Need R + pucch-sSCellPatternSecondaryPUCCHgroup-r17 SEQUENCE (SIZE(1..maxNrofSlots)) OF INTEGER (0..1) OPTIONAL, -- Cond twoPUCCHgroup + -- end of PUCCH Cell switching + + uci-MuxWithDiffPrio-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + uci-MuxWithDiffPrioSecondaryPUCCHgroup-r17 ENUMERATED {enabled} OPTIONAL, -- Cond twoPUCCHgroup + simultaneousPUCCH-PUSCH-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + simultaneousPUCCH-PUSCH-SecondaryPUCCHgroup-r17 ENUMERATED {enabled} OPTIONAL, -- Cond twoPUCCHgroup + + prioLowDG-HighCG-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + prioHighDG-LowCG-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + twoQCLTypeDforPDCCHRepetition-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + multicastConfig-r17 SetupRelease { MulticastConfig-r17 } OPTIONAL, -- Need M + pdcch-BlindDetectionCA-CombIndicator-r17 SetupRelease { PDCCH-BlindDetectionCA-CombIndicator-r17 } OPTIONAL -- Need M + ]], + [[ + simultaneousSR-PUSCH-diffPUCCH-Groups-r17 ENUMERATED {enabled} OPTIONAL -- Cond twoPUCCHgroup + ]], + [[ + intraBandNC-PRACH-simulTx-r17 ENUMERATED {enabled} OPTIONAL -- Need R + ]] +} + + +PDSCH-HARQ-ACK-EnhType3-r17 ::= SEQUENCE { + pdsch-HARQ-ACK-EnhType3Index-r17 PDSCH-HARQ-ACK-EnhType3Index-r17, + applicable-r17 CHOICE { + perCC SEQUENCE (SIZE (1..maxNrofServingCells)) OF INTEGER (0..1), + perHARQ SEQUENCE (SIZE (1..maxNrofServingCells)) OF BIT STRING (SIZE (16)) + }, + pdsch-HARQ-ACK-EnhType3NDI-r17 ENUMERATED {true} OPTIONAL, -- Need R + pdsch-HARQ-ACK-EnhType3CBG-r17 ENUMERATED {true} OPTIONAL, -- Need S + ... +} + +PDSCH-HARQ-ACK-EnhType3Index-r17 ::= INTEGER (0..maxNrofEnhType3HARQ-ACK-1-r17) + +PDCCH-BlindDetection ::= INTEGER (1..15) + +DCP-Config-r16 ::= SEQUENCE { + ps-RNTI-r16 RNTI-Value, + ps-Offset-r16 INTEGER (1..120), + sizeDCI-2-6-r16 INTEGER (1..maxDCI-2-6-Size-r16), + ps-PositionDCI-2-6-r16 INTEGER (0..maxDCI-2-6-Size-1-r16), + ps-WakeUp-r16 ENUMERATED {true} OPTIONAL, -- Need S + ps-TransmitPeriodicL1-RSRP-r16 ENUMERATED {true} OPTIONAL, -- Need S + ps-TransmitOtherPeriodicCSI-r16 ENUMERATED {true} OPTIONAL -- Need S +} + +PDSCH-HARQ-ACK-CodebookList-r16 ::= SEQUENCE (SIZE (1..2)) OF ENUMERATED {semiStatic, dynamic} + +PDCCH-BlindDetectionCA-CombIndicator-r16 ::= SEQUENCE { + pdcch-BlindDetectionCA1-r16 INTEGER (1..15), + pdcch-BlindDetectionCA2-r16 INTEGER (1..15) +} + +PDCCH-BlindDetection2-r16 ::= INTEGER (1..15) + +PDCCH-BlindDetection3-r16 ::= INTEGER (1..15) + +MulticastConfig-r17 ::= SEQUENCE { + pdsch-HARQ-ACK-CodebookListMulticast-r17 SetupRelease { PDSCH-HARQ-ACK-CodebookList-r16} OPTIONAL, -- Need M + type1-Codebook-GenerationMode-r17 ENUMERATED { mode1, mode2} OPTIONAL -- Need M +} + +PDCCH-BlindDetectionCA-CombIndicator-r17 ::= SEQUENCE { + pdcch-BlindDetectionCA1-r17 INTEGER (1..15) OPTIONAL, -- Need R + pdcch-BlindDetectionCA2-r17 INTEGER (1..15) OPTIONAL, -- Need R + pdcch-BlindDetectionCA3-r17 INTEGER (1..15) +} + +-- TAG-PHYSICALCELLGROUPCONFIG-STOP +-- TAG-PLMN-IDENTITY-START + +PLMN-Identity ::= SEQUENCE { + mcc MCC OPTIONAL, -- Cond MCC + mnc MNC +} + +MCC ::= SEQUENCE (SIZE (3)) OF MCC-MNC-Digit + +MNC ::= SEQUENCE (SIZE (2..3)) OF MCC-MNC-Digit + +MCC-MNC-Digit ::= INTEGER (0..9) + +-- TAG-PLMN-IDENTITY-STOP +-- TAG-PLMN-IDENTITYINFOLIST-START + +PLMN-IdentityInfoList ::= SEQUENCE (SIZE (1..maxPLMN)) OF PLMN-IdentityInfo + +PLMN-IdentityInfo ::= SEQUENCE { + plmn-IdentityList SEQUENCE (SIZE (1..maxPLMN)) OF PLMN-Identity, + trackingAreaCode TrackingAreaCode OPTIONAL, -- Need R + ranac RAN-AreaCode OPTIONAL, -- Need R + cellIdentity CellIdentity, + cellReservedForOperatorUse ENUMERATED {reserved, notReserved}, + ..., + [[ + iab-Support-r16 ENUMERATED {true} OPTIONAL -- Need S + ]], + [[ + trackingAreaList-r17 SEQUENCE (SIZE (1..maxTAC-r17)) OF TrackingAreaCode OPTIONAL, -- Need R + gNB-ID-Length-r17 INTEGER (22..32) OPTIONAL -- Need R + ]] +} +-- TAG-PLMN-IDENTITYINFOLIST-STOP +-- TAG-PLMNIDENTITYLIST2-START + +PLMN-IdentityList2-r16 ::= SEQUENCE (SIZE (1..16)) OF PLMN-Identity + +-- TAG-PLMNIDENTITYLIST2-STOP +-- TAG-PRB-ID-START + +PRB-Id ::= INTEGER (0..maxNrofPhysicalResourceBlocks-1) + +-- TAG-PRB-ID-STOP +-- TAG-PTRS-DOWNLINKCONFIG-START + +PTRS-DownlinkConfig ::= SEQUENCE { + frequencyDensity SEQUENCE (SIZE (2)) OF INTEGER (1..276) OPTIONAL, -- Need S + timeDensity SEQUENCE (SIZE (3)) OF INTEGER (0..29) OPTIONAL, -- Need S + epre-Ratio INTEGER (0..3) OPTIONAL, -- Need S + resourceElementOffset ENUMERATED { offset01, offset10, offset11 } OPTIONAL, -- Need S + ..., + [[ + maxNrofPorts-r16 ENUMERATED {n1, n2} OPTIONAL -- Need R + ]] + +} + +-- TAG-PTRS-DOWNLINKCONFIG-STOP +-- TAG-PTRS-UPLINKCONFIG-START + +PTRS-UplinkConfig ::= SEQUENCE { + transformPrecoderDisabled SEQUENCE { + frequencyDensity SEQUENCE (SIZE (2)) OF INTEGER (1..276) OPTIONAL, -- Need S + timeDensity SEQUENCE (SIZE (3)) OF INTEGER (0..29) OPTIONAL, -- Need S + maxNrofPorts ENUMERATED {n1, n2}, + resourceElementOffset ENUMERATED {offset01, offset10, offset11 } OPTIONAL, -- Need S + ptrs-Power ENUMERATED {p00, p01, p10, p11} + } OPTIONAL, -- Need R + transformPrecoderEnabled SEQUENCE { + sampleDensity SEQUENCE (SIZE (5)) OF INTEGER (1..276), + timeDensityTransformPrecoding ENUMERATED {d2} OPTIONAL -- Need S + } OPTIONAL, -- Need R + ... +} + +-- TAG-PTRS-UPLINKCONFIG-STOP +-- TAG-PUCCH-CONFIG-START + +PUCCH-Config ::= SEQUENCE { + resourceSetToAddModList SEQUENCE (SIZE (1..maxNrofPUCCH-ResourceSets)) OF PUCCH-ResourceSet OPTIONAL, -- Need N + resourceSetToReleaseList SEQUENCE (SIZE (1..maxNrofPUCCH-ResourceSets)) OF PUCCH-ResourceSetId OPTIONAL, -- Need N + resourceToAddModList SEQUENCE (SIZE (1..maxNrofPUCCH-Resources)) OF PUCCH-Resource OPTIONAL, -- Need N + resourceToReleaseList SEQUENCE (SIZE (1..maxNrofPUCCH-Resources)) OF PUCCH-ResourceId OPTIONAL, -- Need N + format1 SetupRelease { PUCCH-FormatConfig } OPTIONAL, -- Need M + format2 SetupRelease { PUCCH-FormatConfig } OPTIONAL, -- Need M + format3 SetupRelease { PUCCH-FormatConfig } OPTIONAL, -- Need M + format4 SetupRelease { PUCCH-FormatConfig } OPTIONAL, -- Need M + schedulingRequestResourceToAddModList SEQUENCE (SIZE (1..maxNrofSR-Resources)) OF SchedulingRequestResourceConfig + OPTIONAL, -- Need N + schedulingRequestResourceToReleaseList SEQUENCE (SIZE (1..maxNrofSR-Resources)) OF SchedulingRequestResourceId + OPTIONAL, -- Need N + multi-CSI-PUCCH-ResourceList SEQUENCE (SIZE (1..2)) OF PUCCH-ResourceId OPTIONAL, -- Need M + dl-DataToUL-ACK SEQUENCE (SIZE (1..8)) OF INTEGER (0..15) OPTIONAL, -- Need M + spatialRelationInfoToAddModList SEQUENCE (SIZE (1..maxNrofSpatialRelationInfos)) OF PUCCH-SpatialRelationInfo + OPTIONAL, -- Need N + spatialRelationInfoToReleaseList SEQUENCE (SIZE (1..maxNrofSpatialRelationInfos)) OF PUCCH-SpatialRelationInfoId + OPTIONAL, -- Need N + pucch-PowerControl PUCCH-PowerControl OPTIONAL, -- Need M + ..., + [[ + resourceToAddModListExt-v1610 SEQUENCE (SIZE (1..maxNrofPUCCH-Resources)) OF PUCCH-ResourceExt-v1610 OPTIONAL, -- Need N + dl-DataToUL-ACK-r16 SetupRelease { DL-DataToUL-ACK-r16 } OPTIONAL, -- Need M + ul-AccessConfigListDCI-1-1-r16 SetupRelease { UL-AccessConfigListDCI-1-1-r16 } OPTIONAL, -- Need M + subslotLengthForPUCCH-r16 CHOICE { + normalCP-r16 ENUMERATED {n2,n7}, + extendedCP-r16 ENUMERATED {n2,n6} + } OPTIONAL, -- Need R + dl-DataToUL-ACK-DCI-1-2-r16 SetupRelease { DL-DataToUL-ACK-DCI-1-2-r16} OPTIONAL, -- Need M + numberOfBitsForPUCCH-ResourceIndicatorDCI-1-2-r16 INTEGER (0..3) OPTIONAL, -- Need R + dmrs-UplinkTransformPrecodingPUCCH-r16 ENUMERATED {enabled} OPTIONAL, -- Cond PI2-BPSK + spatialRelationInfoToAddModListSizeExt-v1610 SEQUENCE (SIZE (1..maxNrofSpatialRelationInfosDiff-r16)) OF PUCCH-SpatialRelationInfo + OPTIONAL, -- Need N + spatialRelationInfoToReleaseListSizeExt-v1610 SEQUENCE (SIZE (1..maxNrofSpatialRelationInfosDiff-r16)) OF PUCCH-SpatialRelationInfoId + OPTIONAL, -- Need N + spatialRelationInfoToAddModListExt-v1610 SEQUENCE (SIZE (1..maxNrofSpatialRelationInfos-r16)) OF PUCCH-SpatialRelationInfoExt-r16 + OPTIONAL, -- Need N + spatialRelationInfoToReleaseListExt-v1610 SEQUENCE (SIZE (1..maxNrofSpatialRelationInfos-r16)) OF + PUCCH-SpatialRelationInfoId-r16 OPTIONAL, -- Need N + resourceGroupToAddModList-r16 SEQUENCE (SIZE (1..maxNrofPUCCH-ResourceGroups-r16)) OF PUCCH-ResourceGroup-r16 + OPTIONAL, -- Need N + resourceGroupToReleaseList-r16 SEQUENCE (SIZE (1..maxNrofPUCCH-ResourceGroups-r16)) OF PUCCH-ResourceGroupId-r16 + OPTIONAL, -- Need N + sps-PUCCH-AN-List-r16 SetupRelease { SPS-PUCCH-AN-List-r16 } OPTIONAL, -- Need M + schedulingRequestResourceToAddModListExt-v1610 SEQUENCE (SIZE (1..maxNrofSR-Resources)) OF SchedulingRequestResourceConfigExt-v1610 + OPTIONAL -- Need N + ]], + [[ + format0-r17 SetupRelease { PUCCH-FormatConfig } OPTIONAL, -- Need M + format2Ext-r17 SetupRelease { PUCCH-FormatConfigExt-r17 } OPTIONAL, -- Need M + format3Ext-r17 SetupRelease { PUCCH-FormatConfigExt-r17 } OPTIONAL, -- Need M + format4Ext-r17 SetupRelease { PUCCH-FormatConfigExt-r17 } OPTIONAL, -- Need M + ul-AccessConfigListDCI-1-2-r17 SetupRelease { UL-AccessConfigListDCI-1-2-r17 } OPTIONAL, -- Need M + mappingPattern-r17 ENUMERATED {cyclicMapping, sequentialMapping} OPTIONAL, -- Need R + powerControlSetInfoToAddModList-r17 SEQUENCE (SIZE (1..maxNrofPowerControlSetInfos-r17)) OF PUCCH-PowerControlSetInfo-r17 + OPTIONAL, -- Need N + powerControlSetInfoToReleaseList-r17 SEQUENCE (SIZE (1..maxNrofPowerControlSetInfos-r17)) OF PUCCH-PowerControlSetInfoId-r17 + OPTIONAL, -- Need N + secondTPCFieldDCI-1-1-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + secondTPCFieldDCI-1-2-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + dl-DataToUL-ACK-r17 SetupRelease { DL-DataToUL-ACK-r17 } OPTIONAL, -- Need M + dl-DataToUL-ACK-DCI-1-2-r17 SetupRelease { DL-DataToUL-ACK-DCI-1-2-r17} OPTIONAL, -- Need M + ul-AccessConfigListDCI-1-1-r17 SetupRelease { UL-AccessConfigListDCI-1-1-r17 } OPTIONAL, -- Need M + schedulingRequestResourceToAddModListExt-v1700 SEQUENCE (SIZE (1..maxNrofSR-Resources)) OF SchedulingRequestResourceConfigExt-v1700 + OPTIONAL, -- Need N + dmrs-BundlingPUCCH-Config-r17 SetupRelease { DMRS-BundlingPUCCH-Config-r17 } OPTIONAL, -- Need M + dl-DataToUL-ACK-v1700 SetupRelease { DL-DataToUL-ACK-v1700 } OPTIONAL, -- Need M + dl-DataToUL-ACK-MulticastDCI-Format4-1-r17 SetupRelease { DL-DataToUL-ACK-MulticastDCI-Format4-1-r17 } OPTIONAL, -- Need M + sps-PUCCH-AN-ListMulticast-r17 SetupRelease { SPS-PUCCH-AN-List-r16 } OPTIONAL -- Need M + ]] +} + +PUCCH-FormatConfig ::= SEQUENCE { + interslotFrequencyHopping ENUMERATED {enabled} OPTIONAL, -- Need R + additionalDMRS ENUMERATED {true} OPTIONAL, -- Need R + maxCodeRate PUCCH-MaxCodeRate OPTIONAL, -- Need R + nrofSlots ENUMERATED {n2,n4,n8} OPTIONAL, -- Need S + pi2BPSK ENUMERATED {enabled} OPTIONAL, -- Need R + simultaneousHARQ-ACK-CSI ENUMERATED {true} OPTIONAL -- Need R +} + +PUCCH-FormatConfigExt-r17 ::= SEQUENCE { + maxCodeRateLP-r17 PUCCH-MaxCodeRate OPTIONAL, -- Need R + ... +} + +PUCCH-MaxCodeRate ::= ENUMERATED {zeroDot08, zeroDot15, zeroDot25, zeroDot35, zeroDot45, zeroDot60, zeroDot80} + +-- A set with one or more PUCCH resources +PUCCH-ResourceSet ::= SEQUENCE { + pucch-ResourceSetId PUCCH-ResourceSetId, + resourceList SEQUENCE (SIZE (1..maxNrofPUCCH-ResourcesPerSet)) OF PUCCH-ResourceId, + maxPayloadSize INTEGER (4..256) OPTIONAL -- Need R +} + +PUCCH-ResourceSetId ::= INTEGER (0..maxNrofPUCCH-ResourceSets-1) + +PUCCH-Resource ::= SEQUENCE { + pucch-ResourceId PUCCH-ResourceId, + startingPRB PRB-Id, + intraSlotFrequencyHopping ENUMERATED { enabled } OPTIONAL, -- Need R + secondHopPRB PRB-Id OPTIONAL, -- Need R + format CHOICE { + format0 PUCCH-format0, + format1 PUCCH-format1, + format2 PUCCH-format2, + format3 PUCCH-format3, + format4 PUCCH-format4 + } +} + +PUCCH-ResourceExt-v1610 ::= SEQUENCE { + interlaceAllocation-r16 SEQUENCE { + rb-SetIndex-r16 INTEGER (0..4), + interlace0-r16 CHOICE { + scs15 INTEGER (0..9), + scs30 INTEGER (0..4) + } + } OPTIONAL, --Need R + format-v1610 CHOICE { + interlace1-v1610 INTEGER (0..9), + occ-v1610 SEQUENCE { + occ-Length-v1610 ENUMERATED {n2,n4} OPTIONAL, -- Need M + occ-Index-v1610 ENUMERATED {n0,n1,n2,n3} OPTIONAL -- Need M + } + } OPTIONAL, -- Need R + ..., + [[ + formatExt-v1700 SEQUENCE { + nrofPRBs-r17 INTEGER (1..16) + } OPTIONAL, -- Need R + pucch-RepetitionNrofSlots-r17 ENUMERATED { n1,n2,n4,n8 } OPTIONAL -- Need R + ]] +} + +PUCCH-ResourceId ::= INTEGER (0..maxNrofPUCCH-Resources-1) + + +PUCCH-format0 ::= SEQUENCE { + initialCyclicShift INTEGER(0..11), + nrofSymbols INTEGER (1..2), + startingSymbolIndex INTEGER(0..13) +} + +PUCCH-format1 ::= SEQUENCE { + initialCyclicShift INTEGER(0..11), + nrofSymbols INTEGER (4..14), + startingSymbolIndex INTEGER(0..10), + timeDomainOCC INTEGER(0..6) +} + +PUCCH-format2 ::= SEQUENCE { + nrofPRBs INTEGER (1..16), + nrofSymbols INTEGER (1..2), + startingSymbolIndex INTEGER(0..13) +} + +PUCCH-format3 ::= SEQUENCE { + nrofPRBs INTEGER (1..16), + nrofSymbols INTEGER (4..14), + startingSymbolIndex INTEGER(0..10) +} + +PUCCH-format4 ::= SEQUENCE { + nrofSymbols INTEGER (4..14), + occ-Length ENUMERATED {n2,n4}, + occ-Index ENUMERATED {n0,n1,n2,n3}, + startingSymbolIndex INTEGER(0..10) +} + +PUCCH-ResourceGroup-r16 ::= SEQUENCE { + pucch-ResourceGroupId-r16 PUCCH-ResourceGroupId-r16, + resourcePerGroupList-r16 SEQUENCE (SIZE (1..maxNrofPUCCH-ResourcesPerGroup-r16)) OF PUCCH-ResourceId +} + +PUCCH-ResourceGroupId-r16 ::= INTEGER (0..maxNrofPUCCH-ResourceGroups-1-r16) + +DL-DataToUL-ACK-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (-1..15) + +DL-DataToUL-ACK-r17 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (-1..127) + +DL-DataToUL-ACK-v1700 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (16..31) + +DL-DataToUL-ACK-DCI-1-2-r16 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (0..15) + +DL-DataToUL-ACK-DCI-1-2-r17 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (0..127) + +UL-AccessConfigListDCI-1-1-r16 ::= SEQUENCE (SIZE (1..16)) OF INTEGER (0..15) + +UL-AccessConfigListDCI-1-2-r17 ::= SEQUENCE (SIZE (1..16)) OF INTEGER (0..15) + +UL-AccessConfigListDCI-1-1-r17 ::= SEQUENCE (SIZE (1..3)) OF INTEGER (0..2) + +DL-DataToUL-ACK-MulticastDCI-Format4-1-r17 ::= SEQUENCE (SIZE (1..8)) OF INTEGER (0..15) + +-- TAG-PUCCH-CONFIG-STOP +-- TAG-PUCCH-CONFIGCOMMON-START + +PUCCH-ConfigCommon ::= SEQUENCE { + pucch-ResourceCommon INTEGER (0..15) OPTIONAL, -- Cond InitialBWP-Only + pucch-GroupHopping ENUMERATED { neither, enable, disable }, + hoppingId INTEGER (0..1023) OPTIONAL, -- Need R + p0-nominal INTEGER (-202..24) OPTIONAL, -- Need R + ..., + [[ + nrofPRBs INTEGER (1..16) OPTIONAL, -- Need R + intra-SlotFH-r17 ENUMERATED {fromLowerEdge, fromUpperEdge} OPTIONAL, -- Need R + pucch-ResourceCommonRedCap-r17 INTEGER (0..15) OPTIONAL, -- Cond InitialBWP-RedCap + additionalPRBOffset-r17 ENUMERATED {n2, n3, n4, n6, n8, n9, n10, n12} OPTIONAL -- Need S + ]] +} + +-- TAG-PUCCH-CONFIGCOMMON-STOP +-- TAG-PUCCH-CONFIGURATIONLIST-START + +PUCCH-ConfigurationList-r16 ::= SEQUENCE (SIZE (1..2)) OF PUCCH-Config + +-- TAG-PUCCH-CONFIGURATIONLIST-STOP +-- TAG-PUCCH-PATHLOSSREFERENCERS-ID-START + +PUCCH-PathlossReferenceRS-Id ::= INTEGER (0..maxNrofPUCCH-PathlossReferenceRSs-1) + +PUCCH-PathlossReferenceRS-Id-v1610 ::= INTEGER (maxNrofPUCCH-PathlossReferenceRSs..maxNrofPUCCH-PathlossReferenceRSs-1-r16) + +PUCCH-PathlossReferenceRS-Id-r17 ::= INTEGER (0..maxNrofPUCCH-PathlossReferenceRSs-1-r17) + +-- TAG-PUCCH-PATHLOSSREFERENCERS-ID-STOP +-- TAG-PUCCH-POWERCONTROL-START +PUCCH-PowerControl ::= SEQUENCE { + deltaF-PUCCH-f0 INTEGER (-16..15) OPTIONAL, -- Need R + deltaF-PUCCH-f1 INTEGER (-16..15) OPTIONAL, -- Need R + deltaF-PUCCH-f2 INTEGER (-16..15) OPTIONAL, -- Need R + deltaF-PUCCH-f3 INTEGER (-16..15) OPTIONAL, -- Need R + deltaF-PUCCH-f4 INTEGER (-16..15) OPTIONAL, -- Need R + p0-Set SEQUENCE (SIZE (1..maxNrofPUCCH-P0-PerSet)) OF P0-PUCCH OPTIONAL, -- Need M + pathlossReferenceRSs SEQUENCE (SIZE (1..maxNrofPUCCH-PathlossReferenceRSs)) OF PUCCH-PathlossReferenceRS + OPTIONAL, -- Need M + twoPUCCH-PC-AdjustmentStates ENUMERATED {twoStates} OPTIONAL, -- Need S + ..., + [[ + pathlossReferenceRSs-v1610 SetupRelease { PathlossReferenceRSs-v1610 } OPTIONAL -- Need M + ]] +} + +P0-PUCCH ::= SEQUENCE { + p0-PUCCH-Id P0-PUCCH-Id, + p0-PUCCH-Value INTEGER (-16..15) +} + +P0-PUCCH-Id ::= INTEGER (1..8) + +PathlossReferenceRSs-v1610 ::= SEQUENCE (SIZE (1..maxNrofPUCCH-PathlossReferenceRSsDiff-r16)) OF PUCCH-PathlossReferenceRS-r16 + +PUCCH-PathlossReferenceRS ::= SEQUENCE { + pucch-PathlossReferenceRS-Id PUCCH-PathlossReferenceRS-Id, + referenceSignal CHOICE { + ssb-Index SSB-Index, + csi-RS-Index NZP-CSI-RS-ResourceId + } +} + +PUCCH-PathlossReferenceRS-r16 ::= SEQUENCE { + pucch-PathlossReferenceRS-Id-r16 PUCCH-PathlossReferenceRS-Id-v1610, + referenceSignal-r16 CHOICE { + ssb-Index-r16 SSB-Index, + csi-RS-Index-r16 NZP-CSI-RS-ResourceId + } +} + +PUCCH-PowerControlSetInfo-r17 ::= SEQUENCE { + pucch-PowerControlSetInfoId-r17 PUCCH-PowerControlSetInfoId-r17, + p0-PUCCH-Id-r17 P0-PUCCH-Id, + pucch-ClosedLoopIndex-r17 ENUMERATED { i0, i1 }, + pucch-PathlossReferenceRS-Id-r17 PUCCH-PathlossReferenceRS-Id-r17 +} + +PUCCH-PowerControlSetInfoId-r17 ::= INTEGER (1.. maxNrofPowerControlSetInfos-r17) + +-- TAG-PUCCH-POWERCONTROL-STOP +-- TAG-PUCCH-SPATIALRELATIONINFO-START + +PUCCH-SpatialRelationInfo ::= SEQUENCE { + pucch-SpatialRelationInfoId PUCCH-SpatialRelationInfoId, + servingCellId ServCellIndex OPTIONAL, -- Need S + referenceSignal CHOICE { + ssb-Index SSB-Index, + csi-RS-Index NZP-CSI-RS-ResourceId, + srs PUCCH-SRS + }, + pucch-PathlossReferenceRS-Id PUCCH-PathlossReferenceRS-Id, + p0-PUCCH-Id P0-PUCCH-Id, + closedLoopIndex ENUMERATED { i0, i1 } +} + +PUCCH-SpatialRelationInfoExt-r16 ::= SEQUENCE { + pucch-SpatialRelationInfoId-v1610 PUCCH-SpatialRelationInfoId-v1610 OPTIONAL, -- Need S + pucch-PathlossReferenceRS-Id-v1610 PUCCH-PathlossReferenceRS-Id-v1610 OPTIONAL, --Need R + ... +} + +PUCCH-SRS ::= SEQUENCE { + resource SRS-ResourceId, + uplinkBWP BWP-Id +} + +-- TAG-PUCCH-SPATIALRELATIONINFO-STOP +-- TAG-PUCCH-SPATIALRELATIONINFO-START + +PUCCH-SpatialRelationInfoId ::= INTEGER (1..maxNrofSpatialRelationInfos) + +PUCCH-SpatialRelationInfoId-r16 ::= INTEGER (1..maxNrofSpatialRelationInfos-r16) + +PUCCH-SpatialRelationInfoId-v1610::= INTEGER (maxNrofSpatialRelationInfos-plus-1..maxNrofSpatialRelationInfos-r16) + +-- TAG-PUCCH-SPATIALRELATIONINFO-STOP +-- TAG-PUCCH-TPC-COMMANDCONFIG-START + +PUCCH-TPC-CommandConfig ::= SEQUENCE { + tpc-IndexPCell INTEGER (1..15) OPTIONAL, -- Cond PDCCH-OfSpcell + tpc-IndexPUCCH-SCell INTEGER (1..15) OPTIONAL, -- Cond PDCCH-ofSpCellOrPUCCH-SCell + ..., + [[ + tpc-IndexPUCCH-sSCell-r17 INTEGER (1..15) OPTIONAL, -- Need R + tpc-IndexPUCCH-sScellSecondaryPUCCHgroup-r17 INTEGER (1..15) OPTIONAL -- Cond twoPUCCHgroup + ]] +} + +-- TAG-PUCCH-TPC-COMMANDCONFIG-STOP +-- TAG-PUSCH-CONFIG-START + +PUSCH-Config ::= SEQUENCE { + dataScramblingIdentityPUSCH INTEGER (0..1023) OPTIONAL, -- Need S + txConfig ENUMERATED {codebook, nonCodebook} OPTIONAL, -- Need S + dmrs-UplinkForPUSCH-MappingTypeA SetupRelease { DMRS-UplinkConfig } OPTIONAL, -- Need M + dmrs-UplinkForPUSCH-MappingTypeB SetupRelease { DMRS-UplinkConfig } OPTIONAL, -- Need M + pusch-PowerControl PUSCH-PowerControl OPTIONAL, -- Need M + frequencyHopping ENUMERATED {intraSlot, interSlot} OPTIONAL, -- Need S + frequencyHoppingOffsetLists SEQUENCE (SIZE (1..4)) OF INTEGER (1.. maxNrofPhysicalResourceBlocks-1) + OPTIONAL, -- Need M + resourceAllocation ENUMERATED { resourceAllocationType0, resourceAllocationType1, dynamicSwitch}, + pusch-TimeDomainAllocationList SetupRelease { PUSCH-TimeDomainResourceAllocationList } OPTIONAL, -- Need M + pusch-AggregationFactor ENUMERATED { n2, n4, n8 } OPTIONAL, -- Need S + mcs-Table ENUMERATED {qam256, qam64LowSE} OPTIONAL, -- Need S + mcs-TableTransformPrecoder ENUMERATED {qam256, qam64LowSE} OPTIONAL, -- Need S + transformPrecoder ENUMERATED {enabled, disabled} OPTIONAL, -- Need S + codebookSubset ENUMERATED {fullyAndPartialAndNonCoherent, partialAndNonCoherent,nonCoherent} + OPTIONAL, -- Cond codebookBased + maxRank INTEGER (1..4) OPTIONAL, -- Cond codebookBased + rbg-Size ENUMERATED { config2} OPTIONAL, -- Need S + uci-OnPUSCH SetupRelease { UCI-OnPUSCH} OPTIONAL, -- Need M + tp-pi2BPSK ENUMERATED {enabled} OPTIONAL, -- Need S + ..., + [[ + minimumSchedulingOffsetK2-r16 SetupRelease { MinSchedulingOffsetK2-Values-r16 } OPTIONAL, -- Need M + ul-AccessConfigListDCI-0-1-r16 SetupRelease { UL-AccessConfigListDCI-0-1-r16 } OPTIONAL, -- Need M + -- Start of the parameters for DCI format 0_2 introduced in V16.1.0 + harq-ProcessNumberSizeDCI-0-2-r16 INTEGER (0..4) OPTIONAL, -- Need R + dmrs-SequenceInitializationDCI-0-2-r16 ENUMERATED {enabled} OPTIONAL, -- Need S + numberOfBitsForRV-DCI-0-2-r16 INTEGER (0..2) OPTIONAL, -- Need R + antennaPortsFieldPresenceDCI-0-2-r16 ENUMERATED {enabled} OPTIONAL, -- Need S + dmrs-UplinkForPUSCH-MappingTypeA-DCI-0-2-r16 SetupRelease { DMRS-UplinkConfig } OPTIONAL, -- Need M + dmrs-UplinkForPUSCH-MappingTypeB-DCI-0-2-r16 SetupRelease { DMRS-UplinkConfig } OPTIONAL, -- Need M + frequencyHoppingDCI-0-2-r16 CHOICE { + pusch-RepTypeA ENUMERATED {intraSlot, interSlot}, + pusch-RepTypeB ENUMERATED {interRepetition, interSlot} + } OPTIONAL, -- Need S + frequencyHoppingOffsetListsDCI-0-2-r16 SetupRelease { FrequencyHoppingOffsetListsDCI-0-2-r16} OPTIONAL, -- Need M + codebookSubsetDCI-0-2-r16 ENUMERATED {fullyAndPartialAndNonCoherent, partialAndNonCoherent,nonCoherent} + OPTIONAL, -- Cond codebookBased + invalidSymbolPatternIndicatorDCI-0-2-r16 ENUMERATED {enabled} OPTIONAL, -- Need S + maxRankDCI-0-2-r16 INTEGER (1..4) OPTIONAL, -- Cond codebookBased + mcs-TableDCI-0-2-r16 ENUMERATED {qam256, qam64LowSE} OPTIONAL, -- Need S + mcs-TableTransformPrecoderDCI-0-2-r16 ENUMERATED {qam256, qam64LowSE} OPTIONAL, -- Need S + priorityIndicatorDCI-0-2-r16 ENUMERATED {enabled} OPTIONAL, -- Need S + pusch-RepTypeIndicatorDCI-0-2-r16 ENUMERATED { pusch-RepTypeA, pusch-RepTypeB} OPTIONAL, -- Need R + resourceAllocationDCI-0-2-r16 ENUMERATED { resourceAllocationType0, resourceAllocationType1, dynamicSwitch} + OPTIONAL, -- Need M + resourceAllocationType1GranularityDCI-0-2-r16 ENUMERATED { n2,n4,n8,n16 } OPTIONAL, -- Need S + uci-OnPUSCH-ListDCI-0-2-r16 SetupRelease { UCI-OnPUSCH-ListDCI-0-2-r16} OPTIONAL, -- Need M + pusch-TimeDomainAllocationListDCI-0-2-r16 SetupRelease { PUSCH-TimeDomainResourceAllocationList-r16 } + OPTIONAL, -- Need M + -- End of the parameters for DCI format 0_2 introduced in V16.1.0 + -- Start of the parameters for DCI format 0_1 introduced in V16.1.0 + pusch-TimeDomainAllocationListDCI-0-1-r16 SetupRelease { PUSCH-TimeDomainResourceAllocationList-r16 } + OPTIONAL, -- Need M + invalidSymbolPatternIndicatorDCI-0-1-r16 ENUMERATED {enabled} OPTIONAL, -- Need S + priorityIndicatorDCI-0-1-r16 ENUMERATED {enabled} OPTIONAL, -- Need S + pusch-RepTypeIndicatorDCI-0-1-r16 ENUMERATED { pusch-RepTypeA, pusch-RepTypeB} OPTIONAL, -- Need R + frequencyHoppingDCI-0-1-r16 ENUMERATED {interRepetition, interSlot} OPTIONAL, -- Cond RepTypeB + uci-OnPUSCH-ListDCI-0-1-r16 SetupRelease { UCI-OnPUSCH-ListDCI-0-1-r16 } OPTIONAL, -- Need M + -- End of the parameters for DCI format 0_1 introduced in V16.1.0 + invalidSymbolPattern-r16 InvalidSymbolPattern-r16 OPTIONAL, -- Need S + pusch-PowerControl-v1610 SetupRelease {PUSCH-PowerControl-v1610} OPTIONAL, -- Need M + ul-FullPowerTransmission-r16 ENUMERATED {fullpower, fullpowerMode1, fullpowerMode2} OPTIONAL, -- Need R + pusch-TimeDomainAllocationListForMultiPUSCH-r16 SetupRelease { PUSCH-TimeDomainResourceAllocationList-r16 } + OPTIONAL, -- Need M + numberOfInvalidSymbolsForDL-UL-Switching-r16 INTEGER (1..4) OPTIONAL -- Cond RepTypeB2 + ]], + [[ + ul-AccessConfigListDCI-0-2-r17 SetupRelease { UL-AccessConfigListDCI-0-2-r17 } OPTIONAL, -- Need M + betaOffsetsCrossPri0-r17 SetupRelease { BetaOffsetsCrossPriSel-r17 } OPTIONAL, -- Need M + betaOffsetsCrossPri1-r17 SetupRelease { BetaOffsetsCrossPriSel-r17 } OPTIONAL, -- Need M + betaOffsetsCrossPri0DCI-0-2-r17 SetupRelease { BetaOffsetsCrossPriSelDCI-0-2-r17 } OPTIONAL, -- Need M + betaOffsetsCrossPri1DCI-0-2-r17 SetupRelease { BetaOffsetsCrossPriSelDCI-0-2-r17 } OPTIONAL, -- Need M + mappingPattern-r17 ENUMERATED {cyclicMapping, sequentialMapping} OPTIONAL, -- Cond SRSsets + secondTPCFieldDCI-0-1-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + secondTPCFieldDCI-0-2-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + sequenceOffsetForRV-r17 INTEGER (0..3) OPTIONAL, -- Need R + ul-AccessConfigListDCI-0-1-r17 SetupRelease { UL-AccessConfigListDCI-0-1-r17 } OPTIONAL, -- Need M + minimumSchedulingOffsetK2-r17 SetupRelease { MinSchedulingOffsetK2-Values-r17 } OPTIONAL, -- Need M + availableSlotCounting-r17 ENUMERATED { enabled } OPTIONAL, -- Need S + dmrs-BundlingPUSCH-Config-r17 SetupRelease { DMRS-BundlingPUSCH-Config-r17 } OPTIONAL, -- Need M + harq-ProcessNumberSizeDCI-0-2-v1700 INTEGER (5) OPTIONAL, -- Need R + harq-ProcessNumberSizeDCI-0-1-r17 INTEGER (5) OPTIONAL, -- Need R + mpe-ResourcePoolToAddModList-r17 SEQUENCE (SIZE(1..maxMPE-Resources-r17)) OF MPE-Resource-r17 OPTIONAL, -- Need N + mpe-ResourcePoolToReleaseList-r17 SEQUENCE (SIZE(1..maxMPE-Resources-r17)) OF MPE-ResourceId-r17 OPTIONAL -- Need N + ]] +} + +UCI-OnPUSCH ::= SEQUENCE { + betaOffsets CHOICE { + dynamic SEQUENCE (SIZE (4)) OF BetaOffsets, + semiStatic BetaOffsets + } OPTIONAL, -- Need M + scaling ENUMERATED { f0p5, f0p65, f0p8, f1 } +} + +MinSchedulingOffsetK2-Values-r16 ::= SEQUENCE (SIZE (1..maxNrOfMinSchedulingOffsetValues-r16)) OF INTEGER (0..maxK2-SchedulingOffset-r16) + +MinSchedulingOffsetK2-Values-r17 ::= SEQUENCE (SIZE (1..maxNrOfMinSchedulingOffsetValues-r16)) OF INTEGER (0..maxK2-SchedulingOffset-r17) + +UCI-OnPUSCH-DCI-0-2-r16 ::= SEQUENCE { + betaOffsetsDCI-0-2-r16 CHOICE { + dynamicDCI-0-2-r16 CHOICE { + oneBit-r16 SEQUENCE (SIZE (2)) OF BetaOffsets, + twoBits-r16 SEQUENCE (SIZE (4)) OF BetaOffsets + }, + semiStaticDCI-0-2-r16 BetaOffsets + } OPTIONAL, -- Need M + scalingDCI-0-2-r16 ENUMERATED { f0p5, f0p65, f0p8, f1 } +} + +FrequencyHoppingOffsetListsDCI-0-2-r16 ::= SEQUENCE (SIZE (1..4)) OF INTEGER (1.. maxNrofPhysicalResourceBlocks-1) + +UCI-OnPUSCH-ListDCI-0-2-r16 ::= SEQUENCE (SIZE (1..2)) OF UCI-OnPUSCH-DCI-0-2-r16 + +UCI-OnPUSCH-ListDCI-0-1-r16 ::= SEQUENCE (SIZE (1..2)) OF UCI-OnPUSCH + +UL-AccessConfigListDCI-0-1-r16 ::= SEQUENCE (SIZE (1..64)) OF INTEGER (0..63) + +UL-AccessConfigListDCI-0-1-r17 ::= SEQUENCE (SIZE (1..3)) OF INTEGER (0..2) + +UL-AccessConfigListDCI-0-2-r17 ::= SEQUENCE (SIZE (1..64)) OF INTEGER (0..63) + +BetaOffsetsCrossPriSel-r17 ::= CHOICE { + dynamic-r17 SEQUENCE (SIZE (4)) OF BetaOffsetsCrossPri-r17, + semiStatic-r17 BetaOffsetsCrossPri-r17 +} + +BetaOffsetsCrossPriSelDCI-0-2-r17 ::= CHOICE { + dynamicDCI-0-2-r17 CHOICE { + oneBit-r17 SEQUENCE (SIZE (2)) OF BetaOffsetsCrossPri-r17, + twoBits-r17 SEQUENCE (SIZE (4)) OF BetaOffsetsCrossPri-r17 + }, + semiStaticDCI-0-2-r17 BetaOffsetsCrossPri-r17 +} + +MPE-Resource-r17 ::= SEQUENCE { + mpe-ResourceId-r17 MPE-ResourceId-r17, + cell-r17 ServCellIndex OPTIONAL, -- Need R + additionalPCI-r17 AdditionalPCIIndex-r17 OPTIONAL, -- Need R + mpe-ReferenceSignal-r17 CHOICE { + csi-RS-Resource-r17 NZP-CSI-RS-ResourceId, + ssb-Resource-r17 SSB-Index + } +} + +MPE-ResourceId-r17 ::= INTEGER (1..maxMPE-Resources-r17) + +-- TAG-PUSCH-CONFIG-STOP +-- TAG-PUSCH-CONFIGCOMMON-START + +PUSCH-ConfigCommon ::= SEQUENCE { + groupHoppingEnabledTransformPrecoding ENUMERATED {enabled} OPTIONAL, -- Need R + pusch-TimeDomainAllocationList PUSCH-TimeDomainResourceAllocationList OPTIONAL, -- Need R + msg3-DeltaPreamble INTEGER (-1..6) OPTIONAL, -- Need R + p0-NominalWithGrant INTEGER (-202..24) OPTIONAL, -- Need R + ... +} + +-- TAG-PUSCH-CONFIGCOMMON-STOP +-- TAG-PUSCH-POWERCONTROL-START + +PUSCH-PowerControl ::= SEQUENCE { + tpc-Accumulation ENUMERATED { disabled } OPTIONAL, -- Need S + msg3-Alpha Alpha OPTIONAL, -- Need S + p0-NominalWithoutGrant INTEGER (-202..24) OPTIONAL, -- Need M + p0-AlphaSets SEQUENCE (SIZE (1..maxNrofP0-PUSCH-AlphaSets)) OF P0-PUSCH-AlphaSet OPTIONAL, -- Need M + pathlossReferenceRSToAddModList SEQUENCE (SIZE (1..maxNrofPUSCH-PathlossReferenceRSs)) OF PUSCH-PathlossReferenceRS + OPTIONAL, -- Need N + pathlossReferenceRSToReleaseList SEQUENCE (SIZE (1..maxNrofPUSCH-PathlossReferenceRSs)) OF PUSCH-PathlossReferenceRS-Id + OPTIONAL, -- Need N + twoPUSCH-PC-AdjustmentStates ENUMERATED {twoStates} OPTIONAL, -- Need S + deltaMCS ENUMERATED {enabled} OPTIONAL, -- Need S + sri-PUSCH-MappingToAddModList SEQUENCE (SIZE (1..maxNrofSRI-PUSCH-Mappings)) OF SRI-PUSCH-PowerControl + OPTIONAL, -- Need N + sri-PUSCH-MappingToReleaseList SEQUENCE (SIZE (1..maxNrofSRI-PUSCH-Mappings)) OF SRI-PUSCH-PowerControlId + OPTIONAL -- Need N +} + +P0-PUSCH-AlphaSet ::= SEQUENCE { + p0-PUSCH-AlphaSetId P0-PUSCH-AlphaSetId, + p0 INTEGER (-16..15) OPTIONAL, -- Need S + alpha Alpha OPTIONAL -- Need S +} + +P0-PUSCH-AlphaSetId ::= INTEGER (0..maxNrofP0-PUSCH-AlphaSets-1) + +PUSCH-PathlossReferenceRS ::= SEQUENCE { + pusch-PathlossReferenceRS-Id PUSCH-PathlossReferenceRS-Id, + referenceSignal CHOICE { + ssb-Index SSB-Index, + csi-RS-Index NZP-CSI-RS-ResourceId + } +} + +PUSCH-PathlossReferenceRS-r16 ::= SEQUENCE { + pusch-PathlossReferenceRS-Id-r16 PUSCH-PathlossReferenceRS-Id-v1610, + referenceSignal-r16 CHOICE { + ssb-Index-r16 SSB-Index, + csi-RS-Index-r16 NZP-CSI-RS-ResourceId + } +} + +DummyPathlossReferenceRS-v1710 ::= SEQUENCE { + pusch-PathlossReferenceRS-Id-r17 PUSCH-PathlossReferenceRS-Id-r17, + additionalPCI-r17 AdditionalPCIIndex-r17 OPTIONAL -- Need R +} + +PUSCH-PathlossReferenceRS-Id ::= INTEGER (0..maxNrofPUSCH-PathlossReferenceRSs-1) + +PUSCH-PathlossReferenceRS-Id-v1610 ::= INTEGER (maxNrofPUSCH-PathlossReferenceRSs..maxNrofPUSCH-PathlossReferenceRSs-1-r16) + +PUSCH-PathlossReferenceRS-Id-r17 ::= INTEGER (0..maxNrofPUSCH-PathlossReferenceRSs-1-r16) + +SRI-PUSCH-PowerControl ::= SEQUENCE { + sri-PUSCH-PowerControlId SRI-PUSCH-PowerControlId, + sri-PUSCH-PathlossReferenceRS-Id PUSCH-PathlossReferenceRS-Id, + sri-P0-PUSCH-AlphaSetId P0-PUSCH-AlphaSetId, + sri-PUSCH-ClosedLoopIndex ENUMERATED { i0, i1 } +} + +SRI-PUSCH-PowerControlId ::= INTEGER (0..maxNrofSRI-PUSCH-Mappings-1) + +PUSCH-PowerControl-v1610 ::= SEQUENCE { + pathlossReferenceRSToAddModListSizeExt-v1610 SEQUENCE (SIZE (1..maxNrofPUSCH-PathlossReferenceRSsDiff-r16)) OF PUSCH-PathlossReferenceRS-r16 + OPTIONAL, -- Need N + pathlossReferenceRSToReleaseListSizeExt-v1610 SEQUENCE (SIZE (1..maxNrofPUSCH-PathlossReferenceRSsDiff-r16)) OF PUSCH-PathlossReferenceRS-Id-v1610 + OPTIONAL, -- Need N + p0-PUSCH-SetList-r16 SEQUENCE (SIZE (1..maxNrofSRI-PUSCH-Mappings)) OF P0-PUSCH-Set-r16 OPTIONAL, -- Need R + olpc-ParameterSet SEQUENCE { + olpc-ParameterSetDCI-0-1-r16 INTEGER (1..2) OPTIONAL, -- Need R + olpc-ParameterSetDCI-0-2-r16 INTEGER (1..2) OPTIONAL -- Need R + } OPTIONAL, -- Need M + ..., + [[ + sri-PUSCH-MappingToAddModList2-r17 SEQUENCE (SIZE (1..maxNrofSRI-PUSCH-Mappings)) OF SRI-PUSCH-PowerControl + OPTIONAL, -- Need N + sri-PUSCH-MappingToReleaseList2-r17 SEQUENCE (SIZE (1..maxNrofSRI-PUSCH-Mappings)) OF SRI-PUSCH-PowerControlId OPTIONAL, -- Need N + p0-PUSCH-SetList2-r17 SEQUENCE (SIZE (1..maxNrofSRI-PUSCH-Mappings)) OF P0-PUSCH-Set-r16 OPTIONAL, -- Need R + dummy SEQUENCE (SIZE (1..maxNrofPUSCH-PathlossReferenceRSs-r16)) OF DummyPathlossReferenceRS-v1710 OPTIONAL -- Need N + ]] +} + +P0-PUSCH-Set-r16 ::= SEQUENCE { + p0-PUSCH-SetId-r16 P0-PUSCH-SetId-r16, + p0-List-r16 SEQUENCE (SIZE (1..maxNrofP0-PUSCH-Set-r16)) OF P0-PUSCH-r16 OPTIONAL, -- Need R + ... +} + +P0-PUSCH-SetId-r16 ::= INTEGER (0..maxNrofSRI-PUSCH-Mappings-1) + +P0-PUSCH-r16 ::= INTEGER (-16..15) + +-- TAG-PUSCH-POWERCONTROL-STOP +-- TAG-PUSCH-SERVINGCELLCONFIG-START + +PUSCH-ServingCellConfig ::= SEQUENCE { + codeBlockGroupTransmission SetupRelease { PUSCH-CodeBlockGroupTransmission } OPTIONAL, -- Need M + rateMatching ENUMERATED {limitedBufferRM} OPTIONAL, -- Need S + xOverhead ENUMERATED {xoh6, xoh12, xoh18} OPTIONAL, -- Need S + ..., + [[ + maxMIMO-Layers INTEGER (1..4) OPTIONAL, -- Need M + processingType2Enabled BOOLEAN OPTIONAL -- Need M + ]], + [[ + maxMIMO-LayersDCI-0-2-r16 SetupRelease { MaxMIMO-LayersDCI-0-2-r16} OPTIONAL -- Need M + ]], + [[ + nrofHARQ-ProcessesForPUSCH-r17 ENUMERATED {n32} OPTIONAL, -- Need R + uplinkHARQ-mode-r17 SetupRelease { UplinkHARQ-mode-r17} OPTIONAL -- Need M + ]] +} + +PUSCH-CodeBlockGroupTransmission ::= SEQUENCE { + maxCodeBlockGroupsPerTransportBlock ENUMERATED {n2, n4, n6, n8}, + ... +} + +MaxMIMO-LayersDCI-0-2-r16 ::= INTEGER (1..4) + +UplinkHARQ-mode-r17 ::= BIT STRING (SIZE (32)) + +-- TAG-PUSCH-SERVINGCELLCONFIG-STOP +-- TAG-PUSCH-TIMEDOMAINRESOURCEALLOCATIONLIST-START + +PUSCH-TimeDomainResourceAllocationList ::= SEQUENCE (SIZE(1..maxNrofUL-Allocations)) OF PUSCH-TimeDomainResourceAllocation + +PUSCH-TimeDomainResourceAllocation ::= SEQUENCE { + k2 INTEGER(0..32) OPTIONAL, -- Need S + mappingType ENUMERATED {typeA, typeB}, + startSymbolAndLength INTEGER (0..127) +} + +PUSCH-TimeDomainResourceAllocationList-r16 ::= SEQUENCE (SIZE(1..maxNrofUL-Allocations-r16)) OF PUSCH-TimeDomainResourceAllocation-r16 + +PUSCH-TimeDomainResourceAllocation-r16 ::= SEQUENCE { + k2-r16 INTEGER(0..32) OPTIONAL, -- Need S + puschAllocationList-r16 SEQUENCE (SIZE(1..maxNrofMultiplePUSCHs-r16)) OF PUSCH-Allocation-r16, +... +} + +PUSCH-Allocation-r16 ::= SEQUENCE { + mappingType-r16 ENUMERATED {typeA, typeB} OPTIONAL, -- Cond NotFormat01-02-Or-TypeA + startSymbolAndLength-r16 INTEGER (0..127) OPTIONAL, -- Cond NotFormat01-02-Or-TypeA + startSymbol-r16 INTEGER (0..13) OPTIONAL, -- Cond RepTypeB + length-r16 INTEGER (1..14) OPTIONAL, -- Cond RepTypeB + numberOfRepetitions-r16 ENUMERATED {n1, n2, n3, n4, n7, n8, n12, n16} OPTIONAL, -- Cond Format01-02 + ..., + [[ + numberOfRepetitionsExt-r17 ENUMERATED {n1, n2, n3, n4, n7, n8, n12, n16, n20, n24, n28, n32, spare4, spare3, spare2, + spare1} OPTIONAL, -- Cond Format01-02-For-TypeA + numberOfSlotsTBoMS-r17 ENUMERATED {n1, n2, n4, n8, spare4, spare3, spare2, spare1} OPTIONAL, -- Need R + extendedK2-r17 INTEGER (0..128) OPTIONAL -- Cond MultiPUSCH + ]] +} + +-- TAG-PUSCH-TIMEDOMAINRESOURCEALLOCATIONLIST-STOP +-- TAG-PUSCH-TPC-COMMANDCONFIG-START + +PUSCH-TPC-CommandConfig ::= SEQUENCE { + tpc-Index INTEGER (1..15) OPTIONAL, -- Cond SUL + tpc-IndexSUL INTEGER (1..15) OPTIONAL, -- Cond SUL-Only + targetCell ServCellIndex OPTIONAL, -- Need S + ... +} + +-- TAG-PUSCH-TPC-COMMANDCONFIG-STOP +-- TAG-Q-OFFSETRANGE-START + +Q-OffsetRange ::= ENUMERATED { + dB-24, dB-22, dB-20, dB-18, dB-16, dB-14, + dB-12, dB-10, dB-8, dB-6, dB-5, dB-4, dB-3, + dB-2, dB-1, dB0, dB1, dB2, dB3, dB4, dB5, + dB6, dB8, dB10, dB12, dB14, dB16, dB18, + dB20, dB22, dB24} + +-- TAG-Q-OFFSETRANGE-STOP +-- TAG-Q-QUALMIN-START + +Q-QualMin ::= INTEGER (-43..-12) + +-- TAG-Q-QUALMIN-STOP +-- TAG-Q-RXLEVMIN-START + +Q-RxLevMin ::= INTEGER (-70..-22) + +-- TAG-Q-RXLEVMIN-STOP +-- TAG-QUANTITYCONFIG-START + + +QuantityConfig ::= SEQUENCE { + quantityConfigNR-List SEQUENCE (SIZE (1..maxNrofQuantityConfig)) OF QuantityConfigNR OPTIONAL, -- Need M + ..., + [[ + quantityConfigEUTRA FilterConfig OPTIONAL -- Need M + ]], + [[ + quantityConfigUTRA-FDD-r16 QuantityConfigUTRA-FDD-r16 OPTIONAL, -- Need M + quantityConfigCLI-r16 FilterConfigCLI-r16 OPTIONAL -- Need M + ]] +} + +QuantityConfigNR::= SEQUENCE { + quantityConfigCell QuantityConfigRS, + quantityConfigRS-Index QuantityConfigRS OPTIONAL -- Need M +} + +QuantityConfigRS ::= SEQUENCE { + ssb-FilterConfig FilterConfig, + csi-RS-FilterConfig FilterConfig +} + +FilterConfig ::= SEQUENCE { + filterCoefficientRSRP FilterCoefficient DEFAULT fc4, + filterCoefficientRSRQ FilterCoefficient DEFAULT fc4, + filterCoefficientRS-SINR FilterCoefficient DEFAULT fc4 +} + +FilterConfigCLI-r16 ::= SEQUENCE { + filterCoefficientSRS-RSRP-r16 FilterCoefficient DEFAULT fc4, + filterCoefficientCLI-RSSI-r16 FilterCoefficient DEFAULT fc4 +} + +QuantityConfigUTRA-FDD-r16 ::= SEQUENCE { + filterCoefficientRSCP-r16 FilterCoefficient DEFAULT fc4, + filterCoefficientEcNO-r16 FilterCoefficient DEFAULT fc4 +} + +-- TAG-QUANTITYCONFIG-STOP +-- TAG-RACH-CONFIGCOMMON-START + +RACH-ConfigCommon ::= SEQUENCE { + rach-ConfigGeneric RACH-ConfigGeneric, + totalNumberOfRA-Preambles INTEGER (1..63) OPTIONAL, -- Need S + ssb-perRACH-OccasionAndCB-PreamblesPerSSB CHOICE { + oneEighth ENUMERATED {n4,n8,n12,n16,n20,n24,n28,n32,n36,n40,n44,n48,n52,n56,n60,n64}, + oneFourth ENUMERATED {n4,n8,n12,n16,n20,n24,n28,n32,n36,n40,n44,n48,n52,n56,n60,n64}, + oneHalf ENUMERATED {n4,n8,n12,n16,n20,n24,n28,n32,n36,n40,n44,n48,n52,n56,n60,n64}, + one ENUMERATED {n4,n8,n12,n16,n20,n24,n28,n32,n36,n40,n44,n48,n52,n56,n60,n64}, + two ENUMERATED {n4,n8,n12,n16,n20,n24,n28,n32}, + four INTEGER (1..16), + eight INTEGER (1..8), + sixteen INTEGER (1..4) + } OPTIONAL, -- Need M + + groupBconfigured SEQUENCE { + ra-Msg3SizeGroupA ENUMERATED {b56, b144, b208, b256, b282, b480, b640, + b800, b1000, b72, spare6, spare5,spare4, spare3, spare2, spare1}, + messagePowerOffsetGroupB ENUMERATED { minusinfinity, dB0, dB5, dB8, dB10, dB12, dB15, dB18}, + numberOfRA-PreamblesGroupA INTEGER (1..64) + } OPTIONAL, -- Need R + ra-ContentionResolutionTimer ENUMERATED { sf8, sf16, sf24, sf32, sf40, sf48, sf56, sf64}, + rsrp-ThresholdSSB RSRP-Range OPTIONAL, -- Need R + rsrp-ThresholdSSB-SUL RSRP-Range OPTIONAL, -- Cond SUL + prach-RootSequenceIndex CHOICE { + l839 INTEGER (0..837), + l139 INTEGER (0..137) + }, + msg1-SubcarrierSpacing SubcarrierSpacing OPTIONAL, -- Cond L139 + restrictedSetConfig ENUMERATED {unrestrictedSet, restrictedSetTypeA, restrictedSetTypeB}, + msg3-transformPrecoder ENUMERATED {enabled} OPTIONAL, -- Need R + ..., + [[ + ra-PrioritizationForAccessIdentity-r16 SEQUENCE { + ra-Prioritization-r16 RA-Prioritization, + ra-PrioritizationForAI-r16 BIT STRING (SIZE (2)) + } OPTIONAL, -- Cond InitialBWP-Only + prach-RootSequenceIndex-r16 CHOICE { + l571 INTEGER (0..569), + l1151 INTEGER (0..1149) + } OPTIONAL -- Need R + ]], + [[ + ra-PrioritizationForSlicing-r17 RA-PrioritizationForSlicing-r17 OPTIONAL, -- Cond InitialBWP-Only + featureCombinationPreamblesList-r17 SEQUENCE (SIZE(1..maxFeatureCombPreamblesPerRACHResource-r17)) OF FeatureCombinationPreambles-r17 OPTIONAL -- Cond AdditionalRACH + ]] +} + +-- TAG-RACH-CONFIGCOMMON-STOP +-- TAG-RACH-CONFIGCOMMONTWOSTEPRA-START + +RACH-ConfigCommonTwoStepRA-r16 ::= SEQUENCE { + rach-ConfigGenericTwoStepRA-r16 RACH-ConfigGenericTwoStepRA-r16, + msgA-TotalNumberOfRA-Preambles-r16 INTEGER (1..63) OPTIONAL, -- Need S + msgA-SSB-PerRACH-OccasionAndCB-PreamblesPerSSB-r16 CHOICE { + oneEighth ENUMERATED {n4,n8,n12,n16,n20,n24,n28,n32,n36,n40,n44,n48,n52,n56,n60,n64}, + oneFourth ENUMERATED {n4,n8,n12,n16,n20,n24,n28,n32,n36,n40,n44,n48,n52,n56,n60,n64}, + oneHalf ENUMERATED {n4,n8,n12,n16,n20,n24,n28,n32,n36,n40,n44,n48,n52,n56,n60,n64}, + one ENUMERATED {n4,n8,n12,n16,n20,n24,n28,n32,n36,n40,n44,n48,n52,n56,n60,n64}, + two ENUMERATED {n4,n8,n12,n16,n20,n24,n28,n32}, + four INTEGER (1..16), + eight INTEGER (1..8), + sixteen INTEGER (1..4) + } OPTIONAL, -- Cond 2StepOnly + msgA-CB-PreamblesPerSSB-PerSharedRO-r16 INTEGER (1..60) OPTIONAL, -- Cond SharedRO + msgA-SSB-SharedRO-MaskIndex-r16 INTEGER (1..15) OPTIONAL, -- Need S + groupB-ConfiguredTwoStepRA-r16 GroupB-ConfiguredTwoStepRA-r16 OPTIONAL, -- Need S + msgA-PRACH-RootSequenceIndex-r16 CHOICE { + l839 INTEGER (0..837), + l139 INTEGER (0..137), + l571 INTEGER (0..569), + l1151 INTEGER (0..1149) + } OPTIONAL, -- Cond 2StepOnly + msgA-TransMax-r16 ENUMERATED {n1, n2, n4, n6, n8, n10, n20, n50, n100, n200} OPTIONAL, -- Need R + msgA-RSRP-Threshold-r16 RSRP-Range OPTIONAL, -- Cond 2Step4Step + msgA-RSRP-ThresholdSSB-r16 RSRP-Range OPTIONAL, -- Need R + msgA-SubcarrierSpacing-r16 SubcarrierSpacing OPTIONAL, -- Cond 2StepOnlyL139 + msgA-RestrictedSetConfig-r16 ENUMERATED {unrestrictedSet, restrictedSetTypeA, + restrictedSetTypeB} OPTIONAL, -- Cond 2StepOnly + ra-PrioritizationForAccessIdentityTwoStep-r16 SEQUENCE { + ra-Prioritization-r16 RA-Prioritization, + ra-PrioritizationForAI-r16 BIT STRING (SIZE (2)) + } OPTIONAL, -- Cond InitialBWP-Only + ra-ContentionResolutionTimer-r16 ENUMERATED {sf8, sf16, sf24, sf32, sf40, sf48, sf56, sf64} OPTIONAL, -- Cond 2StepOnly + ..., + [[ + ra-PrioritizationForSlicingTwoStep-r17 RA-PrioritizationForSlicing-r17 OPTIONAL, -- Cond InitialBWP-Only + featureCombinationPreamblesList-r17 SEQUENCE (SIZE(1..maxFeatureCombPreamblesPerRACHResource-r17)) OF FeatureCombinationPreambles-r17 OPTIONAL -- Cond AdditionalRACH + ]] +} + +GroupB-ConfiguredTwoStepRA-r16 ::= SEQUENCE { + ra-MsgA-SizeGroupA ENUMERATED {b56, b144, b208, b256, b282, b480, b640, b800, + b1000, b72, spare6, spare5, spare4, spare3, spare2, spare1}, + messagePowerOffsetGroupB ENUMERATED {minusinfinity, dB0, dB5, dB8, dB10, dB12, dB15, dB18}, + numberOfRA-PreamblesGroupA INTEGER (1..64) +} + +-- TAG-RACH-CONFIGCOMMONTWOSTEPRA-STOP +-- TAG-RACH-CONFIGDEDICATED-START + + +RACH-ConfigDedicated ::= SEQUENCE { + cfra CFRA OPTIONAL, -- Need S + ra-Prioritization RA-Prioritization OPTIONAL, -- Need N + ..., + [[ + ra-PrioritizationTwoStep-r16 RA-Prioritization OPTIONAL, -- Need N + cfra-TwoStep-r16 CFRA-TwoStep-r16 OPTIONAL -- Need S + ]] +} + +CFRA ::= SEQUENCE { + occasions SEQUENCE { + rach-ConfigGeneric RACH-ConfigGeneric, + ssb-perRACH-Occasion ENUMERATED {oneEighth, oneFourth, oneHalf, one, two, four, eight, sixteen} + OPTIONAL -- Cond Mandatory + } OPTIONAL, -- Need S + resources CHOICE { + ssb SEQUENCE { + ssb-ResourceList SEQUENCE (SIZE(1..maxRA-SSB-Resources)) OF CFRA-SSB-Resource, + ra-ssb-OccasionMaskIndex INTEGER (0..15) + }, + csirs SEQUENCE { + csirs-ResourceList SEQUENCE (SIZE(1..maxRA-CSIRS-Resources)) OF CFRA-CSIRS-Resource, + rsrp-ThresholdCSI-RS RSRP-Range + } + }, + ..., + [[ + totalNumberOfRA-Preambles INTEGER (1..63) OPTIONAL -- Cond Occasions + ]] +} + +CFRA-TwoStep-r16 ::= SEQUENCE { + occasionsTwoStepRA-r16 SEQUENCE { + rach-ConfigGenericTwoStepRA-r16 RACH-ConfigGenericTwoStepRA-r16, + ssb-PerRACH-OccasionTwoStepRA-r16 ENUMERATED {oneEighth, oneFourth, oneHalf, one, + two, four, eight, sixteen} + } OPTIONAL, -- Need S + msgA-CFRA-PUSCH-r16 MsgA-PUSCH-Resource-r16, + msgA-TransMax-r16 ENUMERATED {n1, n2, n4, n6, n8, n10, n20, n50, n100, n200} OPTIONAL, -- Need S + resourcesTwoStep-r16 SEQUENCE { + ssb-ResourceList SEQUENCE (SIZE(1..maxRA-SSB-Resources)) OF CFRA-SSB-Resource, + ra-ssb-OccasionMaskIndex INTEGER (0..15) + }, + ... +} + +CFRA-SSB-Resource ::= SEQUENCE { + ssb SSB-Index, + ra-PreambleIndex INTEGER (0..63), + ..., + [[ + msgA-PUSCH-Resource-Index-r16 INTEGER (0..3071) OPTIONAL -- Cond 2StepCFRA + ]] + +} + +CFRA-CSIRS-Resource ::= SEQUENCE { + csi-RS CSI-RS-Index, + ra-OccasionList SEQUENCE (SIZE(1..maxRA-OccasionsPerCSIRS)) OF INTEGER (0..maxRA-Occasions-1), + ra-PreambleIndex INTEGER (0..63), + ... +} + +-- TAG-RACH-CONFIGDEDICATED-STOP +-- TAG-RACH-CONFIGGENERIC-START + +RACH-ConfigGeneric ::= SEQUENCE { + prach-ConfigurationIndex INTEGER (0..255), + msg1-FDM ENUMERATED {one, two, four, eight}, + msg1-FrequencyStart INTEGER (0..maxNrofPhysicalResourceBlocks-1), + zeroCorrelationZoneConfig INTEGER(0..15), + preambleReceivedTargetPower INTEGER (-202..-60), + preambleTransMax ENUMERATED {n3, n4, n5, n6, n7, n8, n10, n20, n50, n100, n200}, + powerRampingStep ENUMERATED {dB0, dB2, dB4, dB6}, + ra-ResponseWindow ENUMERATED {sl1, sl2, sl4, sl8, sl10, sl20, sl40, sl80}, + ..., + [[ + prach-ConfigurationPeriodScaling-IAB-r16 ENUMERATED {scf1,scf2,scf4,scf8,scf16,scf32,scf64} OPTIONAL, -- Need R + prach-ConfigurationFrameOffset-IAB-r16 INTEGER (0..63) OPTIONAL, -- Need R + prach-ConfigurationSOffset-IAB-r16 INTEGER (0..39) OPTIONAL, -- Need R + ra-ResponseWindow-v1610 ENUMERATED { sl60, sl160} OPTIONAL, -- Need R + prach-ConfigurationIndex-v1610 INTEGER (256..262) OPTIONAL -- Need R + ]], + [[ + ra-ResponseWindow-v1700 ENUMERATED {sl240, sl320, sl640, sl960, sl1280, sl1920, sl2560} OPTIONAL -- Need R + ]] +} + +-- TAG-RACH-CONFIGGENERIC-STOP +-- TAG-RACH-CONFIGGENERICTWOSTEPRA-START + +RACH-ConfigGenericTwoStepRA-r16 ::= SEQUENCE { + msgA-PRACH-ConfigurationIndex-r16 INTEGER (0..262) OPTIONAL, -- Cond 2StepOnly + msgA-RO-FDM-r16 ENUMERATED {one, two, four, eight} OPTIONAL, -- Cond 2StepOnly + msgA-RO-FrequencyStart-r16 INTEGER (0..maxNrofPhysicalResourceBlocks-1) OPTIONAL, -- Cond 2StepOnly + msgA-ZeroCorrelationZoneConfig-r16 INTEGER (0..15) OPTIONAL, -- Cond 2StepOnly + msgA-PreamblePowerRampingStep-r16 ENUMERATED {dB0, dB2, dB4, dB6} OPTIONAL, -- Cond 2StepOnlyNoCFRA + msgA-PreambleReceivedTargetPower-r16 INTEGER (-202..-60) OPTIONAL, -- Cond 2StepOnlyNoCFRA + msgB-ResponseWindow-r16 ENUMERATED {sl1, sl2, sl4, sl8, sl10, sl20, sl40, sl80, sl160, sl320} + OPTIONAL, -- Cond NoCFRA + preambleTransMax-r16 ENUMERATED {n3, n4, n5, n6, n7, n8, n10, n20, n50, n100, n200} OPTIONAL, -- Cond 2StepOnlyNoCFRA + ..., + [[ + msgB-ResponseWindow-v1700 ENUMERATED {sl240, sl640, sl960, sl1280, sl1920, sl2560} OPTIONAL -- Cond NoCFRA2 + ]] +} + +-- TAG-RACH-CONFIGGENERICTWOSTEPRA-STOP +-- TAG-RA-PRIORITIZATION-START + +RA-Prioritization ::= SEQUENCE { + powerRampingStepHighPriority ENUMERATED {dB0, dB2, dB4, dB6}, + scalingFactorBI ENUMERATED {zero, dot25, dot5, dot75} OPTIONAL, -- Need R + ... +} + +-- TAG-RA-PRIORITIZATION-STOP +-- TAG-RA-PRIORITIZATIONFORSLICING-START + +RA-PrioritizationForSlicing-r17 ::= SEQUENCE { + ra-PrioritizationSliceInfoList-r17 RA-PrioritizationSliceInfoList-r17, + ... +} + +RA-PrioritizationSliceInfoList-r17 ::= SEQUENCE (SIZE (1..maxSliceInfo-r17)) OF RA-PrioritizationSliceInfo-r17 + +RA-PrioritizationSliceInfo-r17 ::= SEQUENCE { + nsag-ID-List-r17 SEQUENCE (SIZE (1..maxSliceInfo-r17)) OF NSAG-ID-r17, + ra-Prioritization-r17 RA-Prioritization, + ... +} + +-- TAG-RA-PRIORITIZATIONFORSLICING-STOP +-- TAG-RADIOBEARERCONFIG-START + +RadioBearerConfig ::= SEQUENCE { + srb-ToAddModList SRB-ToAddModList OPTIONAL, -- Cond HO-Conn + srb3-ToRelease ENUMERATED{true} OPTIONAL, -- Need N + drb-ToAddModList DRB-ToAddModList OPTIONAL, -- Cond HO-toNR + drb-ToReleaseList DRB-ToReleaseList OPTIONAL, -- Need N + securityConfig SecurityConfig OPTIONAL, -- Need M + ..., + [[ + mrb-ToAddModList-r17 MRB-ToAddModList-r17 OPTIONAL, -- Need N + mrb-ToReleaseList-r17 MRB-ToReleaseList-r17 OPTIONAL, -- Need N + srb4-ToAddMod-r17 SRB-ToAddMod OPTIONAL, -- Need N + srb4-ToRelease-r17 ENUMERATED{true} OPTIONAL -- Need N + ]] + +} + +SRB-ToAddModList ::= SEQUENCE (SIZE (1..2)) OF SRB-ToAddMod + +SRB-ToAddMod ::= SEQUENCE { + srb-Identity SRB-Identity, + reestablishPDCP ENUMERATED{true} OPTIONAL, -- Need N + discardOnPDCP ENUMERATED{true} OPTIONAL, -- Need N + pdcp-Config PDCP-Config OPTIONAL, -- Cond PDCP + ..., + [[ + srb-Identity-v1700 SRB-Identity-v1700 OPTIONAL -- Need M + ]] +} + +DRB-ToAddModList ::= SEQUENCE (SIZE (1..maxDRB)) OF DRB-ToAddMod + +DRB-ToAddMod ::= SEQUENCE { + cnAssociation CHOICE { + eps-BearerIdentity INTEGER (0..15), + sdap-Config SDAP-Config + } OPTIONAL, -- Cond DRBSetup + drb-Identity DRB-Identity, + reestablishPDCP ENUMERATED{true} OPTIONAL, -- Need N + recoverPDCP ENUMERATED{true} OPTIONAL, -- Need N + pdcp-Config PDCP-Config OPTIONAL, -- Cond PDCP + ..., + [[ + daps-Config-r16 ENUMERATED{true} OPTIONAL -- Cond DAPS + ]] +} +DRB-ToReleaseList ::= SEQUENCE (SIZE (1..maxDRB)) OF DRB-Identity + +SecurityConfig ::= SEQUENCE { + securityAlgorithmConfig SecurityAlgorithmConfig OPTIONAL, -- Cond RBTermChange1 + keyToUse ENUMERATED{master, secondary} OPTIONAL, -- Cond RBTermChange + ... +} + +MRB-ToAddModList-r17 ::= SEQUENCE (SIZE (1..maxMRB-r17)) OF MRB-ToAddMod-r17 + +MRB-ToAddMod-r17 ::= SEQUENCE { + mbs-SessionId-r17 TMGI-r17 OPTIONAL, -- Cond MRBSetup + mrb-Identity-r17 MRB-Identity-r17, + mrb-IdentityNew-r17 MRB-Identity-r17 OPTIONAL, -- Need N + reestablishPDCP-r17 ENUMERATED{true} OPTIONAL, -- Need N + recoverPDCP-r17 ENUMERATED{true} OPTIONAL, -- Need N + pdcp-Config-r17 PDCP-Config OPTIONAL, -- Cond PDCP + ... +} + +MRB-ToReleaseList-r17 ::= SEQUENCE (SIZE (1..maxMRB-r17)) OF MRB-Identity-r17 + +-- TAG-RADIOBEARERCONFIG-STOP +-- TAG-RADIOLINKMONITORINGCONFIG-START + +RadioLinkMonitoringConfig ::= SEQUENCE { + failureDetectionResourcesToAddModList SEQUENCE (SIZE(1..maxNrofFailureDetectionResources)) OF RadioLinkMonitoringRS + OPTIONAL, -- Need N + failureDetectionResourcesToReleaseList SEQUENCE (SIZE(1..maxNrofFailureDetectionResources)) OF RadioLinkMonitoringRS-Id + OPTIONAL, -- Need N + beamFailureInstanceMaxCount ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10} OPTIONAL, -- Need R + beamFailureDetectionTimer ENUMERATED {pbfd1, pbfd2, pbfd3, pbfd4, pbfd5, pbfd6, pbfd8, pbfd10} OPTIONAL, -- Need R + ..., + [[ + beamfailure-r17 BeamFailureDetection-r17 OPTIONAL -- Need R + ]] +} + +BeamFailureDetection-r17 ::= SEQUENCE { + failureDetectionSet1-r17 BeamFailureDetectionSet-r17 OPTIONAL, -- Need R + failureDetectionSet2-r17 BeamFailureDetectionSet-r17 OPTIONAL, -- Need R + additionalPCI-r17 AdditionalPCIIndex-r17 OPTIONAL -- Need R +} + +RadioLinkMonitoringRS ::= SEQUENCE { + radioLinkMonitoringRS-Id RadioLinkMonitoringRS-Id, + purpose ENUMERATED {beamFailure, rlf, both}, + detectionResource CHOICE { + ssb-Index SSB-Index, + csi-RS-Index NZP-CSI-RS-ResourceId + }, + ... +} + +BeamFailureDetectionSet-r17 ::= SEQUENCE { + bfdResourcesToAddModList-r17 SEQUENCE (SIZE(1..maxNrofBFDResourcePerSet-r17)) OF BeamLinkMonitoringRS-r17 + OPTIONAL, -- Need N + bfdResourcesToReleaseList-r17 SEQUENCE (SIZE(1..maxNrofBFDResourcePerSet-r17)) OF BeamLinkMonitoringRS-Id-r17 + OPTIONAL, -- Need N + beamFailureInstanceMaxCount-r17 ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10} OPTIONAL, -- Need R + beamFailureDetectionTimer-r17 ENUMERATED {pbfd1, pbfd2, pbfd3, pbfd4, pbfd5, pbfd6, pbfd8, pbfd10} OPTIONAL, -- Need R + ... +} + +BeamLinkMonitoringRS-r17 ::= SEQUENCE { + beamLinkMonitoringRS-Id-r17 BeamLinkMonitoringRS-Id-r17, + detectionResource-r17 CHOICE { + ssb-Index SSB-Index, + csi-RS-Index NZP-CSI-RS-ResourceId + }, + ... +} + +BeamLinkMonitoringRS-Id-r17 ::= INTEGER (0..maxNrofFailureDetectionResources-1-r17) + +-- TAG-RADIOLINKMONITORINGCONFIG-STOP +-- TAG-RADIOLINKMONITORINGRS-ID-START + +RadioLinkMonitoringRS-Id ::= INTEGER (0..maxNrofFailureDetectionResources-1) + +-- TAG-RADIOLINKMONITORINGRS-ID-STOP +-- TAG-RAN-AREACODE-START + +RAN-AreaCode ::= INTEGER (0..255) + +-- TAG-RAN-AREACODE-STOP +-- TAG-RATEMATCHPATTERN-START + +RateMatchPattern ::= SEQUENCE { + rateMatchPatternId RateMatchPatternId, + + patternType CHOICE { + bitmaps SEQUENCE { + resourceBlocks BIT STRING (SIZE (275)), + symbolsInResourceBlock CHOICE { + oneSlot BIT STRING (SIZE (14)), + twoSlots BIT STRING (SIZE (28)) + }, + periodicityAndPattern CHOICE { + n2 BIT STRING (SIZE (2)), + n4 BIT STRING (SIZE (4)), + n5 BIT STRING (SIZE (5)), + n8 BIT STRING (SIZE (8)), + n10 BIT STRING (SIZE (10)), + n20 BIT STRING (SIZE (20)), + n40 BIT STRING (SIZE (40)) + } OPTIONAL, -- Need S + ... + }, + controlResourceSet ControlResourceSetId + }, + subcarrierSpacing SubcarrierSpacing OPTIONAL, -- Cond CellLevel + dummy ENUMERATED { dynamic, semiStatic }, + ..., + [[ + controlResourceSet-r16 ControlResourceSetId-r16 OPTIONAL -- Need R + ]] + +} + +-- TAG-RATEMATCHPATTERN-STOP +-- TAG-RATEMATCHPATTERNID-START + +RateMatchPatternId ::= INTEGER (0..maxNrofRateMatchPatterns-1) + +-- TAG-RATEMATCHPATTERNID-STOP +-- TAG-RATEMATCHPATTERNLTE-CRS-START + +RateMatchPatternLTE-CRS ::= SEQUENCE { + carrierFreqDL INTEGER (0..16383), + carrierBandwidthDL ENUMERATED {n6, n15, n25, n50, n75, n100, spare2, spare1}, + mbsfn-SubframeConfigList EUTRA-MBSFN-SubframeConfigList OPTIONAL, -- Need M + nrofCRS-Ports ENUMERATED {n1, n2, n4}, + v-Shift ENUMERATED {n0, n1, n2, n3, n4, n5} +} + +LTE-CRS-PatternList-r16 ::= SEQUENCE (SIZE (1..maxLTE-CRS-Patterns-r16)) OF RateMatchPatternLTE-CRS + +-- TAG-RATEMATCHPATTERNLTE-CRS-STOP +-- TAG-REFERENCELOCATION-START + +ReferenceLocation-r17 ::= OCTET STRING + +-- TAG-REFERENCELOCATION-STOP +-- TAG-REFERENCETIMEINFO-START + +ReferenceTimeInfo-r16 ::= SEQUENCE { + time-r16 ReferenceTime-r16, + uncertainty-r16 INTEGER (0..32767) OPTIONAL, -- Need S + timeInfoType-r16 ENUMERATED {localClock} OPTIONAL, -- Need S + referenceSFN-r16 INTEGER (0..1023) OPTIONAL -- Cond RefTime +} + +ReferenceTime-r16 ::= SEQUENCE { + refDays-r16 INTEGER (0..72999), + refSeconds-r16 INTEGER (0..86399), + refMilliSeconds-r16 INTEGER (0..999), + refTenNanoSeconds-r16 INTEGER (0..99999) +} + +-- TAG-REFERENCETIMEINFO-STOP +-- TAG-REJECTWAITTIME-START + +RejectWaitTime ::= INTEGER (1..16) + +-- TAG-REJECTWAITTIME-STOP +-- TAG-REPETITIONSCHEMECONFIG-START + +RepetitionSchemeConfig-r16 ::= CHOICE { + fdm-TDM-r16 SetupRelease { FDM-TDM-r16 }, + slotBased-r16 SetupRelease { SlotBased-r16 } +} + +RepetitionSchemeConfig-v1630 ::= SEQUENCE { + slotBased-v1630 SetupRelease { SlotBased-v1630 } +} + +FDM-TDM-r16 ::= SEQUENCE { + repetitionScheme-r16 ENUMERATED {fdmSchemeA, fdmSchemeB,tdmSchemeA }, + startingSymbolOffsetK-r16 INTEGER (0..7) OPTIONAL -- Need R +} + +SlotBased-r16 ::= SEQUENCE { + tciMapping-r16 ENUMERATED {cyclicMapping, sequentialMapping}, + sequenceOffsetForRV-r16 INTEGER (1..3) +} + +SlotBased-v1630 ::= SEQUENCE { + tciMapping-r16 ENUMERATED {cyclicMapping, sequentialMapping}, + sequenceOffsetForRV-r16 INTEGER (0) +} + +-- TAG-REPETITIONSCHEMECONFIG-STOP +-- TAG-REPORTCONFIGID-START + +ReportConfigId ::= INTEGER (1..maxReportConfigId) + +-- TAG-REPORTCONFIGID-STOP +-- TAG-REPORTCONFIGINTERRAT-START + +ReportConfigInterRAT ::= SEQUENCE { + reportType CHOICE { + periodical PeriodicalReportConfigInterRAT, + eventTriggered EventTriggerConfigInterRAT, + reportCGI ReportCGI-EUTRA, + ..., + reportSFTD ReportSFTD-EUTRA + } +} + +ReportCGI-EUTRA ::= SEQUENCE { + cellForWhichToReportCGI EUTRA-PhysCellId, + ..., + [[ + useAutonomousGaps-r16 ENUMERATED {setup} OPTIONAL -- Need R + ]] +} + +ReportSFTD-EUTRA ::= SEQUENCE { + reportSFTD-Meas BOOLEAN, + reportRSRP BOOLEAN, + ... +} + +EventTriggerConfigInterRAT ::= SEQUENCE { + eventId CHOICE { + eventB1 SEQUENCE { + b1-ThresholdEUTRA MeasTriggerQuantityEUTRA, + reportOnLeave BOOLEAN, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger, + ... + }, + eventB2 SEQUENCE { + b2-Threshold1 MeasTriggerQuantity, + b2-Threshold2EUTRA MeasTriggerQuantityEUTRA, + reportOnLeave BOOLEAN, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger, + ... + }, + ..., + [[ + eventB1-UTRA-FDD-r16 SEQUENCE { + b1-ThresholdUTRA-FDD-r16 MeasTriggerQuantityUTRA-FDD-r16, + reportOnLeave-r16 BOOLEAN, + hysteresis-r16 Hysteresis, + timeToTrigger-r16 TimeToTrigger, + ... + }, + eventB2-UTRA-FDD-r16 SEQUENCE { + b2-Threshold1-r16 MeasTriggerQuantity, + b2-Threshold2UTRA-FDD-r16 MeasTriggerQuantityUTRA-FDD-r16, + reportOnLeave-r16 BOOLEAN, + hysteresis-r16 Hysteresis, + timeToTrigger-r16 TimeToTrigger, + ... + } + ]], + [[ + eventY1-Relay-r17 SEQUENCE { + y1-Threshold1-r17 MeasTriggerQuantity, + y1-Threshold2-Relay-r17 SL-MeasTriggerQuantity-r16, + reportOnLeave-r17 BOOLEAN, + hysteresis-r17 Hysteresis, + timeToTrigger-r17 TimeToTrigger, + ... + }, + eventY2-Relay-r17 SEQUENCE { + y2-Threshold-Relay-r17 SL-MeasTriggerQuantity-r16, + reportOnLeave-r17 BOOLEAN, + hysteresis-r17 Hysteresis, + timeToTrigger-r17 TimeToTrigger, + ... + } + ]] + }, + rsType NR-RS-Type, + + reportInterval ReportInterval, + reportAmount ENUMERATED {r1, r2, r4, r8, r16, r32, r64, infinity}, + reportQuantity MeasReportQuantity, + maxReportCells INTEGER (1..maxCellReport), + ..., + [[ + reportQuantityUTRA-FDD-r16 MeasReportQuantityUTRA-FDD-r16 OPTIONAL -- Need R + ]], + [[ + includeCommonLocationInfo-r16 ENUMERATED {true} OPTIONAL, -- Need R + includeBT-Meas-r16 SetupRelease {BT-NameList-r16} OPTIONAL, -- Need M + includeWLAN-Meas-r16 SetupRelease {WLAN-NameList-r16} OPTIONAL, -- Need M + includeSensor-Meas-r16 SetupRelease {Sensor-NameList-r16} OPTIONAL -- Need M + ]], + [[ + reportQuantityRelay-r17 SL-MeasReportQuantity-r16 OPTIONAL -- Need R + ]]} + +PeriodicalReportConfigInterRAT ::= SEQUENCE { + reportInterval ReportInterval, + reportAmount ENUMERATED {r1, r2, r4, r8, r16, r32, r64, infinity}, + reportQuantity MeasReportQuantity, + maxReportCells INTEGER (1..maxCellReport), + ..., + [[ + reportQuantityUTRA-FDD-r16 MeasReportQuantityUTRA-FDD-r16 OPTIONAL -- Need R + ]], + [[ + includeCommonLocationInfo-r16 ENUMERATED {true} OPTIONAL, -- Need R + includeBT-Meas-r16 SetupRelease {BT-NameList-r16} OPTIONAL, -- Need M + includeWLAN-Meas-r16 SetupRelease {WLAN-NameList-r16} OPTIONAL, -- Need M + includeSensor-Meas-r16 SetupRelease {Sensor-NameList-r16} OPTIONAL -- Need M + ]], + [[ + reportQuantityRelay-r17 SL-MeasReportQuantity-r16 OPTIONAL -- Need R + ]] + +} + +MeasTriggerQuantityUTRA-FDD-r16 ::= CHOICE{ + utra-FDD-RSCP-r16 INTEGER (-5..91), + utra-FDD-EcN0-r16 INTEGER (0..49) +} + +MeasReportQuantityUTRA-FDD-r16 ::= SEQUENCE { + cpich-RSCP BOOLEAN, + cpich-EcN0 BOOLEAN +} + +-- TAG-REPORTCONFIGINTERRAT-STOP +-- TAG-REPORTCONFIGNR-START + +ReportConfigNR ::= SEQUENCE { + reportType CHOICE { + periodical PeriodicalReportConfig, + eventTriggered EventTriggerConfig, + ..., + reportCGI ReportCGI, + reportSFTD ReportSFTD-NR, + condTriggerConfig-r16 CondTriggerConfig-r16, + cli-Periodical-r16 CLI-PeriodicalReportConfig-r16, + cli-EventTriggered-r16 CLI-EventTriggerConfig-r16, + rxTxPeriodical-r17 RxTxPeriodical-r17 + } +} + +ReportCGI ::= SEQUENCE { + cellForWhichToReportCGI PhysCellId, + ..., + [[ + useAutonomousGaps-r16 ENUMERATED {setup} OPTIONAL -- Need R + ]] + +} + +ReportSFTD-NR ::= SEQUENCE { + reportSFTD-Meas BOOLEAN, + reportRSRP BOOLEAN, + ..., + [[ + reportSFTD-NeighMeas ENUMERATED {true} OPTIONAL, -- Need R + drx-SFTD-NeighMeas ENUMERATED {true} OPTIONAL, -- Need R + cellsForWhichToReportSFTD SEQUENCE (SIZE (1..maxCellSFTD)) OF PhysCellId OPTIONAL -- Need R + ]] +} + +CondTriggerConfig-r16 ::= SEQUENCE { + condEventId CHOICE { + condEventA3 SEQUENCE { + a3-Offset MeasTriggerQuantityOffset, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger + }, + condEventA5 SEQUENCE { + a5-Threshold1 MeasTriggerQuantity, + a5-Threshold2 MeasTriggerQuantity, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger + }, + ..., + condEventA4-r17 SEQUENCE { + a4-Threshold-r17 MeasTriggerQuantity, + hysteresis-r17 Hysteresis, + timeToTrigger-r17 TimeToTrigger + }, + condEventD1-r17 SEQUENCE { + distanceThreshFromReference1-r17 INTEGER(0.. 65525), + distanceThreshFromReference2-r17 INTEGER(0.. 65525), + referenceLocation1-r17 ReferenceLocation-r17, + referenceLocation2-r17 ReferenceLocation-r17, + hysteresisLocation-r17 HysteresisLocation-r17, + timeToTrigger-r17 TimeToTrigger + }, + condEventT1-r17 SEQUENCE { + t1-Threshold-r17 INTEGER (0..549755813887), + duration-r17 INTEGER (1..6000) + } + }, + rsType-r16 NR-RS-Type, + ... +} + +EventTriggerConfig::= SEQUENCE { + eventId CHOICE { + eventA1 SEQUENCE { + a1-Threshold MeasTriggerQuantity, + reportOnLeave BOOLEAN, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger + }, + eventA2 SEQUENCE { + a2-Threshold MeasTriggerQuantity, + reportOnLeave BOOLEAN, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger + }, + eventA3 SEQUENCE { + a3-Offset MeasTriggerQuantityOffset, + reportOnLeave BOOLEAN, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger, + useAllowedCellList BOOLEAN + }, + eventA4 SEQUENCE { + a4-Threshold MeasTriggerQuantity, + reportOnLeave BOOLEAN, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger, + useAllowedCellList BOOLEAN + }, + eventA5 SEQUENCE { + a5-Threshold1 MeasTriggerQuantity, + a5-Threshold2 MeasTriggerQuantity, + reportOnLeave BOOLEAN, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger, + useAllowedCellList BOOLEAN + }, + eventA6 SEQUENCE { + a6-Offset MeasTriggerQuantityOffset, + reportOnLeave BOOLEAN, + hysteresis Hysteresis, + timeToTrigger TimeToTrigger, + useAllowedCellList BOOLEAN + }, + ..., + [[ + eventX1-r17 SEQUENCE { + x1-Threshold1-Relay-r17 SL-MeasTriggerQuantity-r16, + x1-Threshold2-r17 MeasTriggerQuantity, + reportOnLeave-r17 BOOLEAN, + hysteresis-r17 Hysteresis, + timeToTrigger-r17 TimeToTrigger, + useAllowedCellList-r17 BOOLEAN + }, + eventX2-r17 SEQUENCE { + x2-Threshold-Relay-r17 SL-MeasTriggerQuantity-r16, + reportOnLeave-r17 BOOLEAN, + hysteresis-r17 Hysteresis, + timeToTrigger-r17 TimeToTrigger + }, + eventD1-r17 SEQUENCE { + distanceThreshFromReference1-r17 INTEGER(1.. 65525), + distanceThreshFromReference2-r17 INTEGER(1.. 65525), + referenceLocation1-r17 ReferenceLocation-r17, + referenceLocation2-r17 ReferenceLocation-r17, + reportOnLeave-r17 BOOLEAN, + hysteresisLocation-r17 HysteresisLocation-r17, + timeToTrigger-r17 TimeToTrigger + } + ]] + }, + rsType NR-RS-Type, + reportInterval ReportInterval, + reportAmount ENUMERATED {r1, r2, r4, r8, r16, r32, r64, infinity}, + reportQuantityCell MeasReportQuantity, + maxReportCells INTEGER (1..maxCellReport), + reportQuantityRS-Indexes MeasReportQuantity OPTIONAL, -- Need R + maxNrofRS-IndexesToReport INTEGER (1..maxNrofIndexesToReport) OPTIONAL, -- Need R + includeBeamMeasurements BOOLEAN, + reportAddNeighMeas ENUMERATED {setup} OPTIONAL, -- Need R + ..., + [[ + measRSSI-ReportConfig-r16 MeasRSSI-ReportConfig-r16 OPTIONAL, -- Need R + useT312-r16 BOOLEAN OPTIONAL, -- Need M + includeCommonLocationInfo-r16 ENUMERATED {true} OPTIONAL, -- Need R + includeBT-Meas-r16 SetupRelease {BT-NameList-r16} OPTIONAL, -- Need M + includeWLAN-Meas-r16 SetupRelease {WLAN-NameList-r16} OPTIONAL, -- Need M + includeSensor-Meas-r16 SetupRelease {Sensor-NameList-r16} OPTIONAL -- Need M + ]], + [[ + coarseLocationRequest-r17 ENUMERATED {true} OPTIONAL, -- Need R + reportQuantityRelay-r17 SL-MeasReportQuantity-r16 OPTIONAL -- Need R + ]] +} + +PeriodicalReportConfig ::= SEQUENCE { + rsType NR-RS-Type, + reportInterval ReportInterval, + reportAmount ENUMERATED {r1, r2, r4, r8, r16, r32, r64, infinity}, + reportQuantityCell MeasReportQuantity, + maxReportCells INTEGER (1..maxCellReport), + reportQuantityRS-Indexes MeasReportQuantity OPTIONAL, -- Need R + maxNrofRS-IndexesToReport INTEGER (1..maxNrofIndexesToReport) OPTIONAL, -- Need R + includeBeamMeasurements BOOLEAN, + useAllowedCellList BOOLEAN, + ..., + [[ + measRSSI-ReportConfig-r16 MeasRSSI-ReportConfig-r16 OPTIONAL, -- Need R + includeCommonLocationInfo-r16 ENUMERATED {true} OPTIONAL, -- Need R + includeBT-Meas-r16 SetupRelease {BT-NameList-r16} OPTIONAL, -- Need M + includeWLAN-Meas-r16 SetupRelease {WLAN-NameList-r16} OPTIONAL, -- Need M + includeSensor-Meas-r16 SetupRelease {Sensor-NameList-r16} OPTIONAL, -- Need M + ul-DelayValueConfig-r16 SetupRelease { UL-DelayValueConfig-r16 } OPTIONAL, -- Need M + reportAddNeighMeas-r16 ENUMERATED {setup} OPTIONAL -- Need R + ]], + [[ + ul-ExcessDelayConfig-r17 SetupRelease { UL-ExcessDelayConfig-r17 } OPTIONAL, -- Need M + coarseLocationRequest-r17 ENUMERATED {true} OPTIONAL, -- Need R + reportQuantityRelay-r17 SL-MeasReportQuantity-r16 OPTIONAL -- Need R + ]] +} + +NR-RS-Type ::= ENUMERATED {ssb, csi-rs} + +MeasTriggerQuantity ::= CHOICE { + rsrp RSRP-Range, + rsrq RSRQ-Range, + sinr SINR-Range +} + +MeasTriggerQuantityOffset ::= CHOICE { + rsrp INTEGER (-30..30), + rsrq INTEGER (-30..30), + sinr INTEGER (-30..30) +} + + +MeasReportQuantity ::= SEQUENCE { + rsrp BOOLEAN, + rsrq BOOLEAN, + sinr BOOLEAN +} + +MeasRSSI-ReportConfig-r16 ::= SEQUENCE { + channelOccupancyThreshold-r16 RSSI-Range-r16 OPTIONAL -- Need R +} + +CLI-EventTriggerConfig-r16 ::= SEQUENCE { + eventId-r16 CHOICE { + eventI1-r16 SEQUENCE { + i1-Threshold-r16 MeasTriggerQuantityCLI-r16, + reportOnLeave-r16 BOOLEAN, + hysteresis-r16 Hysteresis, + timeToTrigger-r16 TimeToTrigger + }, + ... + }, + reportInterval-r16 ReportInterval, + reportAmount-r16 ENUMERATED {r1, r2, r4, r8, r16, r32, r64, infinity}, + maxReportCLI-r16 INTEGER (1..maxCLI-Report-r16), + ... +} + +CLI-PeriodicalReportConfig-r16 ::= SEQUENCE { + reportInterval-r16 ReportInterval, + reportAmount-r16 ENUMERATED {r1, r2, r4, r8, r16, r32, r64, infinity}, + reportQuantityCLI-r16 MeasReportQuantityCLI-r16, + maxReportCLI-r16 INTEGER (1..maxCLI-Report-r16), + ... +} + +RxTxPeriodical-r17 ::= SEQUENCE { + rxTxReportInterval-r17 RxTxReportInterval-r17 OPTIONAL, -- Need R + reportAmount-r17 ENUMERATED {r1, infinity, spare6, spare5, spare4, spare3, spare2, spare1}, + ... +} + +RxTxReportInterval-r17 ::= ENUMERATED {ms80,ms120,ms160,ms240,ms320,ms480,ms640,ms1024,ms1280,ms2048,ms2560,ms5120,spare4,spare3,spare2,spare1} + +MeasTriggerQuantityCLI-r16 ::= CHOICE { + srs-RSRP-r16 SRS-RSRP-Range-r16, + cli-RSSI-r16 CLI-RSSI-Range-r16 +} + +MeasReportQuantityCLI-r16 ::= ENUMERATED {srs-rsrp, cli-rssi} + +-- TAG-REPORTCONFIGNR-STOP +-- TAG-REPORTCONFIGNR-SL-START + +ReportConfigNR-SL-r16 ::= SEQUENCE { + reportType-r16 CHOICE { + periodical-r16 PeriodicalReportConfigNR-SL-r16, + eventTriggered-r16 EventTriggerConfigNR-SL-r16 + } +} + +EventTriggerConfigNR-SL-r16::= SEQUENCE { + eventId-r16 CHOICE { + eventC1 SEQUENCE { + c1-Threshold-r16 SL-CBR-r16, + hysteresis-r16 Hysteresis, + timeToTrigger-r16 TimeToTrigger + }, + eventC2-r16 SEQUENCE { + c2-Threshold-r16 SL-CBR-r16, + hysteresis-r16 Hysteresis, + timeToTrigger-r16 TimeToTrigger + }, + ... + }, + reportInterval-r16 ReportInterval, + reportAmount-r16 ENUMERATED {r1, r2, r4, r8, r16, r32, r64, infinity}, + reportQuantity-r16 MeasReportQuantity-r16, + ... +} + +PeriodicalReportConfigNR-SL-r16 ::= SEQUENCE { + reportInterval-r16 ReportInterval, + reportAmount-r16 ENUMERATED {r1, r2, r4, r8, r16, r32, r64, infinity}, + reportQuantity-r16 MeasReportQuantity-r16, + ... +} + +MeasReportQuantity-r16 ::= SEQUENCE { + cbr-r16 BOOLEAN, + ... +} + +-- TAG-REPORTCONFIGNR-SL-STOP +-- TAG-REPORTCONFIGTOADDMODLIST-START + +ReportConfigToAddModList ::= SEQUENCE (SIZE (1..maxReportConfigId)) OF ReportConfigToAddMod + +ReportConfigToAddMod ::= SEQUENCE { + reportConfigId ReportConfigId, + reportConfig CHOICE { + reportConfigNR ReportConfigNR, + ..., + reportConfigInterRAT ReportConfigInterRAT, + reportConfigNR-SL-r16 ReportConfigNR-SL-r16 + } +} + +-- TAG-REPORTCONFIGTOADDMODLIST-STOP +-- TAG-REPORTINTERVAL-START + +ReportInterval ::= ENUMERATED {ms120, ms240, ms480, ms640, ms1024, ms2048, ms5120, ms10240, ms20480, ms40960, + min1,min6, min12, min30 } + +-- TAG-REPORTINTERVAL-STOP +-- TAG-RESELECTIONTHRESHOLD-START + +ReselectionThreshold ::= INTEGER (0..31) + +-- TAG-RESELECTIONTHRESHOLD-STOP +-- TAG-RESELECTIONTHRESHOLDQ-START + +ReselectionThresholdQ ::= INTEGER (0..31) + +-- TAG-RESELECTIONTHRESHOLDQ-STOP +-- TAG-RESUMECAUSE-START + +ResumeCause ::= ENUMERATED {emergency, highPriorityAccess, mt-Access, mo-Signalling, + mo-Data, mo-VoiceCall, mo-VideoCall, mo-SMS, rna-Update, mps-PriorityAccess, + mcs-PriorityAccess, spare1, spare2, spare3, spare4, spare5 } + +-- TAG-RESUMECAUSE-STOP +-- TAG-RLC-BEARERCONFIG-START + +RLC-BearerConfig ::= SEQUENCE { + logicalChannelIdentity LogicalChannelIdentity, + servedRadioBearer CHOICE { + srb-Identity SRB-Identity, + drb-Identity DRB-Identity + } OPTIONAL, -- Cond LCH-SetupOnly + reestablishRLC ENUMERATED {true} OPTIONAL, -- Need N + rlc-Config RLC-Config OPTIONAL, -- Cond LCH-Setup + mac-LogicalChannelConfig LogicalChannelConfig OPTIONAL, -- Cond LCH-Setup + ..., + [[ + rlc-Config-v1610 RLC-Config-v1610 OPTIONAL -- Need R + ]], + [[ + rlc-Config-v1700 RLC-Config-v1700 OPTIONAL, -- Need R + logicalChannelIdentityExt-r17 LogicalChannelIdentityExt-r17 OPTIONAL, -- Cond LCH-SetupModMRB + multicastRLC-BearerConfig-r17 MulticastRLC-BearerConfig-r17 OPTIONAL, -- Cond LCH-SetupOnlyMRB + servedRadioBearerSRB4-r17 SRB-Identity-v1700 OPTIONAL -- Need N + ]] +} + +MulticastRLC-BearerConfig-r17 ::= SEQUENCE { + servedMBS-RadioBearer-r17 MRB-Identity-r17, + isPTM-Entity-r17 ENUMERATED {true} OPTIONAL -- Need S +} + +LogicalChannelIdentityExt-r17 ::= INTEGER (320..65855) + +-- TAG-RLC-BEARERCONFIG-STOP +-- TAG-RLC-CONFIG-START + +RLC-Config ::= CHOICE { + am SEQUENCE { + ul-AM-RLC UL-AM-RLC, + dl-AM-RLC DL-AM-RLC + }, + um-Bi-Directional SEQUENCE { + ul-UM-RLC UL-UM-RLC, + dl-UM-RLC DL-UM-RLC + }, + um-Uni-Directional-UL SEQUENCE { + ul-UM-RLC UL-UM-RLC + }, + um-Uni-Directional-DL SEQUENCE { + dl-UM-RLC DL-UM-RLC + }, + ... +} + +UL-AM-RLC ::= SEQUENCE { + sn-FieldLength SN-FieldLengthAM OPTIONAL, -- Cond Reestab + t-PollRetransmit T-PollRetransmit, + pollPDU PollPDU, + pollByte PollByte, + maxRetxThreshold ENUMERATED { t1, t2, t3, t4, t6, t8, t16, t32 } +} + +DL-AM-RLC ::= SEQUENCE { + sn-FieldLength SN-FieldLengthAM OPTIONAL, -- Cond Reestab + t-Reassembly T-Reassembly, + t-StatusProhibit T-StatusProhibit +} + +UL-UM-RLC ::= SEQUENCE { + sn-FieldLength SN-FieldLengthUM OPTIONAL -- Cond Reestab +} + +DL-UM-RLC ::= SEQUENCE { + sn-FieldLength SN-FieldLengthUM OPTIONAL, -- Cond Reestab + t-Reassembly T-Reassembly +} + +T-PollRetransmit ::= ENUMERATED { + ms5, ms10, ms15, ms20, ms25, ms30, ms35, + ms40, ms45, ms50, ms55, ms60, ms65, ms70, + ms75, ms80, ms85, ms90, ms95, ms100, ms105, + ms110, ms115, ms120, ms125, ms130, ms135, + ms140, ms145, ms150, ms155, ms160, ms165, + ms170, ms175, ms180, ms185, ms190, ms195, + ms200, ms205, ms210, ms215, ms220, ms225, + ms230, ms235, ms240, ms245, ms250, ms300, + ms350, ms400, ms450, ms500, ms800, ms1000, + ms2000, ms4000, ms1-v1610, ms2-v1610, ms3-v1610, + ms4-v1610, spare1} + + +PollPDU ::= ENUMERATED { + p4, p8, p16, p32, p64, p128, p256, p512, p1024, p2048, p4096, p6144, p8192, p12288, p16384,p20480, + p24576, p28672, p32768, p40960, p49152, p57344, p65536, infinity, spare8, spare7, spare6, spare5, spare4, + spare3, spare2, spare1} + +PollByte ::= ENUMERATED { + kB1, kB2, kB5, kB8, kB10, kB15, kB25, kB50, kB75, + kB100, kB125, kB250, kB375, kB500, kB750, kB1000, + kB1250, kB1500, kB2000, kB3000, kB4000, kB4500, + kB5000, kB5500, kB6000, kB6500, kB7000, kB7500, + mB8, mB9, mB10, mB11, mB12, mB13, mB14, mB15, + mB16, mB17, mB18, mB20, mB25, mB30, mB40, infinity, + spare20, spare19, spare18, spare17, spare16, + spare15, spare14, spare13, spare12, spare11, + spare10, spare9, spare8, spare7, spare6, spare5, + spare4, spare3, spare2, spare1} + +T-Reassembly ::= ENUMERATED { + ms0, ms5, ms10, ms15, ms20, ms25, ms30, ms35, + ms40, ms45, ms50, ms55, ms60, ms65, ms70, + ms75, ms80, ms85, ms90, ms95, ms100, ms110, + ms120, ms130, ms140, ms150, ms160, ms170, + ms180, ms190, ms200, spare1} + +T-StatusProhibit ::= ENUMERATED { + ms0, ms5, ms10, ms15, ms20, ms25, ms30, ms35, + ms40, ms45, ms50, ms55, ms60, ms65, ms70, + ms75, ms80, ms85, ms90, ms95, ms100, ms105, + ms110, ms115, ms120, ms125, ms130, ms135, + ms140, ms145, ms150, ms155, ms160, ms165, + ms170, ms175, ms180, ms185, ms190, ms195, + ms200, ms205, ms210, ms215, ms220, ms225, + ms230, ms235, ms240, ms245, ms250, ms300, + ms350, ms400, ms450, ms500, ms800, ms1000, + ms1200, ms1600, ms2000, ms2400, spare2, spare1} + +SN-FieldLengthUM ::= ENUMERATED {size6, size12} +SN-FieldLengthAM ::= ENUMERATED {size12, size18} + +RLC-Config-v1610 ::= SEQUENCE { + dl-AM-RLC-v1610 DL-AM-RLC-v1610 +} + +RLC-Config-v1700 ::= SEQUENCE { + dl-AM-RLC-v1700 DL-AM-RLC-v1700, + dl-UM-RLC-v1700 DL-UM-RLC-v1700 +} + +DL-AM-RLC-v1610 ::= SEQUENCE { + t-StatusProhibit-v1610 T-StatusProhibit-v1610 OPTIONAL, -- Need N + ... +} + +DL-AM-RLC-v1700 ::= SEQUENCE { + t-ReassemblyExt-r17 T-ReassemblyExt-r17 OPTIONAL -- Need N +} + +DL-UM-RLC-v1700 ::= SEQUENCE { + t-ReassemblyExt-r17 T-ReassemblyExt-r17 OPTIONAL -- Need N +} + +T-StatusProhibit-v1610 ::= ENUMERATED { ms1, ms2, ms3, ms4, spare4, spare3, spare2, spare1} + +T-ReassemblyExt-r17 ::= ENUMERATED {ms210, ms220, ms340, ms350, ms550, ms1100, ms1650, ms2200} + +-- TAG-RLC-CONFIG-STOP +-- TAG-RLF-TIMERSANDCONSTANTS-START + +RLF-TimersAndConstants ::= SEQUENCE { + t310 ENUMERATED {ms0, ms50, ms100, ms200, ms500, ms1000, ms2000, ms4000, ms6000}, + n310 ENUMERATED {n1, n2, n3, n4, n6, n8, n10, n20}, + n311 ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10}, + ..., + [[ + t311 ENUMERATED {ms1000, ms3000, ms5000, ms10000, ms15000, ms20000, ms30000} + ]] +} + +-- TAG-RLF-TIMERSANDCONSTANTS-STOP +-- TAG-RNTI-VALUE-START + +RNTI-Value ::= INTEGER (0..65535) + +-- TAG-RNTI-VALUE-STOP +-- TAG-RSRP-RANGE-START + +RSRP-Range ::= INTEGER(0..127) + +-- TAG-RSRP-RANGE-STOP +-- TAG-RSRQ-RANGE-START + +RSRQ-Range ::= INTEGER(0..127) + +-- TAG-RSRQ-RANGE-STOP +-- TAG-RSSI-RANGE-START + +RSSI-Range-r16 ::= INTEGER(0..76) + +-- TAG-RSSI-RANGE-STOP +-- TAG-RXTXTIMEDIFF-START + +RxTxTimeDiff-r17 ::= SEQUENCE { + result-k5-r17 INTEGER (0..61565) OPTIONAL, -- Need N + ... +} + +-- TAG-RXTXTIMEDIFF-STOP +-- TAG-SCELLACTIVATIONRS-CONFIG-START + +SCellActivationRS-Config-r17 ::= SEQUENCE { + scellActivationRS-Id-r17 SCellActivationRS-ConfigId-r17, + resourceSet-r17 NZP-CSI-RS-ResourceSetId, + gapBetweenBursts-r17 INTEGER (2..31) OPTIONAL, -- Need R + qcl-Info-r17 TCI-StateId, + ... +} + +-- TAG-SCELLACTIVATIONRS-CONFIG-STOP +-- TAG-SCELLACTIVATIONRS-CONFIGID-START + +SCellActivationRS-ConfigId-r17 ::= INTEGER (1.. maxNrofSCellActRS-r17) + +-- TAG-SCELLACTIVATIONRS-CONFIGID-STOP +-- TAG-SCELLINDEX-START + +SCellIndex ::= INTEGER (1..31) + +-- TAG-SCELLINDEX-STOP +-- TAG-SCHEDULINGREQUESTCONFIG-START + +SchedulingRequestConfig ::= SEQUENCE { + schedulingRequestToAddModList SEQUENCE (SIZE (1..maxNrofSR-ConfigPerCellGroup)) OF SchedulingRequestToAddMod + OPTIONAL, -- Need N + schedulingRequestToReleaseList SEQUENCE (SIZE (1..maxNrofSR-ConfigPerCellGroup)) OF SchedulingRequestId + OPTIONAL -- Need N +} + +SchedulingRequestToAddMod ::= SEQUENCE { + schedulingRequestId SchedulingRequestId, + sr-ProhibitTimer ENUMERATED {ms1, ms2, ms4, ms8, ms16, ms32, ms64, ms128} OPTIONAL, -- Need S + sr-TransMax ENUMERATED { n4, n8, n16, n32, n64, spare3, spare2, spare1} +} + +SchedulingRequestConfig-v1700 ::= SEQUENCE { + schedulingRequestToAddModListExt-v1700 SEQUENCE (SIZE (1..maxNrofSR-ConfigPerCellGroup)) OF SchedulingRequestToAddModExt-v1700 + OPTIONAL -- Need N +} + +SchedulingRequestToAddModExt-v1700 ::= SEQUENCE { + sr-ProhibitTimer-v1700 ENUMERATED { ms192, ms256, ms320, ms384, ms448, ms512, ms576, ms640, ms1082, spare7, spare6, spare5, spare4, spare3, spare2, spare1} + OPTIONAL -- Need R +} + +-- TAG-SCHEDULINGREQUESTCONFIG-STOP +-- TAG-SCHEDULINGREQUESTID-START + +SchedulingRequestId ::= INTEGER (0..7) + +-- TAG-SCHEDULINGREQUESTID-STOP +-- TAG-SCHEDULINGREQUESTRESOURCECONFIG-START + +SchedulingRequestResourceConfig ::= SEQUENCE { + schedulingRequestResourceId SchedulingRequestResourceId, + schedulingRequestID SchedulingRequestId, + periodicityAndOffset CHOICE { + sym2 NULL, + sym6or7 NULL, + sl1 NULL, -- Recurs in every slot + sl2 INTEGER (0..1), + sl4 INTEGER (0..3), + sl5 INTEGER (0..4), + sl8 INTEGER (0..7), + sl10 INTEGER (0..9), + sl16 INTEGER (0..15), + sl20 INTEGER (0..19), + sl40 INTEGER (0..39), + sl80 INTEGER (0..79), + sl160 INTEGER (0..159), + sl320 INTEGER (0..319), + sl640 INTEGER (0..639) + } OPTIONAL, -- Need M + resource PUCCH-ResourceId OPTIONAL -- Need M +} + +SchedulingRequestResourceConfigExt-v1610 ::= SEQUENCE { + phy-PriorityIndex-r16 ENUMERATED {p0, p1} OPTIONAL, -- Need M + ... +} + +SchedulingRequestResourceConfigExt-v1700 ::= SEQUENCE { + periodicityAndOffset-r17 CHOICE { + sl1280 INTEGER (0..1279), + sl2560 INTEGER (0..2559), + sl5120 INTEGER (0..5119) + } OPTIONAL -- Need M +} + +-- TAG-SCHEDULINGREQUESTRESOURCECONFIG-STOP +-- TAG-SCHEDULINGREQUESTRESOURCEID-START + +SchedulingRequestResourceId ::= INTEGER (1..maxNrofSR-Resources) + +-- TAG-SCHEDULINGREQUESTRESOURCEID-STOP +-- TAG-SCRAMBLINGID-START + +ScramblingId ::= INTEGER(0..1023) + +-- TAG-SCRAMBLINGID-STOP +-- TAG-SCS-SPECIFICCARRIER-START + +SCS-SpecificCarrier ::= SEQUENCE { + offsetToCarrier INTEGER (0..2199), + subcarrierSpacing SubcarrierSpacing, + carrierBandwidth INTEGER (1..maxNrofPhysicalResourceBlocks), + ..., + [[ + txDirectCurrentLocation INTEGER (0..4095) OPTIONAL -- Need S + ]] +} + +-- TAG-SCS-SPECIFICCARRIER-STOP +-- TAG-SDAP-CONFIG-START + +SDAP-Config ::= SEQUENCE { + pdu-Session PDU-SessionID, + sdap-HeaderDL ENUMERATED {present, absent}, + sdap-HeaderUL ENUMERATED {present, absent}, + defaultDRB BOOLEAN, + mappedQoS-FlowsToAdd SEQUENCE (SIZE (1..maxNrofQFIs)) OF QFI OPTIONAL, -- Need N + mappedQoS-FlowsToRelease SEQUENCE (SIZE (1..maxNrofQFIs)) OF QFI OPTIONAL, -- Need N + ... +} + +QFI ::= INTEGER (0..maxQFI) + +PDU-SessionID ::= INTEGER (0..255) + +-- TAG-SDAP-CONFIG-STOP +-- TAG-SEARCHSPACE-START + +SearchSpace ::= SEQUENCE { + searchSpaceId SearchSpaceId, + controlResourceSetId ControlResourceSetId OPTIONAL, -- Cond SetupOnly + monitoringSlotPeriodicityAndOffset CHOICE { + sl1 NULL, + sl2 INTEGER (0..1), + sl4 INTEGER (0..3), + sl5 INTEGER (0..4), + sl8 INTEGER (0..7), + sl10 INTEGER (0..9), + sl16 INTEGER (0..15), + sl20 INTEGER (0..19), + sl40 INTEGER (0..39), + sl80 INTEGER (0..79), + sl160 INTEGER (0..159), + sl320 INTEGER (0..319), + sl640 INTEGER (0..639), + sl1280 INTEGER (0..1279), + sl2560 INTEGER (0..2559) + } OPTIONAL, -- Cond Setup4 + duration INTEGER (2..2559) OPTIONAL, -- Need S + monitoringSymbolsWithinSlot BIT STRING (SIZE (14)) OPTIONAL, -- Cond Setup + nrofCandidates SEQUENCE { + aggregationLevel1 ENUMERATED {n0, n1, n2, n3, n4, n5, n6, n8}, + aggregationLevel2 ENUMERATED {n0, n1, n2, n3, n4, n5, n6, n8}, + aggregationLevel4 ENUMERATED {n0, n1, n2, n3, n4, n5, n6, n8}, + aggregationLevel8 ENUMERATED {n0, n1, n2, n3, n4, n5, n6, n8}, + aggregationLevel16 ENUMERATED {n0, n1, n2, n3, n4, n5, n6, n8} + } OPTIONAL, -- Cond Setup + searchSpaceType CHOICE { + common SEQUENCE { + dci-Format0-0-AndFormat1-0 SEQUENCE { + ... + } OPTIONAL, -- Need R + dci-Format2-0 SEQUENCE { + nrofCandidates-SFI SEQUENCE { + aggregationLevel1 ENUMERATED {n1, n2} OPTIONAL, -- Need R + aggregationLevel2 ENUMERATED {n1, n2} OPTIONAL, -- Need R + aggregationLevel4 ENUMERATED {n1, n2} OPTIONAL, -- Need R + aggregationLevel8 ENUMERATED {n1, n2} OPTIONAL, -- Need R + aggregationLevel16 ENUMERATED {n1, n2} OPTIONAL -- Need R + }, + ... + } OPTIONAL, -- Need R + dci-Format2-1 SEQUENCE { + ... + } OPTIONAL, -- Need R + dci-Format2-2 SEQUENCE { + ... + } OPTIONAL, -- Need R + dci-Format2-3 SEQUENCE { + dummy1 ENUMERATED {sl1, sl2, sl4, sl5, sl8, sl10, sl16, sl20} OPTIONAL, -- Cond Setup + dummy2 ENUMERATED {n1, n2}, + ... + } OPTIONAL -- Need R + }, + ue-Specific SEQUENCE { + dci-Formats ENUMERATED {formats0-0-And-1-0, formats0-1-And-1-1}, + ..., + [[ + dci-Formats-MT-r16 ENUMERATED {formats2-5} OPTIONAL, -- Need R + dci-FormatsSL-r16 ENUMERATED {formats0-0-And-1-0, formats0-1-And-1-1, formats3-0, formats3-1, + formats3-0-And-3-1} OPTIONAL, -- Need R + dci-FormatsExt-r16 ENUMERATED {formats0-2-And-1-2, formats0-1-And-1-1And-0-2-And-1-2} + OPTIONAL -- Need R + ]] + } + } OPTIONAL -- Cond Setup2 +} + +SearchSpaceExt-r16 ::= SEQUENCE { + controlResourceSetId-r16 ControlResourceSetId-r16 OPTIONAL, -- Cond SetupOnly2 + searchSpaceType-r16 SEQUENCE { + common-r16 SEQUENCE { + dci-Format2-4-r16 SEQUENCE { + nrofCandidates-CI-r16 SEQUENCE { + aggregationLevel1-r16 ENUMERATED {n1, n2} OPTIONAL, -- Need R + aggregationLevel2-r16 ENUMERATED {n1, n2} OPTIONAL, -- Need R + aggregationLevel4-r16 ENUMERATED {n1, n2} OPTIONAL, -- Need R + aggregationLevel8-r16 ENUMERATED {n1, n2} OPTIONAL, -- Need R + aggregationLevel16-r16 ENUMERATED {n1, n2} OPTIONAL -- Need R + }, + ... + } OPTIONAL, -- Need R + dci-Format2-5-r16 SEQUENCE { + nrofCandidates-IAB-r16 SEQUENCE { + aggregationLevel1-r16 ENUMERATED {n1, n2} OPTIONAL, -- Need R + aggregationLevel2-r16 ENUMERATED {n1, n2} OPTIONAL, -- Need R + aggregationLevel4-r16 ENUMERATED {n1, n2} OPTIONAL, -- Need R + aggregationLevel8-r16 ENUMERATED {n1, n2} OPTIONAL, -- Need R + aggregationLevel16-r16 ENUMERATED {n1, n2} OPTIONAL -- Need R + }, + ... + } OPTIONAL, -- Need R + dci-Format2-6-r16 SEQUENCE { + ... + } OPTIONAL, -- Need R + ... + } + } OPTIONAL, -- Cond Setup3 + searchSpaceGroupIdList-r16 SEQUENCE (SIZE (1.. 2)) OF INTEGER (0..1) OPTIONAL, -- Need R + freqMonitorLocations-r16 BIT STRING (SIZE (5)) OPTIONAL -- Need R +} + +SearchSpaceExt-v1700 ::= SEQUENCE { + monitoringSlotPeriodicityAndOffset-v1710 CHOICE { + sl32 INTEGER (0..31), + sl64 INTEGER (0..63), + sl128 INTEGER (0..127), + sl5120 INTEGER (0..5119), + sl10240 INTEGER (0..10239), + sl20480 INTEGER (0..20479) + } OPTIONAL, -- Cond Setup5 + monitoringSlotsWithinSlotGroup-r17 CHOICE { + slotGroupLength4-r17 BIT STRING (SIZE (4)), + slotGroupLength8-r17 BIT STRING (SIZE (8)) + } OPTIONAL, -- Need R + duration-r17 INTEGER (4..20476) OPTIONAL, -- Need R + + searchSpaceType-r17 SEQUENCE{ + common-r17 SEQUENCE { + dci-Format4-0-r17 SEQUENCE { + ... + } OPTIONAL, -- Need R + dci-Format4-1-r17 SEQUENCE { + ... + } OPTIONAL, -- Need R + dci-Format4-2-r17 SEQUENCE { + ... + } OPTIONAL, -- Need R + dci-Format4-1-AndFormat4-2-r17 SEQUENCE { + ... + } OPTIONAL, -- Need R + dci-Format2-7-r17 SEQUENCE { + nrofCandidates-PEI-r17 SEQUENCE { + aggregationLevel4-r17 ENUMERATED {n0, n1, n2, n3, n4} OPTIONAL, -- Need R + aggregationLevel8-r17 ENUMERATED {n0, n1, n2} OPTIONAL, -- Need R + aggregationLevel16-r17 ENUMERATED {n0, n1} OPTIONAL -- Need R + }, + ... + } OPTIONAL -- Need R + } + } OPTIONAL, -- Need R + searchSpaceGroupIdList-r17 SEQUENCE (SIZE (1.. 3)) OF INTEGER (0.. maxNrofSearchSpaceGroups-1-r17) OPTIONAL, -- Cond DedicatedOnly + searchSpaceLinkingId-r17 INTEGER (0..maxNrofSearchSpacesLinks-1-r17) OPTIONAL -- Cond DedicatedOnly +} + +-- TAG-SEARCHSPACE-STOP +-- TAG-SEARCHSPACEID-START + +SearchSpaceId ::= INTEGER (0..maxNrofSearchSpaces-1) + +-- TAG-SEARCHSPACEID-STOP +-- TAG-SEARCHSPACEZERO-START + +SearchSpaceZero ::= INTEGER (0..15) + +-- TAG-SEARCHSPACEZERO-STOP +-- TAG-SECURITYALGORITHMCONFIG-START + +SecurityAlgorithmConfig ::= SEQUENCE { + cipheringAlgorithm CipheringAlgorithm, + integrityProtAlgorithm IntegrityProtAlgorithm OPTIONAL, -- Need R + ... +} + +IntegrityProtAlgorithm ::= ENUMERATED { + nia0, nia1, nia2, nia3, spare4, spare3, + spare2, spare1, ...} + +CipheringAlgorithm ::= ENUMERATED { + nea0, nea1, nea2, nea3, spare4, spare3, + spare2, spare1, ...} + +-- TAG-SECURITYALGORITHMCONFIG-STOP +-- TAG-SEMISTATICCHANNELACCESSCONFIG-START + +SemiStaticChannelAccessConfig-r16 ::= SEQUENCE { + period ENUMERATED {ms1, ms2, ms2dot5, ms4, ms5, ms10} +} + +-- TAG-SEMISTATICCHANNELACCESSCONFIG-STOP +-- TAG-SEMISTATICCHANNELACCESSCONFIGUE-START + +SemiStaticChannelAccessConfigUE-r17 ::= SEQUENCE { + periodUE-r17 ENUMERATED {ms1, ms2, ms2dot5, ms4, ms5, ms10, spare2, spare1}, + offsetUE-r17 INTEGER (0..559) +} + +-- TAG-SEMISTATICCHANNELACCESSCONFIGUE-STOP +-- TAG-SENSORLOCATIONINFO-START + +Sensor-LocationInfo-r16 ::= SEQUENCE { + sensor-MeasurementInformation-r16 OCTET STRING OPTIONAL, + sensor-MotionInformation-r16 OCTET STRING OPTIONAL, + ... +} + +-- TAG-SENSORLOCATIONINFO-STOP +-- TAG-SERVINGCELLANDBWP-ID-START + +ServingCellAndBWP-Id-r17 ::= SEQUENCE { + servingcell-r17 ServCellIndex, + bwp-r17 BWP-Id +} + +-- TAG-SERVINGCELLANDBWP-ID-STOP +-- TAG-SERVCELLINDEX-START + +ServCellIndex ::= INTEGER (0..maxNrofServingCells-1) + +-- TAG-SERVCELLINDEX-STOP +-- TAG-SERVINGCELLCONFIG-START + +ServingCellConfig ::= SEQUENCE { + tdd-UL-DL-ConfigurationDedicated TDD-UL-DL-ConfigDedicated OPTIONAL, -- Cond TDD + initialDownlinkBWP BWP-DownlinkDedicated OPTIONAL, -- Need M + downlinkBWP-ToReleaseList SEQUENCE (SIZE (1..maxNrofBWPs)) OF BWP-Id OPTIONAL, -- Need N + downlinkBWP-ToAddModList SEQUENCE (SIZE (1..maxNrofBWPs)) OF BWP-Downlink OPTIONAL, -- Need N + firstActiveDownlinkBWP-Id BWP-Id OPTIONAL, -- Cond SyncAndCellAdd + bwp-InactivityTimer ENUMERATED {ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, + ms40,ms50, ms60, ms80,ms100, ms200,ms300, ms500, + ms750, ms1280, ms1920, ms2560, spare10, spare9, spare8, + spare7, spare6, spare5, spare4, spare3, spare2, spare1 } OPTIONAL, --Need R + defaultDownlinkBWP-Id BWP-Id OPTIONAL, -- Need S + uplinkConfig UplinkConfig OPTIONAL, -- Need M + supplementaryUplink UplinkConfig OPTIONAL, -- Need M + pdcch-ServingCellConfig SetupRelease { PDCCH-ServingCellConfig } OPTIONAL, -- Need M + pdsch-ServingCellConfig SetupRelease { PDSCH-ServingCellConfig } OPTIONAL, -- Need M + csi-MeasConfig SetupRelease { CSI-MeasConfig } OPTIONAL, -- Need M + sCellDeactivationTimer ENUMERATED {ms20, ms40, ms80, ms160, ms200, ms240, + ms320, ms400, ms480, ms520, ms640, ms720, + ms840, ms1280, spare2,spare1} OPTIONAL, -- Cond ServingCellWithoutPUCCH + crossCarrierSchedulingConfig CrossCarrierSchedulingConfig OPTIONAL, -- Need M + tag-Id TAG-Id, + dummy1 ENUMERATED {enabled} OPTIONAL, -- Need R + pathlossReferenceLinking ENUMERATED {spCell, sCell} OPTIONAL, -- Cond SCellOnly + servingCellMO MeasObjectId OPTIONAL, -- Cond MeasObject + ..., + [[ + lte-CRS-ToMatchAround SetupRelease { RateMatchPatternLTE-CRS } OPTIONAL, -- Need M + rateMatchPatternToAddModList SEQUENCE (SIZE (1..maxNrofRateMatchPatterns)) OF RateMatchPattern OPTIONAL, -- Need N + rateMatchPatternToReleaseList SEQUENCE (SIZE (1..maxNrofRateMatchPatterns)) OF RateMatchPatternId OPTIONAL, -- Need N + downlinkChannelBW-PerSCS-List SEQUENCE (SIZE (1..maxSCSs)) OF SCS-SpecificCarrier OPTIONAL -- Need S + ]], + [[ + supplementaryUplinkRelease-r16 ENUMERATED {true} OPTIONAL, -- Need N + tdd-UL-DL-ConfigurationDedicated-IAB-MT-r16 TDD-UL-DL-ConfigDedicated-IAB-MT-r16 OPTIONAL, -- Cond TDD_IAB + dormantBWP-Config-r16 SetupRelease { DormantBWP-Config-r16 } OPTIONAL, -- Need M + ca-SlotOffset-r16 CHOICE { + refSCS15kHz INTEGER (-2..2), + refSCS30KHz INTEGER (-5..5), + refSCS60KHz INTEGER (-10..10), + refSCS120KHz INTEGER (-20..20) + } OPTIONAL, -- Cond AsyncCA + dummy2 SetupRelease { DummyJ } OPTIONAL, -- Need M + intraCellGuardBandsDL-List-r16 SEQUENCE (SIZE (1..maxSCSs)) OF IntraCellGuardBandsPerSCS-r16 OPTIONAL, -- Need S + intraCellGuardBandsUL-List-r16 SEQUENCE (SIZE (1..maxSCSs)) OF IntraCellGuardBandsPerSCS-r16 OPTIONAL, -- Need S + csi-RS-ValidationWithDCI-r16 ENUMERATED {enabled} OPTIONAL, -- Need R + lte-CRS-PatternList1-r16 SetupRelease { LTE-CRS-PatternList-r16 } OPTIONAL, -- Need M + lte-CRS-PatternList2-r16 SetupRelease { LTE-CRS-PatternList-r16 } OPTIONAL, -- Need M + crs-RateMatch-PerCORESETPoolIndex-r16 ENUMERATED {enabled} OPTIONAL, -- Need R + enableTwoDefaultTCI-States-r16 ENUMERATED {enabled} OPTIONAL, -- Need R + enableDefaultTCI-StatePerCoresetPoolIndex-r16 ENUMERATED {enabled} OPTIONAL, -- Need R + enableBeamSwitchTiming-r16 ENUMERATED {true} OPTIONAL, -- Need R + cbg-TxDiffTBsProcessingType1-r16 ENUMERATED {enabled} OPTIONAL, -- Need R + cbg-TxDiffTBsProcessingType2-r16 ENUMERATED {enabled} OPTIONAL -- Need R + ]], + [[ + directionalCollisionHandling-r16 ENUMERATED {enabled} OPTIONAL, -- Need R + channelAccessConfig-r16 SetupRelease { ChannelAccessConfig-r16 } OPTIONAL -- Need M + ]], + [[ + nr-dl-PRS-PDC-Info-r17 SetupRelease {NR-DL-PRS-PDC-Info-r17} OPTIONAL, -- Need M + semiStaticChannelAccessConfigUE-r17 SetupRelease {SemiStaticChannelAccessConfigUE-r17} OPTIONAL, -- Need M + mimoParam-r17 SetupRelease {MIMOParam-r17} OPTIONAL, -- Need M + channelAccessMode2-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + timeDomainHARQ-BundlingType1-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + nrofHARQ-BundlingGroups-r17 ENUMERATED {n1, n2, n4} OPTIONAL, -- Need R + fdmed-ReceptionMulticast-r17 ENUMERATED {true} OPTIONAL, -- Need R + moreThanOneNackOnlyMode-r17 ENUMERATED {mode2} OPTIONAL, -- Need S + tci-ActivatedConfig-r17 TCI-ActivatedConfig-r17 OPTIONAL, -- Cond TCI_ActivatedConfig + directionalCollisionHandling-DC-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + lte-NeighCellsCRS-AssistInfoList-r17 SetupRelease { LTE-NeighCellsCRS-AssistInfoList-r17 } OPTIONAL -- Need M + ]], + [[ + lte-NeighCellsCRS-Assumptions-r17 ENUMERATED {false} OPTIONAL -- Need R + ]] +} + +UplinkConfig ::= SEQUENCE { + initialUplinkBWP BWP-UplinkDedicated OPTIONAL, -- Need M + uplinkBWP-ToReleaseList SEQUENCE (SIZE (1..maxNrofBWPs)) OF BWP-Id OPTIONAL, -- Need N + uplinkBWP-ToAddModList SEQUENCE (SIZE (1..maxNrofBWPs)) OF BWP-Uplink OPTIONAL, -- Need N + firstActiveUplinkBWP-Id BWP-Id OPTIONAL, -- Cond SyncAndCellAdd + pusch-ServingCellConfig SetupRelease { PUSCH-ServingCellConfig } OPTIONAL, -- Need M + carrierSwitching SetupRelease { SRS-CarrierSwitching } OPTIONAL, -- Need M + ..., + [[ + powerBoostPi2BPSK BOOLEAN OPTIONAL, -- Need M + uplinkChannelBW-PerSCS-List SEQUENCE (SIZE (1..maxSCSs)) OF SCS-SpecificCarrier OPTIONAL -- Need S + ]], + [[ + enablePL-RS-UpdateForPUSCH-SRS-r16 ENUMERATED {enabled} OPTIONAL, -- Need R + enableDefaultBeamPL-ForPUSCH0-0-r16 ENUMERATED {enabled} OPTIONAL, -- Need R + enableDefaultBeamPL-ForPUCCH-r16 ENUMERATED {enabled} OPTIONAL, -- Need R + enableDefaultBeamPL-ForSRS-r16 ENUMERATED {enabled} OPTIONAL, -- Need R + uplinkTxSwitching-r16 SetupRelease { UplinkTxSwitching-r16 } OPTIONAL, -- Need M + mpr-PowerBoost-FR2-r16 ENUMERATED {true} OPTIONAL -- Need R + ]] +} + +DummyJ ::= SEQUENCE { + maxEnergyDetectionThreshold-r16 INTEGER(-85..-52), + energyDetectionThresholdOffset-r16 INTEGER (-20..-13), + ul-toDL-COT-SharingED-Threshold-r16 INTEGER (-85..-52) OPTIONAL, -- Need R + absenceOfAnyOtherTechnology-r16 ENUMERATED {true} OPTIONAL -- Need R +} + +ChannelAccessConfig-r16 ::= SEQUENCE { + energyDetectionConfig-r16 CHOICE { + maxEnergyDetectionThreshold-r16 INTEGER (-85..-52), + energyDetectionThresholdOffset-r16 INTEGER (-13..20) + } OPTIONAL, -- Need R + ul-toDL-COT-SharingED-Threshold-r16 INTEGER (-85..-52) OPTIONAL, -- Need R + absenceOfAnyOtherTechnology-r16 ENUMERATED {true} OPTIONAL -- Need R +} + +IntraCellGuardBandsPerSCS-r16 ::= SEQUENCE { + guardBandSCS-r16 SubcarrierSpacing, + intraCellGuardBands-r16 SEQUENCE (SIZE (1..4)) OF GuardBand-r16 +} + +GuardBand-r16 ::= SEQUENCE { + startCRB-r16 INTEGER (0..274), + nrofCRBs-r16 INTEGER (0..15) +} + +DormancyGroupID-r16 ::= INTEGER (0..4) + +DormantBWP-Config-r16::= SEQUENCE { + dormantBWP-Id-r16 BWP-Id OPTIONAL, -- Need M + withinActiveTimeConfig-r16 SetupRelease { WithinActiveTimeConfig-r16 } OPTIONAL, -- Need M + outsideActiveTimeConfig-r16 SetupRelease { OutsideActiveTimeConfig-r16 } OPTIONAL -- Need M +} + +WithinActiveTimeConfig-r16 ::= SEQUENCE { + firstWithinActiveTimeBWP-Id-r16 BWP-Id OPTIONAL, -- Need M + dormancyGroupWithinActiveTime-r16 DormancyGroupID-r16 OPTIONAL -- Need R +} + +OutsideActiveTimeConfig-r16 ::= SEQUENCE { + firstOutsideActiveTimeBWP-Id-r16 BWP-Id OPTIONAL, -- Need M + dormancyGroupOutsideActiveTime-r16 DormancyGroupID-r16 OPTIONAL -- Need R +} + +UplinkTxSwitching-r16 ::= SEQUENCE { + uplinkTxSwitchingPeriodLocation-r16 BOOLEAN, + uplinkTxSwitchingCarrier-r16 ENUMERATED {carrier1, carrier2} +} + +MIMOParam-r17 ::= SEQUENCE { + additionalPCI-ToAddModList-r17 SEQUENCE (SIZE(1..maxNrofAdditionalPCI-r17)) OF SSB-MTC-AdditionalPCI-r17 OPTIONAL, -- Need N + additionalPCI-ToReleaseList-r17 SEQUENCE (SIZE(1..maxNrofAdditionalPCI-r17)) OF AdditionalPCIIndex-r17 OPTIONAL, -- Need N + unifiedTCI-StateType-r17 ENUMERATED {separate, joint} OPTIONAL, -- Need R + uplink-PowerControlToAddModList-r17 SEQUENCE (SIZE (1..maxUL-TCI-r17)) OF Uplink-powerControl-r17 OPTIONAL, -- Need N + uplink-PowerControlToReleaseList-r17 SEQUENCE (SIZE (1..maxUL-TCI-r17)) OF Uplink-powerControlId-r17 OPTIONAL, -- Need N + sfnSchemePDCCH-r17 ENUMERATED {sfnSchemeA,sfnSchemeB} OPTIONAL, -- Need R + sfnSchemePDSCH-r17 ENUMERATED {sfnSchemeA,sfnSchemeB} OPTIONAL -- Need R + +} + +-- TAG-SERVINGCELLCONFIG-STOP +-- TAG-SERVINGCELLCONFIGCOMMON-START + +ServingCellConfigCommon ::= SEQUENCE { + physCellId PhysCellId OPTIONAL, -- Cond HOAndServCellAdd, + downlinkConfigCommon DownlinkConfigCommon OPTIONAL, -- Cond HOAndServCellAdd + uplinkConfigCommon UplinkConfigCommon OPTIONAL, -- Need M + supplementaryUplinkConfig UplinkConfigCommon OPTIONAL, -- Need S + n-TimingAdvanceOffset ENUMERATED { n0, n25600, n39936 } OPTIONAL, -- Need S + ssb-PositionsInBurst CHOICE { + shortBitmap BIT STRING (SIZE (4)), + mediumBitmap BIT STRING (SIZE (8)), + longBitmap BIT STRING (SIZE (64)) + } OPTIONAL, -- Cond AbsFreqSSB + ssb-periodicityServingCell ENUMERATED { ms5, ms10, ms20, ms40, ms80, ms160, spare2, spare1 } OPTIONAL, -- Need S + dmrs-TypeA-Position ENUMERATED {pos2, pos3}, + lte-CRS-ToMatchAround SetupRelease { RateMatchPatternLTE-CRS } OPTIONAL, -- Need M + rateMatchPatternToAddModList SEQUENCE (SIZE (1..maxNrofRateMatchPatterns)) OF RateMatchPattern OPTIONAL, -- Need N + rateMatchPatternToReleaseList SEQUENCE (SIZE (1..maxNrofRateMatchPatterns)) OF RateMatchPatternId OPTIONAL, -- Need N + ssbSubcarrierSpacing SubcarrierSpacing OPTIONAL, -- Cond HOAndServCellWithSSB + tdd-UL-DL-ConfigurationCommon TDD-UL-DL-ConfigCommon OPTIONAL, -- Cond TDD + ss-PBCH-BlockPower INTEGER (-60..50), + ..., + [[ + channelAccessMode-r16 CHOICE { + dynamic NULL, + semiStatic SemiStaticChannelAccessConfig-r16 + } OPTIONAL, -- Cond SharedSpectrum + discoveryBurstWindowLength-r16 ENUMERATED {ms0dot5, ms1, ms2, ms3, ms4, ms5} OPTIONAL, -- Need R + ssb-PositionQCL-r16 SSB-PositionQCL-Relation-r16 OPTIONAL, -- Cond SharedSpectrum + highSpeedConfig-r16 HighSpeedConfig-r16 OPTIONAL -- Need R + ]], + [[ + highSpeedConfig-v1700 HighSpeedConfig-v1700 OPTIONAL, -- Need R + channelAccessMode2-r17 ENUMERATED {enabled} OPTIONAL, -- Cond SharedSpectrum2 + discoveryBurstWindowLength-r17 ENUMERATED {ms0dot125, ms0dot25, ms0dot5, ms0dot75, ms1, ms1dot25} OPTIONAL, -- Need R + ssb-PositionQCL-r17 SSB-PositionQCL-Relation-r17 OPTIONAL, -- Cond SharedSpectrum2 + highSpeedConfigFR2-r17 HighSpeedConfigFR2-r17 OPTIONAL, -- Need R + uplinkConfigCommon-v1700 UplinkConfigCommon-v1700 OPTIONAL, -- Need R + ntn-Config-r17 NTN-Config-r17 OPTIONAL -- Need R + ]], + [[ + featurePriorities-r17 SEQUENCE { + redCapPriority-r17 FeaturePriority-r17 OPTIONAL, -- Need R + slicingPriority-r17 FeaturePriority-r17 OPTIONAL, -- Need R + msg3-Repetitions-Priority-r17 FeaturePriority-r17 OPTIONAL, -- Need R + sdt-Priority-r17 FeaturePriority-r17 OPTIONAL -- Need R + } OPTIONAL -- Need R + ]] +} + +-- TAG-SERVINGCELLCONFIGCOMMON-STOP +-- TAG-SERVINGCELLCONFIGCOMMONSIB-START + +ServingCellConfigCommonSIB ::= SEQUENCE { + downlinkConfigCommon DownlinkConfigCommonSIB, + uplinkConfigCommon UplinkConfigCommonSIB OPTIONAL, -- Need R + supplementaryUplink UplinkConfigCommonSIB OPTIONAL, -- Need R + n-TimingAdvanceOffset ENUMERATED { n0, n25600, n39936 } OPTIONAL, -- Need S + ssb-PositionsInBurst SEQUENCE { + inOneGroup BIT STRING (SIZE (8)), + groupPresence BIT STRING (SIZE (8)) OPTIONAL -- Cond FR2-Only + }, + ssb-PeriodicityServingCell ENUMERATED {ms5, ms10, ms20, ms40, ms80, ms160}, + tdd-UL-DL-ConfigurationCommon TDD-UL-DL-ConfigCommon OPTIONAL, -- Cond TDD + ss-PBCH-BlockPower INTEGER (-60..50), + ..., + [[ + channelAccessMode-r16 CHOICE { + dynamic NULL, + semiStatic SemiStaticChannelAccessConfig-r16 + } OPTIONAL, -- Cond SharedSpectrum + discoveryBurstWindowLength-r16 ENUMERATED {ms0dot5, ms1, ms2, ms3, ms4, ms5} OPTIONAL, -- Need R + highSpeedConfig-r16 HighSpeedConfig-r16 OPTIONAL -- Need R + ]], + [[ + channelAccessMode2-r17 ENUMERATED {enabled} OPTIONAL, -- Cond SharedSpectrum2 + discoveryBurstWindowLength-v1700 ENUMERATED {ms0dot125, ms0dot25, ms0dot5, ms0dot75, ms1, ms1dot25} OPTIONAL, -- Need R + highSpeedConfigFR2-r17 HighSpeedConfigFR2-r17 OPTIONAL, -- Need R + uplinkConfigCommon-v1700 UplinkConfigCommonSIB-v1700 OPTIONAL -- Need R + ]], + [[ + enhancedMeasurementLEO-r17 ENUMERATED {true} OPTIONAL -- Need R + ]] +} + +-- TAG-SERVINGCELLCONFIGCOMMONSIB-STOP +-- TAG-SHORTI-RNTI-VALUE-START + +ShortI-RNTI-Value ::= BIT STRING (SIZE(24)) + +-- TAG-SHORTI-RNTI-VALUE-STOP +-- TAG-SHORTMAC-I-START + +ShortMAC-I ::= BIT STRING (SIZE (16)) + +-- TAG-SHORTMAC-I-STOP +-- TAG-SINR-RANGE-START + +SINR-Range ::= INTEGER(0..127) + +-- TAG-SINR-RANGE-STOP +-- TAG-SI-REQUESTCONFIG-START + +SI-RequestConfig ::= SEQUENCE { + rach-OccasionsSI SEQUENCE { + rach-ConfigSI RACH-ConfigGeneric, + ssb-perRACH-Occasion ENUMERATED {oneEighth, oneFourth, oneHalf, one, two, four, eight, sixteen} + } OPTIONAL, -- Need R + si-RequestPeriod ENUMERATED {one, two, four, six, eight, ten, twelve, sixteen} OPTIONAL, -- Need R + si-RequestResources SEQUENCE (SIZE (1..maxSI-Message)) OF SI-RequestResources +} + +SI-RequestResources ::= SEQUENCE { + ra-PreambleStartIndex INTEGER (0..63), + ra-AssociationPeriodIndex INTEGER (0..15) OPTIONAL, -- Need R + ra-ssb-OccasionMaskIndex INTEGER (0..15) OPTIONAL -- Need R +} + +-- TAG-SI-REQUESTCONFIG-STOP +-- TAG-SI-SCHEDULINGINFO-START + +SI-SchedulingInfo ::= SEQUENCE { + schedulingInfoList SEQUENCE (SIZE (1..maxSI-Message)) OF SchedulingInfo, + si-WindowLength ENUMERATED {s5, s10, s20, s40, s80, s160, s320, s640, s1280, s2560-v1710, s5120-v1710 }, + si-RequestConfig SI-RequestConfig OPTIONAL, -- Cond MSG-1 + si-RequestConfigSUL SI-RequestConfig OPTIONAL, -- Cond SUL-MSG-1 + systemInformationAreaID BIT STRING (SIZE (24)) OPTIONAL, -- Need R + ... +} + +SchedulingInfo ::= SEQUENCE { + si-BroadcastStatus ENUMERATED {broadcasting, notBroadcasting}, + si-Periodicity ENUMERATED {rf8, rf16, rf32, rf64, rf128, rf256, rf512}, + sib-MappingInfo SIB-Mapping +} + +SI-SchedulingInfo-v1700 ::= SEQUENCE { + schedulingInfoList2-r17 SEQUENCE (SIZE (1..maxSI-Message)) OF SchedulingInfo2-r17, + si-RequestConfigRedCap-r17 SI-RequestConfig OPTIONAL -- Cond REDCAP-MSG-1 +} + +SchedulingInfo2-r17 ::= SEQUENCE { + si-BroadcastStatus-r17 ENUMERATED {broadcasting, notBroadcasting}, + si-WindowPosition-r17 INTEGER (1..256), + si-Periodicity-r17 ENUMERATED {rf8, rf16, rf32, rf64, rf128, rf256, rf512}, + sib-MappingInfo-r17 SIB-Mapping-v1700 +} + +SIB-Mapping ::= SEQUENCE (SIZE (1..maxSIB)) OF SIB-TypeInfo + +SIB-Mapping-v1700 ::= SEQUENCE (SIZE (1..maxSIB)) OF SIB-TypeInfo-v1700 + +SIB-TypeInfo ::= SEQUENCE { + type ENUMERATED {sibType2, sibType3, sibType4, sibType5, sibType6, sibType7, sibType8, sibType9, + sibType10-v1610, sibType11-v1610, sibType12-v1610, sibType13-v1610, + sibType14-v1610, spare3, spare2, spare1,... }, + valueTag INTEGER (0..31) OPTIONAL, -- Cond SIB-TYPE + areaScope ENUMERATED {true} OPTIONAL -- Need S +} + +SIB-TypeInfo-v1700 ::= SEQUENCE { + sibType-r17 CHOICE { + type1-r17 ENUMERATED {sibType15, sibType16, sibType17, sibType18, sibType19, sibType20, sibType21, + spare9, spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1,...}, + type2-r17 SEQUENCE { + posSibType-r17 ENUMERATED {posSibType1-9, posSibType1-10, posSibType2-24, posSibType2-25, + posSibType6-4, posSibType6-5, posSibType6-6, spare9, spare8, spare7, spare6, + spare5, spare4, spare3, spare2, spare1,...}, + encrypted-r17 ENUMERATED { true } OPTIONAL, -- Need R + gnss-id-r17 GNSS-ID-r16 OPTIONAL, -- Need R + sbas-id-r17 SBAS-ID-r16 OPTIONAL -- Need R + } + }, + valueTag-r17 INTEGER (0..31) OPTIONAL, -- Cond NonPosSIB + areaScope-r17 ENUMERATED {true} OPTIONAL -- Need S +} + +-- TAG-SI-SCHEDULINGINFO-STOP +-- TAG-SKCOUNTER-START + +SK-Counter ::= INTEGER (0..65535) + +-- TAG-SKCOUNTER-STOP +-- TAG-SLOTFORMATCOMBINATIONSPERCELL-START + +SlotFormatCombinationsPerCell ::= SEQUENCE { + servingCellId ServCellIndex, + subcarrierSpacing SubcarrierSpacing, + subcarrierSpacing2 SubcarrierSpacing OPTIONAL, -- Need R + slotFormatCombinations SEQUENCE (SIZE (1..maxNrofSlotFormatCombinationsPerSet)) OF SlotFormatCombination + OPTIONAL, -- Need M + positionInDCI INTEGER(0..maxSFI-DCI-PayloadSize-1) OPTIONAL, -- Need M + ..., + [[ + enableConfiguredUL-r16 ENUMERATED {enabled} OPTIONAL -- Need R + ]] + +} + +SlotFormatCombination ::= SEQUENCE { + slotFormatCombinationId SlotFormatCombinationId, + slotFormats SEQUENCE (SIZE (1..maxNrofSlotFormatsPerCombination)) OF INTEGER (0..255) +} + +SlotFormatCombinationId ::= INTEGER (0..maxNrofSlotFormatCombinationsPerSet-1) + +-- TAG-SLOTFORMATCOMBINATIONSPERCELL-STOP +-- TAG-SLOTFORMATINDICATOR-START + +SlotFormatIndicator ::= SEQUENCE { + sfi-RNTI RNTI-Value, + dci-PayloadSize INTEGER (1..maxSFI-DCI-PayloadSize), + slotFormatCombToAddModList SEQUENCE (SIZE(1..maxNrofAggregatedCellsPerCellGroup)) OF SlotFormatCombinationsPerCell + OPTIONAL, -- Need N + slotFormatCombToReleaseList SEQUENCE (SIZE(1..maxNrofAggregatedCellsPerCellGroup)) OF ServCellIndex OPTIONAL, -- Need N + ..., + [[ + availableRB-SetsToAddModList-r16 SEQUENCE (SIZE(1..maxNrofAggregatedCellsPerCellGroup)) OF AvailableRB-SetsPerCell-r16 OPTIONAL, -- Need N + availableRB-SetsToReleaseList-r16 SEQUENCE (SIZE(1..maxNrofAggregatedCellsPerCellGroup)) OF ServCellIndex OPTIONAL, -- Need N + switchTriggerToAddModList-r16 SEQUENCE (SIZE(1..4)) OF SearchSpaceSwitchTrigger-r16 OPTIONAL, -- Need N + switchTriggerToReleaseList-r16 SEQUENCE (SIZE(1..4)) OF ServCellIndex OPTIONAL, -- Need N + co-DurationsPerCellToAddModList-r16 SEQUENCE (SIZE(1..maxNrofAggregatedCellsPerCellGroup)) OF CO-DurationsPerCell-r16 OPTIONAL, -- Need N + co-DurationsPerCellToReleaseList-r16 SEQUENCE (SIZE(1..maxNrofAggregatedCellsPerCellGroup)) OF ServCellIndex OPTIONAL -- Need N + ]], + [[ + switchTriggerToAddModListSizeExt-r16 SEQUENCE (SIZE(1..maxNrofAggregatedCellsPerCellGroupMinus4-r16)) OF + SearchSpaceSwitchTrigger-r16 OPTIONAL, -- Need N + switchTriggerToReleaseListSizeExt-r16 SEQUENCE (SIZE(1.. maxNrofAggregatedCellsPerCellGroupMinus4-r16)) OF + ServCellIndex OPTIONAL -- Need N + ]], + [[ + co-DurationsPerCellToAddModList-r17 SEQUENCE (SIZE(1..maxNrofAggregatedCellsPerCellGroup)) OF CO-DurationsPerCell-r17 OPTIONAL -- Need N + ]] +} + +CO-DurationsPerCell-r16 ::= SEQUENCE { + servingCellId-r16 ServCellIndex, + positionInDCI-r16 INTEGER(0..maxSFI-DCI-PayloadSize-1), + subcarrierSpacing-r16 SubcarrierSpacing, + co-DurationList-r16 SEQUENCE (SIZE(1..64)) OF CO-Duration-r16 +} + +CO-DurationsPerCell-r17 ::= SEQUENCE { + servingCellId-r17 ServCellIndex, + positionInDCI-r17 INTEGER(0..maxSFI-DCI-PayloadSize-1), + subcarrierSpacing-r17 SubcarrierSpacing, + co-DurationList-r17 SEQUENCE (SIZE(1..64)) OF CO-Duration-r17 +} + +CO-Duration-r16 ::= INTEGER (0..1120) +CO-Duration-r17 ::= INTEGER (0..4480) + +AvailableRB-SetsPerCell-r16 ::= SEQUENCE { + servingCellId-r16 ServCellIndex, + positionInDCI-r16 INTEGER(0..maxSFI-DCI-PayloadSize-1) +} + +SearchSpaceSwitchTrigger-r16 ::= SEQUENCE { + servingCellId-r16 ServCellIndex, + positionInDCI-r16 INTEGER(0..maxSFI-DCI-PayloadSize-1) +} + +-- TAG-SLOTFORMATINDICATOR-STOP +-- TAG-S-NSSAI-START + +S-NSSAI ::= CHOICE{ + sst BIT STRING (SIZE (8)), + sst-SD BIT STRING (SIZE (32)) +} + +-- TAG-S-NSSAI-STOP +-- TAG-SPEEDSTATESCALEFACTORS-START + +SpeedStateScaleFactors ::= SEQUENCE { + sf-Medium ENUMERATED {oDot25, oDot5, oDot75, lDot0}, + sf-High ENUMERATED {oDot25, oDot5, oDot75, lDot0} +} +-- TAG-SPEEDSTATESCALEFACTORS-STOP +-- TAG-SPS-CONFIG-START + +SPS-Config ::= SEQUENCE { + periodicity ENUMERATED {ms10, ms20, ms32, ms40, ms64, ms80, ms128, ms160, ms320, ms640, + spare6, spare5, spare4, spare3, spare2, spare1}, + nrofHARQ-Processes INTEGER (1..8), + n1PUCCH-AN PUCCH-ResourceId OPTIONAL, -- Need M + mcs-Table ENUMERATED {qam64LowSE} OPTIONAL, -- Need S + ..., + [[ + sps-ConfigIndex-r16 SPS-ConfigIndex-r16 OPTIONAL, -- Cond SPS-List + harq-ProcID-Offset-r16 INTEGER (0..15) OPTIONAL, -- Need R + periodicityExt-r16 INTEGER (1..5120) OPTIONAL, -- Need R + harq-CodebookID-r16 INTEGER (1..2) OPTIONAL, -- Need R + pdsch-AggregationFactor-r16 ENUMERATED {n1, n2, n4, n8 } OPTIONAL -- Need S + ]], + [[ + sps-HARQ-Deferral-r17 INTEGER (1..32) OPTIONAL, -- Need R + n1PUCCH-AN-PUCCHsSCell-r17 PUCCH-ResourceId OPTIONAL, -- Need R + periodicityExt-r17 INTEGER (1..40960) OPTIONAL, -- Need R + nrofHARQ-Processes-v1710 INTEGER(9..32) OPTIONAL, -- Need R + harq-ProcID-Offset-v1700 INTEGER (16..31) OPTIONAL -- Need R + ]] +} + +-- TAG-SPS-CONFIG-STOP +-- TAG-SPS-CONFIGINDEX-START + +SPS-ConfigIndex-r16 ::= INTEGER (0.. maxNrofSPS-Config-1-r16) + +-- TAG-SPS-CONFIGINDEX-STOP +-- TAG-SPS-PUCCH-AN-START + +SPS-PUCCH-AN-r16 ::= SEQUENCE { + sps-PUCCH-AN-ResourceID-r16 PUCCH-ResourceId, + maxPayloadSize-r16 INTEGER (4..256) OPTIONAL -- Need R +} + +-- TAG-SPS-PUCCH-AN-STOP +-- TAG-SPS-PUCCH-AN-LIST-START + +SPS-PUCCH-AN-List-r16 ::= SEQUENCE (SIZE(1..4)) OF SPS-PUCCH-AN-r16 + +-- TAG-SPS-PUCCH-AN-LIST-STOP +-- TAG-SRB-IDENTITY-START + +SRB-Identity ::= INTEGER (1..3) + +SRB-Identity-v1700 ::= INTEGER (4) + +-- TAG-SRB-IDENTITY-STOP +-- TAG-SRS-CARRIERSWITCHING-START + +SRS-CarrierSwitching ::= SEQUENCE { + srs-SwitchFromServCellIndex INTEGER (0..31) OPTIONAL, -- Need M + srs-SwitchFromCarrier ENUMERATED {sUL, nUL}, + srs-TPC-PDCCH-Group CHOICE { + typeA SEQUENCE (SIZE (1..32)) OF SRS-TPC-PDCCH-Config, + typeB SRS-TPC-PDCCH-Config + } OPTIONAL, -- Need M + monitoringCells SEQUENCE (SIZE (1..maxNrofServingCells)) OF ServCellIndex OPTIONAL, -- Need M + ... +} + +SRS-TPC-PDCCH-Config ::= SEQUENCE { + srs-CC-SetIndexlist SEQUENCE (SIZE(1..4)) OF SRS-CC-SetIndex OPTIONAL -- Need M +} + +SRS-CC-SetIndex ::= SEQUENCE { + cc-SetIndex INTEGER (0..3) OPTIONAL, -- Need M + cc-IndexInOneCC-Set INTEGER (0..7) OPTIONAL -- Need M +} + +-- TAG-SRS-CARRIERSWITCHING-STOP +-- TAG-SRS-CONFIG-START + +SRS-Config ::= SEQUENCE { + srs-ResourceSetToReleaseList SEQUENCE (SIZE(1..maxNrofSRS-ResourceSets)) OF SRS-ResourceSetId OPTIONAL, -- Need N + srs-ResourceSetToAddModList SEQUENCE (SIZE(1..maxNrofSRS-ResourceSets)) OF SRS-ResourceSet OPTIONAL, -- Need N + srs-ResourceToReleaseList SEQUENCE (SIZE(1..maxNrofSRS-Resources)) OF SRS-ResourceId OPTIONAL, -- Need N + srs-ResourceToAddModList SEQUENCE (SIZE(1..maxNrofSRS-Resources)) OF SRS-Resource OPTIONAL, -- Need N + tpc-Accumulation ENUMERATED {disabled} OPTIONAL, -- Need S + ..., + [[ + srs-RequestDCI-1-2-r16 INTEGER (1..2) OPTIONAL, -- Need S + srs-RequestDCI-0-2-r16 INTEGER (1..2) OPTIONAL, -- Need S + srs-ResourceSetToAddModListDCI-0-2-r16 SEQUENCE (SIZE(1..maxNrofSRS-ResourceSets)) OF SRS-ResourceSet OPTIONAL, -- Need N + srs-ResourceSetToReleaseListDCI-0-2-r16 SEQUENCE (SIZE(1..maxNrofSRS-ResourceSets)) OF SRS-ResourceSetId OPTIONAL, -- Need N + srs-PosResourceSetToReleaseList-r16 SEQUENCE (SIZE(1..maxNrofSRS-PosResourceSets-r16)) OF SRS-PosResourceSetId-r16 + OPTIONAL, -- Need N + srs-PosResourceSetToAddModList-r16 SEQUENCE (SIZE(1..maxNrofSRS-PosResourceSets-r16)) OF SRS-PosResourceSet-r16 OPTIONAL,-- Need N + srs-PosResourceToReleaseList-r16 SEQUENCE (SIZE(1..maxNrofSRS-PosResources-r16)) OF SRS-PosResourceId-r16 OPTIONAL,-- Need N + srs-PosResourceToAddModList-r16 SEQUENCE (SIZE(1..maxNrofSRS-PosResources-r16)) OF SRS-PosResource-r16 OPTIONAL -- Need N + ]] +} + +SRS-ResourceSet ::= SEQUENCE { + srs-ResourceSetId SRS-ResourceSetId, + srs-ResourceIdList SEQUENCE (SIZE(1..maxNrofSRS-ResourcesPerSet)) OF SRS-ResourceId OPTIONAL, -- Cond Setup + resourceType CHOICE { + aperiodic SEQUENCE { + aperiodicSRS-ResourceTrigger INTEGER (1..maxNrofSRS-TriggerStates-1), + csi-RS NZP-CSI-RS-ResourceId OPTIONAL, -- Cond NonCodebook + slotOffset INTEGER (1..32) OPTIONAL, -- Need S + ..., + [[ + aperiodicSRS-ResourceTriggerList SEQUENCE (SIZE(1..maxNrofSRS-TriggerStates-2)) + OF INTEGER (1..maxNrofSRS-TriggerStates-1) OPTIONAL -- Need M + ]] + }, + semi-persistent SEQUENCE { + associatedCSI-RS NZP-CSI-RS-ResourceId OPTIONAL, -- Cond NonCodebook + ... + }, + periodic SEQUENCE { + associatedCSI-RS NZP-CSI-RS-ResourceId OPTIONAL, -- Cond NonCodebook + ... + } + }, + usage ENUMERATED {beamManagement, codebook, nonCodebook, antennaSwitching}, + alpha Alpha OPTIONAL, -- Need S + p0 INTEGER (-202..24) OPTIONAL, -- Cond Setup + pathlossReferenceRS PathlossReferenceRS-Config OPTIONAL, -- Need M + srs-PowerControlAdjustmentStates ENUMERATED { sameAsFci2, separateClosedLoop} OPTIONAL, -- Need S + ..., + [[ + pathlossReferenceRSList-r16 SetupRelease { PathlossReferenceRSList-r16} OPTIONAL -- Need M + ]], + [[ + usagePDC-r17 ENUMERATED {true} OPTIONAL, -- Need R + availableSlotOffsetList-r17 SEQUENCE (SIZE(1..4)) OF AvailableSlotOffset-r17 OPTIONAL, -- Need R + followUnifiedTCI-StateSRS-r17 ENUMERATED {enabled} OPTIONAL -- Need R + ]] +} + +AvailableSlotOffset-r17 ::= INTEGER (0..7) + +PathlossReferenceRS-Config ::= CHOICE { + ssb-Index SSB-Index, + csi-RS-Index NZP-CSI-RS-ResourceId +} + +PathlossReferenceRSList-r16 ::= SEQUENCE (SIZE (1..maxNrofSRS-PathlossReferenceRS-r16)) OF PathlossReferenceRS-r16 + +PathlossReferenceRS-r16 ::= SEQUENCE { + srs-PathlossReferenceRS-Id-r16 SRS-PathlossReferenceRS-Id-r16, + pathlossReferenceRS-r16 PathlossReferenceRS-Config +} + +SRS-PathlossReferenceRS-Id-r16 ::= INTEGER (0..maxNrofSRS-PathlossReferenceRS-1-r16) + +SRS-PosResourceSet-r16 ::= SEQUENCE { + srs-PosResourceSetId-r16 SRS-PosResourceSetId-r16, + srs-PosResourceIdList-r16 SEQUENCE (SIZE(1..maxNrofSRS-ResourcesPerSet)) OF SRS-PosResourceId-r16 + OPTIONAL, -- Cond Setup + resourceType-r16 CHOICE { + aperiodic-r16 SEQUENCE { + aperiodicSRS-ResourceTriggerList-r16 SEQUENCE (SIZE(1..maxNrofSRS-TriggerStates-1)) + OF INTEGER (1..maxNrofSRS-TriggerStates-1) OPTIONAL, -- Need M + ... + }, + semi-persistent-r16 SEQUENCE { + ... + }, + periodic-r16 SEQUENCE { + ... + } + }, + alpha-r16 Alpha OPTIONAL, -- Need S + p0-r16 INTEGER (-202..24) OPTIONAL, -- Cond Setup + pathlossReferenceRS-Pos-r16 CHOICE { + ssb-IndexServing-r16 SSB-Index, + ssb-Ncell-r16 SSB-InfoNcell-r16, + dl-PRS-r16 DL-PRS-Info-r16 + } OPTIONAL, -- Need M + ... +} + +SRS-ResourceSetId ::= INTEGER (0..maxNrofSRS-ResourceSets-1) + +SRS-PosResourceSetId-r16 ::= INTEGER (0..maxNrofSRS-PosResourceSets-1-r16) + +SRS-Resource ::= SEQUENCE { + srs-ResourceId SRS-ResourceId, + nrofSRS-Ports ENUMERATED {port1, ports2, ports4}, + ptrs-PortIndex ENUMERATED {n0, n1 } OPTIONAL, -- Need R + transmissionComb CHOICE { + n2 SEQUENCE { + combOffset-n2 INTEGER (0..1), + cyclicShift-n2 INTEGER (0..7) + }, + n4 SEQUENCE { + combOffset-n4 INTEGER (0..3), + cyclicShift-n4 INTEGER (0..11) + } + }, + resourceMapping SEQUENCE { + startPosition INTEGER (0..5), + nrofSymbols ENUMERATED {n1, n2, n4}, + repetitionFactor ENUMERATED {n1, n2, n4} + }, + freqDomainPosition INTEGER (0..67), + freqDomainShift INTEGER (0..268), + freqHopping SEQUENCE { + c-SRS INTEGER (0..63), + b-SRS INTEGER (0..3), + b-hop INTEGER (0..3) + }, + groupOrSequenceHopping ENUMERATED { neither, groupHopping, sequenceHopping }, + resourceType CHOICE { + aperiodic SEQUENCE { + ... + }, + semi-persistent SEQUENCE { + periodicityAndOffset-sp SRS-PeriodicityAndOffset, + ... + }, + periodic SEQUENCE { + periodicityAndOffset-p SRS-PeriodicityAndOffset, + ... + } + }, + sequenceId INTEGER (0..1023), + spatialRelationInfo SRS-SpatialRelationInfo OPTIONAL, -- Need R + ..., + [[ + resourceMapping-r16 SEQUENCE { + startPosition-r16 INTEGER (0..13), + nrofSymbols-r16 ENUMERATED {n1, n2, n4}, + repetitionFactor-r16 ENUMERATED {n1, n2, n4} + } OPTIONAL -- Need R + ]], + [[ + spatialRelationInfo-PDC-r17 SetupRelease { SpatialRelationInfo-PDC-r17 } OPTIONAL, -- Need M + resourceMapping-r17 SEQUENCE { + startPosition-r17 INTEGER (0..13), + nrofSymbols-r17 ENUMERATED {n1, n2, n4, n8, n10, n12, n14}, + repetitionFactor-r17 ENUMERATED {n1, n2, n4, n5, n6, n7, n8, n10, n12, n14} + } OPTIONAL, -- Need R + partialFreqSounding-r17 SEQUENCE { + startRBIndexFScaling-r17 CHOICE{ + startRBIndexAndFreqScalingFactor2-r17 INTEGER (0..1), + startRBIndexAndFreqScalingFactor4-r17 INTEGER (0..3) + }, + enableStartRBHopping-r17 ENUMERATED {enable} OPTIONAL -- Need R + } OPTIONAL, -- Need R + transmissionComb-n8-r17 SEQUENCE { + combOffset-n8-r17 INTEGER (0..7), + cyclicShift-n8-r17 INTEGER (0..5) + } OPTIONAL, -- Need R + srs-TCI-State-r17 CHOICE { + srs-UL-TCI-State TCI-UL-State-Id-r17, + srs-DLorJointTCI-State TCI-StateId + } OPTIONAL -- Need R + ]], + [[ + repetitionFactor-v1730 ENUMERATED {n3} OPTIONAL, -- Need R + srs-DLorJointTCI-State-v1730 SEQUENCE { + cellAndBWP-r17 ServingCellAndBWP-Id-r17 + } OPTIONAL -- Cond DLorJointTCI-SRS + ]] +} + +SRS-PosResource-r16::= SEQUENCE { + srs-PosResourceId-r16 SRS-PosResourceId-r16, + transmissionComb-r16 CHOICE { + n2-r16 SEQUENCE { + combOffset-n2-r16 INTEGER (0..1), + cyclicShift-n2-r16 INTEGER (0..7) + }, + n4-r16 SEQUENCE { + combOffset-n4-r16 INTEGER (0..3), + cyclicShift-n4-r16 INTEGER (0..11) + }, + n8-r16 SEQUENCE { + combOffset-n8-r16 INTEGER (0..7), + cyclicShift-n8-r16 INTEGER (0..5) + }, + ... + }, + resourceMapping-r16 SEQUENCE { + startPosition-r16 INTEGER (0..13), + nrofSymbols-r16 ENUMERATED {n1, n2, n4, n8, n12} + }, + freqDomainShift-r16 INTEGER (0..268), + freqHopping-r16 SEQUENCE { + c-SRS-r16 INTEGER (0..63), + ... + }, + groupOrSequenceHopping-r16 ENUMERATED { neither, groupHopping, sequenceHopping }, + resourceType-r16 CHOICE { + aperiodic-r16 SEQUENCE { + slotOffset-r16 INTEGER (1..32) OPTIONAL, -- Need S + ... + }, + semi-persistent-r16 SEQUENCE { + periodicityAndOffset-sp-r16 SRS-PeriodicityAndOffset-r16, + ..., + [[ + periodicityAndOffset-sp-Ext-r16 SRS-PeriodicityAndOffsetExt-r16 OPTIONAL -- Need R + ]] + }, + periodic-r16 SEQUENCE { + periodicityAndOffset-p-r16 SRS-PeriodicityAndOffset-r16, + ..., + [[ + periodicityAndOffset-p-Ext-r16 SRS-PeriodicityAndOffsetExt-r16 OPTIONAL -- Need R + ]] + } + }, + sequenceId-r16 INTEGER (0..65535), + spatialRelationInfoPos-r16 SRS-SpatialRelationInfoPos-r16 OPTIONAL, -- Need R + ... +} + +SRS-SpatialRelationInfo ::= SEQUENCE { + servingCellId ServCellIndex OPTIONAL, -- Need S + referenceSignal CHOICE { + ssb-Index SSB-Index, + csi-RS-Index NZP-CSI-RS-ResourceId, + srs SEQUENCE { + resourceId SRS-ResourceId, + uplinkBWP BWP-Id + } + } +} + +SRS-SpatialRelationInfoPos-r16 ::= CHOICE { + servingRS-r16 SEQUENCE { + servingCellId ServCellIndex OPTIONAL, -- Need S + referenceSignal-r16 CHOICE { + ssb-IndexServing-r16 SSB-Index, + csi-RS-IndexServing-r16 NZP-CSI-RS-ResourceId, + srs-SpatialRelation-r16 SEQUENCE { + resourceSelection-r16 CHOICE { + srs-ResourceId-r16 SRS-ResourceId, + srs-PosResourceId-r16 SRS-PosResourceId-r16 + }, + uplinkBWP-r16 BWP-Id + } + } + }, + ssb-Ncell-r16 SSB-InfoNcell-r16, + dl-PRS-r16 DL-PRS-Info-r16 +} + +SSB-Configuration-r16 ::= SEQUENCE { + ssb-Freq-r16 ARFCN-ValueNR, + halfFrameIndex-r16 ENUMERATED {zero, one}, + ssbSubcarrierSpacing-r16 SubcarrierSpacing, + ssb-Periodicity-r16 ENUMERATED { ms5, ms10, ms20, ms40, ms80, ms160, spare2,spare1 } OPTIONAL, -- Need S + sfn0-Offset-r16 SEQUENCE { + sfn-Offset-r16 INTEGER (0..1023), + integerSubframeOffset-r16 INTEGER (0..9) OPTIONAL -- Need R + } OPTIONAL, -- Need R + sfn-SSB-Offset-r16 INTEGER (0..15), + ss-PBCH-BlockPower-r16 INTEGER (-60..50) OPTIONAL -- Cond Pathloss +} + +SSB-InfoNcell-r16 ::= SEQUENCE { + physicalCellId-r16 PhysCellId, + ssb-IndexNcell-r16 SSB-Index OPTIONAL, -- Need S + ssb-Configuration-r16 SSB-Configuration-r16 OPTIONAL -- Need S +} + +DL-PRS-Info-r16 ::= SEQUENCE { + dl-PRS-ID-r16 INTEGER (0..255), + dl-PRS-ResourceSetId-r16 INTEGER (0..7), + dl-PRS-ResourceId-r16 INTEGER (0..63) OPTIONAL -- Need S +} + +SRS-ResourceId ::= INTEGER (0..maxNrofSRS-Resources-1) +SRS-PosResourceId-r16 ::= INTEGER (0..maxNrofSRS-PosResources-1-r16) + +SRS-PeriodicityAndOffset ::= CHOICE { + sl1 NULL, + sl2 INTEGER(0..1), + sl4 INTEGER(0..3), + sl5 INTEGER(0..4), + sl8 INTEGER(0..7), + sl10 INTEGER(0..9), + sl16 INTEGER(0..15), + sl20 INTEGER(0..19), + sl32 INTEGER(0..31), + sl40 INTEGER(0..39), + sl64 INTEGER(0..63), + sl80 INTEGER(0..79), + sl160 INTEGER(0..159), + sl320 INTEGER(0..319), + sl640 INTEGER(0..639), + sl1280 INTEGER(0..1279), + sl2560 INTEGER(0..2559) +} + +SRS-PeriodicityAndOffset-r16 ::= CHOICE { + sl1 NULL, + sl2 INTEGER(0..1), + sl4 INTEGER(0..3), + sl5 INTEGER(0..4), + sl8 INTEGER(0..7), + sl10 INTEGER(0..9), + sl16 INTEGER(0..15), + sl20 INTEGER(0..19), + sl32 INTEGER(0..31), + sl40 INTEGER(0..39), + sl64 INTEGER(0..63), + sl80 INTEGER(0..79), + sl160 INTEGER(0..159), + sl320 INTEGER(0..319), + sl640 INTEGER(0..639), + sl1280 INTEGER(0..1279), + sl2560 INTEGER(0..2559), + sl5120 INTEGER(0..5119), + sl10240 INTEGER(0..10239), + sl40960 INTEGER(0..40959), + sl81920 INTEGER(0..81919), + ... +} + +SRS-PeriodicityAndOffsetExt-r16 ::= CHOICE { + sl128 INTEGER(0..127), + sl256 INTEGER(0..255), + sl512 INTEGER(0..511), + sl20480 INTEGER(0..20479) +} + +SpatialRelationInfo-PDC-r17 ::= SEQUENCE { + referenceSignal CHOICE { + ssb-Index SSB-Index, + csi-RS-Index NZP-CSI-RS-ResourceId, + dl-PRS-PDC NR-DL-PRS-ResourceID-r17, + srs SEQUENCE { + resourceId SRS-ResourceId, + uplinkBWP BWP-Id + }, + ... + }, + ... +} + +-- TAG-SRS-CONFIG-STOP +-- TAG-SRS-RSRP-RANGE-START + +SRS-RSRP-Range-r16 ::= INTEGER(0..98) + +-- TAG-SRS-RSRP-RANGE-STOP +-- TAG-SRS-TPC-COMMANDCONFIG-START + +SRS-TPC-CommandConfig ::= SEQUENCE { + startingBitOfFormat2-3 INTEGER (1..31) OPTIONAL, -- Need R + fieldTypeFormat2-3 INTEGER (0..1) OPTIONAL, -- Need R + ..., + [[ + startingBitOfFormat2-3SUL INTEGER (1..31) OPTIONAL -- Need R + ]] +} + +-- TAG-SRS-TPC-COMMANDCONFIG-STOP +-- TAG-SSB-INDEX-START + +SSB-Index ::= INTEGER (0..maxNrofSSBs-1) + +-- TAG-SSB-INDEX-STOP +-- TAG-SSB-MTC-START + +SSB-MTC ::= SEQUENCE { + periodicityAndOffset CHOICE { + sf5 INTEGER (0..4), + sf10 INTEGER (0..9), + sf20 INTEGER (0..19), + sf40 INTEGER (0..39), + sf80 INTEGER (0..79), + sf160 INTEGER (0..159) + }, + duration ENUMERATED { sf1, sf2, sf3, sf4, sf5 } +} + +SSB-MTC2 ::= SEQUENCE { + pci-List SEQUENCE (SIZE (1..maxNrofPCIsPerSMTC)) OF PhysCellId OPTIONAL, -- Need M + periodicity ENUMERATED {sf5, sf10, sf20, sf40, sf80, spare3, spare2, spare1} +} + +SSB-MTC2-LP-r16 ::= SEQUENCE { + pci-List SEQUENCE (SIZE (1..maxNrofPCIsPerSMTC)) OF PhysCellId OPTIONAL, -- Need R + periodicity ENUMERATED {sf10, sf20, sf40, sf80, sf160, spare3, spare2, spare1} +} + +SSB-MTC3-r16 ::= SEQUENCE { + periodicityAndOffset-r16 CHOICE { + sf5-r16 INTEGER (0..4), + sf10-r16 INTEGER (0..9), + sf20-r16 INTEGER (0..19), + sf40-r16 INTEGER (0..39), + sf80-r16 INTEGER (0..79), + sf160-r16 INTEGER (0..159), + sf320-r16 INTEGER (0..319), + sf640-r16 INTEGER (0..639), + sf1280-r16 INTEGER (0..1279) + }, + duration-r16 ENUMERATED {sf1, sf2, sf3, sf4, sf5}, + pci-List-r16 SEQUENCE (SIZE (1..maxNrofPCIsPerSMTC)) OF PhysCellId OPTIONAL, -- Need M + ssb-ToMeasure-r16 SetupRelease { SSB-ToMeasure } OPTIONAL -- Need M +} + +SSB-MTC4-r17 ::= SEQUENCE { + pci-List-r17 SEQUENCE (SIZE (1..maxNrofPCIsPerSMTC)) OF PhysCellId OPTIONAL, -- Need M + offset-r17 INTEGER (0..159) +} + +SSB-MTC-AdditionalPCI-r17 ::= SEQUENCE { + additionalPCIIndex-r17 AdditionalPCIIndex-r17, + additionalPCI-r17 PhysCellId, + periodicity-r17 ENUMERATED { ms5, ms10, ms20, ms40, ms80, ms160, spare2, spare1 }, + ssb-PositionsInBurst-r17 CHOICE { + shortBitmap BIT STRING (SIZE (4)), + mediumBitmap BIT STRING (SIZE (8)), + longBitmap BIT STRING (SIZE (64)) + }, + ss-PBCH-BlockPower-r17 INTEGER (-60..50) +} + +AdditionalPCIIndex-r17 ::= INTEGER(1..maxNrofAdditionalPCI-r17) + +-- TAG-SSB-MTC-STOP +-- TAG-SSB-POSITIONQCL-RELATION-START + +SSB-PositionQCL-Relation-r16 ::= ENUMERATED {n1,n2,n4,n8} + +SSB-PositionQCL-Relation-r17 ::= ENUMERATED {n32, n64} + +-- TAG-SSB-POSITIONQCL-RELATION-STOP +-- TAG-SSB-TOMEASURE-START + +SSB-ToMeasure ::= CHOICE { + shortBitmap BIT STRING (SIZE (4)), + mediumBitmap BIT STRING (SIZE (8)), + longBitmap BIT STRING (SIZE (64)) +} + +-- TAG-SSB-TOMEASURE-STOP +-- TAG-SS-RSSI-MEASUREMENT-START + +SS-RSSI-Measurement ::= SEQUENCE { + measurementSlots BIT STRING (SIZE (1..80)), + endSymbol INTEGER(0..3) +} + +-- TAG-SS-RSSI-MEASUREMENT-STOP +-- TAG-SUBCARRIERSPACING-START + +SubcarrierSpacing ::= ENUMERATED {kHz15, kHz30, kHz60, kHz120, kHz240, kHz480-v1700, kHz960-v1700, spare1} + +-- TAG-SUBCARRIERSPACING-STOP +-- TAG-TAG-CONFIG-START + +TAG-Config ::= SEQUENCE { + tag-ToReleaseList SEQUENCE (SIZE (1..maxNrofTAGs)) OF TAG-Id OPTIONAL, -- Need N + tag-ToAddModList SEQUENCE (SIZE (1..maxNrofTAGs)) OF TAG OPTIONAL -- Need N +} + +TAG ::= SEQUENCE { + tag-Id TAG-Id, + timeAlignmentTimer TimeAlignmentTimer, + ... +} + +TAG-Id ::= INTEGER (0..maxNrofTAGs-1) + +-- TAG-TAG-CONFIG-STOP +-- TAG-TAR-CONFIG-START + +TAR-Config-r17 ::= SEQUENCE { + offsetThresholdTA-r17 ENUMERATED {ms0dot5, ms1, ms2, ms3, ms4, ms5, ms6 ,ms7, ms8, ms9, ms10, ms11, ms12, + ms13, ms14, ms15, spare13, spare12, spare11, spare10, spare9, spare8, spare7, + spare6, spare5, spare4, spare3, spare2, spare1} OPTIONAL, -- Need R + timingAdvanceSR-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + ... +} + +-- TAG-TAR-CONFIG-STOP +-- TAG-TCI-ACTIVATEDCONFIG-START + +TCI-ActivatedConfig-r17 ::= SEQUENCE { + pdcch-TCI-r17 SEQUENCE (SIZE (1..5)) OF TCI-StateId, + pdsch-TCI-r17 BIT STRING (SIZE (1..maxNrofTCI-States)) +} + +-- TAG-TCI-ACTIVATEDCONFIG-STOP +-- TAG-TCI-STATE-START + +TCI-State ::= SEQUENCE { + tci-StateId TCI-StateId, + qcl-Type1 QCL-Info, + qcl-Type2 QCL-Info OPTIONAL, -- Need R + ..., + [[ + additionalPCI-r17 AdditionalPCIIndex-r17 OPTIONAL, -- Need R + pathlossReferenceRS-Id-r17 PathlossReferenceRS-Id-r17 OPTIONAL, -- Cond JointTCI1 + ul-powerControl-r17 Uplink-powerControlId-r17 OPTIONAL -- Cond JointTCI + ]] + +} + +QCL-Info ::= SEQUENCE { + cell ServCellIndex OPTIONAL, -- Need R + bwp-Id BWP-Id OPTIONAL, -- Cond CSI-RS-Indicated + referenceSignal CHOICE { + csi-rs NZP-CSI-RS-ResourceId, + ssb SSB-Index + }, + qcl-Type ENUMERATED {typeA, typeB, typeC, typeD}, + ... +} + +-- TAG-TCI-STATE-STOP +-- TAG-TCI-STATEID-START + +TCI-StateId ::= INTEGER (0..maxNrofTCI-States-1) + +-- TAG-TCI-STATEID-STOP +-- TAG-TCI-UL-STATE-START + +TCI-UL-State-r17 ::= SEQUENCE { + tci-UL-State-Id-r17 TCI-UL-State-Id-r17, + servingCellId-r17 ServCellIndex OPTIONAL, -- Need R + bwp-Id-r17 BWP-Id OPTIONAL, -- Cond CSI-RSorSRS-Indicated + referenceSignal-r17 CHOICE { + ssb-Index-r17 SSB-Index, + csi-RS-Index-r17 NZP-CSI-RS-ResourceId, + srs-r17 SRS-ResourceId + }, + additionalPCI-r17 AdditionalPCIIndex-r17 OPTIONAL, -- Need R + ul-powerControl-r17 Uplink-powerControlId-r17 OPTIONAL, -- Need R + pathlossReferenceRS-Id-r17 PathlossReferenceRS-Id-r17 OPTIONAL, -- Cond Mandatory + ... +} + +-- TAG-TCI-UL-STATE-STOP +-- TAG-TCI-UL-STATEID-START + +TCI-UL-State-Id-r17 ::= INTEGER (0..maxUL-TCI-1-r17) + +-- TAG-TCI-UL-STATEID-STOP +-- TAG-TDD-UL-DL-CONFIGCOMMON-START + +TDD-UL-DL-ConfigCommon ::= SEQUENCE { + referenceSubcarrierSpacing SubcarrierSpacing, + pattern1 TDD-UL-DL-Pattern, + pattern2 TDD-UL-DL-Pattern OPTIONAL, -- Need R + ... +} + +TDD-UL-DL-Pattern ::= SEQUENCE { + dl-UL-TransmissionPeriodicity ENUMERATED {ms0p5, ms0p625, ms1, ms1p25, ms2, ms2p5, ms5, ms10}, + nrofDownlinkSlots INTEGER (0..maxNrofSlots), + nrofDownlinkSymbols INTEGER (0..maxNrofSymbols-1), + nrofUplinkSlots INTEGER (0..maxNrofSlots), + nrofUplinkSymbols INTEGER (0..maxNrofSymbols-1), + ..., + [[ + dl-UL-TransmissionPeriodicity-v1530 ENUMERATED {ms3, ms4} OPTIONAL -- Need R + ]] +} + +-- TAG-TDD-UL-DL-CONFIGCOMMON-STOP +-- TAG-TDD-UL-DL-CONFIGDEDICATED-START + +TDD-UL-DL-ConfigDedicated ::= SEQUENCE { + slotSpecificConfigurationsToAddModList SEQUENCE (SIZE (1..maxNrofSlots)) OF TDD-UL-DL-SlotConfig OPTIONAL, -- Need N + slotSpecificConfigurationsToReleaseList SEQUENCE (SIZE (1..maxNrofSlots)) OF TDD-UL-DL-SlotIndex OPTIONAL, -- Need N + ... +} + +TDD-UL-DL-ConfigDedicated-IAB-MT-r16::= SEQUENCE { + slotSpecificConfigurationsToAddModList-IAB-MT-r16 SEQUENCE (SIZE (1..maxNrofSlots)) OF TDD-UL-DL-SlotConfig-IAB-MT-r16 OPTIONAL, -- Need N + slotSpecificConfigurationsToReleaseList-IAB-MT-r16 SEQUENCE (SIZE (1..maxNrofSlots)) OF TDD-UL-DL-SlotIndex OPTIONAL, -- Need N + ... +} + +TDD-UL-DL-SlotConfig ::= SEQUENCE { + slotIndex TDD-UL-DL-SlotIndex, + symbols CHOICE { + allDownlink NULL, + allUplink NULL, + explicit SEQUENCE { + nrofDownlinkSymbols INTEGER (1..maxNrofSymbols-1) OPTIONAL, -- Need S + nrofUplinkSymbols INTEGER (1..maxNrofSymbols-1) OPTIONAL -- Need S + } + } +} + +TDD-UL-DL-SlotConfig-IAB-MT-r16::= SEQUENCE { + slotIndex-r16 TDD-UL-DL-SlotIndex, + symbols-IAB-MT-r16 CHOICE { + allDownlink-r16 NULL, + allUplink-r16 NULL, + explicit-r16 SEQUENCE { + nrofDownlinkSymbols-r16 INTEGER (1..maxNrofSymbols-1) OPTIONAL, -- Need S + nrofUplinkSymbols-r16 INTEGER (1..maxNrofSymbols-1) OPTIONAL -- Need S + }, + explicit-IAB-MT-r16 SEQUENCE { + nrofDownlinkSymbols-r16 INTEGER (1..maxNrofSymbols-1) OPTIONAL, -- Need S + nrofUplinkSymbols-r16 INTEGER (1..maxNrofSymbols-1) OPTIONAL -- Need S + } + } +} + +TDD-UL-DL-SlotIndex ::= INTEGER (0..maxNrofSlots-1) + +-- TAG-TDD-UL-DL-CONFIGDEDICATED-STOP +-- TAG-TRACKINGAREACODE-START + +TrackingAreaCode ::= BIT STRING (SIZE (24)) + +-- TAG-TRACKINGAREACODE-STOP +-- TAG-TRESELECTION-START + +T-Reselection ::= INTEGER (0..7) + +-- TAG-TRESELECTION-STOP +-- TAG-TIMEALIGNMENTTIMER-START + +TimeAlignmentTimer ::= ENUMERATED {ms500, ms750, ms1280, ms1920, ms2560, ms5120, ms10240, infinity} + +-- TAG-TIMEALIGNMENTTIMER-STOP +-- TAG-TIMETOTRIGGER-START + +TimeToTrigger ::= ENUMERATED { + ms0, ms40, ms64, ms80, ms100, ms128, ms160, ms256, + ms320, ms480, ms512, ms640, ms1024, ms1280, ms2560, + ms5120} + +-- TAG-TIMETOTRIGGER-STOP +-- TAG-UAC-BARRINGINFOSETINDEX-START + +UAC-BarringInfoSetIndex ::= INTEGER (1..maxBarringInfoSet) + +-- TAG-UAC-BARRINGINFOSETINDEX-STOP +-- TAG-UAC-BARRINGINFOSETLIST-START + +UAC-BarringInfoSetList ::= SEQUENCE (SIZE(1..maxBarringInfoSet)) OF UAC-BarringInfoSet + +UAC-BarringInfoSetList-v1700 ::= SEQUENCE (SIZE(1..maxBarringInfoSet)) OF UAC-BarringInfoSet-v1700 + +UAC-BarringInfoSet ::= SEQUENCE { + uac-BarringFactor ENUMERATED {p00, p05, p10, p15, p20, p25, p30, p40, + p50, p60, p70, p75, p80, p85, p90, p95}, + uac-BarringTime ENUMERATED {s4, s8, s16, s32, s64, s128, s256, s512}, + uac-BarringForAccessIdentity BIT STRING (SIZE(7)) +} + +UAC-BarringInfoSet-v1700 ::= SEQUENCE { + uac-BarringFactorForAI3-r17 ENUMERATED {p00, p05, p10, p15, p20, p25, p30, p40, p50, p60, p70, p75, p80, p85, p90, p95} + OPTIONAL -- Need S +} + +-- TAG-UAC-BARRINGINFOSETLIST-STOP +-- TAG-UAC-BARRINGPERCATLIST-START + +UAC-BarringPerCatList ::= SEQUENCE (SIZE (1..maxAccessCat-1)) OF UAC-BarringPerCat + +UAC-BarringPerCat ::= SEQUENCE { + accessCategory INTEGER (1..maxAccessCat-1), + uac-barringInfoSetIndex UAC-BarringInfoSetIndex +} + +-- TAG-UAC-BARRINGPERCATLIST-STOP +-- TAG-UAC-BARRINGPERPLMN-LIST-START + +UAC-BarringPerPLMN-List ::= SEQUENCE (SIZE (1.. maxPLMN)) OF UAC-BarringPerPLMN + +UAC-BarringPerPLMN ::= SEQUENCE { + plmn-IdentityIndex INTEGER (1..maxPLMN), + uac-ACBarringListType CHOICE{ + uac-ImplicitACBarringList SEQUENCE (SIZE(maxAccessCat-1)) OF UAC-BarringInfoSetIndex, + uac-ExplicitACBarringList UAC-BarringPerCatList + } OPTIONAL -- Need S +} + +-- TAG-UAC-BARRINGPERPLMN-LIST-STOP +-- TAG-UE-TIMERSANDCONSTANTS-START + +UE-TimersAndConstants ::= SEQUENCE { + t300 ENUMERATED {ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000}, + t301 ENUMERATED {ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000}, + t310 ENUMERATED {ms0, ms50, ms100, ms200, ms500, ms1000, ms2000}, + n310 ENUMERATED {n1, n2, n3, n4, n6, n8, n10, n20}, + t311 ENUMERATED {ms1000, ms3000, ms5000, ms10000, ms15000, ms20000, ms30000}, + n311 ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10}, + t319 ENUMERATED {ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000}, + ... +} + +-- TAG-UE-TIMERSANDCONSTANTS-STOP +-- TAG-UE-TIMERSANDCONSTANTSREMOTEUE-START + +UE-TimersAndConstantsRemoteUE-r17 ::= SEQUENCE { + t300-RemoteUE-r17 ENUMERATED {ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000} OPTIONAL, -- Need S + t301-RemoteUE-r17 ENUMERATED {ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000} OPTIONAL, -- Need S + t319-RemoteUE-r17 ENUMERATED {ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000} OPTIONAL, -- Need S + ... +} + +-- TAG-UE-TIMERSANDCONSTANTSREMOTEUE-STOP +-- TAG-ULDELAYVALUECONFIG-START + +UL-DelayValueConfig-r16 ::= SEQUENCE { + delay-DRBlist-r16 SEQUENCE (SIZE(1..maxDRB)) OF DRB-Identity +} + +-- TAG-ULDELAYVALUECONFIG-STOP +-- TAG-ULEXCESSDELAYCONFIG-START + +UL-ExcessDelayConfig-r17 ::= SEQUENCE { + excessDelay-DRBlist-r17 SEQUENCE (SIZE(1..maxDRB)) OF ExcessDelay-DRB-IdentityInfo-r17 +} + +ExcessDelay-DRB-IdentityInfo-r17 ::= SEQUENCE { + drb-IdentityList SEQUENCE (SIZE (1..maxDRB)) OF DRB-Identity, + delayThreshold ENUMERATED {ms0dot25, ms0dot5, ms1, ms2, ms4, ms5, ms10, ms20, ms30, ms40, ms50, ms60, ms70, + ms80, ms90, ms100, ms150, ms300, ms500} +} + +-- TAG-ULEXCESSDELAYCONFIG-STOP +-- TAG-UL-GAPFR2-CONFIG-START + +UL-GapFR2-Config-r17 ::= SEQUENCE { + gapOffset-r17 INTEGER (0..159), + ugl-r17 ENUMERATED {ms0dot125, ms0dot25, ms0dot5, ms1}, + ugrp-r17 ENUMERATED {ms5, ms20, ms40, ms160}, + refFR2-ServCellAsyncCA-r17 ServCellIndex OPTIONAL -- Cond AsyncCA +} + +-- TAG-UL-GAPFR2-CONFIG-STOP +-- TAG-UPLINKCANCELLATION-START + +UplinkCancellation-r16 ::= SEQUENCE { + ci-RNTI-r16 RNTI-Value, + dci-PayloadSizeForCI-r16 INTEGER (0..maxCI-DCI-PayloadSize-r16), + ci-ConfigurationPerServingCell-r16 SEQUENCE (SIZE (1..maxNrofServingCells)) OF CI-ConfigurationPerServingCell-r16, + ... +} + +CI-ConfigurationPerServingCell-r16 ::= SEQUENCE { + servingCellId ServCellIndex, + positionInDCI-r16 INTEGER (0..maxCI-DCI-PayloadSize-1-r16), + positionInDCI-ForSUL-r16 INTEGER (0..maxCI-DCI-PayloadSize-1-r16) OPTIONAL, -- Cond SUL-Only + ci-PayloadSize-r16 ENUMERATED {n1, n2, n4, n5, n7, n8, n10, n14, n16, n20, n28, n32, n35, n42, n56, n112}, + timeFrequencyRegion-r16 SEQUENCE { + timeDurationForCI-r16 ENUMERATED {n2, n4, n7, n14} OPTIONAL, -- Cond SymbolPeriodicity + timeGranularityForCI-r16 ENUMERATED {n1, n2, n4, n7, n14, n28}, + frequencyRegionForCI-r16 INTEGER (0..37949), + deltaOffset-r16 INTEGER (0..2), + ... + }, + uplinkCancellationPriority-v1610 ENUMERATED {enabled} OPTIONAL -- Need S +} + +-- TAG-UPLINKCANCELLATION-STOP +-- TAG-UPLINKCONFIGCOMMON-START + +UplinkConfigCommon ::= SEQUENCE { + frequencyInfoUL FrequencyInfoUL OPTIONAL, -- Cond InterFreqHOAndServCellAdd + initialUplinkBWP BWP-UplinkCommon OPTIONAL, -- Cond ServCellAdd + dummy TimeAlignmentTimer +} + +UplinkConfigCommon-v1700 ::= SEQUENCE { + initialUplinkBWP-RedCap-r17 BWP-UplinkCommon OPTIONAL -- Need R +} + +-- TAG-UPLINKCONFIGCOMMON-STOP +-- TAG-UPLINKCONFIGCOMMONSIB-START + +UplinkConfigCommonSIB ::= SEQUENCE { + frequencyInfoUL FrequencyInfoUL-SIB, + initialUplinkBWP BWP-UplinkCommon, + timeAlignmentTimerCommon TimeAlignmentTimer +} + +UplinkConfigCommonSIB-v1700 ::= SEQUENCE { + initialUplinkBWP-RedCap-r17 BWP-UplinkCommon OPTIONAL -- Need R +} + +-- TAG-UPLINKCONFIGCOMMONSIB-STOP +-- TAG-UPLINK-POWERCONTROL-START + +Uplink-powerControl-r17 ::= SEQUENCE { + ul-powercontrolId-r17 Uplink-powerControlId-r17, + p0AlphaSetforPUSCH-r17 P0AlphaSet-r17 OPTIONAL, -- Need R + p0AlphaSetforPUCCH-r17 P0AlphaSet-r17 OPTIONAL, -- Need R + p0AlphaSetforSRS-r17 P0AlphaSet-r17 OPTIONAL -- Need R +} + +P0AlphaSet-r17 ::= SEQUENCE { + p0-r17 INTEGER (-16..15) OPTIONAL, -- Need R + alpha-r17 Alpha OPTIONAL, -- Need S + closedLoopIndex-r17 ENUMERATED { i0, i1 } +} + +Uplink-powerControlId-r17 ::= INTEGER(1.. maxUL-TCI-r17) + +-- TAG-UPLINK-POWERCONTROL-STOP +-- TAG-UURELAYRLCCHANNELCONFIG-START + +Uu-RelayRLC-ChannelConfig-r17::= SEQUENCE { + uu-LogicalChannelIdentity-r17 LogicalChannelIdentity OPTIONAL, -- Cond RelayLCH-SetupOnly + uu-RelayRLC-ChannelID-r17 Uu-RelayRLC-ChannelID-r17, + reestablishRLC-r17 ENUMERATED {true} OPTIONAL, -- Need N + rlc-Config-r17 RLC-Config OPTIONAL, -- Cond RelayLCH-Setup + mac-LogicalChannelConfig-r17 LogicalChannelConfig OPTIONAL, -- Cond RelayLCH-Setup + ... +} + +-- TAG-UURELAYRLCCHANNELCONFIG-STOP +-- TAG-UURELAYRLCCHANNELID-START + +Uu-RelayRLC-ChannelID-r17 ::= INTEGER (1..maxLC-ID) + +-- TAG-UURELAYRLCCHANNELID-STOP +-- TAG-UPLINKTXDIRECTCURRENTLIST-START + +UplinkTxDirectCurrentList ::= SEQUENCE (SIZE (1..maxNrofServingCells)) OF UplinkTxDirectCurrentCell + +UplinkTxDirectCurrentCell ::= SEQUENCE { + servCellIndex ServCellIndex, + uplinkDirectCurrentBWP SEQUENCE (SIZE (1..maxNrofBWPs)) OF UplinkTxDirectCurrentBWP, + ..., + [[ + uplinkDirectCurrentBWP-SUL SEQUENCE (SIZE (1..maxNrofBWPs)) OF UplinkTxDirectCurrentBWP OPTIONAL + ]] +} + +UplinkTxDirectCurrentBWP ::= SEQUENCE { + bwp-Id BWP-Id, + shift7dot5kHz BOOLEAN, + txDirectCurrentLocation INTEGER (0..3301) +} + +-- TAG-UPLINKTXDIRECTCURRENTLIST-STOP +-- TAG-UPLINKTXDIRECTCURRENTMORECARRIERLIST-START + +UplinkTxDirectCurrentMoreCarrierList-r17 ::= SEQUENCE (SIZE (1..maxNrofCC-Group-r17)) OF CC-Group-r17 + +CC-Group-r17 ::= SEQUENCE { + servCellIndexLower-r17 ServCellIndex, + servCellIndexHigher-r17 ServCellIndex OPTIONAL, + defaultDC-Location-r17 DefaultDC-Location-r17, + offsetToDefault-r17 CHOICE{ + offsetValue OffsetValue-r17, + offsetlist SEQUENCE (SIZE(1..maxNrofReqComDC-Location-r17)) OF OffsetValue-r17 + } OPTIONAL +} + + +OffsetValue-r17::= SEQUENCE { + offsetValue-r17 INTEGER (-20000.. 20000), + shift7dot5kHz-r17 BOOLEAN +} + +DefaultDC-Location-r17 ::= CHOICE { + ul FrequencyComponent-r17, + dl FrequencyComponent-r17, + ulAndDL FrequencyComponent-r17 +} + +FrequencyComponent-r17 ::= ENUMERATED {activeCarrier,configuredCarrier,activeBWP,configuredBWP} + +-- TAG-UPLINKTXDIRECTCURRENTMORECARRIERLIST-STOP +-- TAG-UPLINKTXDIRECTCURRENTTWOCARRIERLIST-START + +UplinkTxDirectCurrentTwoCarrierList-r16 ::= SEQUENCE (SIZE (1..maxNrofTxDC-TwoCarrier-r16)) OF UplinkTxDirectCurrentTwoCarrier-r16 + +UplinkTxDirectCurrentTwoCarrier-r16 ::= SEQUENCE { + carrierOneInfo-r16 UplinkTxDirectCurrentCarrierInfo-r16, + carrierTwoInfo-r16 UplinkTxDirectCurrentCarrierInfo-r16, + singlePA-TxDirectCurrent-r16 UplinkTxDirectCurrentTwoCarrierInfo-r16, + secondPA-TxDirectCurrent-r16 UplinkTxDirectCurrentTwoCarrierInfo-r16 OPTIONAL +} + +UplinkTxDirectCurrentCarrierInfo-r16 ::= SEQUENCE { + servCellIndex-r16 ServCellIndex, + servCellInfo-r16 CHOICE { + bwp-Id-r16 BWP-Id, + deactivatedCarrier-r16 ENUMERATED {deactivated} + } +} + +UplinkTxDirectCurrentTwoCarrierInfo-r16 ::= SEQUENCE { + referenceCarrierIndex-r16 ServCellIndex, + shift7dot5kHz-r16 BOOLEAN, + txDirectCurrentLocation-r16 INTEGER (0..3301) +} + +-- TAG-UPLINKTXDIRECTCURRENTTWOCARRIERLIST-STOP +-- TAG-ZP-CSI-RS-RESOURCE-START + +ZP-CSI-RS-Resource ::= SEQUENCE { + zp-CSI-RS-ResourceId ZP-CSI-RS-ResourceId, + resourceMapping CSI-RS-ResourceMapping, + periodicityAndOffset CSI-ResourcePeriodicityAndOffset OPTIONAL, --Cond PeriodicOrSemiPersistent + ... +} + +ZP-CSI-RS-ResourceId ::= INTEGER (0..maxNrofZP-CSI-RS-Resources-1) + +-- TAG-ZP-CSI-RS-RESOURCE-STOP +-- TAG-ZP-CSI-RS-RESOURCESET-START + +ZP-CSI-RS-ResourceSet ::= SEQUENCE { + zp-CSI-RS-ResourceSetId ZP-CSI-RS-ResourceSetId, + zp-CSI-RS-ResourceIdList SEQUENCE (SIZE(1..maxNrofZP-CSI-RS-ResourcesPerSet)) OF ZP-CSI-RS-ResourceId, + ... +} + +-- TAG-ZP-CSI-RS-RESOURCESET-STOP +-- TAG-ZP-CSI-RS-RESOURCESETID-START + +ZP-CSI-RS-ResourceSetId ::= INTEGER (0..maxNrofZP-CSI-RS-ResourceSets-1) + +-- TAG-ZP-CSI-RS-RESOURCESETID-STOP +-- TAG-ACCESSSTRATUMRELEASE-START + +AccessStratumRelease ::= ENUMERATED { + rel15, rel16, rel17, spare5, spare4, spare3, spare2, spare1, ... } + +-- TAG-ACCESSSTRATUMRELEASE-STOP +-- TAG-APPLAYERMEASPARAMETERS-START + +AppLayerMeasParameters-r17 ::= SEQUENCE { + qoe-Streaming-MeasReport-r17 ENUMERATED {supported} OPTIONAL, + qoe-MTSI-MeasReport-r17 ENUMERATED {supported} OPTIONAL, + qoe-VR-MeasReport-r17 ENUMERATED {supported} OPTIONAL, + ran-VisibleQoE-Streaming-MeasReport-r17 ENUMERATED {supported} OPTIONAL, + ran-VisibleQoE-VR-MeasReport-r17 ENUMERATED {supported} OPTIONAL, + ul-MeasurementReportAppLayer-Seg-r17 ENUMERATED {supported} OPTIONAL, + ... +} + +-- TAG-APPLAYERMEASPARAMETERS-STOP +-- TAG-BANDCOMBINATIONLIST-START + +BandCombinationList ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination + +BandCombinationList-v1540 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-v1540 + +BandCombinationList-v1550 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-v1550 + +BandCombinationList-v1560 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-v1560 + +BandCombinationList-v1570 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-v1570 + +BandCombinationList-v1580 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-v1580 + +BandCombinationList-v1590 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-v1590 + +BandCombinationList-v15g0 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-v15g0 + +BandCombinationList-v1610 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-v1610 + +BandCombinationList-v1630 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-v1630 + +BandCombinationList-v1640 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-v1640 + +BandCombinationList-v1650 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-v1650 + +BandCombinationList-v1680 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-v1680 + +BandCombinationList-v1690 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-v1690 + +BandCombinationList-v16a0 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-v16a0 + +BandCombinationList-v1700 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-v1700 + +BandCombinationList-v1720 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-v1720 + +BandCombinationList-v1730 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-v1730 + +BandCombinationList-UplinkTxSwitch-r16 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-UplinkTxSwitch-r16 + +BandCombinationList-UplinkTxSwitch-v1630 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-UplinkTxSwitch-v1630 + +BandCombinationList-UplinkTxSwitch-v1640 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-UplinkTxSwitch-v1640 + +BandCombinationList-UplinkTxSwitch-v1650 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-UplinkTxSwitch-v1650 + +BandCombinationList-UplinkTxSwitch-v1670 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-UplinkTxSwitch-v1670 + +BandCombinationList-UplinkTxSwitch-v1690 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-UplinkTxSwitch-v1690 + +BandCombinationList-UplinkTxSwitch-v16a0 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-UplinkTxSwitch-v16a0 + +BandCombinationList-UplinkTxSwitch-v1700 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-UplinkTxSwitch-v1700 + +BandCombinationList-UplinkTxSwitch-v1720 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-UplinkTxSwitch-v1720 + +BandCombinationList-UplinkTxSwitch-v1730 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombination-UplinkTxSwitch-v1730 + +BandCombination ::= SEQUENCE { + bandList SEQUENCE (SIZE (1..maxSimultaneousBands)) OF BandParameters, + featureSetCombination FeatureSetCombinationId, + ca-ParametersEUTRA CA-ParametersEUTRA OPTIONAL, + ca-ParametersNR CA-ParametersNR OPTIONAL, + mrdc-Parameters MRDC-Parameters OPTIONAL, + supportedBandwidthCombinationSet BIT STRING (SIZE (1..32)) OPTIONAL, + powerClass-v1530 ENUMERATED {pc2} OPTIONAL +} + +BandCombination-v1540::= SEQUENCE { + bandList-v1540 SEQUENCE (SIZE (1..maxSimultaneousBands)) OF BandParameters-v1540, + ca-ParametersNR-v1540 CA-ParametersNR-v1540 OPTIONAL +} + +BandCombination-v1550 ::= SEQUENCE { + ca-ParametersNR-v1550 CA-ParametersNR-v1550 +} +BandCombination-v1560::= SEQUENCE { + ne-DC-BC ENUMERATED {supported} OPTIONAL, + ca-ParametersNRDC CA-ParametersNRDC OPTIONAL, + ca-ParametersEUTRA-v1560 CA-ParametersEUTRA-v1560 OPTIONAL, + ca-ParametersNR-v1560 CA-ParametersNR-v1560 OPTIONAL +} + +BandCombination-v1570 ::= SEQUENCE { + ca-ParametersEUTRA-v1570 CA-ParametersEUTRA-v1570 +} + +BandCombination-v1580 ::= SEQUENCE { + mrdc-Parameters-v1580 MRDC-Parameters-v1580 +} + +BandCombination-v1590::= SEQUENCE { + supportedBandwidthCombinationSetIntraENDC BIT STRING (SIZE (1..32)) OPTIONAL, + mrdc-Parameters-v1590 MRDC-Parameters-v1590 +} + +BandCombination-v15g0::= SEQUENCE { + ca-ParametersNR-v15g0 CA-ParametersNR-v15g0 OPTIONAL, + ca-ParametersNRDC-v15g0 CA-ParametersNRDC-v15g0 OPTIONAL, + mrdc-Parameters-v15g0 MRDC-Parameters-v15g0 OPTIONAL +} + +BandCombination-v1610 ::= SEQUENCE { + bandList-v1610 SEQUENCE (SIZE (1..maxSimultaneousBands)) OF BandParameters-v1610 OPTIONAL, + ca-ParametersNR-v1610 CA-ParametersNR-v1610 OPTIONAL, + ca-ParametersNRDC-v1610 CA-ParametersNRDC-v1610 OPTIONAL, + powerClass-v1610 ENUMERATED {pc1dot5} OPTIONAL, + powerClassNRPart-r16 ENUMERATED {pc1, pc2, pc3, pc5} OPTIONAL, + featureSetCombinationDAPS-r16 FeatureSetCombinationId OPTIONAL, + mrdc-Parameters-v1620 MRDC-Parameters-v1620 OPTIONAL +} + +BandCombination-v1630 ::= SEQUENCE { + ca-ParametersNR-v1630 CA-ParametersNR-v1630 OPTIONAL, + ca-ParametersNRDC-v1630 CA-ParametersNRDC-v1630 OPTIONAL, + mrdc-Parameters-v1630 MRDC-Parameters-v1630 OPTIONAL, + supportedTxBandCombListPerBC-Sidelink-r16 BIT STRING (SIZE (1..maxBandComb)) OPTIONAL, + supportedRxBandCombListPerBC-Sidelink-r16 BIT STRING (SIZE (1..maxBandComb)) OPTIONAL, + scalingFactorTxSidelink-r16 SEQUENCE (SIZE (1..maxBandComb)) OF ScalingFactorSidelink-r16 OPTIONAL, + scalingFactorRxSidelink-r16 SEQUENCE (SIZE (1..maxBandComb)) OF ScalingFactorSidelink-r16 OPTIONAL +} + +BandCombination-v1640 ::= SEQUENCE { + ca-ParametersNR-v1640 CA-ParametersNR-v1640 OPTIONAL, + ca-ParametersNRDC-v1640 CA-ParametersNRDC-v1640 OPTIONAL +} + +BandCombination-v1650 ::= SEQUENCE { + ca-ParametersNRDC-v1650 CA-ParametersNRDC-v1650 OPTIONAL +} + +BandCombination-v1680 ::= SEQUENCE { + intrabandConcurrentOperationPowerClass-r16 SEQUENCE (SIZE (1..maxBandComb)) OF IntraBandPowerClass-r16 OPTIONAL +} + +BandCombination-v1690 ::= SEQUENCE { + ca-ParametersNR-v1690 CA-ParametersNR-v1690 OPTIONAL +} + +BandCombination-v16a0 ::= SEQUENCE { + ca-ParametersNR-v16a0 CA-ParametersNR-v16a0 OPTIONAL, + ca-ParametersNRDC-v16a0 CA-ParametersNRDC-v16a0 OPTIONAL +} +BandCombination-v1700 ::= SEQUENCE { + ca-ParametersNR-v1700 CA-ParametersNR-v1700 OPTIONAL, + ca-ParametersNRDC-v1700 CA-ParametersNRDC-v1700 OPTIONAL, + mrdc-Parameters-v1700 MRDC-Parameters-v1700 OPTIONAL, + bandList-v1710 SEQUENCE (SIZE (1..maxSimultaneousBands)) OF BandParameters-v1710 OPTIONAL, + supportedBandCombListPerBC-SL-RelayDiscovery-r17 BIT STRING (SIZE (1..maxBandComb)) OPTIONAL, + supportedBandCombListPerBC-SL-NonRelayDiscovery-r17 BIT STRING (SIZE (1..maxBandComb)) OPTIONAL +} + +BandCombination-v1720 ::= SEQUENCE { + ca-ParametersNR-v1720 CA-ParametersNR-v1720 OPTIONAL, + ca-ParametersNRDC-v1720 CA-ParametersNRDC-v1720 OPTIONAL +} + +BandCombination-v1730 ::= SEQUENCE { + ca-ParametersNR-v1730 CA-ParametersNR-v1730 OPTIONAL, + ca-ParametersNRDC-v1730 CA-ParametersNRDC-v1730 OPTIONAL, + bandList-v1730 SEQUENCE (SIZE (1..maxSimultaneousBands)) OF BandParameters-v1730 OPTIONAL +} + +BandCombination-UplinkTxSwitch-r16 ::= SEQUENCE { + bandCombination-r16 BandCombination, + bandCombination-v1540 BandCombination-v1540 OPTIONAL, + bandCombination-v1560 BandCombination-v1560 OPTIONAL, + bandCombination-v1570 BandCombination-v1570 OPTIONAL, + bandCombination-v1580 BandCombination-v1580 OPTIONAL, + bandCombination-v1590 BandCombination-v1590 OPTIONAL, + bandCombination-v1610 BandCombination-v1610 OPTIONAL, + supportedBandPairListNR-r16 SEQUENCE (SIZE (1..maxULTxSwitchingBandPairs)) OF ULTxSwitchingBandPair-r16, + uplinkTxSwitching-OptionSupport-r16 ENUMERATED {switchedUL, dualUL, both} OPTIONAL, + uplinkTxSwitching-PowerBoosting-r16 ENUMERATED {supported} OPTIONAL, + ..., + [[ + -- R4 16-5 UL-MIMO coherence capability for dynamic Tx switching between 3CC 1Tx-2Tx switching + uplinkTxSwitching-PUSCH-TransCoherence-r16 ENUMERATED {nonCoherent, fullCoherent} OPTIONAL + ]] +} + +BandCombination-UplinkTxSwitch-v1630 ::= SEQUENCE { + bandCombination-v1630 BandCombination-v1630 OPTIONAL +} + +BandCombination-UplinkTxSwitch-v1640 ::= SEQUENCE { + bandCombination-v1640 BandCombination-v1640 OPTIONAL +} + +BandCombination-UplinkTxSwitch-v1650 ::= SEQUENCE { + bandCombination-v1650 BandCombination-v1650 OPTIONAL +} + +BandCombination-UplinkTxSwitch-v1670 ::= SEQUENCE { + bandCombination-v15g0 BandCombination-v15g0 OPTIONAL +} + +BandCombination-UplinkTxSwitch-v1690 ::= SEQUENCE { + bandCombination-v1690 BandCombination-v1690 OPTIONAL +} + +BandCombination-UplinkTxSwitch-v16a0 ::= SEQUENCE { + bandCombination-v16a0 BandCombination-v16a0 OPTIONAL +} + +BandCombination-UplinkTxSwitch-v1700 ::= SEQUENCE { + bandCombination-v1700 BandCombination-v1700 OPTIONAL, + -- R4 16-1/16-2/16-3 Dynamic Tx switching between 2CC/3CC 2Tx-2Tx/1Tx-2Tx switching + supportedBandPairListNR-v1700 SEQUENCE (SIZE (1..maxULTxSwitchingBandPairs)) OF ULTxSwitchingBandPair-v1700 OPTIONAL, + -- R4 16-6: UL-MIMO coherence capability for dynamic Tx switching between 2Tx-2Tx switching + uplinkTxSwitchingBandParametersList-v1700 SEQUENCE (SIZE (1.. maxSimultaneousBands)) OF UplinkTxSwitchingBandParameters-v1700 OPTIONAL +} + +BandCombination-UplinkTxSwitch-v1720 ::= SEQUENCE { + bandCombination-v1720 BandCombination-v1720 OPTIONAL, + uplinkTxSwitching-OptionSupport2T2T-r17 ENUMERATED {switchedUL, dualUL, both} OPTIONAL +} + +BandCombination-UplinkTxSwitch-v1730 ::= SEQUENCE { + bandCombination-v1730 BandCombination-v1730 OPTIONAL +} + +ULTxSwitchingBandPair-r16 ::= SEQUENCE { + bandIndexUL1-r16 INTEGER(1..maxSimultaneousBands), + bandIndexUL2-r16 INTEGER(1..maxSimultaneousBands), + uplinkTxSwitchingPeriod-r16 ENUMERATED {n35us, n140us, n210us}, + uplinkTxSwitching-DL-Interruption-r16 BIT STRING (SIZE(1..maxSimultaneousBands)) OPTIONAL +} + +ULTxSwitchingBandPair-v1700 ::= SEQUENCE { + uplinkTxSwitchingPeriod2T2T-r17 ENUMERATED {n35us, n140us, n210us} OPTIONAL +} + +UplinkTxSwitchingBandParameters-v1700 ::= SEQUENCE { + bandIndex-r17 INTEGER(1..maxSimultaneousBands), + uplinkTxSwitching2T2T-PUSCH-TransCoherence-r17 ENUMERATED {nonCoherent, fullCoherent} OPTIONAL +} + +BandParameters ::= CHOICE { + eutra SEQUENCE { + bandEUTRA FreqBandIndicatorEUTRA, + ca-BandwidthClassDL-EUTRA CA-BandwidthClassEUTRA OPTIONAL, + ca-BandwidthClassUL-EUTRA CA-BandwidthClassEUTRA OPTIONAL + }, + nr SEQUENCE { + bandNR FreqBandIndicatorNR, + ca-BandwidthClassDL-NR CA-BandwidthClassNR OPTIONAL, + ca-BandwidthClassUL-NR CA-BandwidthClassNR OPTIONAL + } +} + +BandParameters-v1540 ::= SEQUENCE { + srs-CarrierSwitch CHOICE { + nr SEQUENCE { + srs-SwitchingTimesListNR SEQUENCE (SIZE (1..maxSimultaneousBands)) OF SRS-SwitchingTimeNR + }, + eutra SEQUENCE { + srs-SwitchingTimesListEUTRA SEQUENCE (SIZE (1..maxSimultaneousBands)) OF SRS-SwitchingTimeEUTRA + } + } OPTIONAL, + srs-TxSwitch SEQUENCE { + supportedSRS-TxPortSwitch ENUMERATED {t1r2, t1r4, t2r4, t1r4-t2r4, t1r1, t2r2, t4r4, notSupported}, + txSwitchImpactToRx INTEGER (1..32) OPTIONAL, + txSwitchWithAnotherBand INTEGER (1..32) OPTIONAL + } OPTIONAL +} + +BandParameters-v1610 ::= SEQUENCE { + srs-TxSwitch-v1610 SEQUENCE { + supportedSRS-TxPortSwitch-v1610 ENUMERATED {t1r1-t1r2, t1r1-t1r2-t1r4, t1r1-t1r2-t2r2-t2r4, t1r1-t1r2-t2r2-t1r4-t2r4, + t1r1-t2r2, t1r1-t2r2-t4r4} + } OPTIONAL +} + +BandParameters-v1710 ::= SEQUENCE { + -- R1 23-8-3 SRS Antenna switching for >4Rx + srs-AntennaSwitchingBeyond4RX-r17 SEQUENCE { + -- 1. Support of SRS antenna switching xTyR with y>4 + supportedSRS-TxPortSwitchBeyond4Rx-r17 BIT STRING (SIZE (11)), + -- 2. Report the entry number of the first-listed band with UL in the band combination that affects this DL + entryNumberAffectBeyond4Rx-r17 INTEGER (1..32) OPTIONAL, + -- 3. Report the entry number of the first-listed band with UL in the band combination that switches together with this UL + entryNumberSwitchBeyond4Rx-r17 INTEGER (1..32) OPTIONAL + } OPTIONAL +} + +BandParameters-v1730 ::= SEQUENCE { + -- R1 39-3-2 Affected bands for inter-band CA during SRS carrier switching + srs-SwitchingAffectedBandsListNR-r17 SEQUENCE (SIZE (1..maxSimultaneousBands)) OF SRS-SwitchingAffectedBandsNR-r17 +} + +ScalingFactorSidelink-r16 ::= ENUMERATED {f0p4, f0p75, f0p8, f1} + +IntraBandPowerClass-r16 ::= ENUMERATED {pc2, pc3, spare6, spare5, spare4, spare3, spare2, spare1} + +SRS-SwitchingAffectedBandsNR-r17 ::= BIT STRING (SIZE (1..maxSimultaneousBands)) + +-- TAG-BANDCOMBINATIONLIST-STOP +-- TAG-BANDCOMBINATIONLISTSIDELINKEUTRANR-START + +BandCombinationListSidelinkEUTRA-NR-r16 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombinationParametersSidelinkEUTRA-NR-r16 + +BandCombinationListSidelinkEUTRA-NR-v1630 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombinationParametersSidelinkEUTRA-NR-v1630 + +BandCombinationListSidelinkEUTRA-NR-v1710 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombinationParametersSidelinkEUTRA-NR-v1710 + +BandCombinationParametersSidelinkEUTRA-NR-r16 ::= SEQUENCE (SIZE (1..maxSimultaneousBands)) OF BandParametersSidelinkEUTRA-NR-r16 + +BandCombinationParametersSidelinkEUTRA-NR-v1630 ::= SEQUENCE (SIZE (1..maxSimultaneousBands)) OF BandParametersSidelinkEUTRA-NR-v1630 + +BandCombinationParametersSidelinkEUTRA-NR-v1710 ::= SEQUENCE (SIZE (1..maxSimultaneousBands)) OF BandParametersSidelinkEUTRA-NR-v1710 + +BandParametersSidelinkEUTRA-NR-r16 ::= CHOICE { + eutra SEQUENCE { + bandParametersSidelinkEUTRA1-r16 OCTET STRING OPTIONAL, + bandParametersSidelinkEUTRA2-r16 OCTET STRING OPTIONAL + }, + nr SEQUENCE { + bandParametersSidelinkNR-r16 BandParametersSidelink-r16 + } +} + +BandParametersSidelinkEUTRA-NR-v1630 ::= CHOICE { + eutra NULL, + nr SEQUENCE { + tx-Sidelink-r16 ENUMERATED {supported} OPTIONAL, + rx-Sidelink-r16 ENUMERATED {supported} OPTIONAL, + sl-CrossCarrierScheduling-r16 ENUMERATED {supported} OPTIONAL + } +} + +BandParametersSidelinkEUTRA-NR-v1710 ::= CHOICE { + eutra NULL, + nr SEQUENCE { + --32-4 + sl-TransmissionMode2-PartialSensing-r17 SEQUENCE { + harq-TxProcessModeTwoSidelink-r17 ENUMERATED {n8, n16}, + scs-CP-PatternTxSidelinkModeTwo-r17 CHOICE { + fr1-r17 SEQUENCE { + scs-15kHz-r17 BIT STRING (SIZE (16)) OPTIONAL, + scs-30kHz-r17 BIT STRING (SIZE (16)) OPTIONAL, + scs-60kHz-r17 BIT STRING (SIZE (16)) OPTIONAL + }, + fr2-r17 SEQUENCE { + scs-60kHz-r17 BIT STRING (SIZE (16)) OPTIONAL, + scs-120kHz-r17 BIT STRING (SIZE (16)) OPTIONAL + } + } OPTIONAL, + extendedCP-Mode2PartialSensing-r17 ENUMERATED {supported} OPTIONAL, + dl-openLoopPC-Sidelink-r17 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + --32-2a: Receiving NR sidelink of PSFCH + rx-sidelinkPSFCH-r17 ENUMERATED {n5, n15, n25, n32, n35, n45, n50, n64} OPTIONAL, + --32-5a-1 + tx-IUC-Scheme1-Mode2Sidelink-r17 ENUMERATED {supported} OPTIONAL, + --32-5b-1 + tx-IUC-Scheme2-Mode2Sidelink-r17 ENUMERATED {n4, n8, n16} OPTIONAL + } +} + +BandParametersSidelink-r16 ::= SEQUENCE { + freqBandSidelink-r16 FreqBandIndicatorNR +} + +-- TAG-BANDCOMBINATIONLISTSIDELINKEUTRANR-STOP +-- TAG-BANDCOMBINATIONLISTSLDISCOVERY-START + +BandCombinationListSL-Discovery-r17 ::= SEQUENCE (SIZE (1..maxSimultaneousBands)) OF BandParametersSidelinkDiscovery-r17 + +BandParametersSidelinkDiscovery-r17 ::= SEQUENCE { + sl-CrossCarrierScheduling-r17 ENUMERATED {supported} OPTIONAL, + --R1 32-4: Transmitting NR sidelink mode 2 with partial sensing + sl-TransmissionMode2-PartialSensing-r17 SEQUENCE { + harq-TxProcessModeTwoSidelink-r17 ENUMERATED {n8, n16}, + scs-CP-PatternTxSidelinkModeTwo-r17 CHOICE { + fr1-r17 SEQUENCE { + scs-15kHz-r17 BIT STRING (SIZE (16)) OPTIONAL, + scs-30kHz-r17 BIT STRING (SIZE (16)) OPTIONAL, + scs-60kHz-r17 BIT STRING (SIZE (16)) OPTIONAL + }, + fr2-r17 SEQUENCE { + scs-60kHz-r17 BIT STRING (SIZE (16)) OPTIONAL, + scs-120kHz-r17 BIT STRING (SIZE (16)) OPTIONAL + } + } OPTIONAL, + extendedCP-Mode2PartialSensing-r17 ENUMERATED {supported} OPTIONAL, + dl-openLoopPC-Sidelink-r17 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + --R1 32-5a-1: Transmitting Inter-UE coordination scheme 1 in NR sidelink mode 2 + tx-IUC-Scheme1-Mode2Sidelink-r17 ENUMERATED {supported} OPTIONAL +} + +-- TAG-BANDCOMBINATIONLISTSLDISCOVERY-STOP +-- TAG-CA-BANDWIDTHCLASSEUTRA-START + +CA-BandwidthClassEUTRA ::= ENUMERATED {a, b, c, d, e, f, ...} + +-- TAG-CA-BANDWIDTHCLASSEUTRA-STOP +-- TAG-CA-BANDWIDTHCLASSNR-START + +-- R4 17-6: new CA BW Classes R2~R12 +CA-BandwidthClassNR ::= ENUMERATED {a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, ...,r2-v1730, r3-v1730, r4-v1730, r5-v1730, r6-v1730, r7-v1730, r8-v1730, r9-v1730, r10-v1730, r11-v1730, r12-v1730 } + +-- TAG-CA-BANDWIDTHCLASSNR-STOP +-- TAG-CA-PARAMETERSEUTRA-START + +CA-ParametersEUTRA ::= SEQUENCE { + multipleTimingAdvance ENUMERATED {supported} OPTIONAL, + simultaneousRx-Tx ENUMERATED {supported} OPTIONAL, + supportedNAICS-2CRS-AP BIT STRING (SIZE (1..8)) OPTIONAL, + additionalRx-Tx-PerformanceReq ENUMERATED {supported} OPTIONAL, + ue-CA-PowerClass-N ENUMERATED {class2} OPTIONAL, + supportedBandwidthCombinationSetEUTRA-v1530 BIT STRING (SIZE (1..32)) OPTIONAL, + ... +} + +CA-ParametersEUTRA-v1560 ::= SEQUENCE { + fd-MIMO-TotalWeightedLayers INTEGER (2..128) OPTIONAL +} + +CA-ParametersEUTRA-v1570 ::= SEQUENCE { + dl-1024QAM-TotalWeightedLayers INTEGER (0..10) OPTIONAL +} + +-- TAG-CA-PARAMETERSEUTRA-STOP +-- TAG-CA-PARAMETERSNR-START + +CA-ParametersNR ::= SEQUENCE { + dummy ENUMERATED {supported} OPTIONAL, + parallelTxSRS-PUCCH-PUSCH ENUMERATED {supported} OPTIONAL, + parallelTxPRACH-SRS-PUCCH-PUSCH ENUMERATED {supported} OPTIONAL, + simultaneousRxTxInterBandCA ENUMERATED {supported} OPTIONAL, + simultaneousRxTxSUL ENUMERATED {supported} OPTIONAL, + diffNumerologyAcrossPUCCH-Group ENUMERATED {supported} OPTIONAL, + diffNumerologyWithinPUCCH-GroupSmallerSCS ENUMERATED {supported} OPTIONAL, + supportedNumberTAG ENUMERATED {n2, n3, n4} OPTIONAL, + ... +} + +CA-ParametersNR-v1540 ::= SEQUENCE { + simultaneousSRS-AssocCSI-RS-AllCC INTEGER (5..32) OPTIONAL, + csi-RS-IM-ReceptionForFeedbackPerBandComb SEQUENCE { + maxNumberSimultaneousNZP-CSI-RS-ActBWP-AllCC INTEGER (1..64) OPTIONAL, + totalNumberPortsSimultaneousNZP-CSI-RS-ActBWP-AllCC INTEGER (2..256) OPTIONAL + } OPTIONAL, + simultaneousCSI-ReportsAllCC INTEGER (5..32) OPTIONAL, + dualPA-Architecture ENUMERATED {supported} OPTIONAL +} + +CA-ParametersNR-v1550 ::= SEQUENCE { + dummy ENUMERATED {supported} OPTIONAL +} + +CA-ParametersNR-v1560 ::= SEQUENCE { + diffNumerologyWithinPUCCH-GroupLargerSCS ENUMERATED {supported} OPTIONAL +} + +CA-ParametersNR-v15g0 ::= SEQUENCE { + simultaneousRxTxInterBandCAPerBandPair SimultaneousRxTxPerBandPair OPTIONAL, + simultaneousRxTxSULPerBandPair SimultaneousRxTxPerBandPair OPTIONAL +} + +CA-ParametersNR-v1610 ::= SEQUENCE { + -- R1 9-3: Parallel MsgA and SRS/PUCCH/PUSCH transmissions across CCs in inter-band CA + parallelTxMsgA-SRS-PUCCH-PUSCH-r16 ENUMERATED {supported} OPTIONAL, + -- R1 9-4: MsgA operation in a band combination including SUL + msgA-SUL-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-9c: Joint search space group switching across multiple cells + jointSearchSpaceSwitchAcrossCells-r16 ENUMERATED {supported} OPTIONAL, + -- R1 14-5: Half-duplex UE behaviour in TDD CA for same SCS + half-DuplexTDD-CA-SameSCS-r16 ENUMERATED {supported} OPTIONAL, + -- R1 18-4: SCell dormancy within active time + scellDormancyWithinActiveTime-r16 ENUMERATED {supported} OPTIONAL, + -- R1 18-4a: SCell dormancy outside active time + scellDormancyOutsideActiveTime-r16 ENUMERATED {supported} OPTIONAL, + -- R1 18-6: Cross-carrier A-CSI RS triggering with different SCS + crossCarrierA-CSI-trigDiffSCS-r16 ENUMERATED {higherA-CSI-SCS,lowerA-CSI-SCS,both} OPTIONAL, + -- R1 18-6a: Default QCL assumption for cross-carrier A-CSI-RS triggering + defaultQCL-CrossCarrierA-CSI-Trig-r16 ENUMERATED {diffOnly, both} OPTIONAL, + -- R1 18-7: CA with non-aligned frame boundaries for inter-band CA + interCA-NonAlignedFrame-r16 ENUMERATED {supported} OPTIONAL, + simul-SRS-Trans-BC-r16 ENUMERATED {n2} OPTIONAL, + interFreqDAPS-r16 SEQUENCE { + interFreqAsyncDAPS-r16 ENUMERATED {supported} OPTIONAL, + interFreqDiffSCS-DAPS-r16 ENUMERATED {supported} OPTIONAL, + interFreqMultiUL-TransmissionDAPS-r16 ENUMERATED {supported} OPTIONAL, + interFreqSemiStaticPowerSharingDAPS-Mode1-r16 ENUMERATED {supported} OPTIONAL, + interFreqSemiStaticPowerSharingDAPS-Mode2-r16 ENUMERATED {supported} OPTIONAL, + interFreqDynamicPowerSharingDAPS-r16 ENUMERATED {short, long} OPTIONAL, + interFreqUL-TransCancellationDAPS-r16 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + codebookParametersPerBC-r16 CodebookParameters-v1610 OPTIONAL, + -- R1 16-2a-10 Value of R for BD/CCE + blindDetectFactor-r16 INTEGER (1..2) OPTIONAL, + -- R1 11-2a: Capability on the number of CCs for monitoring a maximum number of BDs and non-overlapped CCEs per span when configured + -- with DL CA with Rel-16 PDCCH monitoring capability on all the serving cells + pdcch-MonitoringCA-r16 SEQUENCE { + maxNumberOfMonitoringCC-r16 INTEGER (2..16), + supportedSpanArrangement-r16 ENUMERATED {alignedOnly, alignedAndNonAligned} + } OPTIONAL, + -- R1 11-2c: Number of carriers for CCE/BD scaling with DL CA with mix of Rel. 16 and Rel. 15 PDCCH monitoring capabilities on + -- different carriers + pdcch-BlindDetectionCA-Mixed-r16 SEQUENCE { + pdcch-BlindDetectionCA1-r16 INTEGER (1..15), + pdcch-BlindDetectionCA2-r16 INTEGER (1..15), + supportedSpanArrangement-r16 ENUMERATED {alignedOnly, alignedAndNonAligned} + } OPTIONAL, + -- R1 11-2d: Capability on the number of CCs for monitoring a maximum number of BDs and non-overlapped CCEs per span for MCG and for + -- SCG when configured for NR-DC operation with Rel-16 PDCCH monitoring capability on all the serving cells + pdcch-BlindDetectionMCG-UE-r16 INTEGER (1..14) OPTIONAL, + pdcch-BlindDetectionSCG-UE-r16 INTEGER (1..14) OPTIONAL, + -- R1 11-2e: Number of carriers for CCE/BD scaling for MCG and for SCG when configured for NR-DC operation with mix of Rel. 16 and + -- Rel. 15 PDCCH monitoring capabilities on different carriers + pdcch-BlindDetectionMCG-UE-Mixed-r16 SEQUENCE { + pdcch-BlindDetectionMCG-UE1-r16 INTEGER (0..15), + pdcch-BlindDetectionMCG-UE2-r16 INTEGER (0..15) + } OPTIONAL, + pdcch-BlindDetectionSCG-UE-Mixed-r16 SEQUENCE { + pdcch-BlindDetectionSCG-UE1-r16 INTEGER (0..15), + pdcch-BlindDetectionSCG-UE2-r16 INTEGER (0..15) + } OPTIONAL, + -- R1 18-5 cross-carrier scheduling with different SCS in DL CA + crossCarrierSchedulingDL-DiffSCS-r16 ENUMERATED {low-to-high, high-to-low, both} OPTIONAL, + -- R1 18-5a Default QCL assumption for cross-carrier scheduling + crossCarrierSchedulingDefaultQCL-r16 ENUMERATED {diff-only, both} OPTIONAL, + -- R1 18-5b cross-carrier scheduling with different SCS in UL CA + crossCarrierSchedulingUL-DiffSCS-r16 ENUMERATED {low-to-high, high-to-low, both} OPTIONAL, + -- R1 13.19a Simultaneous positioning SRS and MIMO SRS transmission for a given BC + simul-SRS-MIMO-Trans-BC-r16 ENUMERATED {n2} OPTIONAL, + -- R1 16-3a, 16-3a-1, 16-3b, 16-3b-1: New Individual Codebook + codebookParametersAdditionPerBC-r16 CodebookParametersAdditionPerBC-r16 OPTIONAL, + -- R1 16-8: Mixed codebook + codebookComboParametersAdditionPerBC-r16 CodebookComboParametersAdditionPerBC-r16 OPTIONAL +} + +CA-ParametersNR-v1630 ::= SEQUENCE { + -- R1 22-5b: Simultaneous transmission of SRS for antenna switching and SRS for CB/NCB /BM for inter-band UL CA + -- R1 22-5d: Simultaneous transmission of SRS for antenna switching for inter-band UL CA + simulTX-SRS-AntSwitchingInterBandUL-CA-r16 SimulSRS-ForAntennaSwitching-r16 OPTIONAL, + -- R4 8-5: supported beam management type for inter-band CA + beamManagementType-r16 ENUMERATED {ibm, dummy} OPTIONAL, + -- R4 7-3a: UL frequency separation class with aggregate BW and Gap BW + intraBandFreqSeparationUL-AggBW-GapBW-r16 ENUMERATED {classI, classII, classIII} OPTIONAL, + -- RAN 89: Case B in case of Inter-band CA with non-aligned frame boundaries + interCA-NonAlignedFrame-B-r16 ENUMERATED {supported} OPTIONAL +} + +CA-ParametersNR-v1640 ::= SEQUENCE { + -- R4 7-5: Support of reporting UL Tx DC locations for uplink intra-band CA. + uplinkTxDC-TwoCarrierReport-r16 ENUMERATED {supported} OPTIONAL, + -- RAN 22-6: Support of up to 3 different numerologies in the same NR PUCCH group for NR part of EN-DC, NGEN-DC, NE-DC and NR-CA + -- where UE is not configured with two NR PUCCH groups + maxUpTo3Diff-NumerologiesConfigSinglePUCCH-grp-r16 PUCCH-Grp-CarrierTypes-r16 OPTIONAL, + -- RAN 22-6a: Support of up to 4 different numerologies in the same NR PUCCH group for NR part of EN-DC, NGEN-DC, NE-DC and NR-CA + -- where UE is not configured with two NR PUCCH groups + maxUpTo4Diff-NumerologiesConfigSinglePUCCH-grp-r16 PUCCH-Grp-CarrierTypes-r16 OPTIONAL, + -- RAN 22-7: Support two PUCCH groups for NR-CA with 3 or more bands with at least two carrier types + twoPUCCH-Grp-ConfigurationsList-r16 SEQUENCE (SIZE (1..maxTwoPUCCH-Grp-ConfigList-r16)) OF TwoPUCCH-Grp-Configurations-r16 OPTIONAL, + -- R1 22-7a: Different numerology across NR PUCCH groups + diffNumerologyAcrossPUCCH-Group-CarrierTypes-r16 ENUMERATED {supported} OPTIONAL, + -- R1 22-7b: Different numerologies across NR carriers within the same NR PUCCH group, with PUCCH on a carrier of smaller SCS + diffNumerologyWithinPUCCH-GroupSmallerSCS-CarrierTypes-r16 ENUMERATED {supported} OPTIONAL, + -- R1 22-7c: Different numerologies across NR carriers within the same NR PUCCH group, with PUCCH on a carrier of larger SCS + diffNumerologyWithinPUCCH-GroupLargerSCS-CarrierTypes-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-2f: add the replicated FGs of 11-2a/c with restriction for non-aligned span case + -- with DL CA with Rel-16 PDCCH monitoring capability on all the serving cells + pdcch-MonitoringCA-NonAlignedSpan-r16 INTEGER (2..16) OPTIONAL, + -- R1 11-2g: add the replicated FGs of 11-2a/c with restriction for non-aligned span case + pdcch-BlindDetectionCA-Mixed-NonAlignedSpan-r16 SEQUENCE { + pdcch-BlindDetectionCA1-r16 INTEGER (1..15), + pdcch-BlindDetectionCA2-r16 INTEGER (1..15) + } OPTIONAL +} + +CA-ParametersNR-v1690 ::= SEQUENCE { + csi-ReportingCrossPUCCH-Grp-r16 SEQUENCE { + computationTimeForA-CSI-r16 ENUMERATED {sameAsNoCross, relaxed}, + additionalSymbols-r16 SEQUENCE { + scs-15kHz-additionalSymbols-r16 ENUMERATED {s14, s28} OPTIONAL, + scs-30kHz-additionalSymbols-r16 ENUMERATED {s14, s28} OPTIONAL, + scs-60kHz-additionalSymbols-r16 ENUMERATED {s14, s28, s56} OPTIONAL, + scs-120kHz-additionalSymbols-r16 ENUMERATED {s14, s28, s56} OPTIONAL + } OPTIONAL, + sp-CSI-ReportingOnPUCCH-r16 ENUMERATED {supported} OPTIONAL, + sp-CSI-ReportingOnPUSCH-r16 ENUMERATED {supported} OPTIONAL, + carrierTypePairList-r16 SEQUENCE (SIZE (1..maxCarrierTypePairList-r16)) OF CarrierTypePair-r16 + } OPTIONAL +} + +CA-ParametersNR-v16a0 ::= SEQUENCE { + pdcch-BlindDetectionMixedList-r16 SEQUENCE(SIZE(1..maxNrofPdcch-BlindDetectionMixed-1-r16)) OF PDCCH-BlindDetectionMixedList-r16 +} + +CA-ParametersNR-v1700 ::= SEQUENCE { + -- R1 23-9-1: Basic Features of Further Enhanced Port-Selection Type II Codebook (FeType-II) per band combination information + codebookParametersfetype2PerBC-r17 CodebookParametersfetype2PerBC-r17 OPTIONAL, + -- R4 18-4: Support of enhanced Demodulation requirements for CA in HST SFN FR1 + demodulationEnhancementCA-r17 ENUMERATED {supported} OPTIONAL, + -- R4 20-1: Maximum uplink duty cycle for NR inter-band CA power class 2 + maxUplinkDutyCycle-interBandCA-PC2-r17 ENUMERATED {n50, n60, n70, n80, n90, n100} OPTIONAL, + -- R4 20-2: Maximum uplink duty cycle for NR SUL combination power class 2 + maxUplinkDutyCycle-SULcombination-PC2-r17 ENUMERATED {n50, n60, n70, n80, n90, n100} OPTIONAL, + beamManagementType-CBM-r17 ENUMERATED {supported} OPTIONAL, + -- R1 25-18: Parallel PUCCH and PUSCH transmission across CCs in inter-band CA + parallelTxPUCCH-PUSCH-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-9-5 Active CSI-RS resources and ports for mixed codebook types in any slot per band combination + codebookComboParameterMixedTypePerBC-r17 CodebookComboParameterMixedTypePerBC-r17 OPTIONAL, + -- R1 23-7-1 Basic Features of CSI Enhancement for Multi-TRP + mTRP-CSI-EnhancementPerBC-r17 SEQUENCE { + maxNumNZP-CSI-RS-r17 INTEGER (2..8), + cSI-Report-mode-r17 ENUMERATED {mode1, mode2, both}, + supportedComboAcrossCCs-r17 SEQUENCE (SIZE (1..16)) OF CSI-MultiTRP-SupportedCombinations-r17, + codebookMode-NCJT-r17 ENUMERATED{mode1,mode1And2} + } OPTIONAL, + -- R1 23-7-1b Active CSI-RS resources and ports in the presence of multi-TRP CSI + codebookComboParameterMultiTRP-PerBC-r17 CodebookComboParameterMultiTRP-PerBC-r17 OPTIONAL, + -- R1 24-8b: 32 DL HARQ processes for FR 2-2 - maximum number of component carriers + maxCC-32-DL-HARQ-ProcessFR2-2-r17 ENUMERATED {n1, n2, n3, n4, n6, n8, n16, n32} OPTIONAL, + -- R1 24-9b: 32 UL HARQ processes for FR 2-2 - maximum number of component carriers + maxCC-32-UL-HARQ-ProcessFR2-2-r17 ENUMERATED {n1, n2, n3, n4, n5, n8, n16, n32} OPTIONAL, + -- R1 34-2: Cross-carrier scheduling from SCell to PCell/PSCell (Type B) + crossCarrierSchedulingSCell-SpCellTypeB-r17 CrossCarrierSchedulingSCell-SpCell-r17 OPTIONAL, +-- R1 34-1: Cross-carrier scheduling from SCell to PCell/PSCell with search space restrictions (Type A) + crossCarrierSchedulingSCell-SpCellTypeA-r17 CrossCarrierSchedulingSCell-SpCell-r17 OPTIONAL, + -- R1 34-1a: DCI formats on PCell/PSCell USS set(s) support + dci-FormatsPCellPSCellUSS-Sets-r17 ENUMERATED {supported} OPTIONAL, + -- R1 34-3: Disabling scaling factor alpha when sSCell is deactivated + disablingScalingFactorDeactSCell-r17 ENUMERATED {supported} OPTIONAL, + -- R1 34-4: Disabling scaling factor alpha when sSCell is deactivated + disablingScalingFactorDormantSCell-r17 ENUMERATED {supported} OPTIONAL, + -- R1 34-5: Non-aligned frame boundaries between PCell/PSCell and sSCell + non-AlignedFrameBoundaries-r17 SEQUENCE { + scs15kHz-15kHz-r17 BIT STRING (SIZE (1..496)) OPTIONAL, + scs15kHz-30kHz-r17 BIT STRING (SIZE (1..496)) OPTIONAL, + scs15kHz-60kHz-r17 BIT STRING (SIZE (1..496)) OPTIONAL, + scs30kHz-30kHz-r17 BIT STRING (SIZE (1..496)) OPTIONAL, + scs30kHz-60kHz-r17 BIT STRING (SIZE (1..496)) OPTIONAL, + scs60kHz-60kHz-r17 BIT STRING (SIZE (1..496)) OPTIONAL + } OPTIONAL +} + +CA-ParametersNR-v1720 ::= SEQUENCE { + -- R1 39-1: Parallel SRS and PUCCH/PUSCH transmission across CCs in intra-band non-contiguous CA + parallelTxSRS-PUCCH-PUSCH-intraBand-r17 ENUMERATED {supported} OPTIONAL, + -- R1 39-2: Parallel PRACH and SRS/PUCCH/PUSCH transmissions across CCs in intra-band non-contiguous CA + parallelTxPRACH-SRS-PUCCH-PUSCH-intraBand-r17 ENUMERATED {supported} OPTIONAL, + -- R1 25-9: Semi-static PUCCH cell switching for a single PUCCH group only + semiStaticPUCCH-CellSwitchSingleGroup-r17 SEQUENCE { + pucch-Group-r17 ENUMERATED {primaryGroupOnly, secondaryGroupOnly, eitherPrimaryOrSecondaryGroup}, + pucch-Group-Config-r17 PUCCH-Group-Config-r17 + } OPTIONAL, + -- R1 25-9a: Semi-static PUCCH cell switching for two PUCCH groups + semiStaticPUCCH-CellSwitchTwoGroups-r17 SEQUENCE (SIZE (1..maxTwoPUCCH-Grp-ConfigList-r17)) OF TwoPUCCH-Grp-Configurations-r17 OPTIONAL, + -- R1 25-10: PUCCH cell switching based on dynamic indication for same length of overlapping PUCCH slots/sub-slots for a single + -- PUCCH group only + dynamicPUCCH-CellSwitchSameLengthSingleGroup-r17 SEQUENCE { + pucch-Group-r17 ENUMERATED {primaryGroupOnly, secondaryGroupOnly, eitherPrimaryOrSecondaryGroup}, + pucch-Group-Config-r17 PUCCH-Group-Config-r17 + } OPTIONAL, + -- R1 25-10a: PUCCH cell switching based on dynamic indication for different length of overlapping PUCCH slots/sub-slots + -- for a single PUCCH group only + dynamicPUCCH-CellSwitchDiffLengthSingleGroup-r17 SEQUENCE { + pucch-Group-r17 ENUMERATED {primaryGroupOnly, secondaryGroupOnly, eitherPrimaryOrSecondaryGroup}, + pucch-Group-Config-r17 PUCCH-Group-Config-r17 + } OPTIONAL, + -- R1 25-10b: PUCCH cell switching based on dynamic indication for same length of overlapping PUCCH slots/sub-slots for two PUCCH + -- groups + dynamicPUCCH-CellSwitchSameLengthTwoGroups-r17 SEQUENCE (SIZE (1..maxTwoPUCCH-Grp-ConfigList-r17)) OF TwoPUCCH-Grp-Configurations-r17 + OPTIONAL, + -- R1 25-10c: PUCCH cell switching based on dynamic indication for different length of overlapping PUCCH slots/sub-slots for two + -- PUCCH groups + dynamicPUCCH-CellSwitchDiffLengthTwoGroups-r17 SEQUENCE (SIZE (1..maxTwoPUCCH-Grp-ConfigList-r17)) OF TwoPUCCH-Grp-Configurations-r17 + OPTIONAL, + -- R1 33-2a: ACK/NACK based HARQ-ACK feedback and RRC-based enabling/disabling ACK/NACK-based + -- feedback for dynamic scheduling for multicast + ack-NACK-FeedbackForMulticast-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-2d: PTP retransmission for multicast dynamic scheduling + ptp-Retx-Multicast-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-4: NACK-only based HARQ-ACK feedback for multicast with ACK/NACK transforming + nack-OnlyFeedbackForMulticast-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-4a: NACK-only based HARQ-ACK feedback for multicast corresponding to a specific sequence or a PUCCH transmission + nack-OnlyFeedbackSpecificResourceForMulticast-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-5-1a: ACK/NACK based HARQ-ACK feedback and RRC-based enabling/disabling ACK/NACK-based feedback + -- for SPS group-common PDSCH for multicast + ack-NACK-FeedbackForSPS-Multicast-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-5-1d: PTP retransmission for SPS group-common PDSCH for multicast + ptp-Retx-SPS-Multicast-r17 ENUMERATED {supported} OPTIONAL, + -- R4 26-1: Higher Power Limit CA DC + higherPowerLimit-r17 ENUMERATED {supported} OPTIONAL, + -- R1 39-4: Parallel MsgA and SRS/PUCCH/PUSCH transmissions across CCs in intra-band non-contiguous CA + parallelTxMsgA-SRS-PUCCH-PUSCH-intraBand-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-11a: Capability on the number of CCs for monitoring a maximum number of BDs and non-overlapped CCEs per span when + -- configured with DL CA with Rel-17 PDCCH monitoring capability on all the serving cells + pdcch-MonitoringCA-r17 INTEGER (4..16) OPTIONAL, + -- R1 24-11f: Capability on the number of CCs for monitoring a maximum number of BDs and non-overlapped CCEs for MCG and for SCG + -- when configured for NR-DC operation with Rel-17 PDCCH monitoring capability on all the serving cells + pdcch-BlindDetectionMCG-SCG-List-r17 SEQUENCE(SIZE(1..maxNrofPdcch-BlindDetection-r17)) OF PDCCH-BlindDetectionMCG-SCG-r17 + OPTIONAL, + -- R1 24-11c: Number of carriers for CCE/BD scaling with DL CA with mix of Rel. 17 and Rel. 15 PDCCH monitoring capabilities on + -- different Carriers + -- R1 24-11g: Number of carriers for CCE/BD scaling for MCG and for SCG when configured for NR-DC operation with mix of Rel. 17 and + -- Rel. 15 PDCCH monitoring capabilities on different carriers + pdcch-BlindDetectionMixedList1-r17 SEQUENCE(SIZE(1..maxNrofPdcch-BlindDetection-r17)) OF PDCCH-BlindDetectionMixed-r17 + OPTIONAL, + -- R1 24-11d: Number of carriers for CCE/BD scaling with DL CA with mix of Rel. 17 and Rel. 16 PDCCH monitoring capabilities on + -- different Carriers + -- R1 24-11h: Number of carriers for CCE/BD scaling for MCG and for SCG when configured for NR-DC operation with mix of Rel. 17 and + -- Rel. 16 PDCCH monitoring capabilities on different carriers + pdcch-BlindDetectionMixedList2-r17 SEQUENCE(SIZE(1..maxNrofPdcch-BlindDetection-r17)) OF PDCCH-BlindDetectionMixed-r17 + OPTIONAL, + -- R1 24-11e: Number of carriers for CCE/BD scaling with DL CA with mix of Rel. 17, Rel. 16 and Rel. 15 PDCCH monitoring + -- capabilities on different carriers + -- R1 24-11i: Number of carriers for CCE/BD scaling for MCG and for SCG when configured for NR-DC operation with mix of Rel. 17, + -- Rel. 16 and Rel. 15 PDCCH monitoring capabilities on different carriers + pdcch-BlindDetectionMixedList3-r17 SEQUENCE(SIZE(1..maxNrofPdcch-BlindDetection-r17)) OF PDCCH-BlindDetectionMixed1-r17 + OPTIONAL +} + +CA-ParametersNR-v1730 ::= SEQUENCE { + -- R1 30-4a: DM-RS bundling for PUSCH repetition type A (per BC) + dmrs-BundlingPUSCH-RepTypeAPerBC-r17 ENUMERATED {supported} OPTIONAL, + -- R1 30-4b: DM-RS bundling for PUSCH repetition type B(per BC) + dmrs-BundlingPUSCH-RepTypeBPerBC-r17 ENUMERATED {supported} OPTIONAL, + -- R1 30-4c: DM-RS bundling for TB processing over multi-slot PUSCH(per BC) + dmrs-BundlingPUSCH-multiSlotPerBC-r17 ENUMERATED {supported} OPTIONAL, + -- R1 30-4d: DMRS bundling for PUCCH repetitions(per BC) + dmrs-BundlingPUCCH-RepPerBC-r17 ENUMERATED {supported} OPTIONAL, + -- R1 30-4g: Restart DM-RS bundling (per BC) + dmrs-BundlingRestartPerBC-r17 ENUMERATED {supported} OPTIONAL, + -- R1 30-4h: DM-RS bundling for non-back-to-back transmission (per BC) + dmrs-BundlingNonBackToBackTX-PerBC-r17 ENUMERATED {supported} OPTIONAL, + -- R1 39-3-1: Stay on the target CC for SRS carrier switching + stayOnTargetCC-SRS-CarrierSwitch-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-3-3a: FDM-ed Type-1 and Type-2 HARQ-ACK codebooks for multiplexing HARQ-ACK for unicast and HARQ-ACK for multicast + fdm-CodebookForMux-UnicastMulticastHARQ-ACK-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-3-3b: Mode 2 TDM-ed Type-1 and Type-2 HARQ-ACK codebook for multiplexing HARQ-ACK for unicast and HARQ-ACK for multicast + mode2-TDM-CodebookForMux-UnicastMulticastHARQ-ACK-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-3-4: Mode 1 for type1 codebook generation + mode1-ForType1-CodebookGeneration-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-5-1j: NACK-only based HARQ-ACK feedback for multicast corresponding to a specific sequence or a PUCCH transmission + -- for SPS group-commmon PDSCH for multicast + nack-OnlyFeedbackSpecificResourceForSPS-Multicast-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-8-2: Up to 2 PUCCH resources configuration for multicast feedback for dynamically scheduled multicast + multiPUCCH-ConfigForMulticast-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-8-3: PUCCH resource configuration for multicast feedback for SPS GC-PDSCH + pucch-ConfigForSPS-Multicast-r17 ENUMERATED {supported} OPTIONAL, + -- The following parameter is associated with R1 33-2a, R1 33-3-3a, and R1 33-3-3b, and is not a RAN1 FG. + maxNumberG-RNTI-HARQ-ACK-Codebook-r17 INTEGER (1..4) OPTIONAL, + -- R1 33-3-5: Feedback multiplexing for unicast PDSCH and group-common PDSCH for multicast with same priority and different codebook + -- type + mux-HARQ-ACK-UnicastMulticast-r17 ENUMERATED {supported} OPTIONAL +} + +CrossCarrierSchedulingSCell-SpCell-r17 ::= SEQUENCE { + supportedSCS-Combinations-r17 SEQUENCE { + scs15kHz-15kHz-r17 ENUMERATED {supported} OPTIONAL, + scs15kHz-30kHz-r17 ENUMERATED {supported} OPTIONAL, + scs15kHz-60kHz-r17 ENUMERATED {supported} OPTIONAL, + scs30kHz-30kHz-r17 BIT STRING (SIZE (1..496)) OPTIONAL, + scs30kHz-60kHz-r17 BIT STRING (SIZE (1..496)) OPTIONAL, + scs60kHz-60kHz-r17 BIT STRING (SIZE (1..496)) OPTIONAL + }, + pdcch-MonitoringOccasion-r17 ENUMERATED {val1, val2} +} + +PDCCH-BlindDetectionMixedList-r16::= SEQUENCE { + pdcch-BlindDetectionCA-MixedExt-r16 CHOICE { + pdcch-BlindDetectionCA-Mixed-v16a0 PDCCH-BlindDetectionCA-MixedExt-r16, + pdcch-BlindDetectionCA-Mixed-NonAlignedSpan-v16a0 PDCCH-BlindDetectionCA-MixedExt-r16 + } OPTIONAL, + pdcch-BlindDetectionCG-UE-MixedExt-r16 SEQUENCE{ + pdcch-BlindDetectionMCG-UE-Mixed-v16a0 PDCCH-BlindDetectionCG-UE-MixedExt-r16, + pdcch-BlindDetectionSCG-UE-Mixed-v16a0 PDCCH-BlindDetectionCG-UE-MixedExt-r16 + } OPTIONAL +} + +PDCCH-BlindDetectionCA-MixedExt-r16 ::= SEQUENCE { + pdcch-BlindDetectionCA1-r16 INTEGER (1..15), + pdcch-BlindDetectionCA2-r16 INTEGER (1..15) +} + +PDCCH-BlindDetectionCG-UE-MixedExt-r16 ::= SEQUENCE { + pdcch-BlindDetectionCG-UE1-r16 INTEGER (0..15), + pdcch-BlindDetectionCG-UE2-r16 INTEGER (0..15) +} + +PDCCH-BlindDetectionMCG-SCG-r17 ::= SEQUENCE { + pdcch-BlindDetectionMCG-UE-r17 INTEGER (1..15), + pdcch-BlindDetectionSCG-UE-r17 INTEGER (1..15) +} + +PDCCH-BlindDetectionMixed-r17::= SEQUENCE { + pdcch-BlindDetectionCA-Mixed-r17 PDCCH-BlindDetectionCA-Mixed-r17 OPTIONAL, + pdcch-BlindDetectionCG-UE-Mixed-r17 SEQUENCE{ + pdcch-BlindDetectionMCG-UE-Mixed-v17 PDCCH-BlindDetectionCG-UE-Mixed-r17, + pdcch-BlindDetectionSCG-UE-Mixed-v17 PDCCH-BlindDetectionCG-UE-Mixed-r17 + } OPTIONAL +} + +PDCCH-BlindDetectionCG-UE-Mixed-r17 ::= SEQUENCE { + pdcch-BlindDetectionCG-UE1-r17 INTEGER (0..15), + pdcch-BlindDetectionCG-UE2-r17 INTEGER (0..15) +} + +PDCCH-BlindDetectionCA-Mixed-r17 ::= SEQUENCE { + pdcch-BlindDetectionCA1-r17 INTEGER (1..15) OPTIONAL, + pdcch-BlindDetectionCA2-r17 INTEGER (1..15) OPTIONAL +} +PDCCH-BlindDetectionMixed1-r17::= SEQUENCE { + pdcch-BlindDetectionCA-Mixed1-r17 PDCCH-BlindDetectionCA-Mixed1-r17 OPTIONAL, + pdcch-BlindDetectionCG-UE-Mixed1-r17 SEQUENCE{ + pdcch-BlindDetectionMCG-UE-Mixed1-v17 PDCCH-BlindDetectionCG-UE-Mixed1-r17, + pdcch-BlindDetectionSCG-UE-Mixed1-v17 PDCCH-BlindDetectionCG-UE-Mixed1-r17 + } OPTIONAL +} + +PDCCH-BlindDetectionCG-UE-Mixed1-r17 ::= SEQUENCE { + pdcch-BlindDetectionCG-UE1-r17 INTEGER (0..15), + pdcch-BlindDetectionCG-UE2-r17 INTEGER (0..15), + pdcch-BlindDetectionCG-UE3-r17 INTEGER (0..15) +} + +PDCCH-BlindDetectionCA-Mixed1-r17 ::= SEQUENCE { + pdcch-BlindDetectionCA1-r17 INTEGER (1..15) OPTIONAL, + pdcch-BlindDetectionCA2-r17 INTEGER (1..15) OPTIONAL, + pdcch-BlindDetectionCA3-r17 INTEGER (1..15) OPTIONAL +} + +SimulSRS-ForAntennaSwitching-r16 ::= SEQUENCE { + supportSRS-xTyR-xLessThanY-r16 ENUMERATED {supported} OPTIONAL, + supportSRS-xTyR-xEqualToY-r16 ENUMERATED {supported} OPTIONAL, + supportSRS-AntennaSwitching-r16 ENUMERATED {supported} OPTIONAL +} + +TwoPUCCH-Grp-Configurations-r16 ::= SEQUENCE { + pucch-PrimaryGroupMapping-r16 TwoPUCCH-Grp-ConfigParams-r16, + pucch-SecondaryGroupMapping-r16 TwoPUCCH-Grp-ConfigParams-r16 +} + +TwoPUCCH-Grp-Configurations-r17 ::= SEQUENCE { + primaryPUCCH-GroupConfig-r17 PUCCH-Group-Config-r17, + secondaryPUCCH-GroupConfig-r17 PUCCH-Group-Config-r17 +} + +TwoPUCCH-Grp-ConfigParams-r16 ::= SEQUENCE { + pucch-GroupMapping-r16 PUCCH-Grp-CarrierTypes-r16, + pucch-TX-r16 PUCCH-Grp-CarrierTypes-r16 +} + + +CarrierTypePair-r16 ::= SEQUENCE { + carrierForCSI-Measurement-r16 PUCCH-Grp-CarrierTypes-r16, + carrierForCSI-Reporting-r16 PUCCH-Grp-CarrierTypes-r16 +} + +PUCCH-Grp-CarrierTypes-r16 ::= SEQUENCE { + fr1-NonSharedTDD-r16 ENUMERATED {supported} OPTIONAL, + fr1-SharedTDD-r16 ENUMERATED {supported} OPTIONAL, + fr1-NonSharedFDD-r16 ENUMERATED {supported} OPTIONAL, + fr2-r16 ENUMERATED {supported} OPTIONAL +} + +PUCCH-Group-Config-r17 ::= SEQUENCE { + fr1-FR1-NonSharedTDD-r17 ENUMERATED {supported} OPTIONAL, + fr2-FR2-NonSharedTDD-r17 ENUMERATED {supported} OPTIONAL, + fr1-FR2-NonSharedTDD-r17 ENUMERATED {supported} OPTIONAL +} + +-- TAG-CA-PARAMETERSNR-STOP +-- TAG-CA-PARAMETERS-NRDC-START + +CA-ParametersNRDC ::= SEQUENCE { + ca-ParametersNR-ForDC CA-ParametersNR OPTIONAL, + ca-ParametersNR-ForDC-v1540 CA-ParametersNR-v1540 OPTIONAL, + ca-ParametersNR-ForDC-v1550 CA-ParametersNR-v1550 OPTIONAL, + ca-ParametersNR-ForDC-v1560 CA-ParametersNR-v1560 OPTIONAL, + featureSetCombinationDC FeatureSetCombinationId OPTIONAL +} + +CA-ParametersNRDC-v15g0 ::= SEQUENCE { + ca-ParametersNR-ForDC-v15g0 CA-ParametersNR-v15g0 OPTIONAL +} + +CA-ParametersNRDC-v1610 ::= SEQUENCE { + -- R1 18-1: Semi-static power sharing mode1 between MCG and SCG cells of same FR for NR dual connectivity + intraFR-NR-DC-PwrSharingMode1-r16 ENUMERATED {supported} OPTIONAL, + -- R1 18-1a: Semi-static power sharing mode 2 between MCG and SCG cells of same FR for NR dual connectivity + intraFR-NR-DC-PwrSharingMode2-r16 ENUMERATED {supported} OPTIONAL, + -- R1 18-1b: Dynamic power sharing between MCG and SCG cells of same FR for NR dual connectivity + intraFR-NR-DC-DynamicPwrSharing-r16 ENUMERATED {short, long} OPTIONAL, + asyncNRDC-r16 ENUMERATED {supported} OPTIONAL +} + +CA-ParametersNRDC-v1630 ::= SEQUENCE { + ca-ParametersNR-ForDC-v1610 CA-ParametersNR-v1610 OPTIONAL, + ca-ParametersNR-ForDC-v1630 CA-ParametersNR-v1630 OPTIONAL +} + +CA-ParametersNRDC-v1640 ::= SEQUENCE { + ca-ParametersNR-ForDC-v1640 CA-ParametersNR-v1640 OPTIONAL +} + +CA-ParametersNRDC-v1650 ::= SEQUENCE { + supportedCellGrouping-r16 BIT STRING (SIZE (1..maxCellGroupings-r16)) OPTIONAL +} + +CA-ParametersNRDC-v16a0 ::= SEQUENCE { + ca-ParametersNR-ForDC-v16a0 CA-ParametersNR-v16a0 OPTIONAL +} + +CA-ParametersNRDC-v1700 ::= SEQUENCE { + -- R1 31-9: Indicates the support of simultaneous transmission and reception of an IAB-node from multiple parent nodes + simultaneousRxTx-IAB-MultipleParents-r17 ENUMERATED {supported} OPTIONAL, + condPSCellAdditionNRDC-r17 ENUMERATED {supported} OPTIONAL, + scg-ActivationDeactivationNRDC-r17 ENUMERATED {supported} OPTIONAL, + scg-ActivationDeactivationResumeNRDC-r17 ENUMERATED {supported} OPTIONAL, + beamManagementType-CBM-r17 ENUMERATED {supported} OPTIONAL +} + +CA-ParametersNRDC-v1720 ::= SEQUENCE { + ca-ParametersNR-ForDC-v1700 CA-ParametersNR-v1700 OPTIONAL, + ca-ParametersNR-ForDC-v1720 CA-ParametersNR-v1720 OPTIONAL +} + +CA-ParametersNRDC-v1730 ::= SEQUENCE { + ca-ParametersNR-ForDC-v1730 CA-ParametersNR-v1730 OPTIONAL +} + +-- TAG-CA-PARAMETERS-NRDC-STOP +-- TAG-CARRIERAGGREGATIONVARIANT-START + +CarrierAggregationVariant ::= SEQUENCE { + fr1fdd-FR1TDD-CA-SpCellOnFR1FDD ENUMERATED {supported} OPTIONAL, + fr1fdd-FR1TDD-CA-SpCellOnFR1TDD ENUMERATED {supported} OPTIONAL, + fr1fdd-FR2TDD-CA-SpCellOnFR1FDD ENUMERATED {supported} OPTIONAL, + fr1fdd-FR2TDD-CA-SpCellOnFR2TDD ENUMERATED {supported} OPTIONAL, + fr1tdd-FR2TDD-CA-SpCellOnFR1TDD ENUMERATED {supported} OPTIONAL, + fr1tdd-FR2TDD-CA-SpCellOnFR2TDD ENUMERATED {supported} OPTIONAL, + fr1fdd-FR1TDD-FR2TDD-CA-SpCellOnFR1FDD ENUMERATED {supported} OPTIONAL, + fr1fdd-FR1TDD-FR2TDD-CA-SpCellOnFR1TDD ENUMERATED {supported} OPTIONAL, + fr1fdd-FR1TDD-FR2TDD-CA-SpCellOnFR2TDD ENUMERATED {supported} OPTIONAL +} + +-- TAG-CARRIERAGGREGATIONVARIANT-STOP +-- TAG-CODEBOOKPARAMETERS-START + +CodebookParameters ::= SEQUENCE { + type1 SEQUENCE { + singlePanel SEQUENCE { + supportedCSI-RS-ResourceList SEQUENCE (SIZE (1.. maxNrofCSI-RS-Resources)) OF SupportedCSI-RS-Resource, + modes ENUMERATED {mode1, mode1andMode2}, + maxNumberCSI-RS-PerResourceSet INTEGER (1..8) + }, + multiPanel SEQUENCE { + supportedCSI-RS-ResourceList SEQUENCE (SIZE (1.. maxNrofCSI-RS-Resources)) OF SupportedCSI-RS-Resource, + modes ENUMERATED {mode1, mode2, both}, + nrofPanels ENUMERATED {n2, n4}, + maxNumberCSI-RS-PerResourceSet INTEGER (1..8) + } OPTIONAL + }, + type2 SEQUENCE { + supportedCSI-RS-ResourceList SEQUENCE (SIZE (1.. maxNrofCSI-RS-Resources)) OF SupportedCSI-RS-Resource, + parameterLx INTEGER (2..4), + amplitudeScalingType ENUMERATED {wideband, widebandAndSubband}, + amplitudeSubsetRestriction ENUMERATED {supported} OPTIONAL + } OPTIONAL, + type2-PortSelection SEQUENCE { + supportedCSI-RS-ResourceList SEQUENCE (SIZE (1.. maxNrofCSI-RS-Resources)) OF SupportedCSI-RS-Resource, + parameterLx INTEGER (2..4), + amplitudeScalingType ENUMERATED {wideband, widebandAndSubband} + } OPTIONAL +} + +CodebookParameters-v1610 ::= SEQUENCE { + supportedCSI-RS-ResourceListAlt-r16 SEQUENCE { + type1-SinglePanel-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-Resources)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) OPTIONAL, + type1-MultiPanel-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-Resources)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) OPTIONAL, + type2-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-Resources)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) OPTIONAL, + type2-PortSelection-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-Resources)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) OPTIONAL + } OPTIONAL +} + +CodebookParametersAddition-r16 ::= SEQUENCE { + etype2-r16 SEQUENCE { + -- R1 16-3a Regular eType 2 R=1 + etype2R1-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF + INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + }, + -- R1 16-3a-1 Regular eType 2 R=2 + etype2R2-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF + INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + } OPTIONAL, + -- R1 16-3a-2: Support of parameter combinations 7-8 + paramComb7-8-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-3a-3: Support of rank 3,4 + rank3-4-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-3a-4: CBSR with soft amplitude restriction + amplitudeSubsetRestriction-r16 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + etype2-PS-r16 SEQUENCE { + -- R1 16-3b Regular eType 2 R=1 PortSelection + etype2R1-PortSelection-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF + INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + }, + -- R1 16-3b-1 Regular eType 2 R=2 PortSelection + etype2R2-PortSelection-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF + INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + } OPTIONAL, + -- R1 16-3b-2: Support of rank 3,4 + rank3-4-r16 ENUMERATED {supported} OPTIONAL + } OPTIONAL +} + +CodebookComboParametersAddition-r16 ::= SEQUENCE { + -- R1 16-8 Mixed codebook types + type1SP-Type2-null-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + } OPTIONAL, + type1SP-Type2PS-null-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + } OPTIONAL, + type1SP-eType2R1-null-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + } OPTIONAL, + type1SP-eType2R2-null-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + } OPTIONAL, + type1SP-eType2R1PS-null-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + } OPTIONAL, + type1SP-eType2R2PS-null-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + } OPTIONAL, + type1SP-Type2-Type2PS-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + } OPTIONAL, + type1MP-Type2-null-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + } OPTIONAL, + type1MP-Type2PS-null-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + } OPTIONAL, + type1MP-eType2R1-null-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + } OPTIONAL, + type1MP-eType2R2-null-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + } OPTIONAL, + type1MP-eType2R1PS-null-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + } OPTIONAL, + type1MP-eType2R2PS-null-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + } OPTIONAL, + type1MP-Type2-Type2PS-r16 SEQUENCE { + supportedCSI-RS-ResourceListAdd-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + } OPTIONAL +} + +CodebookParametersfetype2-r17 ::= SEQUENCE { + -- R1 23-9-1 Basic Features of Further Enhanced Port-Selection Type II Codebook (FeType-II) + fetype2basic-r17 SEQUENCE (SIZE (1.. maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16), + -- R1 23-9-2 Support of M=2 and R=1 for FeType-II + fetype2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r17)) OF INTEGER (0.. maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + -- R1 23-9-4 Support of R = 2 for FeType-II + fetype2R2-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r17)) OF INTEGER (0.. maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + -- R1 23-9-3 Support of rank 3, 4 for FeType-II + fetype2Rank3Rank4-r17 ENUMERATED {supported} OPTIONAL +} + +CodebookComboParameterMixedType-r17 ::= SEQUENCE { + -- R1 23-9-5 Active CSI-RS resources and ports for mixed codebook types in any slot + type1SP-feType2PS-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-feType2PS-M2R1-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-feType2PS-M2R2-null-r1 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-Type2-feType2-PS-M1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-Type2-feType2-PS-M2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-eType2R1-feType2-PS-M1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-eType2R1-feType2-PS-M2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-feType2PS-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-feType2PS-M2R1-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-feType2PS-M2R2-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-Type2-feType2-PS-M1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-Type2-feType2-PS-M2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-eType2R1-feType2-PS-M1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-eType2R1-feType2-PS-M2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL +} + +CodebookComboParameterMultiTRP-r17::= SEQUENCE { + -- R1 23-7-1b Active CSI-RS resources and ports in the presence of multi-TRP CSI + -- {Codebook 2, Codebook 3} =(NULL, NULL} + nCJT-null-null SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-null-null SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + -- {Codebook 2, Codebook 3} = {( {"Rel 16 combinations in FG 16-8"} + nCJT-Type2-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-Type2PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-eType2R1-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-eType2R2-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-eType2R1PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-eType2R2PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-Type2-Type2PS-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-Type2-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-Type2PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-eType2R1-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-eType2R2-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-eType2R1PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-eType2R2PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-Type2-Type2PS-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + -- {Codebook 2, Codebook 3} = {"New Rel17 combinations in FG 23-9-5"} + nCJT-feType2PS-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-feType2PS-M2R1-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-feType2PS-M2R2-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-Type2-feType2-PS-M1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-Type2-feType2-PS-M2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-eType2R1-feType2-PS-M1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-eType2R1-feType2-PS-M2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-feType2PS-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-feType2PS-M2R1-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-feType2PS-M2R2-null-r1 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-Type2-feType2-PS-M1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-Type2-feType2-PS-M2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-eType2R1-feType2-PS-M1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-eType2R1-feType2-PS-M2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL +} + +CodebookParametersAdditionPerBC-r16::= SEQUENCE { + -- R1 16-3a Regular eType 2 R=1 + etype2R1-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + -- R1 16-3a-1 Regular eType 2 R=2 + etype2R2-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + -- R1 16-3b Regular eType 2 R=1 PortSelection + etype2R1-PortSelection-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + -- R1 16-3b-1 Regular eType 2 R=2 PortSelection + etype2R2-PortSelection-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL +} + +CodebookComboParametersAdditionPerBC-r16::= SEQUENCE { + -- R1 16-8 Mixed codebook types + type1SP-Type2-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-Type2PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-eType2R1-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-eType2R2-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-eType2R1PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-eType2R2PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-Type2-Type2PS-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-Type2-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-Type2PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-eType2R1-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-eType2R2-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-eType2R1PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-eType2R2PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-Type2-Type2PS-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL +} + +CodebookParametersfetype2PerBC-r17 ::= SEQUENCE { + -- R1 23-9-1 Basic Features of Further Enhanced Port-Selection Type II Codebook (FeType-II) + fetype2basic-r17 SEQUENCE (SIZE (1.. maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16), + -- R1 23-9-2 Support of M=2 and R=1 for FeType-II + fetype2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r17)) OF INTEGER (0.. maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + -- R1 23-9-4 Support of R = 2 for FeType-II + fetype2R2-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r17)) OF INTEGER (0.. maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL +} + +CodebookComboParameterMixedTypePerBC-r17 ::= SEQUENCE { + -- R1 23-9-5 Active CSI-RS resources and ports for mixed codebook types in any slot + type1SP-feType2PS-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-feType2PS-M2R1-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-feType2PS-M2R2-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-Type2-feType2-PS-M1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-Type2-feType2-PS-M2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-eType2R1-feType2-PS-M1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1SP-eType2R1-feType2-PS-M2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-feType2PS-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-feType2PS-M2R1-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-feType2PS-M2R2-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-Type2-feType2-PS-M1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-Type2-feType2-PS-M2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-eType2R1-feType2-PS-M1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + type1MP-eType2R1-feType2-PS-M2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL +} + +CodebookComboParameterMultiTRP-PerBC-r17::= SEQUENCE { + -- R1 23-7-1b Active CSI-RS resources and ports in the presence of multi-TRP CSI + -- {Codebook 2, Codebook 3} =(NULL, NULL} + nCJT-null-null SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-null-null SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + -- {Codebook 2, Codebook 3} = {( {"Rel 16 combinations in FG 16-8"} + nCJT-Type2-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-Type2PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-eType2R1-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-eType2R2-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-eType2R1PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-eType2R2PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-Type2-Type2PS-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-Type2-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-Type2PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-eType2R1-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-eType2R2-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-eType2R1PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-eType2R2PS-null-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-Type2-Type2PS-r16 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + -- {Codebook 2, Codebook 3} = {"New Rel17 combinations in FG 23-9-5"} + nCJT-feType2PS-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-feType2PS-M2R1-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-feType2PS-M2R2-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-Type2-feType2-PS-M1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-Type2-feType2-PS-M2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-eType2R1-feType2-PS-M1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT-eType2R1-feType2-PS-M2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-feType2PS-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-feType2PS-M2R1-null-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-feType2PS-M2R2-null-r1 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-Type2-feType2-PS-M1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-Type2-feType2-PS-M2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-eType2R1-feType2-PS-M1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL, + nCJT1SP-eType2R1-feType2-PS-M2R1-r17 SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesExt-r16)) OF INTEGER (0..maxNrofCSI-RS-ResourcesAlt-1-r16) + OPTIONAL +} + +CodebookVariantsList-r16 ::= SEQUENCE (SIZE (1..maxNrofCSI-RS-ResourcesAlt-r16)) OF SupportedCSI-RS-Resource + +SupportedCSI-RS-Resource ::= SEQUENCE { + maxNumberTxPortsPerResource ENUMERATED {p2, p4, p8, p12, p16, p24, p32}, + maxNumberResourcesPerBand INTEGER (1..64), + totalNumberTxPortsPerBand INTEGER (2..256) +} + +-- TAG-CODEBOOKPARAMETERS-STOP +-- TAG-FEATURESETCOMBINATION-START + +FeatureSetCombination ::= SEQUENCE (SIZE (1..maxSimultaneousBands)) OF FeatureSetsPerBand + +FeatureSetsPerBand ::= SEQUENCE (SIZE (1..maxFeatureSetsPerBand)) OF FeatureSet + +FeatureSet ::= CHOICE { + eutra SEQUENCE { + downlinkSetEUTRA FeatureSetEUTRA-DownlinkId, + uplinkSetEUTRA FeatureSetEUTRA-UplinkId + }, + nr SEQUENCE { + downlinkSetNR FeatureSetDownlinkId, + uplinkSetNR FeatureSetUplinkId + } +} + +-- TAG-FEATURESETCOMBINATION-STOP +-- TAG-FEATURESETCOMBINATIONID-START + +FeatureSetCombinationId ::= INTEGER (0.. maxFeatureSetCombinations) + +-- TAG-FEATURESETCOMBINATIONID-STOP +-- TAG-FEATURESETDOWNLINK-START + +FeatureSetDownlink ::= SEQUENCE { + featureSetListPerDownlinkCC SEQUENCE (SIZE (1..maxNrofServingCells)) OF FeatureSetDownlinkPerCC-Id, + + intraBandFreqSeparationDL FreqSeparationClass OPTIONAL, + scalingFactor ENUMERATED {f0p4, f0p75, f0p8} OPTIONAL, + dummy8 ENUMERATED {supported} OPTIONAL, + scellWithoutSSB ENUMERATED {supported} OPTIONAL, + csi-RS-MeasSCellWithoutSSB ENUMERATED {supported} OPTIONAL, + dummy1 ENUMERATED {supported} OPTIONAL, + type1-3-CSS ENUMERATED {supported} OPTIONAL, + pdcch-MonitoringAnyOccasions ENUMERATED {withoutDCI-Gap, withDCI-Gap} OPTIONAL, + dummy2 ENUMERATED {supported} OPTIONAL, + ue-SpecificUL-DL-Assignment ENUMERATED {supported} OPTIONAL, + searchSpaceSharingCA-DL ENUMERATED {supported} OPTIONAL, + timeDurationForQCL SEQUENCE { + scs-60kHz ENUMERATED {s7, s14, s28} OPTIONAL, + scs-120kHz ENUMERATED {s14, s28} OPTIONAL + } OPTIONAL, + pdsch-ProcessingType1-DifferentTB-PerSlot SEQUENCE { + scs-15kHz ENUMERATED {upto2, upto4, upto7} OPTIONAL, + scs-30kHz ENUMERATED {upto2, upto4, upto7} OPTIONAL, + scs-60kHz ENUMERATED {upto2, upto4, upto7} OPTIONAL, + scs-120kHz ENUMERATED {upto2, upto4, upto7} OPTIONAL + } OPTIONAL, + dummy3 DummyA OPTIONAL, + dummy4 SEQUENCE (SIZE (1.. maxNrofCodebooks)) OF DummyB OPTIONAL, + dummy5 SEQUENCE (SIZE (1.. maxNrofCodebooks)) OF DummyC OPTIONAL, + dummy6 SEQUENCE (SIZE (1.. maxNrofCodebooks)) OF DummyD OPTIONAL, + dummy7 SEQUENCE (SIZE (1.. maxNrofCodebooks)) OF DummyE OPTIONAL +} + +FeatureSetDownlink-v1540 ::= SEQUENCE { + oneFL-DMRS-TwoAdditionalDMRS-DL ENUMERATED {supported} OPTIONAL, + additionalDMRS-DL-Alt ENUMERATED {supported} OPTIONAL, + twoFL-DMRS-TwoAdditionalDMRS-DL ENUMERATED {supported} OPTIONAL, + oneFL-DMRS-ThreeAdditionalDMRS-DL ENUMERATED {supported} OPTIONAL, + pdcch-MonitoringAnyOccasionsWithSpanGap SEQUENCE { + scs-15kHz ENUMERATED {set1, set2, set3} OPTIONAL, + scs-30kHz ENUMERATED {set1, set2, set3} OPTIONAL, + scs-60kHz ENUMERATED {set1, set2, set3} OPTIONAL, + scs-120kHz ENUMERATED {set1, set2, set3} OPTIONAL + } OPTIONAL, + pdsch-SeparationWithGap ENUMERATED {supported} OPTIONAL, + pdsch-ProcessingType2 SEQUENCE { + scs-15kHz ProcessingParameters OPTIONAL, + scs-30kHz ProcessingParameters OPTIONAL, + scs-60kHz ProcessingParameters OPTIONAL + } OPTIONAL, + pdsch-ProcessingType2-Limited SEQUENCE { + differentTB-PerSlot-SCS-30kHz ENUMERATED {upto1, upto2, upto4, upto7} + } OPTIONAL, + dl-MCS-TableAlt-DynamicIndication ENUMERATED {supported} OPTIONAL +} + +FeatureSetDownlink-v15a0 ::= SEQUENCE { + supportedSRS-Resources SRS-Resources OPTIONAL +} + +FeatureSetDownlink-v1610 ::= SEQUENCE { + -- R1 22-4e/4f/4g/4h: CBG based reception for DL with unicast PDSCH(s) per slot per CC with UE processing time Capability 1 + cbgPDSCH-ProcessingType1-DifferentTB-PerSlot-r16 SEQUENCE { + scs-15kHz-r16 ENUMERATED {one, upto2, upto4, upto7} OPTIONAL, + scs-30kHz-r16 ENUMERATED {one, upto2, upto4, upto7} OPTIONAL, + scs-60kHz-r16 ENUMERATED {one, upto2, upto4, upto7} OPTIONAL, + scs-120kHz-r16 ENUMERATED {one, upto2, upto4, upto7} OPTIONAL + } OPTIONAL, + + -- R1 22-3e/3f/3g/3h: CBG based reception for DL with unicast PDSCH(s) per slot per CC with UE processing time Capability 2 + cbgPDSCH-ProcessingType2-DifferentTB-PerSlot-r16 SEQUENCE { + scs-15kHz-r16 ENUMERATED {one, upto2, upto4, upto7} OPTIONAL, + scs-30kHz-r16 ENUMERATED {one, upto2, upto4, upto7} OPTIONAL, + scs-60kHz-r16 ENUMERATED {one, upto2, upto4, upto7} OPTIONAL, + scs-120kHz-r16 ENUMERATED {one, upto2, upto4, upto7} OPTIONAL + } OPTIONAL, + intraFreqDAPS-r16 SEQUENCE { + intraFreqDiffSCS-DAPS-r16 ENUMERATED {supported} OPTIONAL, + intraFreqAsyncDAPS-r16 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + intraBandFreqSeparationDL-v1620 FreqSeparationClassDL-v1620 OPTIONAL, + intraBandFreqSeparationDL-Only-r16 FreqSeparationClassDL-Only-r16 OPTIONAL, + + -- R1 11-2: Rel-16 PDCCH monitoring capability + pdcch-Monitoring-r16 SEQUENCE { + pdsch-ProcessingType1-r16 SEQUENCE { + scs-15kHz-r16 PDCCH-MonitoringOccasions-r16 OPTIONAL, + scs-30kHz-r16 PDCCH-MonitoringOccasions-r16 OPTIONAL + } OPTIONAL, + pdsch-ProcessingType2-r16 SEQUENCE { + scs-15kHz-r16 PDCCH-MonitoringOccasions-r16 OPTIONAL, + scs-30kHz-r16 PDCCH-MonitoringOccasions-r16 OPTIONAL + } OPTIONAL + } OPTIONAL, + + -- R1 11-2b: Mix of Rel. 16 PDCCH monitoring capability and Rel. 15 PDCCH monitoring capability on different carriers + pdcch-MonitoringMixed-r16 ENUMERATED {supported} OPTIONAL, + + -- R1 18-5c: Processing up to X unicast DCI scheduling for DL per scheduled CC + crossCarrierSchedulingProcessing-DiffSCS-r16 SEQUENCE { + scs-15kHz-120kHz-r16 ENUMERATED {n1,n2,n4} OPTIONAL, + scs-15kHz-60kHz-r16 ENUMERATED {n1,n2,n4} OPTIONAL, + scs-30kHz-120kHz-r16 ENUMERATED {n1,n2,n4} OPTIONAL, + scs-15kHz-30kHz-r16 ENUMERATED {n2} OPTIONAL, + scs-30kHz-60kHz-r16 ENUMERATED {n2} OPTIONAL, + scs-60kHz-120kHz-r16 ENUMERATED {n2} OPTIONAL + } OPTIONAL, + + -- R1 16-2b-1: Support of single-DCI based SDM scheme + singleDCI-SDM-scheme-r16 ENUMERATED {supported} OPTIONAL +} + +FeatureSetDownlink-v1700 ::= SEQUENCE { + -- R1 36-2: Scaling factor to be applied to 1024QAM for FR1 + scalingFactor-1024QAM-FR1-r17 ENUMERATED {f0p4, f0p75, f0p8} OPTIONAL, + -- R1 24 feature for existing UE cap to include new SCS + timeDurationForQCL-v1710 SEQUENCE { + scs-480kHz ENUMERATED {s56, s112} OPTIONAL, + scs-960kHz ENUMERATED {s112, s224} OPTIONAL + } OPTIONAL, + -- R1 23-6-1 SFN scheme A (scheme 1) for PDSCH and PDCCH + sfn-SchemeA-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-6-1-1 SFN scheme A (scheme 1) for PDCCH only + sfn-SchemeA-PDCCH-only-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-6-1a Dynamic switching - scheme A + sfn-SchemeA-DynamicSwitching-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-6-1b SFN scheme A (scheme 1) for PDSCH only + sfn-SchemeA-PDSCH-only-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-6-2 SFN scheme B (TRP based pre-compensation) for PDSCH and PDCCH + sfn-SchemeB-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-6-2a Dynamic switching - scheme B + sfn-SchemeB-DynamicSwitching-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-6-2b SFN scheme B (TRP based pre-compensation) for PDSCH only + sfn-SchemeB-PDSCH-only-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-2-1d PDCCH repetition for Case 2 PDCCH monitoring with a span gap + mTRP-PDCCH-Case2-1SpanGap-r17 SEQUENCE { + scs-15kHz-r17 PDCCH-RepetitionParameters-r17 OPTIONAL, + scs-30kHz-r17 PDCCH-RepetitionParameters-r17 OPTIONAL, + scs-60kHz-r17 PDCCH-RepetitionParameters-r17 OPTIONAL, + scs-120kHz-r17 PDCCH-RepetitionParameters-r17 OPTIONAL + } OPTIONAL, + -- R1 23-2-1e PDCCH repetition for Rel-16 PDCCH monitoring + mTRP-PDCCH-legacyMonitoring-r17 SEQUENCE { + scs-15kHz-r17 PDCCH-RepetitionParameters-r17 OPTIONAL, + scs-30kHz-r17 PDCCH-RepetitionParameters-r17 OPTIONAL + } OPTIONAL, + -- R1 23-2-4 Simultaneous configuration of PDCCH repetition and multi-DCI based multi-TRP + mTRP-PDCCH-multiDCI-multiTRP-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-2: Dynamic scheduling for multicast for PCell + dynamicMulticastPCell-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-2-1 PDCCH repetition + mTRP-PDCCH-Repetition-r17 SEQUENCE { + numBD-twoPDCCH-r17 INTEGER (2..3), + maxNumOverlaps-r17 ENUMERATED {n1,n2,n3,n5,n10,n20,n40} + } OPTIONAL +} + +FeatureSetDownlink-v1720 ::= SEQUENCE { + -- R1 25-19: RTT-based Propagation delay compensation based on CSI-RS for tracking and SRS + rtt-BasedPDC-CSI-RS-ForTracking-r17 ENUMERATED {supported} OPTIONAL, + -- R1 25-19a: RTT-based Propagation delay compensation based on DL PRS for RTT-based PDC and SRS + rtt-BasedPDC-PRS-r17 SEQUENCE { + maxNumberPRS-Resource-r17 ENUMERATED {n1, n2, n4, n8, n16, n32, n64}, + maxNumberPRS-ResourceProcessedPerSlot-r17 SEQUENCE { + scs-15kHz-r17 ENUMERATED {n1, n2, n4, n6, n8, n12, n16, n24, n32, n48, n64} OPTIONAL, + scs-30kHz-r17 ENUMERATED {n1, n2, n4, n6, n8, n12, n16, n24, n32, n48, n64} OPTIONAL, + scs-60kHz-r17 ENUMERATED {n1, n2, n4, n6, n8, n12, n16, n24, n32, n48, n64} OPTIONAL, + scs-120kHz-r17 ENUMERATED {n1, n2, n4, n6, n8, n12, n16, n24, n32, n48, n64} OPTIONAL + } + } OPTIONAL, + -- R1 33-5-1: SPS group-common PDSCH for multicast on PCell + sps-Multicast-r17 ENUMERATED {supported} OPTIONAL +} + +FeatureSetDownlink-v1730 ::= SEQUENCE { + -- R1 25-19b: Support of PRS as spatial relation RS for SRS + prs-AsSpatialRelationRS-For-SRS-r17 ENUMERATED {supported} OPTIONAL +} + +PDCCH-MonitoringOccasions-r16 ::= SEQUENCE { + period7span3-r16 ENUMERATED {supported} OPTIONAL, + period4span3-r16 ENUMERATED {supported} OPTIONAL, + period2span2-r16 ENUMERATED {supported} OPTIONAL +} + +PDCCH-RepetitionParameters-r17 ::= SEQUENCE { + supportedMode-r17 ENUMERATED {intra-span, inter-span, both}, + limitX-PerCC-r17 ENUMERATED {n4, n8, n16, n32, n44, n64, nolimit} OPTIONAL, + limitX-AcrossCC-r17 ENUMERATED {n4, n8, n16, n32, n44, n64, n128, n256, n512, nolimit} OPTIONAL +} + +DummyA ::= SEQUENCE { + maxNumberNZP-CSI-RS-PerCC INTEGER (1..32), + maxNumberPortsAcrossNZP-CSI-RS-PerCC ENUMERATED {p2, p4, p8, p12, p16, p24, p32, p40, p48, p56, p64, p72, p80, + p88, p96, p104, p112, p120, p128, p136, p144, p152, p160, p168, + p176, p184, p192, p200, p208, p216, p224, p232, p240, p248, p256}, + maxNumberCS-IM-PerCC ENUMERATED {n1, n2, n4, n8, n16, n32}, + maxNumberSimultaneousCSI-RS-ActBWP-AllCC ENUMERATED {n5, n6, n7, n8, n9, n10, n12, n14, n16, n18, n20, n22, n24, n26, + n28, n30, n32, n34, n36, n38, n40, n42, n44, n46, n48, n50, n52, + n54, n56, n58, n60, n62, n64}, + totalNumberPortsSimultaneousCSI-RS-ActBWP-AllCC ENUMERATED {p8, p12, p16, p24, p32, p40, p48, p56, p64, p72, p80, + p88, p96, p104, p112, p120, p128, p136, p144, p152, p160, p168, + p176, p184, p192, p200, p208, p216, p224, p232, p240, p248, p256} +} + +DummyB ::= SEQUENCE { + maxNumberTxPortsPerResource ENUMERATED {p2, p4, p8, p12, p16, p24, p32}, + maxNumberResources INTEGER (1..64), + totalNumberTxPorts INTEGER (2..256), + supportedCodebookMode ENUMERATED {mode1, mode1AndMode2}, + maxNumberCSI-RS-PerResourceSet INTEGER (1..8) +} + +DummyC ::= SEQUENCE { + maxNumberTxPortsPerResource ENUMERATED {p8, p16, p32}, + maxNumberResources INTEGER (1..64), + totalNumberTxPorts INTEGER (2..256), + supportedCodebookMode ENUMERATED {mode1, mode2, both}, + supportedNumberPanels ENUMERATED {n2, n4}, + maxNumberCSI-RS-PerResourceSet INTEGER (1..8) +} + +DummyD ::= SEQUENCE { + maxNumberTxPortsPerResource ENUMERATED {p4, p8, p12, p16, p24, p32}, + maxNumberResources INTEGER (1..64), + totalNumberTxPorts INTEGER (2..256), + parameterLx INTEGER (2..4), + amplitudeScalingType ENUMERATED {wideband, widebandAndSubband}, + amplitudeSubsetRestriction ENUMERATED {supported} OPTIONAL, + maxNumberCSI-RS-PerResourceSet INTEGER (1..8) +} + +DummyE ::= SEQUENCE { + maxNumberTxPortsPerResource ENUMERATED {p4, p8, p12, p16, p24, p32}, + maxNumberResources INTEGER (1..64), + totalNumberTxPorts INTEGER (2..256), + parameterLx INTEGER (2..4), + amplitudeScalingType ENUMERATED {wideband, widebandAndSubband}, + maxNumberCSI-RS-PerResourceSet INTEGER (1..8) +} + +-- TAG-FEATURESETDOWNLINK-STOP +-- TAG-FEATURESETDOWNLINKID-START + +FeatureSetDownlinkId ::= INTEGER (0..maxDownlinkFeatureSets) + +-- TAG-FEATURESETDOWNLINKID-STOP +-- TAG-FEATURESETDOWNLINKPERCC-START + +FeatureSetDownlinkPerCC ::= SEQUENCE { + supportedSubcarrierSpacingDL SubcarrierSpacing, + supportedBandwidthDL SupportedBandwidth, + channelBW-90mhz ENUMERATED {supported} OPTIONAL, + maxNumberMIMO-LayersPDSCH MIMO-LayersDL OPTIONAL, + supportedModulationOrderDL ModulationOrder OPTIONAL +} + +FeatureSetDownlinkPerCC-v1620 ::= SEQUENCE { + -- R1 16-2a: Mulit-DCI based multi-TRP + multiDCI-MultiTRP-r16 MultiDCI-MultiTRP-r16 OPTIONAL, + -- R1 16-2b-3: Support of single-DCI based FDMSchemeB + supportFDM-SchemeB-r16 ENUMERATED {supported} OPTIONAL +} + +FeatureSetDownlinkPerCC-v1700 ::= SEQUENCE { + supportedMinBandwidthDL-r17 SupportedBandwidth-v1700 OPTIONAL, + broadcastSCell-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-2g: MIMO layers for multicast PDSCH + maxNumberMIMO-LayersMulticastPDSCH-r17 ENUMERATED {n2, n4, n8} OPTIONAL, + -- R1 33-2h: Dynamic scheduling for multicast for SCell + dynamicMulticastSCell-r17 ENUMERATED {supported} OPTIONAL, + supportedBandwidthDL-v1710 SupportedBandwidth-v1700 OPTIONAL, + -- R4 24-1/24-2/24-3/24-4/24-5 + supportedCRS-InterfMitigation-r17 CRS-InterfMitigation-r17 OPTIONAL +} + +FeatureSetDownlinkPerCC-v1720 ::= SEQUENCE { + -- R1 33-2j: Supported maximum modulation order used for maximum data rate calculation for multicast PDSCH + maxModulationOrderForMulticastDataRateCalculation-r17 ENUMERATED {qam64, qam256, qam1024} OPTIONAL, + -- R1 33-1-2: FDM-ed unicast PDSCH and group-common PDSCH for broadcast + fdm-BroadcastUnicast-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-3-2: FDM-ed unicast PDSCH and one group-common PDSCH for multicast + fdm-MulticastUnicast-r17 ENUMERATED {supported} OPTIONAL +} + +FeatureSetDownlinkPerCC-v1730 ::= SEQUENCE { + -- R1 33-3-3: Intra-slot TDM-ed unicast PDSCH and group-common PDSCH + intraSlotTDM-UnicastGroupCommonPDSCH-r17 ENUMERATED {yes, no} OPTIONAL, + -- R1 33-5-3: One SPS group-common PDSCH configuration for multicast for SCell + sps-MulticastSCell-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-5-4: Up to 8 SPS group-common PDSCH configurations per CFR for multicast for SCell + sps-MulticastSCellMultiConfig-r17 INTEGER (1..8) OPTIONAL, + -- R1 33-1-1: Dynamic slot-level repetition for broadcast MTCH + dci-BroadcastWith16Repetitions-r17 ENUMERATED {supported} OPTIONAL +} + +MultiDCI-MultiTRP-r16 ::= SEQUENCE { + maxNumberCORESET-r16 ENUMERATED {n2, n3, n4, n5}, + maxNumberCORESETPerPoolIndex-r16 INTEGER (1..3), + maxNumberUnicastPDSCH-PerPool-r16 ENUMERATED {n1, n2, n3, n4, n7} +} + +CRS-InterfMitigation-r17 ::= SEQUENCE { + -- R4 24-1 CRS-IM (Interference Mitigation) in DSS scenario + crs-IM-DSS-15kHzSCS-r17 ENUMERATED {supported} OPTIONAL, + -- R4 24-2 CRS-IM in non-DSS and 15 kHz NR SCS scenario, without the assistance of network signaling on LTE channel bandwidth + crs-IM-nonDSS-15kHzSCS-r17 ENUMERATED {supported} OPTIONAL, + -- R4 24-3 CRS-IM in non-DSS and 15 kHz NR SCS scenario, with the assistance of network signaling on LTE channel bandwidth + crs-IM-nonDSS-NWA-15kHzSCS-r17 ENUMERATED {supported} OPTIONAL, + -- R4 24-4 CRS-IM in non-DSS and 30 kHz NR SCS scenario, without the assistance of network signaling on LTE channel bandwidth + crs-IM-nonDSS-30kHzSCS-r17 ENUMERATED {supported} OPTIONAL, + -- R4 24-5 CRS-IM in non-DSS and 30 kHz NR SCS scenario, with the assistance of network signaling on LTE channel bandwidth + crs-IM-nonDSS-NWA-30kHzSCS-r17 ENUMERATED {supported} OPTIONAL +} + +-- TAG-FEATURESETDOWNLINKPERCC-STOP +-- TAG-FEATURESETDOWNLINKPERCC-ID-START + +FeatureSetDownlinkPerCC-Id ::= INTEGER (1..maxPerCC-FeatureSets) + +-- TAG-FEATURESETDOWNLINKPERCC-ID-STOP +-- TAG-FEATURESETEUTRADOWNLINKID-START + +FeatureSetEUTRA-DownlinkId ::= INTEGER (0..maxEUTRA-DL-FeatureSets) + +-- TAG-FEATURESETEUTRADOWNLINKID-STOP +-- TAG-FEATURESETEUTRAUPLINKID-START + +FeatureSetEUTRA-UplinkId ::= INTEGER (0..maxEUTRA-UL-FeatureSets) + +-- TAG-FEATURESETEUTRAUPLINKID-STOP +-- TAG-FEATURESETS-START + +FeatureSets ::= SEQUENCE { + featureSetsDownlink SEQUENCE (SIZE (1..maxDownlinkFeatureSets)) OF FeatureSetDownlink OPTIONAL, + featureSetsDownlinkPerCC SEQUENCE (SIZE (1..maxPerCC-FeatureSets)) OF FeatureSetDownlinkPerCC OPTIONAL, + featureSetsUplink SEQUENCE (SIZE (1..maxUplinkFeatureSets)) OF FeatureSetUplink OPTIONAL, + featureSetsUplinkPerCC SEQUENCE (SIZE (1..maxPerCC-FeatureSets)) OF FeatureSetUplinkPerCC OPTIONAL, + ..., + [[ + featureSetsDownlink-v1540 SEQUENCE (SIZE (1..maxDownlinkFeatureSets)) OF FeatureSetDownlink-v1540 OPTIONAL, + featureSetsUplink-v1540 SEQUENCE (SIZE (1..maxUplinkFeatureSets)) OF FeatureSetUplink-v1540 OPTIONAL, + featureSetsUplinkPerCC-v1540 SEQUENCE (SIZE (1..maxPerCC-FeatureSets)) OF FeatureSetUplinkPerCC-v1540 OPTIONAL + ]], + [[ + featureSetsDownlink-v15a0 SEQUENCE (SIZE (1..maxDownlinkFeatureSets)) OF FeatureSetDownlink-v15a0 OPTIONAL + ]], + [[ + featureSetsDownlink-v1610 SEQUENCE (SIZE (1..maxDownlinkFeatureSets)) OF FeatureSetDownlink-v1610 OPTIONAL, + featureSetsUplink-v1610 SEQUENCE (SIZE (1..maxUplinkFeatureSets)) OF FeatureSetUplink-v1610 OPTIONAL, + featureSetDownlinkPerCC-v1620 SEQUENCE (SIZE (1..maxPerCC-FeatureSets)) OF FeatureSetDownlinkPerCC-v1620 OPTIONAL + ]], + [[ + featureSetsUplink-v1630 SEQUENCE (SIZE (1..maxUplinkFeatureSets)) OF FeatureSetUplink-v1630 OPTIONAL + ]], + [[ + featureSetsUplink-v1640 SEQUENCE (SIZE (1..maxUplinkFeatureSets)) OF FeatureSetUplink-v1640 OPTIONAL + ]], + [[ + featureSetsDownlink-v1700 SEQUENCE (SIZE (1..maxDownlinkFeatureSets)) OF FeatureSetDownlink-v1700 OPTIONAL, + featureSetsDownlinkPerCC-v1700 SEQUENCE (SIZE (1..maxPerCC-FeatureSets)) OF FeatureSetDownlinkPerCC-v1700 OPTIONAL, + featureSetsUplink-v1710 SEQUENCE (SIZE (1..maxUplinkFeatureSets)) OF FeatureSetUplink-v1710 OPTIONAL, + featureSetsUplinkPerCC-v1700 SEQUENCE (SIZE (1..maxPerCC-FeatureSets)) OF FeatureSetUplinkPerCC-v1700 OPTIONAL + ]], + [[ + featureSetsDownlink-v1720 SEQUENCE (SIZE (1..maxDownlinkFeatureSets)) OF FeatureSetDownlink-v1720 OPTIONAL, + featureSetsDownlinkPerCC-v1720 SEQUENCE (SIZE (1..maxPerCC-FeatureSets)) OF FeatureSetDownlinkPerCC-v1720 OPTIONAL, + featureSetsUplink-v1720 SEQUENCE (SIZE (1..maxUplinkFeatureSets)) OF FeatureSetUplink-v1720 OPTIONAL + ]], + [[ + featureSetsDownlink-v1730 SEQUENCE (SIZE (1..maxDownlinkFeatureSets)) OF FeatureSetDownlink-v1730 OPTIONAL, + featureSetsDownlinkPerCC-v1730 SEQUENCE (SIZE (1..maxPerCC-FeatureSets)) OF FeatureSetDownlinkPerCC-v1730 OPTIONAL + ]] +} + +-- TAG-FEATURESETS-STOP +-- TAG-FEATURESETUPLINK-START + +FeatureSetUplink ::= SEQUENCE { + featureSetListPerUplinkCC SEQUENCE (SIZE (1.. maxNrofServingCells)) OF FeatureSetUplinkPerCC-Id, + scalingFactor ENUMERATED {f0p4, f0p75, f0p8} OPTIONAL, + dummy3 ENUMERATED {supported} OPTIONAL, + intraBandFreqSeparationUL FreqSeparationClass OPTIONAL, + searchSpaceSharingCA-UL ENUMERATED {supported} OPTIONAL, + dummy1 DummyI OPTIONAL, + supportedSRS-Resources SRS-Resources OPTIONAL, + twoPUCCH-Group ENUMERATED {supported} OPTIONAL, + dynamicSwitchSUL ENUMERATED {supported} OPTIONAL, + simultaneousTxSUL-NonSUL ENUMERATED {supported} OPTIONAL, + pusch-ProcessingType1-DifferentTB-PerSlot SEQUENCE { + scs-15kHz ENUMERATED {upto2, upto4, upto7} OPTIONAL, + scs-30kHz ENUMERATED {upto2, upto4, upto7} OPTIONAL, + scs-60kHz ENUMERATED {upto2, upto4, upto7} OPTIONAL, + scs-120kHz ENUMERATED {upto2, upto4, upto7} OPTIONAL + } OPTIONAL, + dummy2 DummyF OPTIONAL +} + +FeatureSetUplink-v1540 ::= SEQUENCE { + zeroSlotOffsetAperiodicSRS ENUMERATED {supported} OPTIONAL, + pa-PhaseDiscontinuityImpacts ENUMERATED {supported} OPTIONAL, + pusch-SeparationWithGap ENUMERATED {supported} OPTIONAL, + pusch-ProcessingType2 SEQUENCE { + scs-15kHz ProcessingParameters OPTIONAL, + scs-30kHz ProcessingParameters OPTIONAL, + scs-60kHz ProcessingParameters OPTIONAL + } OPTIONAL, + ul-MCS-TableAlt-DynamicIndication ENUMERATED {supported} OPTIONAL +} + +FeatureSetUplink-v1610 ::= SEQUENCE { + -- R1 11-5: PUsCH repetition Type B + pusch-RepetitionTypeB-r16 SEQUENCE { + maxNumberPUSCH-Tx-r16 ENUMERATED {n2, n3, n4, n7, n8, n12}, + hoppingScheme-r16 ENUMERATED {interSlotHopping, interRepetitionHopping, both} + } OPTIONAL, + -- R1 11-7: UL cancelation scheme for self-carrier + ul-CancellationSelfCarrier-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-7a: UL cancelation scheme for cross-carrier + ul-CancellationCrossCarrier-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-5c: The maximum number of SRS resources in one SRS resource set with usage set to 'codebook' for Mode 2 + ul-FullPwrMode2-MaxSRS-ResInSet-r16 ENUMERATED {n1, n2, n4} OPTIONAL, + + -- R1 22-4a/4b/4c/4d: CBG based transmission for UL with unicast PUSCH(s) per slot per CC with UE processing time Capability 1 + cbgPUSCH-ProcessingType1-DifferentTB-PerSlot-r16 SEQUENCE { + scs-15kHz-r16 ENUMERATED {one-pusch, upto2, upto4, upto7} OPTIONAL, + scs-30kHz-r16 ENUMERATED {one-pusch, upto2, upto4, upto7} OPTIONAL, + scs-60kHz-r16 ENUMERATED {one-pusch, upto2, upto4, upto7} OPTIONAL, + scs-120kHz-r16 ENUMERATED {one-pusch, upto2, upto4, upto7} OPTIONAL + } OPTIONAL, + + -- R1 22-3a/3b/3c/3d: CBG based transmission for UL with unicast PUSCH(s) per slot per CC with UE processing time Capability 2 + cbgPUSCH-ProcessingType2-DifferentTB-PerSlot-r16 SEQUENCE { + scs-15kHz-r16 ENUMERATED {one-pusch, upto2, upto4, upto7} OPTIONAL, + scs-30kHz-r16 ENUMERATED {one-pusch, upto2, upto4, upto7} OPTIONAL, + scs-60kHz-r16 ENUMERATED {one-pusch, upto2, upto4, upto7} OPTIONAL, + scs-120kHz-r16 ENUMERATED {one-pusch, upto2, upto4, upto7} OPTIONAL + } OPTIONAL, + supportedSRS-PosResources-r16 SRS-AllPosResources-r16 OPTIONAL, + intraFreqDAPS-UL-r16 SEQUENCE { + dummy ENUMERATED {supported} OPTIONAL, + intraFreqTwoTAGs-DAPS-r16 ENUMERATED {supported} OPTIONAL, + dummy1 ENUMERATED {supported} OPTIONAL, + dummy2 ENUMERATED {supported} OPTIONAL, + dummy3 ENUMERATED {short, long} OPTIONAL + } OPTIONAL, + intraBandFreqSeparationUL-v1620 FreqSeparationClassUL-v1620 OPTIONAL, + + -- R1 11-3: More than one PUCCH for HARQ-ACK transmission within a slot + multiPUCCH-r16 SEQUENCE { + sub-SlotConfig-NCP-r16 ENUMERATED {set1, set2} OPTIONAL, + sub-SlotConfig-ECP-r16 ENUMERATED {set1, set2} OPTIONAL + } OPTIONAL, + -- R1 11-3c: 2 PUCCH of format 0 or 2 for a single 7*2-symbol subslot based HARQ-ACK codebook + twoPUCCH-Type1-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-3d: 2 PUCCH of format 0 or 2 for a single 2*7-symbol subslot based HARQ-ACK codebook + twoPUCCH-Type2-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-3e: 1 PUCCH format 0 or 2 and 1 PUCCH format 1, 3 or 4 in the same subslot for a single 2*7-symbol HARQ-ACK codebooks + twoPUCCH-Type3-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-3f: 2 PUCCH transmissions in the same subslot for a single 2*7-symbol HARQ-ACK codebooks which are not covered by 11-3d and + -- 11-3e + twoPUCCH-Type4-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-3g: SR/HARQ-ACK multiplexing once per subslot using a PUCCH (or HARQ-ACK piggybacked on a PUSCH) when SR/HARQ-ACK + -- are supposed to be sent with different starting symbols in a subslot + mux-SR-HARQ-ACK-r16 ENUMERATED {supported} OPTIONAL, + dummy1 ENUMERATED {supported} OPTIONAL, + dummy2 ENUMERATED {supported} OPTIONAL, + -- R1 11-4c: 2 PUCCH of format 0 or 2 for two HARQ-ACK codebooks with one 7*2-symbol sub-slot based HARQ-ACK codebook + twoPUCCH-Type5-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-4d: 2 PUCCH of format 0 or 2 in consecutive symbols for two HARQ-ACK codebooks with one 2*7-symbol sub-slot based HARQ-ACK + -- codebook + twoPUCCH-Type6-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-4e: 2 PUCCH of format 0 or 2 for two subslot based HARQ-ACK codebooks + twoPUCCH-Type7-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-4f: 1 PUCCH format 0 or 2 and 1 PUCCH format 1, 3 or 4 in the same subslot for HARQ-ACK codebooks with one 2*7-symbol + -- subslot based HARQ-ACK codebook + twoPUCCH-Type8-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-4g: 1 PUCCH format 0 or 2 and 1 PUCCH format 1, 3 or 4 in the same subslot for two subslot based HARQ-ACK codebooks + twoPUCCH-Type9-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-4h: 2 PUCCH transmissions in the same subslot for two HARQ-ACK codebooks with one 2*7-symbol subslot which are not covered + -- by 11-4c and 11-4e + twoPUCCH-Type10-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-4i: 2 PUCCH transmissions in the same subslot for two subslot based HARQ-ACK codebooks which are not covered by 11-4d and + -- 11-4f + twoPUCCH-Type11-r16 ENUMERATED {supported} OPTIONAL, + -- R1 12-1: UL intra-UE multiplexing/prioritization of overlapping channel/signals with two priority levels in physical layer + ul-IntraUE-Mux-r16 SEQUENCE { + pusch-PreparationLowPriority-r16 ENUMERATED {sym0, sym1, sym2}, + pusch-PreparationHighPriority-r16 ENUMERATED {sym0, sym1, sym2} + } OPTIONAL, + -- R1 16-5a: Supported UL full power transmission mode of fullpower + ul-FullPwrMode-r16 ENUMERATED {supported} OPTIONAL, + -- R1 18-5d: Processing up to X unicast DCI scheduling for UL per scheduled CC + crossCarrierSchedulingProcessing-DiffSCS-r16 SEQUENCE { + scs-15kHz-120kHz-r16 ENUMERATED {n1,n2,n4} OPTIONAL, + scs-15kHz-60kHz-r16 ENUMERATED {n1,n2,n4} OPTIONAL, + scs-30kHz-120kHz-r16 ENUMERATED {n1,n2,n4} OPTIONAL, + scs-15kHz-30kHz-r16 ENUMERATED {n2} OPTIONAL, + scs-30kHz-60kHz-r16 ENUMERATED {n2} OPTIONAL, + scs-60kHz-120kHz-r16 ENUMERATED {n2} OPTIONAL + } OPTIONAL, + -- R1 16-5b: Supported UL full power transmission mode of fullpowerMode1 + ul-FullPwrMode1-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-5c-2: Ports configuration for Mode 2 + ul-FullPwrMode2-SRSConfig-diffNumSRSPorts-r16 ENUMERATED {p1-2, p1-4, p1-2-4} OPTIONAL, + -- R1 16-5c-3: TPMI group for Mode 2 + ul-FullPwrMode2-TPMIGroup-r16 SEQUENCE { + twoPorts-r16 BIT STRING(SIZE(2)) OPTIONAL, + fourPortsNonCoherent-r16 ENUMERATED{g0, g1, g2, g3} OPTIONAL, + fourPortsPartialCoherent-r16 ENUMERATED{g0, g1, g2, g3, g4, g5, g6} OPTIONAL + } OPTIONAL +} + +FeatureSetUplink-v1630 ::= SEQUENCE { + -- R1 22-8: For SRS for CB PUSCH and antenna switching on FR1 with symbol level offset for aperiodic SRS transmission + offsetSRS-CB-PUSCH-Ant-Switch-fr1-r16 ENUMERATED {supported} OPTIONAL, + -- R1 22-8a: PDCCH monitoring on any span of up to 3 consecutive OFDM symbols of a slot and constrained timeline for SRS for CB + -- PUSCH and antenna switching on FR1 + offsetSRS-CB-PUSCH-PDCCH-MonitorSingleOcc-fr1-r16 ENUMERATED {supported} OPTIONAL, + -- R1 22-8b: For type 1 CSS with dedicated RRC configuration, type 3 CSS, and UE-SS, monitoring occasion can be any OFDM symbol(s) + -- of a slot for Case 2 and constrained timeline for SRS for CB PUSCH and antenna switching on FR1 + offsetSRS-CB-PUSCH-PDCCH-MonitorAnyOccWithoutGap-fr1-r16 ENUMERATED {supported} OPTIONAL, + -- R1 22-8c: For type 1 CSS with dedicated RRC configuration, type 3 CSS, and UE-SS, monitoring occasion can be any OFDM symbol(s) + -- of a slot for Case 2 with a DCI gap and constrained timeline for SRS for CB PUSCH and antenna switching on FR1 + offsetSRS-CB-PUSCH-PDCCH-MonitorAnyOccWithGap-fr1-r16 ENUMERATED {supported} OPTIONAL, + dummy ENUMERATED {supported} OPTIONAL, + -- R1 22-9: Cancellation of PUCCH, PUSCH or PRACH with a DCI scheduling a PDSCH or CSI-RS or a DCI format 2_0 for SFI + partialCancellationPUCCH-PUSCH-PRACH-TX-r16 ENUMERATED {supported} OPTIONAL +} + +FeatureSetUplink-v1640 ::= SEQUENCE { + -- R1 11-4: Two HARQ-ACK codebooks with up to one sub-slot based HARQ-ACK codebook (i.e. slot-based + slot-based, or slot-based + + -- sub-slot based) simultaneously constructed for supporting HARQ-ACK codebooks with different priorities at a UE + twoHARQ-ACK-Codebook-type1-r16 SubSlot-Config-r16 OPTIONAL, + -- R1 11-4a: Two sub-slot based HARQ-ACK codebooks simultaneously constructed for supporting HARQ-ACK codebooks with different + -- priorities at a UE + twoHARQ-ACK-Codebook-type2-r16 SubSlot-Config-r16 OPTIONAL, + -- R1 22-8d: All PDCCH monitoring occasion can be any OFDM symbol(s) of a slot for Case 2 with a span gap and constrained timeline + -- for SRS for CB PUSCH and antenna switching on FR1 + offsetSRS-CB-PUSCH-PDCCH-MonitorAnyOccWithSpanGap-fr1-r16 SEQUENCE { + scs-15kHz-r16 ENUMERATED {set1, set2, set3} OPTIONAL, + scs-30kHz-r16 ENUMERATED {set1, set2, set3} OPTIONAL, + scs-60kHz-r16 ENUMERATED {set1, set2, set3} OPTIONAL + } OPTIONAL +} + +FeatureSetUplink-v1710 ::= SEQUENCE { + -- R1 23-3-1 Multi-TRP PUSCH repetition (type A) -codebook based + mTRP-PUSCH-TypeA-CB-r17 ENUMERATED {n1,n2,n4} OPTIONAL, + -- R1 23-3-1-2 Multi-TRP PUSCH repetition (type A) - non-codebook based + mTRP-PUSCH-RepetitionTypeA-r17 ENUMERATED {n1,n2,n3,n4} OPTIONAL, + -- R1 23-3-3 Multi-TRP PUCCH repetition-intra-slot + mTRP-PUCCH-IntraSlot-r17 ENUMERATED {pf0-2, pf1-3-4, pf0-4} OPTIONAL, + -- R1 23-8-4 Maximum 2 SP and 1 periodic SRS sets for antenna switching + srs-AntennaSwitching2SP-1Periodic-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-8-9 Extension of aperiodic SRS configuration for 1T4R, 1T2R and 2T4R + srs-ExtensionAperiodicSRS-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-8-10 1 aperiodic SRS resource set for 1T4R + srs-OneAP-SRS-r17 ENUMERATED {supported} OPTIONAL, + -- R4 16-8 UE power class per band per band combination + ue-PowerClassPerBandPerBC-r17 ENUMERATED {pc1dot5, pc2, pc3} OPTIONAL, + -- R4 17-8 UL transmission in FR2 bands within an UL gap when the UL gap is activated + tx-Support-UL-GapFR2-r17 ENUMERATED {supported} OPTIONAL +} + +FeatureSetUplink-v1720 ::= SEQUENCE { + -- R1 25-3: Repetitions for PUCCH format 0, 1, 2, 3 and 4 over multiple PUCCH subslots with configured K = 2, 4, 8 + pucch-Repetition-F0-1-2-3-4-RRC-Config-r17 ENUMERATED {supported} OPTIONAL, + -- R1 25-3a: Repetitions for PUCCH format 0, 1, 2, 3 and 4 over multiple PUCCH subslots using dynamic repetition indication + pucch-Repetition-F0-1-2-3-4-DynamicIndication-r17 ENUMERATED {supported} OPTIONAL, + -- R1 25-3b: Inter-subslot frequency hopping for PUCCH repetitions + interSubslotFreqHopping-PUCCH-r17 ENUMERATED {supported} OPTIONAL, + -- R1 25-8: Semi-static HARQ-ACK codebook for sub-slot PUCCH + semiStaticHARQ-ACK-CodebookSub-SlotPUCCH-r17 ENUMERATED {supported} OPTIONAL, + -- R1 25-14: PHY prioritization of overlapping low-priority DG-PUSCH and high-priority CG-PUSCH + phy-PrioritizationLowPriorityDG-HighPriorityCG-r17 INTEGER(1..16) OPTIONAL, + -- R1 25-15: PHY prioritization of overlapping high-priority DG-PUSCH and low-priority CG-PUSCH + phy-PrioritizationHighPriorityDG-LowPriorityCG-r17 SEQUENCE { + pusch-PreparationLowPriority-r17 ENUMERATED{sym0, sym1, sym2}, + additionalCancellationTime-r17 SEQUENCE { + scs-15kHz-r17 ENUMERATED{sym0, sym1, sym2} OPTIONAL, + scs-30kHz-r17 ENUMERATED{sym0, sym1, sym2, sym3, sym4} OPTIONAL, + scs-60kHz-r17 ENUMERATED{sym0, sym1, sym2, sym3, sym4, sym5, sym6, sym7, sym8} OPTIONAL, + scs-120kHz-r17 ENUMERATED{sym0, sym1, sym2, sym3, sym4, sym5, sym6, sym7, sym8, sym9, + sym10, sym11, sym12, sym13, sym14, sym15, sym16} OPTIONAL + }, + maxNumberCarriers-r17 INTEGER(1..16) + } OPTIONAL, + -- R4 17-5 Support of UL DC location(s) report + extendedDC-LocationReport-r17 ENUMERATED {supported} OPTIONAL +} + +SubSlot-Config-r16 ::= SEQUENCE { + sub-SlotConfig-NCP-r16 ENUMERATED {n4,n5,n6,n7} OPTIONAL, + sub-SlotConfig-ECP-r16 ENUMERATED {n4,n5,n6} OPTIONAL +} + +SRS-AllPosResources-r16 ::= SEQUENCE { + srs-PosResources-r16 SRS-PosResources-r16, + srs-PosResourceAP-r16 SRS-PosResourceAP-r16 OPTIONAL, + srs-PosResourceSP-r16 SRS-PosResourceSP-r16 OPTIONAL +} + +SRS-PosResources-r16 ::= SEQUENCE { + maxNumberSRS-PosResourceSetPerBWP-r16 ENUMERATED {n1, n2, n4, n8, n12, n16}, + maxNumberSRS-PosResourcesPerBWP-r16 ENUMERATED {n1, n2, n4, n8, n16, n32, n64}, + maxNumberSRS-ResourcesPerBWP-PerSlot-r16 ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10, n12, n14}, + maxNumberPeriodicSRS-PosResourcesPerBWP-r16 ENUMERATED {n1, n2, n4, n8, n16, n32, n64}, + maxNumberPeriodicSRS-PosResourcesPerBWP-PerSlot-r16 ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10, n12, n14} +} + +SRS-PosResourceAP-r16 ::= SEQUENCE { + maxNumberAP-SRS-PosResourcesPerBWP-r16 ENUMERATED {n1, n2, n4, n8, n16, n32, n64}, + maxNumberAP-SRS-PosResourcesPerBWP-PerSlot-r16 ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10, n12, n14} +} + +SRS-PosResourceSP-r16 ::= SEQUENCE { + maxNumberSP-SRS-PosResourcesPerBWP-r16 ENUMERATED {n1, n2, n4, n8, n16, n32, n64}, + maxNumberSP-SRS-PosResourcesPerBWP-PerSlot-r16 ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10, n12, n14} +} + +SRS-Resources ::= SEQUENCE { + maxNumberAperiodicSRS-PerBWP ENUMERATED {n1, n2, n4, n8, n16}, + maxNumberAperiodicSRS-PerBWP-PerSlot INTEGER (1..6), + maxNumberPeriodicSRS-PerBWP ENUMERATED {n1, n2, n4, n8, n16}, + maxNumberPeriodicSRS-PerBWP-PerSlot INTEGER (1..6), + maxNumberSemiPersistentSRS-PerBWP ENUMERATED {n1, n2, n4, n8, n16}, + maxNumberSemiPersistentSRS-PerBWP-PerSlot INTEGER (1..6), + maxNumberSRS-Ports-PerResource ENUMERATED {n1, n2, n4} +} + +DummyF ::= SEQUENCE { + maxNumberPeriodicCSI-ReportPerBWP INTEGER (1..4), + maxNumberAperiodicCSI-ReportPerBWP INTEGER (1..4), + maxNumberSemiPersistentCSI-ReportPerBWP INTEGER (0..4), + simultaneousCSI-ReportsAllCC INTEGER (5..32) +} + +-- TAG-FEATURESETUPLINK-STOP +-- TAG-FEATURESETUPLINKID-START + +FeatureSetUplinkId ::= INTEGER (0..maxUplinkFeatureSets) + +-- TAG-FEATURESETUPLINKID-STOP +-- TAG-FEATURESETUPLINKPERCC-START + +FeatureSetUplinkPerCC ::= SEQUENCE { + supportedSubcarrierSpacingUL SubcarrierSpacing, + supportedBandwidthUL SupportedBandwidth, + channelBW-90mhz ENUMERATED {supported} OPTIONAL, + mimo-CB-PUSCH SEQUENCE { + maxNumberMIMO-LayersCB-PUSCH MIMO-LayersUL OPTIONAL, + maxNumberSRS-ResourcePerSet INTEGER (1..2) + } OPTIONAL, + maxNumberMIMO-LayersNonCB-PUSCH MIMO-LayersUL OPTIONAL, + supportedModulationOrderUL ModulationOrder OPTIONAL +} +FeatureSetUplinkPerCC-v1540 ::= SEQUENCE { + mimo-NonCB-PUSCH SEQUENCE { + maxNumberSRS-ResourcePerSet INTEGER (1..4), + maxNumberSimultaneousSRS-ResourceTx INTEGER (1..4) + } OPTIONAL +} + +FeatureSetUplinkPerCC-v1700 ::= SEQUENCE { + supportedMinBandwidthUL-r17 SupportedBandwidth-v1700 OPTIONAL, + -- R1 23-3-1-3 FeMIMO: Multi-TRP PUSCH repetition (type B) - non-codebook based + mTRP-PUSCH-RepetitionTypeB-r17 ENUMERATED {n1,n2,n3,n4} OPTIONAL, + -- R1 23-3-1-1 -codebook based Multi-TRP PUSCH repetition (type B) + mTRP-PUSCH-TypeB-CB-r17 ENUMERATED {n1,n2,n4} OPTIONAL, + supportedBandwidthUL-v1710 SupportedBandwidth-v1700 OPTIONAL +} + +-- TAG-FEATURESETUPLINKPERCC-STOP +-- TAG-FEATURESETUPLINKPERCC-ID-START + +FeatureSetUplinkPerCC-Id ::= INTEGER (1..maxPerCC-FeatureSets) + +-- TAG-FEATURESETUPLINKPERCC-ID-STOP +-- TAG-FREQBANDINDICATOREUTRA-START + +FreqBandIndicatorEUTRA ::= INTEGER (1..maxBandsEUTRA) + +-- TAG-FREQBANDINDICATOREUTRA-STOP +-- TAG-FREQBANDLIST-START + +FreqBandList ::= SEQUENCE (SIZE (1..maxBandsMRDC)) OF FreqBandInformation + +FreqBandInformation ::= CHOICE { + bandInformationEUTRA FreqBandInformationEUTRA, + bandInformationNR FreqBandInformationNR +} + +FreqBandInformationEUTRA ::= SEQUENCE { + bandEUTRA FreqBandIndicatorEUTRA, + ca-BandwidthClassDL-EUTRA CA-BandwidthClassEUTRA OPTIONAL, -- Need N + ca-BandwidthClassUL-EUTRA CA-BandwidthClassEUTRA OPTIONAL -- Need N +} + +FreqBandInformationNR ::= SEQUENCE { + bandNR FreqBandIndicatorNR, + maxBandwidthRequestedDL AggregatedBandwidth OPTIONAL, -- Need N + maxBandwidthRequestedUL AggregatedBandwidth OPTIONAL, -- Need N + maxCarriersRequestedDL INTEGER (1..maxNrofServingCells) OPTIONAL, -- Need N + maxCarriersRequestedUL INTEGER (1..maxNrofServingCells) OPTIONAL -- Need N +} + +AggregatedBandwidth ::= ENUMERATED {mhz50, mhz100, mhz150, mhz200, mhz250, mhz300, mhz350, + mhz400, mhz450, mhz500, mhz550, mhz600, mhz650, mhz700, mhz750, mhz800} + +-- TAG-FREQBANDLIST-STOP +-- TAG-FREQSEPARATIONCLASS-START + +FreqSeparationClass ::= ENUMERATED { mhz800, mhz1200, mhz1400, ..., mhz400-v1650, mhz600-v1650} + +FreqSeparationClassDL-v1620 ::= ENUMERATED {mhz1000, mhz1600, mhz1800, mhz2000, mhz2200, mhz2400} + +FreqSeparationClassUL-v1620 ::= ENUMERATED {mhz1000} + +-- TAG-FREQSEPARATIONCLASS-STOP +-- TAG-FREQSEPARATIONCLASSDL-Only-START + +FreqSeparationClassDL-Only-r16 ::= ENUMERATED {mhz200, mhz400, mhz600, mhz800, mhz1000, mhz1200} + +-- TAG-FREQSEPARATIONCLASSDL-Only-STOP +-- TAG-FR2-2-ACCESSPARAMSPERBAND-START + +FR2-2-AccessParamsPerBand-r17 ::= SEQUENCE { + -- R1 24-1: Basic FR2-2 DL support + dl-FR2-2-SCS-120kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-1a: Basic FR2-2 UL support + ul-FR2-2-SCS-120kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-2: 120KHz SSB support for initial access in FR2-2 + initialAccessSSB-120kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-1b: Wideband PRACH for 120 kHz in FR2-2 + widebandPRACH-SCS-120kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-1c: Multi-RB support PUCCH format 0/1/4 for 120 kHz in FR2-2 + multiRB-PUCCH-SCS-120kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-1d: Multiple PDSCH scheduling by single DCI for 120kHz in FR2-2 + multiPDSCH-SingleDCI-FR2-2-SCS-120kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-1e: Multiple PUSCH scheduling by single DCI for 120kHz in FR2-2 + multiPUSCH-SingleDCI-FR2-2-SCS-120kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-4: 480KHz SCS support for DL + dl-FR2-2-SCS-480kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-4a: 480KHz SCS support for UL + ul-FR2-2-SCS-480kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-3: 480KHz SSB support for initial access in FR2-2 + initialAccessSSB-480kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-4b: Wideband PRACH for 480 kHz in FR2-2 + widebandPRACH-SCS-480kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-4c: Multi-RB support PUCCH format 0/1/4 for 480 kHz in FR2-2 + multiRB-PUCCH-SCS-480kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-4f: Enhanced PDCCH monitoring for 480KHz in FR2-2 + enhancedPDCCH-monitoringSCS-480kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-5: 960KHz SCS support for DL + dl-FR2-2-SCS-960kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-5a: 960KHz SCS support for UL + ul-FR2-2-SCS-960kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-5c: Multi-RB support PUCCH format 0/1/4 for 960 kHz in FR2-2 + multiRB-PUCCH-SCS-960kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-5f: Enhanced PDCCH monitoring for 960KHz in FR2-2 + enhancedPDCCH-monitoringSCS-960kHz-r17 SEQUENCE { + pdcch-monitoring4-1-r17 ENUMERATED {supported} OPTIONAL, + pdcch-monitoring4-2-r17 ENUMERATED {supported} OPTIONAL, + pdcch-monitoring8-4-r17 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + -- R1 24-6: Type 1 channel access procedure in uplink for FR2-2 with shared spectrum channel access + type1-ChannelAccess-FR2-2-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-7: Type 2 channel access procedure in uplink for FR2-2 with shared spectrum channel access + type2-ChannelAccess-FR2-2-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-10: Reduced beam switching time delay + reduced-BeamSwitchTiming-FR2-2-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-8: 32 DL HARQ processes for FR 2-2 + support32-DL-HARQ-ProcessPerSCS-r17 SEQUENCE { + scs-120kHz-r17 ENUMERATED {supported} OPTIONAL, + scs-480kHz-r17 ENUMERATED {supported} OPTIONAL, + scs-960kHz-r17 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + -- R1 24-9: 32 UL HARQ processes for FR 2-2 + support32-UL-HARQ-ProcessPerSCS-r17 SEQUENCE { + scs-120kHz-r17 ENUMERATED {supported} OPTIONAL, + scs-480kHz-r17 ENUMERATED {supported} OPTIONAL, + scs-960kHz-r17 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + ..., + [[ + -- R4 15-1: 64QAM for PUSCH for FR2-2 + modulation64-QAM-PUSCH-FR2-2-r17 ENUMERATED {supported} OPTIONAL + ]] +} + +-- TAG-FR2-2-ACCESSPARAMSPERBAND-STOP +-- TAG-HIGHSPEEDPARAMETERS-START + +HighSpeedParameters-r16 ::= SEQUENCE { + measurementEnhancement-r16 ENUMERATED {supported} OPTIONAL, + demodulationEnhancement-r16 ENUMERATED {supported} OPTIONAL +} + +HighSpeedParameters-v1650 ::= CHOICE { + intraNR-MeasurementEnhancement-r16 ENUMERATED {supported}, + interRAT-MeasurementEnhancement-r16 ENUMERATED {supported} +} + +HighSpeedParameters-v1700 ::= SEQUENCE { + -- R4 18-1: Enhanced RRM requirements specified for CA for FR1 HST + measurementEnhancementCA-r17 ENUMERATED {supported} OPTIONAL, + -- R4 18-2: Enhanced RRM requirements specified for inter-frequency measurement in connected mode for FR1 HST + measurementEnhancementInterFreq-r17 ENUMERATED {supported} OPTIONAL +} + +-- TAG-HIGHSPEEDPARAMETERS-STOP +-- TAG-IMS-PARAMETERS-START + +IMS-Parameters ::= SEQUENCE { + ims-ParametersCommon IMS-ParametersCommon OPTIONAL, + ims-ParametersFRX-Diff IMS-ParametersFRX-Diff OPTIONAL, + ... +} + +IMS-Parameters-v1700 ::= SEQUENCE { + ims-ParametersFR2-2-r17 IMS-ParametersFR2-2-r17 OPTIONAL +} + +IMS-ParametersCommon ::= SEQUENCE { + voiceOverEUTRA-5GC ENUMERATED {supported} OPTIONAL, + ..., + [[ + voiceOverSCG-BearerEUTRA-5GC ENUMERATED {supported} OPTIONAL + ]], + [[ + voiceFallbackIndicationEPS-r16 ENUMERATED {supported} OPTIONAL + ]] +} + +IMS-ParametersFRX-Diff ::= SEQUENCE { + voiceOverNR ENUMERATED {supported} OPTIONAL, + ... +} + +IMS-ParametersFR2-2-r17 ::= SEQUENCE { + voiceOverNR-r17 ENUMERATED {supported} OPTIONAL, + ... +} + +-- TAG-IMS-PARAMETERS-STOP +-- TAG-INTERRAT-PARAMETERS-START + +InterRAT-Parameters ::= SEQUENCE { + eutra EUTRA-Parameters OPTIONAL, + ..., + [[ + utra-FDD-r16 UTRA-FDD-Parameters-r16 OPTIONAL + ]] + +} + +EUTRA-Parameters ::= SEQUENCE { + supportedBandListEUTRA SEQUENCE (SIZE (1..maxBandsEUTRA)) OF FreqBandIndicatorEUTRA, + eutra-ParametersCommon EUTRA-ParametersCommon OPTIONAL, + eutra-ParametersXDD-Diff EUTRA-ParametersXDD-Diff OPTIONAL, + ... +} + +EUTRA-ParametersCommon ::= SEQUENCE { + mfbi-EUTRA ENUMERATED {supported} OPTIONAL, + modifiedMPR-BehaviorEUTRA BIT STRING (SIZE (32)) OPTIONAL, + multiNS-Pmax-EUTRA ENUMERATED {supported} OPTIONAL, + rs-SINR-MeasEUTRA ENUMERATED {supported} OPTIONAL, + ..., + [[ + ne-DC ENUMERATED {supported} OPTIONAL + ]], + [[ + nr-HO-ToEN-DC-r16 ENUMERATED {supported} OPTIONAL + ]] +} + +EUTRA-ParametersXDD-Diff ::= SEQUENCE { + rsrqMeasWidebandEUTRA ENUMERATED {supported} OPTIONAL, + ... +} + +UTRA-FDD-Parameters-r16 ::= SEQUENCE { + supportedBandListUTRA-FDD-r16 SEQUENCE (SIZE (1..maxBandsUTRA-FDD-r16)) OF SupportedBandUTRA-FDD-r16, + ... +} + +SupportedBandUTRA-FDD-r16 ::= ENUMERATED { + bandI, bandII, bandIII, bandIV, bandV, bandVI, + bandVII, bandVIII, bandIX, bandX, bandXI, + bandXII, bandXIII, bandXIV, bandXV, bandXVI, + bandXVII, bandXVIII, bandXIX, bandXX, + bandXXI, bandXXII, bandXXIII, bandXXIV, + bandXXV, bandXXVI, bandXXVII, bandXXVIII, + bandXXIX, bandXXX, bandXXXI, bandXXXII} + +-- TAG-INTERRAT-PARAMETERS-STOP +-- TAG-MAC-PARAMETERS-START + +MAC-Parameters ::= SEQUENCE { + mac-ParametersCommon MAC-ParametersCommon OPTIONAL, + mac-ParametersXDD-Diff MAC-ParametersXDD-Diff OPTIONAL +} + +MAC-Parameters-v1610 ::= SEQUENCE { + mac-ParametersFRX-Diff-r16 MAC-ParametersFRX-Diff-r16 OPTIONAL +} + +MAC-Parameters-v1700 ::= SEQUENCE { + mac-ParametersFR2-2-r17 MAC-ParametersFR2-2-r17 OPTIONAL +} + +MAC-ParametersCommon ::= SEQUENCE { + lcp-Restriction ENUMERATED {supported} OPTIONAL, + dummy ENUMERATED {supported} OPTIONAL, + lch-ToSCellRestriction ENUMERATED {supported} OPTIONAL, + ..., + [[ + recommendedBitRate ENUMERATED {supported} OPTIONAL, + recommendedBitRateQuery ENUMERATED {supported} OPTIONAL + ]], + [[ + recommendedBitRateMultiplier-r16 ENUMERATED {supported} OPTIONAL, + preEmptiveBSR-r16 ENUMERATED {supported} OPTIONAL, + autonomousTransmission-r16 ENUMERATED {supported} OPTIONAL, + lch-PriorityBasedPrioritization-r16 ENUMERATED {supported} OPTIONAL, + lch-ToConfiguredGrantMapping-r16 ENUMERATED {supported} OPTIONAL, + lch-ToGrantPriorityRestriction-r16 ENUMERATED {supported} OPTIONAL, + singlePHR-P-r16 ENUMERATED {supported} OPTIONAL, + ul-LBT-FailureDetectionRecovery-r16 ENUMERATED {supported} OPTIONAL, + -- R4 8-1: MPE + tdd-MPE-P-MPR-Reporting-r16 ENUMERATED {supported} OPTIONAL, + lcid-ExtensionIAB-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + spCell-BFR-CBRA-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + srs-ResourceId-Ext-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + enhancedUuDRX-forSidelink-r17 ENUMERATED {supported} OPTIONAL, + --27-10: Support of UL MAC CE based MG activation request for PRS measurements + mg-ActivationRequestPRS-Meas-r17 ENUMERATED {supported} OPTIONAL, + --27-11: Support of DL MAC CE based MG activation request for PRS measurements + mg-ActivationCommPRS-Meas-r17 ENUMERATED {supported} OPTIONAL, + intraCG-Prioritization-r17 ENUMERATED {supported} OPTIONAL, + jointPrioritizationCG-Retx-Timer-r17 ENUMERATED {supported} OPTIONAL, + survivalTime-r17 ENUMERATED {supported} OPTIONAL, + lcg-ExtensionIAB-r17 ENUMERATED {supported} OPTIONAL, + harq-FeedbackDisabled-r17 ENUMERATED {supported} OPTIONAL, + uplink-Harq-ModeB-r17 ENUMERATED {supported} OPTIONAL, + sr-TriggeredBy-TA-Report-r17 ENUMERATED {supported} OPTIONAL, + extendedDRX-CycleInactive-r17 ENUMERATED {supported} OPTIONAL, + simultaneousSR-PUSCH-DiffPUCCH-groups-r17 ENUMERATED {supported} OPTIONAL, + lastTransmissionUL-r17 ENUMERATED {supported} OPTIONAL + ]] +} + +MAC-ParametersFRX-Diff-r16 ::= SEQUENCE { + directMCG-SCellActivation-r16 ENUMERATED {supported} OPTIONAL, + directMCG-SCellActivationResume-r16 ENUMERATED {supported} OPTIONAL, + directSCG-SCellActivation-r16 ENUMERATED {supported} OPTIONAL, + directSCG-SCellActivationResume-r16 ENUMERATED {supported} OPTIONAL, + -- R1 19-1: DRX Adaptation + drx-Adaptation-r16 SEQUENCE { + non-SharedSpectrumChAccess-r16 MinTimeGap-r16 OPTIONAL, + sharedSpectrumChAccess-r16 MinTimeGap-r16 OPTIONAL + } OPTIONAL, + ... +} + +MAC-ParametersFR2-2-r17 ::= SEQUENCE { + directMCG-SCellActivation-r17 ENUMERATED {supported} OPTIONAL, + directMCG-SCellActivationResume-r17 ENUMERATED {supported} OPTIONAL, + directSCG-SCellActivation-r17 ENUMERATED {supported} OPTIONAL, + directSCG-SCellActivationResume-r17 ENUMERATED {supported} OPTIONAL, + drx-Adaptation-r17 SEQUENCE { + non-SharedSpectrumChAccess-r17 MinTimeGapFR2-2-r17 OPTIONAL, + sharedSpectrumChAccess-r17 MinTimeGapFR2-2-r17 OPTIONAL + } OPTIONAL, + ... +} + +MAC-ParametersXDD-Diff ::= SEQUENCE { + skipUplinkTxDynamic ENUMERATED {supported} OPTIONAL, + logicalChannelSR-DelayTimer ENUMERATED {supported} OPTIONAL, + longDRX-Cycle ENUMERATED {supported} OPTIONAL, + shortDRX-Cycle ENUMERATED {supported} OPTIONAL, + multipleSR-Configurations ENUMERATED {supported} OPTIONAL, + multipleConfiguredGrants ENUMERATED {supported} OPTIONAL, + ..., + [[ + secondaryDRX-Group-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + enhancedSkipUplinkTxDynamic-r16 ENUMERATED {supported} OPTIONAL, + enhancedSkipUplinkTxConfigured-r16 ENUMERATED {supported} OPTIONAL + ]] +} + +MinTimeGap-r16 ::= SEQUENCE { + scs-15kHz-r16 ENUMERATED {sl1, sl3} OPTIONAL, + scs-30kHz-r16 ENUMERATED {sl1, sl6} OPTIONAL, + scs-60kHz-r16 ENUMERATED {sl1, sl12} OPTIONAL, + scs-120kHz-r16 ENUMERATED {sl2, sl24} OPTIONAL +} + +MinTimeGapFR2-2-r17 ::= SEQUENCE { + scs-120kHz-r17 ENUMERATED {sl2, sl24} OPTIONAL, + scs-480kHz-r17 ENUMERATED {sl8, sl96} OPTIONAL, + scs-960kHz-r17 ENUMERATED {sl16, sl192} OPTIONAL +} + +-- TAG-MAC-PARAMETERS-STOP +-- TAG-MEASANDMOBPARAMETERS-START + +MeasAndMobParameters ::= SEQUENCE { + measAndMobParametersCommon MeasAndMobParametersCommon OPTIONAL, + measAndMobParametersXDD-Diff MeasAndMobParametersXDD-Diff OPTIONAL, + measAndMobParametersFRX-Diff MeasAndMobParametersFRX-Diff OPTIONAL +} + +MeasAndMobParameters-v1700 ::= SEQUENCE { + measAndMobParametersFR2-2-r17 MeasAndMobParametersFR2-2-r17 OPTIONAL +} + +MeasAndMobParametersCommon ::= SEQUENCE { + supportedGapPattern BIT STRING (SIZE (22)) OPTIONAL, + ssb-RLM ENUMERATED {supported} OPTIONAL, + ssb-AndCSI-RS-RLM ENUMERATED {supported} OPTIONAL, + ..., + [[ + eventB-MeasAndReport ENUMERATED {supported} OPTIONAL, + handoverFDD-TDD ENUMERATED {supported} OPTIONAL, + eutra-CGI-Reporting ENUMERATED {supported} OPTIONAL, + nr-CGI-Reporting ENUMERATED {supported} OPTIONAL + ]], + [[ + independentGapConfig ENUMERATED {supported} OPTIONAL, + periodicEUTRA-MeasAndReport ENUMERATED {supported} OPTIONAL, + handoverFR1-FR2 ENUMERATED {supported} OPTIONAL, + maxNumberCSI-RS-RRM-RS-SINR ENUMERATED {n4, n8, n16, n32, n64, n96} OPTIONAL + ]], + [[ + nr-CGI-Reporting-ENDC ENUMERATED {supported} OPTIONAL + ]], + [[ + eutra-CGI-Reporting-NEDC ENUMERATED {supported} OPTIONAL, + eutra-CGI-Reporting-NRDC ENUMERATED {supported} OPTIONAL, + nr-CGI-Reporting-NEDC ENUMERATED {supported} OPTIONAL, + nr-CGI-Reporting-NRDC ENUMERATED {supported} OPTIONAL + ]], + [[ + reportAddNeighMeasForPeriodic-r16 ENUMERATED {supported} OPTIONAL, + condHandoverParametersCommon-r16 SEQUENCE { + condHandoverFDD-TDD-r16 ENUMERATED {supported} OPTIONAL, + condHandoverFR1-FR2-r16 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + nr-NeedForGap-Reporting-r16 ENUMERATED {supported} OPTIONAL, + supportedGapPattern-NRonly-r16 BIT STRING (SIZE (10)) OPTIONAL, + supportedGapPattern-NRonly-NEDC-r16 ENUMERATED {supported} OPTIONAL, + maxNumberCLI-RSSI-r16 ENUMERATED {n8, n16, n32, n64} OPTIONAL, + maxNumberCLI-SRS-RSRP-r16 ENUMERATED {n4, n8, n16, n32} OPTIONAL, + maxNumberPerSlotCLI-SRS-RSRP-r16 ENUMERATED {n2, n4, n8} OPTIONAL, + mfbi-IAB-r16 ENUMERATED {supported} OPTIONAL, + dummy ENUMERATED {supported} OPTIONAL, + nr-CGI-Reporting-NPN-r16 ENUMERATED {supported} OPTIONAL, + idleInactiveEUTRA-MeasReport-r16 ENUMERATED {supported} OPTIONAL, + idleInactive-ValidityArea-r16 ENUMERATED {supported} OPTIONAL, + eutra-AutonomousGaps-r16 ENUMERATED {supported} OPTIONAL, + eutra-AutonomousGaps-NEDC-r16 ENUMERATED {supported} OPTIONAL, + eutra-AutonomousGaps-NRDC-r16 ENUMERATED {supported} OPTIONAL, + pcellT312-r16 ENUMERATED {supported} OPTIONAL, + supportedGapPattern-r16 BIT STRING (SIZE (2)) OPTIONAL + ]], + [[ + -- R4 19-2 Concurrent measurement gaps + concurrentMeasGap-r17 CHOICE { + concurrentPerUE-OnlyMeasGap-r17 ENUMERATED {supported}, + concurrentPerUE-PerFRCombMeasGap-r17 ENUMERATED {supported} + } OPTIONAL, + -- R4 19-1 Network controlled small gap (NCSG) + nr-NeedForGapNCSG-Reporting-r17 ENUMERATED {supported} OPTIONAL, + eutra-NeedForGapNCSG-Reporting-r17 ENUMERATED {supported} OPTIONAL, + -- R4 19-1-1 per FR Network controlled small gap (NCSG) + ncsg-MeasGapPerFR-r17 ENUMERATED {supported} OPTIONAL, + -- R4 19-1-2 Network controlled small gap (NCSG) supported patterns + ncsg-MeasGapPatterns-r17 BIT STRING (SIZE(24)) OPTIONAL, + -- R4 19-1-3 Network controlled small gap (NCSG) supported NR-only patterns + ncsg-MeasGapNR-Patterns-r17 BIT STRING (SIZE(24)) OPTIONAL, + -- R4 19-3-2 pre-configured measurement gap + preconfiguredUE-AutonomousMeasGap-r17 ENUMERATED {supported} OPTIONAL, + -- R4 19-3-1 pre-configured measurement gap + preconfiguredNW-ControlledMeasGap-r17 ENUMERATED {supported} OPTIONAL, + handoverFR1-FR2-2-r17 ENUMERATED {supported} OPTIONAL, + handoverFR2-1-FR2-2-r17 ENUMERATED {supported} OPTIONAL, + -- RAN4 14-1: per-FR MG for PRS measurement + independentGapConfigPRS-r17 ENUMERATED {supported} OPTIONAL, + rrm-RelaxationRRC-ConnectedRedCap-r17 ENUMERATED {supported} OPTIONAL, + -- R4 25-3: Parallel measurements with multiple measurement gaps + parallelMeasurementGap-r17 ENUMERATED {n2} OPTIONAL, + condHandoverWithSCG-NRDC-r17 ENUMERATED {supported} OPTIONAL, + gNB-ID-LengthReporting-r17 ENUMERATED {supported} OPTIONAL, + gNB-ID-LengthReporting-ENDC-r17 ENUMERATED {supported} OPTIONAL, + gNB-ID-LengthReporting-NEDC-r17 ENUMERATED {supported} OPTIONAL, + gNB-ID-LengthReporting-NRDC-r17 ENUMERATED {supported} OPTIONAL, + gNB-ID-LengthReporting-NPN-r17 ENUMERATED {supported} OPTIONAL + ]], + [[ + -- R4 25-1: Parallel measurements on multiple SMTC-s for a single frequency carrier + parallelSMTC-r17 ENUMERATED {n4} OPTIONAL, + -- R4 19-2-1 Concurrent measurement gaps for EUTRA + concurrentMeasGapEUTRA-r17 ENUMERATED {supported} OPTIONAL, + serviceLinkPropDelayDiffReporting-r17 ENUMERATED {supported} OPTIONAL, + -- R4 19-1-4 Network controlled small gap (NCSG) performing measurement based on flagderiveSSB-IndexFromCell-inter + ncsg-SymbolLevelScheduleRestrictionInter-r17 ENUMERATED {supported} OPTIONAL + ]], + [[ + eventD1-MeasReportTrigger-r17 ENUMERATED {supported} OPTIONAL, + independentGapConfig-maxCC-r17 SEQUENCE { + fr1-Only-r17 INTEGER (1..32) OPTIONAL, + fr2-Only-r17 INTEGER (1..32) OPTIONAL, + fr1-AndFR2-r17 INTEGER (1..32) OPTIONAL + } OPTIONAL + ]] +} + +MeasAndMobParametersXDD-Diff ::= SEQUENCE { + intraAndInterF-MeasAndReport ENUMERATED {supported} OPTIONAL, + eventA-MeasAndReport ENUMERATED {supported} OPTIONAL, + ..., + [[ + handoverInterF ENUMERATED {supported} OPTIONAL, + handoverLTE-EPC ENUMERATED {supported} OPTIONAL, + handoverLTE-5GC ENUMERATED {supported} OPTIONAL + ]], + [[ + sftd-MeasNR-Neigh ENUMERATED {supported} OPTIONAL, + sftd-MeasNR-Neigh-DRX ENUMERATED {supported} OPTIONAL + ]], + [[ + dummy ENUMERATED {supported} OPTIONAL + ]] +} + +MeasAndMobParametersFRX-Diff ::= SEQUENCE { + ss-SINR-Meas ENUMERATED {supported} OPTIONAL, + csi-RSRP-AndRSRQ-MeasWithSSB ENUMERATED {supported} OPTIONAL, + csi-RSRP-AndRSRQ-MeasWithoutSSB ENUMERATED {supported} OPTIONAL, + csi-SINR-Meas ENUMERATED {supported} OPTIONAL, + csi-RS-RLM ENUMERATED {supported} OPTIONAL, + ..., + [[ + handoverInterF ENUMERATED {supported} OPTIONAL, + handoverLTE-EPC ENUMERATED {supported} OPTIONAL, + handoverLTE-5GC ENUMERATED {supported} OPTIONAL + ]], + [[ + maxNumberResource-CSI-RS-RLM ENUMERATED {n2, n4, n6, n8} OPTIONAL + ]], + [[ + simultaneousRxDataSSB-DiffNumerology ENUMERATED {supported} OPTIONAL + ]], + [[ + nr-AutonomousGaps-r16 ENUMERATED {supported} OPTIONAL, + nr-AutonomousGaps-ENDC-r16 ENUMERATED {supported} OPTIONAL, + nr-AutonomousGaps-NEDC-r16 ENUMERATED {supported} OPTIONAL, + nr-AutonomousGaps-NRDC-r16 ENUMERATED {supported} OPTIONAL, + dummy ENUMERATED {supported} OPTIONAL, + cli-RSSI-Meas-r16 ENUMERATED {supported} OPTIONAL, + cli-SRS-RSRP-Meas-r16 ENUMERATED {supported} OPTIONAL, + interFrequencyMeas-NoGap-r16 ENUMERATED {supported} OPTIONAL, + simultaneousRxDataSSB-DiffNumerology-Inter-r16 ENUMERATED {supported} OPTIONAL, + idleInactiveNR-MeasReport-r16 ENUMERATED {supported} OPTIONAL, + -- R4 6-2: Support of beam level Early Measurement Reporting + idleInactiveNR-MeasBeamReport-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + increasedNumberofCSIRSPerMO-r16 ENUMERATED {supported} OPTIONAL + ]] +} + +MeasAndMobParametersFR2-2-r17 ::= SEQUENCE { + handoverInterF-r17 ENUMERATED {supported} OPTIONAL, + handoverLTE-EPC-r17 ENUMERATED {supported} OPTIONAL, + handoverLTE-5GC-r17 ENUMERATED {supported} OPTIONAL, + idleInactiveNR-MeasReport-r17 ENUMERATED {supported} OPTIONAL, +... +} + +-- TAG-MEASANDMOBPARAMETERS-STOP +-- TAG-MEASANDMOBPARAMETERSMRDC-START + +MeasAndMobParametersMRDC ::= SEQUENCE { + measAndMobParametersMRDC-Common MeasAndMobParametersMRDC-Common OPTIONAL, + measAndMobParametersMRDC-XDD-Diff MeasAndMobParametersMRDC-XDD-Diff OPTIONAL, + measAndMobParametersMRDC-FRX-Diff MeasAndMobParametersMRDC-FRX-Diff OPTIONAL +} + +MeasAndMobParametersMRDC-v1560 ::= SEQUENCE { + measAndMobParametersMRDC-XDD-Diff-v1560 MeasAndMobParametersMRDC-XDD-Diff-v1560 OPTIONAL +} + +MeasAndMobParametersMRDC-v1610 ::= SEQUENCE { + measAndMobParametersMRDC-Common-v1610 MeasAndMobParametersMRDC-Common-v1610 OPTIONAL, + interNR-MeasEUTRA-IAB-r16 ENUMERATED {supported} OPTIONAL +} + +MeasAndMobParametersMRDC-v1700 ::= SEQUENCE { + measAndMobParametersMRDC-Common-v1700 MeasAndMobParametersMRDC-Common-v1700 OPTIONAL +} + +MeasAndMobParametersMRDC-v1730 ::= SEQUENCE { + measAndMobParametersMRDC-Common-v1730 MeasAndMobParametersMRDC-Common-v1730 OPTIONAL +} + +MeasAndMobParametersMRDC-Common ::= SEQUENCE { + independentGapConfig ENUMERATED {supported} OPTIONAL +} + +MeasAndMobParametersMRDC-Common-v1610 ::= SEQUENCE { + condPSCellChangeParametersCommon-r16 SEQUENCE { + condPSCellChangeFDD-TDD-r16 ENUMERATED {supported} OPTIONAL, + condPSCellChangeFR1-FR2-r16 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + pscellT312-r16 ENUMERATED {supported} OPTIONAL +} + +MeasAndMobParametersMRDC-Common-v1700 ::= SEQUENCE { + condPSCellChangeParameters-r17 SEQUENCE { + inter-SN-condPSCellChangeFDD-TDD-NRDC-r17 ENUMERATED {supported} OPTIONAL, + inter-SN-condPSCellChangeFR1-FR2-NRDC-r17 ENUMERATED {supported} OPTIONAL, + inter-SN-condPSCellChangeFDD-TDD-ENDC-r17 ENUMERATED {supported} OPTIONAL, + inter-SN-condPSCellChangeFR1-FR2-ENDC-r17 ENUMERATED {supported} OPTIONAL, + mn-InitiatedCondPSCellChange-FR1FDD-ENDC-r17 ENUMERATED {supported} OPTIONAL, + mn-InitiatedCondPSCellChange-FR1TDD-ENDC-r17 ENUMERATED {supported} OPTIONAL, + mn-InitiatedCondPSCellChange-FR2TDD-ENDC-r17 ENUMERATED {supported} OPTIONAL, + sn-InitiatedCondPSCellChange-FR1FDD-ENDC-r17 ENUMERATED {supported} OPTIONAL, + sn-InitiatedCondPSCellChange-FR1TDD-ENDC-r17 ENUMERATED {supported} OPTIONAL, + sn-InitiatedCondPSCellChange-FR2TDD-ENDC-r17 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + condHandoverWithSCG-ENDC-r17 ENUMERATED {supported} OPTIONAL, + condHandoverWithSCG-NEDC-r17 ENUMERATED {supported} OPTIONAL +} + +MeasAndMobParametersMRDC-Common-v1730 ::= SEQUENCE { + independentGapConfig-maxCC-r17 SEQUENCE { + fr1-Only-r17 INTEGER (1..32) OPTIONAL, + fr2-Only-r17 INTEGER (1..32) OPTIONAL, + fr1-AndFR2-r17 INTEGER (1..32) OPTIONAL + } +} + +MeasAndMobParametersMRDC-XDD-Diff ::= SEQUENCE { + sftd-MeasPSCell ENUMERATED {supported} OPTIONAL, + sftd-MeasNR-Cell ENUMERATED {supported} OPTIONAL +} + +MeasAndMobParametersMRDC-XDD-Diff-v1560 ::= SEQUENCE { + sftd-MeasPSCell-NEDC ENUMERATED {supported} OPTIONAL +} + +MeasAndMobParametersMRDC-FRX-Diff ::= SEQUENCE { + simultaneousRxDataSSB-DiffNumerology ENUMERATED {supported} OPTIONAL +} + +-- TAG-MEASANDMOBPARAMETERSMRDC-STOP +-- TAG-MIMO-LAYERS-START + +MIMO-LayersDL ::= ENUMERATED {twoLayers, fourLayers, eightLayers} + +MIMO-LayersUL ::= ENUMERATED {oneLayer, twoLayers, fourLayers} + +-- TAG-MIMO-LAYERS-STOP +-- TAG-MIMO-PARAMETERSPERBAND-START + +MIMO-ParametersPerBand ::= SEQUENCE { + tci-StatePDSCH SEQUENCE { + maxNumberConfiguredTCI-StatesPerCC ENUMERATED {n4, n8, n16, n32, n64, n128} OPTIONAL, + maxNumberActiveTCI-PerBWP ENUMERATED {n1, n2, n4, n8} OPTIONAL + } OPTIONAL, + additionalActiveTCI-StatePDCCH ENUMERATED {supported} OPTIONAL, + pusch-TransCoherence ENUMERATED {nonCoherent, partialCoherent, fullCoherent} OPTIONAL, + beamCorrespondenceWithoutUL-BeamSweeping ENUMERATED {supported} OPTIONAL, + periodicBeamReport ENUMERATED {supported} OPTIONAL, + aperiodicBeamReport ENUMERATED {supported} OPTIONAL, + sp-BeamReportPUCCH ENUMERATED {supported} OPTIONAL, + sp-BeamReportPUSCH ENUMERATED {supported} OPTIONAL, + dummy1 DummyG OPTIONAL, + maxNumberRxBeam INTEGER (2..8) OPTIONAL, + maxNumberRxTxBeamSwitchDL SEQUENCE { + scs-15kHz ENUMERATED {n4, n7, n14} OPTIONAL, + scs-30kHz ENUMERATED {n4, n7, n14} OPTIONAL, + scs-60kHz ENUMERATED {n4, n7, n14} OPTIONAL, + scs-120kHz ENUMERATED {n4, n7, n14} OPTIONAL, + scs-240kHz ENUMERATED {n4, n7, n14} OPTIONAL + } OPTIONAL, + maxNumberNonGroupBeamReporting ENUMERATED {n1, n2, n4} OPTIONAL, + groupBeamReporting ENUMERATED {supported} OPTIONAL, + uplinkBeamManagement SEQUENCE { + maxNumberSRS-ResourcePerSet-BM ENUMERATED {n2, n4, n8, n16}, + maxNumberSRS-ResourceSet INTEGER (1..8) + } OPTIONAL, + maxNumberCSI-RS-BFD INTEGER (1..64) OPTIONAL, + maxNumberSSB-BFD INTEGER (1..64) OPTIONAL, + maxNumberCSI-RS-SSB-CBD INTEGER (1..256) OPTIONAL, + dummy2 ENUMERATED {supported} OPTIONAL, + twoPortsPTRS-UL ENUMERATED {supported} OPTIONAL, + dummy5 SRS-Resources OPTIONAL, + dummy3 INTEGER (1..4) OPTIONAL, + beamReportTiming SEQUENCE { + scs-15kHz ENUMERATED {sym2, sym4, sym8} OPTIONAL, + scs-30kHz ENUMERATED {sym4, sym8, sym14, sym28} OPTIONAL, + scs-60kHz ENUMERATED {sym8, sym14, sym28} OPTIONAL, + scs-120kHz ENUMERATED {sym14, sym28, sym56} OPTIONAL + } OPTIONAL, + ptrs-DensityRecommendationSetDL SEQUENCE { + scs-15kHz PTRS-DensityRecommendationDL OPTIONAL, + scs-30kHz PTRS-DensityRecommendationDL OPTIONAL, + scs-60kHz PTRS-DensityRecommendationDL OPTIONAL, + scs-120kHz PTRS-DensityRecommendationDL OPTIONAL + } OPTIONAL, + ptrs-DensityRecommendationSetUL SEQUENCE { + scs-15kHz PTRS-DensityRecommendationUL OPTIONAL, + scs-30kHz PTRS-DensityRecommendationUL OPTIONAL, + scs-60kHz PTRS-DensityRecommendationUL OPTIONAL, + scs-120kHz PTRS-DensityRecommendationUL OPTIONAL + } OPTIONAL, + dummy4 DummyH OPTIONAL, + aperiodicTRS ENUMERATED {supported} OPTIONAL, + ..., + [[ + dummy6 ENUMERATED {true} OPTIONAL, + beamManagementSSB-CSI-RS BeamManagementSSB-CSI-RS OPTIONAL, + beamSwitchTiming SEQUENCE { + scs-60kHz ENUMERATED {sym14, sym28, sym48, sym224, sym336} OPTIONAL, + scs-120kHz ENUMERATED {sym14, sym28, sym48, sym224, sym336} OPTIONAL + } OPTIONAL, + codebookParameters CodebookParameters OPTIONAL, + csi-RS-IM-ReceptionForFeedback CSI-RS-IM-ReceptionForFeedback OPTIONAL, + csi-RS-ProcFrameworkForSRS CSI-RS-ProcFrameworkForSRS OPTIONAL, + csi-ReportFramework CSI-ReportFramework OPTIONAL, + csi-RS-ForTracking CSI-RS-ForTracking OPTIONAL, + srs-AssocCSI-RS SEQUENCE (SIZE (1.. maxNrofCSI-RS-Resources)) OF SupportedCSI-RS-Resource OPTIONAL, + spatialRelations SpatialRelations OPTIONAL + ]], + [[ + -- R1 16-2b-0: Support of default QCL assumption with two TCI states + defaultQCL-TwoTCI-r16 ENUMERATED {supported} OPTIONAL, + codebookParametersPerBand-r16 CodebookParameters-v1610 OPTIONAL, + -- R1 16-1b-3: Support of PUCCH resource groups per BWP for simultaneous spatial relation update + simul-SpatialRelationUpdatePUCCHResGroup-r16 ENUMERATED {supported} OPTIONAL, + + -- R1 16-1f: Maximum number of SCells configured for SCell beam failure recovery simultaneously + maxNumberSCellBFR-r16 ENUMERATED {n1,n2,n4,n8} OPTIONAL, + + -- R1 16-2c: Supports simultaneous reception with different Type-D for FR2 only + simultaneousReceptionDiffTypeD-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-1a-1: SSB/CSI-RS for L1-SINR measurement + ssb-csirs-SINR-measurement-r16 SEQUENCE { + maxNumberSSB-CSIRS-OneTx-CMR-r16 ENUMERATED {n8, n16, n32, n64}, + maxNumberCSI-IM-NZP-IMR-res-r16 ENUMERATED {n8, n16, n32, n64}, + maxNumberCSIRS-2Tx-res-r16 ENUMERATED {n0, n4, n8, n16, n32, n64}, + maxNumberSSB-CSIRS-res-r16 ENUMERATED {n8, n16, n32, n64, n128}, + maxNumberCSI-IM-NZP-IMR-res-mem-r16 ENUMERATED {n8, n16, n32, n64, n128}, + supportedCSI-RS-Density-CMR-r16 ENUMERATED {one, three, oneAndThree}, + maxNumberAperiodicCSI-RS-Res-r16 ENUMERATED {n2, n4, n8, n16, n32, n64}, + supportedSINR-meas-r16 ENUMERATED {ssbWithCSI-IM, ssbWithNZP-IMR, csirsWithNZP-IMR, csi-RSWithoutIMR} OPTIONAL + } OPTIONAL, + -- R1 16-1a-2: Non-group based L1-SINR reporting + nonGroupSINR-reporting-r16 ENUMERATED {n1, n2, n4} OPTIONAL, + -- R1 16-1a-3: Non-group based L1-SINR reporting + groupSINR-reporting-r16 ENUMERATED {supported} OPTIONAL, + + multiDCI-multiTRP-Parameters-r16 SEQUENCE { + -- R1 16-2a-0: Overlapping PDSCHs in time and fully overlapping in frequency and time + overlapPDSCHsFullyFreqTime-r16 INTEGER (1..2) OPTIONAL, + -- R1 16-2a-1: Overlapping PDSCHs in time and partially overlapping in frequency and time + overlapPDSCHsInTimePartiallyFreq-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-2a-2: Out of order operation for DL + outOfOrderOperationDL-r16 SEQUENCE { + supportPDCCH-ToPDSCH-r16 ENUMERATED {supported} OPTIONAL, + supportPDSCH-ToHARQ-ACK-r16 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + -- R1 16-2a-3: Out of order operation for UL + outOfOrderOperationUL-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-2a-5: Separate CRS rate matching + separateCRS-RateMatching-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-2a-6: Default QCL enhancement for multi-DCI based multi-TRP + defaultQCL-PerCORESETPoolIndex-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-2a-7: Maximum number of activated TCI states + maxNumberActivatedTCI-States-r16 SEQUENCE { + maxNumberPerCORESET-Pool-r16 ENUMERATED {n1, n2, n4, n8}, + maxTotalNumberAcrossCORESET-Pool-r16 ENUMERATED {n2, n4, n8, n16} + } OPTIONAL + } OPTIONAL, + singleDCI-SDM-scheme-Parameters-r16 SEQUENCE { + -- R1 16-2b-1b: Single-DCI based SDM scheme - Support of new DMRS port entry + supportNewDMRS-Port-r16 ENUMERATED {supported1, supported2, supported3} OPTIONAL, + -- R1 16-2b-1a: Support of s-port DL PTRS + supportTwoPortDL-PTRS-r16 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + -- R1 16-2b-2: Support of single-DCI based FDMSchemeA + supportFDM-SchemeA-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-2b-3a: Single-DCI based FDMSchemeB CW soft combining + supportCodeWordSoftCombining-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-2b-4: Single-DCI based TDMSchemeA + supportTDM-SchemeA-r16 ENUMERATED {kb3, kb5, kb10, kb20, noRestriction} OPTIONAL, + -- R1 16-2b-5: Single-DCI based inter-slot TDM + supportInter-slotTDM-r16 SEQUENCE { + supportRepNumPDSCH-TDRA-r16 ENUMERATED {n2, n3, n4, n5, n6, n7, n8, n16}, + maxTBS-Size-r16 ENUMERATED {kb3, kb5, kb10, kb20, noRestriction}, + maxNumberTCI-states-r16 INTEGER (1..2) + } OPTIONAL, + -- R1 16-4: Low PAPR DMRS for PDSCH + lowPAPR-DMRS-PDSCH-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-6a: Low PAPR DMRS for PUSCH without transform precoding + lowPAPR-DMRS-PUSCHwithoutPrecoding-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-6b: Low PAPR DMRS for PUCCH + lowPAPR-DMRS-PUCCH-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-6c: Low PAPR DMRS for PUSCH with transform precoding & pi/2 BPSK + lowPAPR-DMRS-PUSCHwithPrecoding-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-7: Extension of the maximum number of configured aperiodic CSI report settings + csi-ReportFrameworkExt-r16 CSI-ReportFrameworkExt-r16 OPTIONAL, + -- R1 16-3a, 16-3a-1, 16-3b, 16-3b-1, 16-8: Individual new codebook types + codebookParametersAddition-r16 CodebookParametersAddition-r16 OPTIONAL, + -- R1 16-8: Mixed codebook types + codebookComboParametersAddition-r16 CodebookComboParametersAddition-r16 OPTIONAL, + -- R4 8-2: SSB based beam correspondence + beamCorrespondenceSSB-based-r16 ENUMERATED {supported} OPTIONAL, + -- R4 8-3: CSI-RS based beam correspondence + beamCorrespondenceCSI-RS-based-r16 ENUMERATED {supported} OPTIONAL, + beamSwitchTiming-r16 SEQUENCE { + scs-60kHz-r16 ENUMERATED {sym224, sym336} OPTIONAL, + scs-120kHz-r16 ENUMERATED {sym224, sym336} OPTIONAL + } OPTIONAL + ]], + [[ + -- R1 16-1a-4: Semi-persistent L1-SINR report on PUCCH + semi-PersistentL1-SINR-Report-PUCCH-r16 SEQUENCE { + supportReportFormat1-2OFDM-syms-r16 ENUMERATED {supported} OPTIONAL, + supportReportFormat4-14OFDM-syms-r16 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + -- R1 16-1a-5: Semi-persistent L1-SINR report on PUSCH + semi-PersistentL1-SINR-Report-PUSCH-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + -- R1 16-1h: Support of 64 configured PUCCH spatial relations + spatialRelations-v1640 SEQUENCE { + maxNumberConfiguredSpatialRelations-v1640 ENUMERATED {n96, n128, n160, n192, n224, n256, n288, n320} + } OPTIONAL, + -- R1 16-1i: Support of 64 configured candidate beam RSs for BFR + support64CandidateBeamRS-BFR-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + -- R1 16-2a-9: Interpretation of maxNumberMIMO-LayersPDSCH for multi-DCI based mTRP + maxMIMO-LayersForMulti-DCI-mTRP-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + supportedSINR-meas-v1670 BIT STRING (SIZE (4)) OPTIONAL + ]], + [[ + -- R1 23-8-5 Increased repetition for SRS + srs-increasedRepetition-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-8-6 Partial frequency sounding of SRS + srs-partialFrequencySounding-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-8-7 Start RB location hopping for partial frequency SRS + srs-startRB-locationHoppingPartial-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-8-8 Comb-8 SRS + srs-combEight-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-9-1 Basic Features of Further Enhanced Port-Selection Type II Codebook (FeType-II) per band information + codebookParametersfetype2-r17 CodebookParametersfetype2-r17 OPTIONAL, + -- R1 23-3-1-2a Two associated CSI-RS resources + mTRP-PUSCH-twoCSI-RS-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-3-2 Multi-TRP PUCCH repetition scheme 1 (inter-slot) + mTRP-PUCCH-InterSlot-r17 ENUMERATED {pf0-2, pf1-3-4, pf0-4} OPTIONAL, + -- R1 23-3-2b Cyclic mapping for multi-TRP PUCCH repetition + mTRP-PUCCH-CyclicMapping-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-3-2c Second TPC field for multi-TRP PUCCH repetition + mTRP-PUCCH-SecondTPC-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-5-2 MTRP BFR based on two BFD-RS set + mTRP-BFR-twoBFD-RS-Set-r17 SEQUENCE { + maxBFD-RS-resourcesPerSetPerBWP-r17 ENUMERATED {n1, n2}, + maxBFR-r17 INTEGER (1..9), + maxBFD-RS-resourcesAcrossSetsPerBWP-r17 ENUMERATED {n2, n3, n4} + } OPTIONAL, + -- R1 23-5-2a PUCCH-SR resources for MTRP BFRQ - Max number of PUCCH-SR resources for MTRP BFRQ per cell group + mTRP-BFR-PUCCH-SR-perCG-r17 ENUMERATED{n1, n2} OPTIONAL, + -- R1 23-5-2b Association between a BFD-RS resource set on SpCell and a PUCCH SR resource + mTRP-BFR-association-PUCCH-SR-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-6-3 Simultaneous activation of two TCI states for PDCCH across multiple CCs (HST/URLLC) + sfn-SimulTwoTCI-AcrossMultiCC-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-6-4 Default DL beam setup for SFN + sfn-DefaultDL-BeamSetup-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-6-4a Default UL beam setup for SFN PDCCH(FR2 only) + sfn-DefaultUL-BeamSetup-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-8-1 SRS triggering offset enhancement + srs-TriggeringOffset-r17 ENUMERATED {n1, n2, n4} OPTIONAL, + -- R1 23-8-2 Triggering SRS only in DCI 0_1/0_2 + srs-TriggeringDCI-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-9-5 Active CSI-RS resources and ports for mixed codebook types in any slot per band information + codebookComboParameterMixedType-r17 CodebookComboParameterMixedType-r17 OPTIONAL, + -- R1 23-1-1 Unified TCI [with joint DL/UL TCI update] for intra-cell beam management + unifiedJointTCI-r17 SEQUENCE{ + maxConfiguredJointTCI-r17 ENUMERATED {n8, n12, n16, n24, n32, n48, n64, n128}, + maxActivatedTCIAcrossCC-r17 ENUMERATED {n1, n2, n4, n8, n16} + } OPTIONAL, + -- R1 23-1-1b Unified TCI with joint DL/UL TCI update for intra- and inter-cell beam management with more than one MAC-CE + unifiedJointTCI-multiMAC-CE-r17 SEQUENCE{ + minBeamApplicationTime-r17 ENUMERATED {n1, n2, n4, n7, n14, n28, n42, n56, n70, n84, n98, n112, n224, n336} + OPTIONAL, + maxNumMAC-CE-PerCC ENUMERATED {n2, n3, n4, n5, n6, n7, n8} + } OPTIONAL, + -- R1 23-1-1d Per BWP TCI state pool configuration for CA mode + unifiedJointTCI-perBWP-CA-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-1-1e TCI state pool configuration with TCI pool sharing for CA mode + unifiedJointTCI-ListSharingCA-r17 ENUMERATED {n1,n2,n4,n8} OPTIONAL, + -- R1 23-1-1f Common multi-CC TCI state ID update and activation + unifiedJointTCI-commonMultiCC-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-1-1g Beam misalignment between the DL source RS in the TCI state + unifiedJointTCI-BeamAlignDLRS-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-1-1h Association between TCI state and UL PC settings for PUCCH, PUSCH, and SRS + unifiedJointTCI-PC-association-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-1-1i Indication/configuration of R17 TCI states for aperiodic CSI-RS, PDCCH, PDSCH + unifiedJointTCI-Legacy-r17 ENUMERATED {supported} OPTIONAL, + -- 23-1-1m Indication/configuration of R17 TCI states for SRS + unifiedJointTCI-Legacy-SRS-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-1-1j Indication/configuration of R17 TCI states for CORESET #0 + unifiedJointTCI-Legacy-CORESET0-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-1-1c SCell BFR with unified TCI framework (NOTE; pre-requisite is empty) + unifiedJointTCI-SCellBFR-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-1-1a Unified TCI with joint DL/UL TCI update for inter-cell beam management + unifiedJointTCI-InterCell-r17 SEQUENCE{ + additionalMAC-CE-PerCC-r17 ENUMERATED {n0, n1, n2, n4}, + additionalMAC-CE-AcrossCC-r17 ENUMERATED {n0, n1, n2, n4} + } OPTIONAL, + -- R1 23-10-1 Unified TCI with separate DL/UL TCI update for intra-cell beam management + unifiedSeparateTCI-r17 SEQUENCE{ + maxConfiguredDL-TCI-r17 ENUMERATED {n4, n8, n12, n16, n24, n32, n48, n64, n128}, + maxConfiguredUL-TCI-r17 ENUMERATED {n4, n8, n12, n16, n24, n32, n48, n64}, + maxActivatedDL-TCIAcrossCC-r17 ENUMERATED {n1, n2, n4, n8, n16}, + maxActivatedUL-TCIAcrossCC-r17 ENUMERATED {n1, n2, n4, n8, n16} + } OPTIONAL, + -- R1 23-10-1b Unified TCI with separate DL/UL TCI update for intra-cell beam management with more than one MAC-CE + unifiedSeparateTCI-multiMAC-CE-r17 SEQUENCE{ + minBeamApplicationTime-r17 ENUMERATED {n1, n2, n4, n7, n14, n28, n42, n56, n70, n84, n98, n112, n224, n336}, + maxActivatedDL-TCIPerCC-r17 INTEGER (2..8), + maxActivatedUL-TCIPerCC-r17 INTEGER (2..8) + } OPTIONAL, + -- R1 23-10-1d Per BWP DL/UL-TCI state pool configuration for CA mode + unifiedSeparateTCI-perBWP-CA-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-10-1e TCI state pool configuration with DL/UL-TCI pool sharing for CA mode + unifiedSeparateTCI-ListSharingCA-r17 SEQUENCE { + maxNumListDL-TCI-r17 ENUMERATED {n1,n2,n4,n8} OPTIONAL, + maxNumListUL-TCI-r17 ENUMERATED {n1,n2,n4,n8} OPTIONAL + } OPTIONAL, + -- R1 23-10-1f Common multi-CC DL/UL-TCI state ID update and activation with separate DL/UL TCI update + unifiedSeparateTCI-commonMultiCC-r17 ENUMERATED {supported} OPTIONAL, + -- 23-10-1m Unified TCI with separate DL/UL TCI update for inter-cell beam management with more than one MAC-CE + unifiedSeparateTCI-InterCell-r17 SEQUENCE { + k-DL-PerCC-r17 ENUMERATED {n0, n1, n2, n4}, + k-UL-PerCC-r17 ENUMERATED {n0, n1, n2, n4}, + k-DL-AcrossCC-r17 ENUMERATED {n0, n1, n2, n4}, + k-UL-AcrossCC-r17 ENUMERATED {n0, n1, n2, n4} + } OPTIONAL, + -- R1 23-1-2 Inter-cell beam measurement and reporting (for inter-cell BM and mTRP) + unifiedJointTCI-mTRP-InterCell-BM-r17 SEQUENCE { + maxNumAdditionalPCI-L1-RSRP-r17 INTEGER (1..7), + maxNumSSB-ResourceL1-RSRP-AcrossCC-r17 ENUMERATED {n1,n2,n4,n8} + } OPTIONAL, + -- R1 23-1-3 MPE mitigation + mpe-Mitigation-r17 SEQUENCE { + maxNumP-MPR-RI-pairs-r17 INTEGER (1..4), + maxNumConfRS-r17 ENUMERATED {n1, n2, n4, n8, n12, n16, n28, n32, n48, n64} + } OPTIONAL, + -- R1 23-1-4 UE capability value reporting + srs-PortReport-r17 SEQUENCE { + capVal1-r17 ENUMERATED {n1, n2, n4} OPTIONAL, + capVal2-r17 ENUMERATED {n1, n2, n4} OPTIONAL, + capVal3-r17 ENUMERATED {n1, n2, n4} OPTIONAL, + capVal4-r17 ENUMERATED {n1, n2, n4} OPTIONAL + } OPTIONAL, + -- R1 23-2-1a Monitoring of individual candidates + mTRP-PDCCH-individual-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-2-1b PDCCH repetition with PDCCH monitoring on any span of up to 3 consecutive OFDM symbols of a slot + mTRP-PDCCH-anySpan-3Symbols-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-2-2 Two QCL TypeD for CORESET monitoring in PDCCH repetition + mTRP-PDCCH-TwoQCL-TypeD-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-3-1-2b CSI-RS processing framework for SRS with two associated CSI-RS resources + mTRP-PUSCH-CSI-RS-r17 SEQUENCE { + maxNumPeriodicSRS-r17 INTEGER (1..8), + maxNumAperiodicSRS-r17 INTEGER (1..8), + maxNumSP-SRS-r17 INTEGER (0..8), + numSRS-ResourcePerCC-r17 INTEGER (1..16), + numSRS-ResourceNonCodebook-r17 INTEGER (1..2) + } OPTIONAL, + -- R1 23-3-1a Cyclic mapping for Multi-TRP PUSCH repetition + mTRP-PUSCH-cyclicMapping-r17 ENUMERATED {typeA,typeB,both} OPTIONAL, + -- R1 23-3-1b Second TPC field for Multi-TRP PUSCH repetition + mTRP-PUSCH-secondTPC-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-3-1c Two PHR reporting + mTRP-PUSCH-twoPHR-Reporting-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-3-1e A-CSI report + mTRP-PUSCH-A-CSI-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-3-1f SP-CSI report + mTRP-PUSCH-SP-CSI-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-3-1g CG PUSCH transmission + mTRP-PUSCH-CG-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-3-2d Updating two Spatial relation or two sets of power control parameters for PUCCH group + mTRP-PUCCH-MAC-CE-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-3-2e Maximum number of power control parameter sets configured for multi-TRP PUCCH repetition in FR1 + mTRP-PUCCH-maxNum-PC-FR1-r17 INTEGER (3..8) OPTIONAL, + -- R1 23-4 IntCell-mTRP + mTRP-inter-Cell-r17 SEQUENCE { + maxNumAdditionalPCI-Case1-r17 INTEGER (1..7), + maxNumAdditionalPCI-Case2-r17 INTEGER (0..7) + } OPTIONAL, + -- R1 23-5-1 Group based L1-RSRP reporting enhancements + mTRP-GroupBasedL1-RSRP-r17 SEQUENCE { + maxNumBeamGroups-r17 INTEGER (1..4), + maxNumRS-WithinSlot-r17 ENUMERATED {n2,n3,n4,n8,n16,n32,n64}, + maxNumRS-AcrossSlot-r17 ENUMERATED {n8, n16, n32, n64, n128} + } OPTIONAL, + -- R1 23-5-2c MAC-CE based update of explicit BFD-RS mTRP-PUCCH-IntraSlot-r17 => per band + mTRP-BFD-RS-MAC-CE-r17 ENUMERATED {n4, n8, n12, n16, n32, n48, n64 } OPTIONAL, + -- R1 23-7-1 Basic Features of CSI Enhancement for Multi-TRP + mTRP-CSI-EnhancementPerBand-r17 SEQUENCE { + maxNumNZP-CSI-RS-r17 INTEGER (2..8), + cSI-Report-mode-r17 ENUMERATED {mode1, mode2, both}, + supportedComboAcrossCCs-r17 SEQUENCE (SIZE (1..16)) OF CSI-MultiTRP-SupportedCombinations-r17, + codebookModeNCJT-r17 ENUMERATED{mode1,mode1And2} + } OPTIONAL, + -- R1 23-7-1b Active CSI-RS resources and ports in the presence of multi-TRP CSI + codebookComboParameterMultiTRP-r17 CodebookComboParameterMultiTRP-r17 OPTIONAL, + -- R1 23-7-1a Additional CSI report mode 1 + mTRP-CSI-additionalCSI-r17 ENUMERATED{x1,x2} OPTIONAL, + -- R1 23-7-4 Support of Nmax=2 for Multi-TRP CSI + mTRP-CSI-N-Max2-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-7-5 CMR sharing + mTRP-CSI-CMR-r17 ENUMERATED {supported} OPTIONAL, + -- R1 23-8-11 Partial frequency sounding of SRS for non-frequency hopping case + srs-partialFreqSounding-r17 ENUMERATED {supported} OPTIONAL, + -- R1-24 feature: Extend beamSwitchTiming for FR2-2 + beamSwitchTiming-v1710 SEQUENCE { + scs-480kHz ENUMERATED {sym56, sym112, sym192, sym896, sym1344} OPTIONAL, + scs-960kHz ENUMERATED {sym112, sym224, sym384, sym1792, sym2688} OPTIONAL + } OPTIONAL, + -- R1-24 feature: Extend beamSwitchTiming-r16 for FR2-2 + beamSwitchTiming-r17 SEQUENCE { + scs-480kHz-r17 ENUMERATED {sym896, sym1344} OPTIONAL, + scs-960kHz-r17 ENUMERATED {sym1792, sym2688} OPTIONAL + } OPTIONAL, + -- R1-24 feature: Extend beamReportTiming for FR2-2 + beamReportTiming-v1710 SEQUENCE { + scs-480kHz-r17 ENUMERATED {sym56, sym112, sym224} OPTIONAL, + scs-960kHz-r17 ENUMERATED {sym112, sym224, sym448} OPTIONAL + } OPTIONAL, + -- R1-24 feature: Extend maximum number of RX/TX beam switch DL for FR2-2 + maxNumberRxTxBeamSwitchDL-v1710 SEQUENCE { + scs-480kHz-r17 ENUMERATED {n2, n4, n7} OPTIONAL, + scs-960kHz-r17 ENUMERATED {n1, n2, n4, n7} OPTIONAL + } OPTIONAL + ]], + [[ + -- R1-23-1-4a: Semi-persistent/aperiodic capability value report + srs-PortReportSP-AP-r17 ENUMERATED {supported} OPTIONAL, + maxNumberRxBeam-v1720 INTEGER (9..12) OPTIONAL, + -- R1-23-6-5 Support implicit configuration of RS(s) with two TCI states for beam failure detection + sfn-ImplicitRS-twoTCI-r17 ENUMERATED {supported} OPTIONAL, + -- R1-23-6-6 QCL-TypeD collision handling with CORESET with 2 TCI states + sfn-QCL-TypeD-Collision-twoTCI-r17 ENUMERATED {supported} OPTIONAL, + -- R1-23-7-1c Basic Features of CSI Enhancement for Multi-TRP - number of CPUs + mTRP-CSI-numCPU-r17 ENUMERATED {n2, n3, n4} OPTIONAL + ]], + [[ + supportRepNumPDSCH-TDRA-DCI-1-2-r17 ENUMERATED {n2, n3, n4, n5, n6, n7, n8, n16} OPTIONAL + ]] +} + +DummyG ::= SEQUENCE { + maxNumberSSB-CSI-RS-ResourceOneTx ENUMERATED {n8, n16, n32, n64}, + maxNumberSSB-CSI-RS-ResourceTwoTx ENUMERATED {n0, n4, n8, n16, n32, n64}, + supportedCSI-RS-Density ENUMERATED {one, three, oneAndThree} +} + +BeamManagementSSB-CSI-RS ::= SEQUENCE { + maxNumberSSB-CSI-RS-ResourceOneTx ENUMERATED {n0, n8, n16, n32, n64}, + maxNumberCSI-RS-Resource ENUMERATED {n0, n4, n8, n16, n32, n64}, + maxNumberCSI-RS-ResourceTwoTx ENUMERATED {n0, n4, n8, n16, n32, n64}, + supportedCSI-RS-Density ENUMERATED {one, three, oneAndThree} OPTIONAL, + maxNumberAperiodicCSI-RS-Resource ENUMERATED {n0, n1, n4, n8, n16, n32, n64} +} + +DummyH ::= SEQUENCE { + burstLength INTEGER (1..2), + maxSimultaneousResourceSetsPerCC INTEGER (1..8), + maxConfiguredResourceSetsPerCC INTEGER (1..64), + maxConfiguredResourceSetsAllCC INTEGER (1..128) +} + +CSI-RS-ForTracking ::= SEQUENCE { + maxBurstLength INTEGER (1..2), + maxSimultaneousResourceSetsPerCC INTEGER (1..8), + maxConfiguredResourceSetsPerCC INTEGER (1..64), + maxConfiguredResourceSetsAllCC INTEGER (1..256) +} + +CSI-RS-IM-ReceptionForFeedback ::= SEQUENCE { + maxConfigNumberNZP-CSI-RS-PerCC INTEGER (1..64), + maxConfigNumberPortsAcrossNZP-CSI-RS-PerCC INTEGER (2..256), + maxConfigNumberCSI-IM-PerCC ENUMERATED {n1, n2, n4, n8, n16, n32}, + maxNumberSimultaneousNZP-CSI-RS-PerCC INTEGER (1..64), + totalNumberPortsSimultaneousNZP-CSI-RS-PerCC INTEGER (2..256) +} + +CSI-RS-ProcFrameworkForSRS ::= SEQUENCE { + maxNumberPeriodicSRS-AssocCSI-RS-PerBWP INTEGER (1..4), + maxNumberAperiodicSRS-AssocCSI-RS-PerBWP INTEGER (1..4), + maxNumberSP-SRS-AssocCSI-RS-PerBWP INTEGER (0..4), + simultaneousSRS-AssocCSI-RS-PerCC INTEGER (1..8) +} + +CSI-ReportFramework ::= SEQUENCE { + maxNumberPeriodicCSI-PerBWP-ForCSI-Report INTEGER (1..4), + maxNumberAperiodicCSI-PerBWP-ForCSI-Report INTEGER (1..4), + maxNumberSemiPersistentCSI-PerBWP-ForCSI-Report INTEGER (0..4), + maxNumberPeriodicCSI-PerBWP-ForBeamReport INTEGER (1..4), + maxNumberAperiodicCSI-PerBWP-ForBeamReport INTEGER (1..4), + maxNumberAperiodicCSI-triggeringStatePerCC ENUMERATED {n3, n7, n15, n31, n63, n128}, + maxNumberSemiPersistentCSI-PerBWP-ForBeamReport INTEGER (0..4), + simultaneousCSI-ReportsPerCC INTEGER (1..8) +} + +CSI-ReportFrameworkExt-r16 ::= SEQUENCE { + maxNumberAperiodicCSI-PerBWP-ForCSI-ReportExt-r16 INTEGER (5..8) +} + +PTRS-DensityRecommendationDL ::= SEQUENCE { + frequencyDensity1 INTEGER (1..276), + frequencyDensity2 INTEGER (1..276), + timeDensity1 INTEGER (0..29), + timeDensity2 INTEGER (0..29), + timeDensity3 INTEGER (0..29) +} + +PTRS-DensityRecommendationUL ::= SEQUENCE { + frequencyDensity1 INTEGER (1..276), + frequencyDensity2 INTEGER (1..276), + timeDensity1 INTEGER (0..29), + timeDensity2 INTEGER (0..29), + timeDensity3 INTEGER (0..29), + sampleDensity1 INTEGER (1..276), + sampleDensity2 INTEGER (1..276), + sampleDensity3 INTEGER (1..276), + sampleDensity4 INTEGER (1..276), + sampleDensity5 INTEGER (1..276) +} + +SpatialRelations ::= SEQUENCE { + maxNumberConfiguredSpatialRelations ENUMERATED {n4, n8, n16, n32, n64, n96}, + maxNumberActiveSpatialRelations ENUMERATED {n1, n2, n4, n8, n14}, + additionalActiveSpatialRelationPUCCH ENUMERATED {supported} OPTIONAL, + maxNumberDL-RS-QCL-TypeD ENUMERATED {n1, n2, n4, n8, n14} +} + +DummyI ::= SEQUENCE { + supportedSRS-TxPortSwitch ENUMERATED {t1r2, t1r4, t2r4, t1r4-t2r4, tr-equal}, + txSwitchImpactToRx ENUMERATED {true} OPTIONAL +} + +CSI-MultiTRP-SupportedCombinations-r17 ::= SEQUENCE { + maxNumTx-Ports-r17 ENUMERATED {n2, n4, n8, n12, n16, n24, n32}, + maxTotalNumCMR-r17 INTEGER (2..64), + maxTotalNumTx-PortsNZP-CSI-RS-r17 INTEGER (2..256) +} + +-- TAG-MIMO-PARAMETERSPERBAND-STOP +-- TAG-MODULATIONORDER-START + +ModulationOrder ::= ENUMERATED {bpsk-halfpi, bpsk, qpsk, qam16, qam64, qam256} + +-- TAG-MODULATIONORDER-STOP +-- TAG-MRDC-PARAMETERS-START + +MRDC-Parameters ::= SEQUENCE { + singleUL-Transmission ENUMERATED {supported} OPTIONAL, + dynamicPowerSharingENDC ENUMERATED {supported} OPTIONAL, + tdm-Pattern ENUMERATED {supported} OPTIONAL, + ul-SharingEUTRA-NR ENUMERATED {tdm, fdm, both} OPTIONAL, + ul-SwitchingTimeEUTRA-NR ENUMERATED {type1, type2} OPTIONAL, + simultaneousRxTxInterBandENDC ENUMERATED {supported} OPTIONAL, + asyncIntraBandENDC ENUMERATED {supported} OPTIONAL, + ..., + [[ + dualPA-Architecture ENUMERATED {supported} OPTIONAL, + intraBandENDC-Support ENUMERATED {non-contiguous, both} OPTIONAL, + ul-TimingAlignmentEUTRA-NR ENUMERATED {required} OPTIONAL + ]] +} + +MRDC-Parameters-v1580 ::= SEQUENCE { + dynamicPowerSharingNEDC ENUMERATED {supported} OPTIONAL +} + +MRDC-Parameters-v1590 ::= SEQUENCE { + interBandContiguousMRDC ENUMERATED {supported} OPTIONAL +} + +MRDC-Parameters-v15g0 ::= SEQUENCE { + simultaneousRxTxInterBandENDCPerBandPair SimultaneousRxTxPerBandPair OPTIONAL +} + +MRDC-Parameters-v1620 ::= SEQUENCE { + maxUplinkDutyCycle-interBandENDC-TDD-PC2-r16 SEQUENCE{ + eutra-TDD-Config0-r16 ENUMERATED {n20, n40, n50, n60, n70, n80, n90, n100} OPTIONAL, + eutra-TDD-Config1-r16 ENUMERATED {n20, n40, n50, n60, n70, n80, n90, n100} OPTIONAL, + eutra-TDD-Config2-r16 ENUMERATED {n20, n40, n50, n60, n70, n80, n90, n100} OPTIONAL, + eutra-TDD-Config3-r16 ENUMERATED {n20, n40, n50, n60, n70, n80, n90, n100} OPTIONAL, + eutra-TDD-Config4-r16 ENUMERATED {n20, n40, n50, n60, n70, n80, n90, n100} OPTIONAL, + eutra-TDD-Config5-r16 ENUMERATED {n20, n40, n50, n60, n70, n80, n90, n100} OPTIONAL, + eutra-TDD-Config6-r16 ENUMERATED {n20, n40, n50, n60, n70, n80, n90, n100} OPTIONAL + } OPTIONAL, + -- R1 18-2 Single UL TX operation for TDD PCell in EN-DC + tdm-restrictionTDD-endc-r16 ENUMERATED {supported} OPTIONAL, + -- R1 18-2a Single UL TX operation for FDD PCell in EN-DC + tdm-restrictionFDD-endc-r16 ENUMERATED {supported} OPTIONAL, + -- R1 18-2b Support of HARQ-offset for SUO case1 in EN-DC with LTE TDD PCell for type 1 UE + singleUL-HARQ-offsetTDD-PCell-r16 ENUMERATED {supported} OPTIONAL, + -- R1 18-3 Dual Tx transmission for EN-DC with FDD PCell(TDM pattern for dual Tx UE) + tdm-restrictionDualTX-FDD-endc-r16 ENUMERATED {supported} OPTIONAL +} + +MRDC-Parameters-v1630 ::= SEQUENCE { + -- R4 2-20 Maximum uplink duty cycle for FDD+TDD EN-DC power class 2 + maxUplinkDutyCycle-interBandENDC-FDD-TDD-PC2-r16 SEQUENCE { + maxUplinkDutyCycle-FDD-TDD-EN-DC1-r16 ENUMERATED {n30, n40, n50, n60, n70, n80, n90, n100} OPTIONAL, + maxUplinkDutyCycle-FDD-TDD-EN-DC2-r16 ENUMERATED {n30, n40, n50, n60, n70, n80, n90, n100} OPTIONAL + } OPTIONAL, + + -- R4 2-19 FDD-FDD or TDD-TDD inter-band MR-DC with overlapping or partially overlapping DL spectrum + interBandMRDC-WithOverlapDL-Bands-r16 ENUMERATED {supported} OPTIONAL +} + +MRDC-Parameters-v1700 ::= SEQUENCE { + condPSCellAdditionENDC-r17 ENUMERATED {supported} OPTIONAL, + scg-ActivationDeactivationENDC-r17 ENUMERATED {supported} OPTIONAL, + scg-ActivationDeactivationResumeENDC-r17 ENUMERATED {supported} OPTIONAL +} + +-- TAG-MRDC-PARAMETERS-STOP +-- TAG-NRDC-PARAMETERS-START + +NRDC-Parameters ::= SEQUENCE { + measAndMobParametersNRDC MeasAndMobParametersMRDC OPTIONAL, + generalParametersNRDC GeneralParametersMRDC-XDD-Diff OPTIONAL, + fdd-Add-UE-NRDC-Capabilities UE-MRDC-CapabilityAddXDD-Mode OPTIONAL, + tdd-Add-UE-NRDC-Capabilities UE-MRDC-CapabilityAddXDD-Mode OPTIONAL, + fr1-Add-UE-NRDC-Capabilities UE-MRDC-CapabilityAddFRX-Mode OPTIONAL, + fr2-Add-UE-NRDC-Capabilities UE-MRDC-CapabilityAddFRX-Mode OPTIONAL, + dummy2 OCTET STRING OPTIONAL, + dummy SEQUENCE {} OPTIONAL +} + +NRDC-Parameters-v1570 ::= SEQUENCE { + sfn-SyncNRDC ENUMERATED {supported} OPTIONAL +} + +NRDC-Parameters-v15c0 ::= SEQUENCE { + pdcp-DuplicationSplitSRB ENUMERATED {supported} OPTIONAL, + pdcp-DuplicationSplitDRB ENUMERATED {supported} OPTIONAL +} + +NRDC-Parameters-v1610 ::= SEQUENCE { + measAndMobParametersNRDC-v1610 MeasAndMobParametersMRDC-v1610 OPTIONAL +} + +NRDC-Parameters-v1700 ::= SEQUENCE { + f1c-OverNR-RRC-r17 ENUMERATED {supported} OPTIONAL, + measAndMobParametersNRDC-v1700 MeasAndMobParametersMRDC-v1700 +} + +-- TAG-NRDC-PARAMETERS-STOP +-- TAG-NTN-PARAMETERS-START + +NTN-Parameters-r17 ::= SEQUENCE { + inactiveStateNTN-r17 ENUMERATED {supported} OPTIONAL, + ra-SDT-NTN-r17 ENUMERATED {supported} OPTIONAL, + srb-SDT-NTN-r17 ENUMERATED {supported} OPTIONAL, + measAndMobParametersNTN-r17 MeasAndMobParameters OPTIONAL, + mac-ParametersNTN-r17 MAC-Parameters OPTIONAL, + phy-ParametersNTN-r17 Phy-Parameters OPTIONAL, + fdd-Add-UE-NR-CapabilitiesNTN-r17 UE-NR-CapabilityAddXDD-Mode OPTIONAL, + fr1-Add-UE-NR-CapabilitiesNTN-r17 UE-NR-CapabilityAddFRX-Mode OPTIONAL, + ue-BasedPerfMeas-ParametersNTN-r17 UE-BasedPerfMeas-Parameters-r16 OPTIONAL, + son-ParametersNTN-r17 SON-Parameters-r16 OPTIONAL +} + +-- TAG-NTN-PARAMETERS-STOP +-- TAG-OLPC-SRS-POS-START + +OLPC-SRS-Pos-r16 ::= SEQUENCE { + olpc-SRS-PosBasedOnPRS-Serving-r16 ENUMERATED {supported} OPTIONAL, + olpc-SRS-PosBasedOnSSB-Neigh-r16 ENUMERATED {supported} OPTIONAL, + olpc-SRS-PosBasedOnPRS-Neigh-r16 ENUMERATED {supported} OPTIONAL, + maxNumberPathLossEstimatePerServing-r16 ENUMERATED {n1, n4, n8, n16} OPTIONAL +} + +--TAG-OLPC-SRS-POS-STOP +-- TAG-PDCP-PARAMETERS-START + +PDCP-Parameters ::= SEQUENCE { + supportedROHC-Profiles SEQUENCE { + profile0x0000 BOOLEAN, + profile0x0001 BOOLEAN, + profile0x0002 BOOLEAN, + profile0x0003 BOOLEAN, + profile0x0004 BOOLEAN, + profile0x0006 BOOLEAN, + profile0x0101 BOOLEAN, + profile0x0102 BOOLEAN, + profile0x0103 BOOLEAN, + profile0x0104 BOOLEAN + }, + maxNumberROHC-ContextSessions ENUMERATED {cs2, cs4, cs8, cs12, cs16, cs24, cs32, cs48, cs64, + cs128, cs256, cs512, cs1024, cs16384, spare2, spare1}, + uplinkOnlyROHC-Profiles ENUMERATED {supported} OPTIONAL, + continueROHC-Context ENUMERATED {supported} OPTIONAL, + outOfOrderDelivery ENUMERATED {supported} OPTIONAL, + shortSN ENUMERATED {supported} OPTIONAL, + pdcp-DuplicationSRB ENUMERATED {supported} OPTIONAL, + pdcp-DuplicationMCG-OrSCG-DRB ENUMERATED {supported} OPTIONAL, + ..., + [[ + drb-IAB-r16 ENUMERATED {supported} OPTIONAL, + non-DRB-IAB-r16 ENUMERATED {supported} OPTIONAL, + extendedDiscardTimer-r16 ENUMERATED {supported} OPTIONAL, + continueEHC-Context-r16 ENUMERATED {supported} OPTIONAL, + ehc-r16 ENUMERATED {supported} OPTIONAL, + maxNumberEHC-Contexts-r16 ENUMERATED {cs2, cs4, cs8, cs16, cs32, cs64, cs128, cs256, cs512, + cs1024, cs2048, cs4096, cs8192, cs16384, cs32768, cs65536} OPTIONAL, + jointEHC-ROHC-Config-r16 ENUMERATED {supported} OPTIONAL, + pdcp-DuplicationMoreThanTwoRLC-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + longSN-RedCap-r17 ENUMERATED {supported} OPTIONAL, + udc-r17 SEQUENCE { + standardDictionary-r17 ENUMERATED {supported} OPTIONAL, + operatorDictionary-r17 SEQUENCE { + versionOfDictionary-r17 INTEGER (0..15), + associatedPLMN-ID-r17 PLMN-Identity + } OPTIONAL, + continueUDC-r17 ENUMERATED {supported} OPTIONAL, + supportOfBufferSize-r17 ENUMERATED {kbyte4, kbyte8} OPTIONAL + } OPTIONAL + ]] +} + +-- TAG-PDCP-PARAMETERS-STOP +-- TAG-PDCP-PARAMETERSMRDC-START + +PDCP-ParametersMRDC ::= SEQUENCE { + pdcp-DuplicationSplitSRB ENUMERATED {supported} OPTIONAL, + pdcp-DuplicationSplitDRB ENUMERATED {supported} OPTIONAL +} + +PDCP-ParametersMRDC-v1610 ::= SEQUENCE { + scg-DRB-NR-IAB-r16 ENUMERATED {supported} OPTIONAL +} + +-- TAG-PDCP-PARAMETERSMRDC-STOP +-- TAG-PHY-PARAMETERS-START + +Phy-Parameters ::= SEQUENCE { + phy-ParametersCommon Phy-ParametersCommon OPTIONAL, + phy-ParametersXDD-Diff Phy-ParametersXDD-Diff OPTIONAL, + phy-ParametersFRX-Diff Phy-ParametersFRX-Diff OPTIONAL, + phy-ParametersFR1 Phy-ParametersFR1 OPTIONAL, + phy-ParametersFR2 Phy-ParametersFR2 OPTIONAL +} + +Phy-Parameters-v16a0 ::= SEQUENCE { + phy-ParametersCommon-v16a0 Phy-ParametersCommon-v16a0 OPTIONAL +} + +Phy-ParametersCommon ::= SEQUENCE { + csi-RS-CFRA-ForHO ENUMERATED {supported} OPTIONAL, + dynamicPRB-BundlingDL ENUMERATED {supported} OPTIONAL, + sp-CSI-ReportPUCCH ENUMERATED {supported} OPTIONAL, + sp-CSI-ReportPUSCH ENUMERATED {supported} OPTIONAL, + nzp-CSI-RS-IntefMgmt ENUMERATED {supported} OPTIONAL, + type2-SP-CSI-Feedback-LongPUCCH ENUMERATED {supported} OPTIONAL, + precoderGranularityCORESET ENUMERATED {supported} OPTIONAL, + dynamicHARQ-ACK-Codebook ENUMERATED {supported} OPTIONAL, + semiStaticHARQ-ACK-Codebook ENUMERATED {supported} OPTIONAL, + spatialBundlingHARQ-ACK ENUMERATED {supported} OPTIONAL, + dynamicBetaOffsetInd-HARQ-ACK-CSI ENUMERATED {supported} OPTIONAL, + pucch-Repetition-F1-3-4 ENUMERATED {supported} OPTIONAL, + ra-Type0-PUSCH ENUMERATED {supported} OPTIONAL, + dynamicSwitchRA-Type0-1-PDSCH ENUMERATED {supported} OPTIONAL, + dynamicSwitchRA-Type0-1-PUSCH ENUMERATED {supported} OPTIONAL, + pdsch-MappingTypeA ENUMERATED {supported} OPTIONAL, + pdsch-MappingTypeB ENUMERATED {supported} OPTIONAL, + interleavingVRB-ToPRB-PDSCH ENUMERATED {supported} OPTIONAL, + interSlotFreqHopping-PUSCH ENUMERATED {supported} OPTIONAL, + type1-PUSCH-RepetitionMultiSlots ENUMERATED {supported} OPTIONAL, + type2-PUSCH-RepetitionMultiSlots ENUMERATED {supported} OPTIONAL, + pusch-RepetitionMultiSlots ENUMERATED {supported} OPTIONAL, + pdsch-RepetitionMultiSlots ENUMERATED {supported} OPTIONAL, + downlinkSPS ENUMERATED {supported} OPTIONAL, + configuredUL-GrantType1 ENUMERATED {supported} OPTIONAL, + configuredUL-GrantType2 ENUMERATED {supported} OPTIONAL, + pre-EmptIndication-DL ENUMERATED {supported} OPTIONAL, + cbg-TransIndication-DL ENUMERATED {supported} OPTIONAL, + cbg-TransIndication-UL ENUMERATED {supported} OPTIONAL, + cbg-FlushIndication-DL ENUMERATED {supported} OPTIONAL, + dynamicHARQ-ACK-CodeB-CBG-Retx-DL ENUMERATED {supported} OPTIONAL, + rateMatchingResrcSetSemi-Static ENUMERATED {supported} OPTIONAL, + rateMatchingResrcSetDynamic ENUMERATED {supported} OPTIONAL, + bwp-SwitchingDelay ENUMERATED {type1, type2} OPTIONAL, + ..., + [[ + dummy ENUMERATED {supported} OPTIONAL + ]], + [[ + maxNumberSearchSpaces ENUMERATED {n10} OPTIONAL, + rateMatchingCtrlResrcSetDynamic ENUMERATED {supported} OPTIONAL, + maxLayersMIMO-Indication ENUMERATED {supported} OPTIONAL + ]], + [[ + spCellPlacement CarrierAggregationVariant OPTIONAL + ]], + [[ + -- R1 9-1: Basic channel structure and procedure of 2-step RACH + twoStepRACH-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-1: Monitoring DCI format 1_2 and DCI format 0_2 + dci-Format1-2And0-2-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-1a: Monitoring both DCI format 0_1/1_1 and DCI format 0_2/1_2 in the same search space + monitoringDCI-SameSearchSpace-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-10: Type 2 configured grant release by DCI format 0_1 + type2-CG-ReleaseDCI-0-1-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-11: Type 2 configured grant release by DCI format 0_2 + type2-CG-ReleaseDCI-0-2-r16 ENUMERATED {supported} OPTIONAL, + -- R1 12-3: SPS release by DCI format 1_1 + sps-ReleaseDCI-1-1-r16 ENUMERATED {supported} OPTIONAL, + -- R1 12-3a: SPS release by DCI format 1_2 + sps-ReleaseDCI-1-2-r16 ENUMERATED {supported} OPTIONAL, + -- R1 14-8: CSI trigger states containing non-active BWP + csi-TriggerStateNon-ActiveBWP-r16 ENUMERATED {supported} OPTIONAL, + -- R1 20-2: Support up to 4 SMTCs configured for an IAB node MT per frequency location, including IAB-specific SMTC window periodicities + separateSMTC-InterIAB-Support-r16 ENUMERATED {supported} OPTIONAL, + -- R1 20-3: Support RACH configuration separately from the RACH configuration for UE access, including new IAB-specific offset and scaling factors + separateRACH-IAB-Support-r16 ENUMERATED {supported} OPTIONAL, + -- R1 20-5a: Support semi-static configuration/indication of UL-Flexible-DL slot formats for IAB-MT resources + ul-flexibleDL-SlotFormatSemiStatic-IAB-r16 ENUMERATED {supported} OPTIONAL, + -- R1 20-5b: Support dynamic indication of UL-Flexible-DL slot formats for IAB-MT resources + ul-flexibleDL-SlotFormatDynamics-IAB-r16 ENUMERATED {supported} OPTIONAL, + dft-S-OFDM-WaveformUL-IAB-r16 ENUMERATED {supported} OPTIONAL, + -- R1 20-6: Support DCI Format 2_5 based indication of soft resource availability to an IAB node + dci-25-AI-RNTI-Support-IAB-r16 ENUMERATED {supported} OPTIONAL, + -- R1 20-7: Support T_delta reception. + t-DeltaReceptionSupport-IAB-r16 ENUMERATED {supported} OPTIONAL, + -- R1 20-8: Support of Desired guard symbol reporting and provided guard symbok reception. + guardSymbolReportReception-IAB-r16 ENUMERATED {supported} OPTIONAL, + -- R1 18-8 HARQ-ACK codebook type and spatial bundling per PUCCH group + harqACK-CB-SpatialBundlingPUCCH-Group-r16 ENUMERATED {supported} OPTIONAL, + -- R1 19-2: Cross Slot Scheduling + crossSlotScheduling-r16 SEQUENCE { + non-SharedSpectrumChAccess-r16 ENUMERATED {supported} OPTIONAL, + sharedSpectrumChAccess-r16 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + maxNumberSRS-PosPathLossEstimateAllServingCells-r16 ENUMERATED {n1, n4, n8, n16} OPTIONAL, + extendedCG-Periodicities-r16 ENUMERATED {supported} OPTIONAL, + extendedSPS-Periodicities-r16 ENUMERATED {supported} OPTIONAL, + codebookVariantsList-r16 CodebookVariantsList-r16 OPTIONAL, + -- R1 11-6: PUSCH repetition Type A + pusch-RepetitionTypeA-r16 SEQUENCE { + sharedSpectrumChAccess-r16 ENUMERATED {supported} OPTIONAL, + non-SharedSpectrumChAccess-r16 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + -- R1 11-4b: DL priority indication in DCI with mixed DCI formats + dci-DL-PriorityIndicator-r16 ENUMERATED {supported} OPTIONAL, + -- R1 12-1a: UL priority indication in DCI with mixed DCI formats + dci-UL-PriorityIndicator-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-1e: Maximum number of configured pathloss reference RSs for PUSCH/PUCCH/SRS by RRC for MAC-CE based pathloss reference RS update + maxNumberPathlossRS-Update-r16 ENUMERATED {n4, n8, n16, n32, n64} OPTIONAL, + + -- R1 18-9: Usage of the PDSCH starting time for HARQ-ACK type 2 codebook + type2-HARQ-ACK-Codebook-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-1g-1: Resources for beam management, pathloss measurement, BFD, RLM and new beam identification across frequency ranges + maxTotalResourcesForAcrossFreqRanges-r16 SEQUENCE { + maxNumberResWithinSlotAcrossCC-AcrossFR-r16 ENUMERATED {n2, n4, n8, n12, n16, n32, n64, n128} OPTIONAL, + maxNumberResAcrossCC-AcrossFR-r16 ENUMERATED {n2, n4, n8, n12, n16, n32, n40, n48, n64, n72, n80, n96, n128, n256} + OPTIONAL + } OPTIONAL, + -- R1 16-2a-4: HARQ-ACK for multi-DCI based multi-TRP - separate + harqACK-separateMultiDCI-MultiTRP-r16 SEQUENCE { + maxNumberLongPUCCHs-r16 ENUMERATED {longAndLong, longAndShort, shortAndShort} OPTIONAL + } OPTIONAL, + -- R1 16-2a-4: HARQ-ACK for multi-DCI based multi-TRP - joint + harqACK-jointMultiDCI-MultiTRP-r16 ENUMERATED {supported} OPTIONAL, + -- R4 9-1: BWP switching on multiple CCs RRM requirements + bwp-SwitchingMultiCCs-r16 CHOICE { + type1-r16 ENUMERATED {us100, us200}, + type2-r16 ENUMERATED {us200, us400, us800, us1000} + } OPTIONAL + ]], + [[ + targetSMTC-SCG-r16 ENUMERATED {supported} OPTIONAL, + supportRepetitionZeroOffsetRV-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-12: in-order CBG-based re-transmission + cbg-TransInOrderPUSCH-UL-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + -- R4 6-3: Dormant BWP switching on multiple CCs RRM requirements + bwp-SwitchingMultiDormancyCCs-r16 CHOICE { + type1-r16 ENUMERATED {us100, us200}, + type2-r16 ENUMERATED {us200, us400, us800, us1000} + } OPTIONAL, + -- R1 16-2a-8: Indicates that retransmission scheduled by a different CORESETPoolIndex for multi-DCI multi-TRP is not supported. + supportRetx-Diff-CoresetPool-Multi-DCI-TRP-r16 ENUMERATED {notSupported} OPTIONAL, + -- R1 22-10: Support of pdcch-MonitoringAnyOccasionsWithSpanGap in case of cross-carrier scheduling with different SCSs + pdcch-MonitoringAnyOccasionsWithSpanGapCrossCarrierSch-r16 ENUMERATED {mode2, mode3} OPTIONAL + ]], + [[ + -- R1 16-1j-1: Support of 2 port CSI-RS for new beam identification + newBeamIdentifications2PortCSI-RS-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-1j-2: Support of 2 port CSI-RS for pathloss estimation + pathlossEstimation2PortCSI-RS-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + mux-HARQ-ACK-withoutPUCCH-onPUSCH-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + -- R1 31-1: Support of Desired Guard Symbol reporting and provided guard symbol reception. + guardSymbolReportReception-IAB-r17 ENUMERATED {supported} OPTIONAL, + -- R1 31-2: support of restricted IAB-DU beam reception + restricted-IAB-DU-BeamReception-r17 ENUMERATED {supported} OPTIONAL, + -- R1 31-3: support of recommended IAB-MT beam transmission for DL and UL beam + recommended-IAB-MT-BeamTransmission-r17 ENUMERATED {supported} OPTIONAL, + -- R1 31-4: support of case 6 timing alignment indication reception + case6-TimingAlignmentReception-IAB-r17 ENUMERATED {supported} OPTIONAL, + -- R1 31-5: support of case 7 timing offset indication reception and case 7 timing at parent-node indication reception + case7-TimingAlignmentReception-IAB-r17 ENUMERATED {supported} OPTIONAL, + -- R1 31-6: support of desired DL Tx power adjustment reporting and DL Tx power adjustment reception + dl-tx-PowerAdjustment-IAB-r17 ENUMERATED {supported} OPTIONAL, + -- R1 31-7: support of desired IAB-MT PSD range reporting + desired-ul-tx-PowerAdjustment-r17 ENUMERATED {supported} OPTIONAL, + -- R1 31-8: support of monitoring DCI Format 2_5 scrambled by AI-RNTI for indication of FDM soft resource availability to an IAB node + fdm-SoftResourceAvailability-DynamicIndication-r17 ENUMERATED{supported} OPTIONAL, + -- R1 31-10: Support of updated T_delta range reception + updated-T-DeltaRangeRecption-r17 ENUMERATED{supported} OPTIONAL, + -- R1 30-5: Support slot based dynamic PUCCH repetition indication for PUCCH formats 0/1/2/3/4 + slotBasedDynamicPUCCH-Rep-r17 ENUMERATED {supported} OPTIONAL, + -- R1 25-1: Support of HARQ-ACK deferral in case of TDD collision + sps-HARQ-ACK-Deferral-r17 SEQUENCE { + non-SharedSpectrumChAccess-r17 ENUMERATED {supported} OPTIONAL, + sharedSpectrumChAccess-r17 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + -- R1 23-1-1k Maximum number of configured CC lists (per UE) + unifiedJointTCI-commonUpdate-r17 INTEGER (1..4) OPTIONAL, + -- R1 23-2-1c PDCCH repetition with a single span of three contiguous OFDM symbols that is within the first four OFDM symbols in a slot + mTRP-PDCCH-singleSpan-r17 ENUMERATED {supported} OPTIONAL, + -- R1 27-23: Support of more than one activated PRS processing windows across all active DL BWPs + supportedActivatedPRS-ProcessingWindow-r17 ENUMERATED {n2, n3, n4} OPTIONAL, + cg-TimeDomainAllocationExtension-r17 ENUMERATED {supported} OPTIONAL + ]], + [[ + -- R1 25-20: Propagation delay compensation based on legacy TA procedure for TN and licensed + ta-BasedPDC-TN-NonSharedSpectrumChAccess-r17 ENUMERATED {supported} OPTIONAL, + -- R1 31-11: Directional Collision Handling in DC operation + directionalCollisionDC-IAB-r17 ENUMERATED {supported} OPTIONAL + ]], + [[ + -- R1 33-6-1: DL priority indication for multicast in DCI + priorityIndicatorInDCI-Multicast-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-6-1a: DL priority configuration for SPS multicast + priorityIndicatorInDCI-SPS-Multicast-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-6-2: Two HARQ-ACK codebooks simultaneously constructed for supporting HARQ-ACK codebooks with different priorities + -- for unicast and multicast at a UE + twoHARQ-ACK-CodebookForUnicastAndMulticast-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-6-3: More than one PUCCH for HARQ-ACK transmission for multicast or for unicast and multicast within a slot + multiPUCCH-HARQ-ACK-ForMulticastUnicast-r17 ENUMERATED {supported} OPTIONAL, + srs-AdditionalRepetition-r17 ENUMERATED {supported} OPTIONAL, + pusch-Repetition-CG-SDT-r17 ENUMERATED {supported} OPTIONAL + ]] +} + +Phy-ParametersCommon-v16a0 ::= SEQUENCE { + srs-PeriodicityAndOffsetExt-r16 ENUMERATED {supported} OPTIONAL +} + +Phy-ParametersXDD-Diff ::= SEQUENCE { + dynamicSFI ENUMERATED {supported} OPTIONAL, + twoPUCCH-F0-2-ConsecSymbols ENUMERATED {supported} OPTIONAL, + twoDifferentTPC-Loop-PUSCH ENUMERATED {supported} OPTIONAL, + twoDifferentTPC-Loop-PUCCH ENUMERATED {supported} OPTIONAL, + ..., + [[ + dl-SchedulingOffset-PDSCH-TypeA ENUMERATED {supported} OPTIONAL, + dl-SchedulingOffset-PDSCH-TypeB ENUMERATED {supported} OPTIONAL, + ul-SchedulingOffset ENUMERATED {supported} OPTIONAL + ]] +} + +Phy-ParametersFRX-Diff ::= SEQUENCE { + dynamicSFI ENUMERATED {supported} OPTIONAL, + dummy1 BIT STRING (SIZE (2)) OPTIONAL, + twoFL-DMRS BIT STRING (SIZE (2)) OPTIONAL, + dummy2 BIT STRING (SIZE (2)) OPTIONAL, + dummy3 BIT STRING (SIZE (2)) OPTIONAL, + supportedDMRS-TypeDL ENUMERATED {type1, type1And2} OPTIONAL, + supportedDMRS-TypeUL ENUMERATED {type1, type1And2} OPTIONAL, + semiOpenLoopCSI ENUMERATED {supported} OPTIONAL, + csi-ReportWithoutPMI ENUMERATED {supported} OPTIONAL, + csi-ReportWithoutCQI ENUMERATED {supported} OPTIONAL, + onePortsPTRS BIT STRING (SIZE (2)) OPTIONAL, + twoPUCCH-F0-2-ConsecSymbols ENUMERATED {supported} OPTIONAL, + pucch-F2-WithFH ENUMERATED {supported} OPTIONAL, + pucch-F3-WithFH ENUMERATED {supported} OPTIONAL, + pucch-F4-WithFH ENUMERATED {supported} OPTIONAL, + pucch-F0-2WithoutFH ENUMERATED {notSupported} OPTIONAL, + pucch-F1-3-4WithoutFH ENUMERATED {notSupported} OPTIONAL, + mux-SR-HARQ-ACK-CSI-PUCCH-MultiPerSlot ENUMERATED {supported} OPTIONAL, + uci-CodeBlockSegmentation ENUMERATED {supported} OPTIONAL, + onePUCCH-LongAndShortFormat ENUMERATED {supported} OPTIONAL, + twoPUCCH-AnyOthersInSlot ENUMERATED {supported} OPTIONAL, + intraSlotFreqHopping-PUSCH ENUMERATED {supported} OPTIONAL, + pusch-LBRM ENUMERATED {supported} OPTIONAL, + pdcch-BlindDetectionCA INTEGER (4..16) OPTIONAL, + tpc-PUSCH-RNTI ENUMERATED {supported} OPTIONAL, + tpc-PUCCH-RNTI ENUMERATED {supported} OPTIONAL, + tpc-SRS-RNTI ENUMERATED {supported} OPTIONAL, + absoluteTPC-Command ENUMERATED {supported} OPTIONAL, + twoDifferentTPC-Loop-PUSCH ENUMERATED {supported} OPTIONAL, + twoDifferentTPC-Loop-PUCCH ENUMERATED {supported} OPTIONAL, + pusch-HalfPi-BPSK ENUMERATED {supported} OPTIONAL, + pucch-F3-4-HalfPi-BPSK ENUMERATED {supported} OPTIONAL, + almostContiguousCP-OFDM-UL ENUMERATED {supported} OPTIONAL, + sp-CSI-RS ENUMERATED {supported} OPTIONAL, + sp-CSI-IM ENUMERATED {supported} OPTIONAL, + tdd-MultiDL-UL-SwitchPerSlot ENUMERATED {supported} OPTIONAL, + multipleCORESET ENUMERATED {supported} OPTIONAL, + ..., + [[ + csi-RS-IM-ReceptionForFeedback CSI-RS-IM-ReceptionForFeedback OPTIONAL, + csi-RS-ProcFrameworkForSRS CSI-RS-ProcFrameworkForSRS OPTIONAL, + csi-ReportFramework CSI-ReportFramework OPTIONAL, + mux-SR-HARQ-ACK-CSI-PUCCH-OncePerSlot SEQUENCE { + sameSymbol ENUMERATED {supported} OPTIONAL, + diffSymbol ENUMERATED {supported} OPTIONAL + } OPTIONAL, + mux-SR-HARQ-ACK-PUCCH ENUMERATED {supported} OPTIONAL, + mux-MultipleGroupCtrlCH-Overlap ENUMERATED {supported} OPTIONAL, + dl-SchedulingOffset-PDSCH-TypeA ENUMERATED {supported} OPTIONAL, + dl-SchedulingOffset-PDSCH-TypeB ENUMERATED {supported} OPTIONAL, + ul-SchedulingOffset ENUMERATED {supported} OPTIONAL, + dl-64QAM-MCS-TableAlt ENUMERATED {supported} OPTIONAL, + ul-64QAM-MCS-TableAlt ENUMERATED {supported} OPTIONAL, + cqi-TableAlt ENUMERATED {supported} OPTIONAL, + oneFL-DMRS-TwoAdditionalDMRS-UL ENUMERATED {supported} OPTIONAL, + twoFL-DMRS-TwoAdditionalDMRS-UL ENUMERATED {supported} OPTIONAL, + oneFL-DMRS-ThreeAdditionalDMRS-UL ENUMERATED {supported} OPTIONAL + ]], + [[ + pdcch-BlindDetectionNRDC SEQUENCE { + pdcch-BlindDetectionMCG-UE INTEGER (1..15), + pdcch-BlindDetectionSCG-UE INTEGER (1..15) + } OPTIONAL, + mux-HARQ-ACK-PUSCH-DiffSymbol ENUMERATED {supported} OPTIONAL + ]], + [[ + -- R1 11-1b: Type 1 HARQ-ACK codebook support for relative TDRA for DL + type1-HARQ-ACK-Codebook-r16 ENUMERATED {supported} OPTIONAL, + -- R1 11-8: Enhanced UL power control scheme + enhancedPowerControl-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-1b-1: TCI state activation across multiple CCs + simultaneousTCI-ActMultipleCC-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-1b-2: Spatial relation update across multiple CCs + simultaneousSpatialRelationMultipleCC-r16 ENUMERATED {supported} OPTIONAL, + cli-RSSI-FDM-DL-r16 ENUMERATED {supported} OPTIONAL, + cli-SRS-RSRP-FDM-DL-r16 ENUMERATED {supported} OPTIONAL, + -- R1 19-3: Maximum MIMO Layer Adaptation + maxLayersMIMO-Adaptation-r16 ENUMERATED {supported} OPTIONAL, + -- R1 12-5: Configuration of aggregation factor per SPS configuration + aggregationFactorSPS-DL-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-1g: Resources for beam management, pathloss measurement, BFD, RLM and new beam identification + maxTotalResourcesForOneFreqRange-r16 SEQUENCE { + maxNumberResWithinSlotAcrossCC-OneFR-r16 ENUMERATED {n2, n4, n8, n12, n16, n32, n64, n128} OPTIONAL, + maxNumberResAcrossCC-OneFR-r16 ENUMERATED {n2, n4, n8, n12, n16, n32, n40, n48, n64, n72, n80, n96, n128, n256} + OPTIONAL + } OPTIONAL, + -- R1 16-7: Extension of the maximum number of configured aperiodic CSI report settings + csi-ReportFrameworkExt-r16 CSI-ReportFrameworkExt-r16 OPTIONAL + ]], + [[ + twoTCI-Act-servingCellInCC-List-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + -- R1 22-11: Support of 'cri-RI-CQI' report without non-PMI-PortIndication + cri-RI-CQI-WithoutNon-PMI-PortInd-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + -- R1 25-11: 4-bits subband CQI for TN and licensed + cqi-4-BitsSubbandTN-NonSharedSpectrumChAccess-r17 ENUMERATED {supported} OPTIONAL + ]] +} + +Phy-ParametersFR1 ::= SEQUENCE { + pdcch-MonitoringSingleOccasion ENUMERATED {supported} OPTIONAL, + scs-60kHz ENUMERATED {supported} OPTIONAL, + pdsch-256QAM-FR1 ENUMERATED {supported} OPTIONAL, + pdsch-RE-MappingFR1-PerSymbol ENUMERATED {n10, n20} OPTIONAL, + ..., + [[ + pdsch-RE-MappingFR1-PerSlot ENUMERATED {n16, n32, n48, n64, n80, n96, n112, n128, + n144, n160, n176, n192, n208, n224, n240, n256} OPTIONAL + ]], + [[ + -- R1 22-12: PDCCH monitoring with a single span of three contiguous OFDM symbols that is within the first four OFDM symbols in a + -- slot + pdcch-MonitoringSingleSpanFirst4Sym-r16 ENUMERATED {supported} OPTIONAL + ]] +} + +Phy-ParametersFR2 ::= SEQUENCE { + dummy ENUMERATED {supported} OPTIONAL, + pdsch-RE-MappingFR2-PerSymbol ENUMERATED {n6, n20} OPTIONAL, + ..., + [[ + pCell-FR2 ENUMERATED {supported} OPTIONAL, + pdsch-RE-MappingFR2-PerSlot ENUMERATED {n16, n32, n48, n64, n80, n96, n112, n128, + n144, n160, n176, n192, n208, n224, n240, n256} OPTIONAL + ]], + [[ + -- R1 16-1c: Support of default spatial relation and pathloss reference RS for dedicated-PUCCH/SRS and PUSCH + defaultSpatialRelationPathlossRS-r16 ENUMERATED {supported} OPTIONAL, + -- R1 16-1d: Support of spatial relation update for AP-SRS via MAC CE + spatialRelationUpdateAP-SRS-r16 ENUMERATED {supported} OPTIONAL, + maxNumberSRS-PosSpatialRelationsAllServingCells-r16 ENUMERATED {n0, n1, n2, n4, n8, n16} OPTIONAL + ]] +} + +-- TAG-PHY-PARAMETERS-STOP +-- TAG-PHY-PARAMETERSMRDC-START + +Phy-ParametersMRDC ::= SEQUENCE { + naics-Capability-List SEQUENCE (SIZE (1..maxNrofNAICS-Entries)) OF NAICS-Capability-Entry OPTIONAL, + ..., + [[ + spCellPlacement CarrierAggregationVariant OPTIONAL + ]], + [[ + -- R1 18-3b: Semi-statically configured LTE UL transmissions in all UL subframes not limited to tdm-pattern in case of TDD PCell + tdd-PCellUL-TX-AllUL-Subframe-r16 ENUMERATED {supported} OPTIONAL, + -- R1 18-3a: Semi-statically configured LTE UL transmissions in all UL subframes not limited to tdm-pattern in case of FDD PCell + fdd-PCellUL-TX-AllUL-Subframe-r16 ENUMERATED {supported} OPTIONAL + ]] +} + +NAICS-Capability-Entry ::= SEQUENCE { + numberOfNAICS-CapableCC INTEGER(1..5), + numberOfAggregatedPRB ENUMERATED {n50, n75, n100, n125, n150, n175, n200, n225, + n250, n275, n300, n350, n400, n450, n500, spare}, + ... +} + +-- TAG-PHY-PARAMETERSMRDC-STOP +-- TAG-PHY-PARAMETERSSHAREDSPECTRUMCHACCESS-START + +Phy-ParametersSharedSpectrumChAccess-r16 ::= SEQUENCE { + -- 10-32 (1-2): SS block based SINR measurement (SS-SINR) for unlicensed spectrum + ss-SINR-Meas-r16 ENUMERATED {supported} OPTIONAL, + -- 10-33 (2-32a): Semi-persistent CSI report on PUCCH for unlicensed spectrum + sp-CSI-ReportPUCCH-r16 ENUMERATED {supported} OPTIONAL, + -- 10-33a (2-32b): Semi-persistent CSI report on PUSCH for unlicensed spectrum + sp-CSI-ReportPUSCH-r16 ENUMERATED {supported} OPTIONAL, + -- 10-34 (3-6): Dynamic SFI monitoring for unlicensed spectrum + dynamicSFI-r16 ENUMERATED {supported} OPTIONAL, + -- 10-35c (4-19c): SR/HARQ-ACK/CSI multiplexing once per slot using a PUCCH (or HARQ-ACK/CSI piggybacked on a PUSCH) when SR/HARQ- + -- ACK/CSI are supposed to be sent with different starting symbols in a slot for unlicensed spectrum + -- 10-35 (4-19): SR/HARQ-ACK/CSI multiplexing once per slot using a PUCCH (or HARQ-ACK/CSI piggybacked on a PUSCH) when SR/HARQ- + -- ACK/CSI are supposed to be sent with the same starting symbol on the PUCCH resources in a slot for unlicensed spectrum + mux-SR-HARQ-ACK-CSI-PUCCH-OncePerSlot-r16 SEQUENCE { + sameSymbol-r16 ENUMERATED {supported} OPTIONAL, + diffSymbol-r16 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + -- 10-35a (4-19a): Overlapping PUCCH resources have different starting symbols in a slot for unlicensed spectrum + mux-SR-HARQ-ACK-PUCCH-r16 ENUMERATED {supported} OPTIONAL, + -- 10-35b (4-19b): SR/HARQ-ACK/CSI multiplexing more than once per slot using a PUCCH (or HARQ-ACK/CSI piggybacked on a PUSCH) when + -- SR/HARQ ACK/CSI are supposed to be sent with the same or different starting symbol in a slot for unlicensed spectrum + mux-SR-HARQ-ACK-CSI-PUCCH-MultiPerSlot-r16 ENUMERATED {supported} OPTIONAL, + -- 10-36 (4-28): HARQ-ACK multiplexing on PUSCH with different PUCCH/PUSCH starting OFDM symbols for unlicensed spectrum + mux-HARQ-ACK-PUSCH-DiffSymbol-r16 ENUMERATED {supported} OPTIONAL, + -- 10-37 (4-23): Repetitions for PUCCH format 1, 3, and 4 over multiple slots with K = 2, 4, 8 for unlicensed spectrum + pucch-Repetition-F1-3-4-r16 ENUMERATED {supported} OPTIONAL, + -- 10-38 (5-14): Type 1 configured PUSCH repetitions over multiple slots for unlicensed spectrum + type1-PUSCH-RepetitionMultiSlots-r16 ENUMERATED {supported} OPTIONAL, + -- 10-39 (5-16): Type 2 configured PUSCH repetitions over multiple slots for unlicensed spectrum + type2-PUSCH-RepetitionMultiSlots-r16 ENUMERATED {supported} OPTIONAL, + -- 10-40 (5-17): PUSCH repetitions over multiple slots for unlicensed spectrum + pusch-RepetitionMultiSlots-r16 ENUMERATED {supported} OPTIONAL, + -- 10-40a (5-17a): PDSCH repetitions over multiple slots for unlicensed spectrum + pdsch-RepetitionMultiSlots-r16 ENUMERATED {supported} OPTIONAL, + -- 10-41 (5-18): DL SPS + downlinkSPS-r16 ENUMERATED {supported} OPTIONAL, + -- 10-42 (5-19): Type 1 Configured UL grant + configuredUL-GrantType1-r16 ENUMERATED {supported} OPTIONAL, + -- 10-43 (5-20): Type 2 Configured UL grant + configuredUL-GrantType2-r16 ENUMERATED {supported} OPTIONAL, + -- 10-44 (5-21): Pre-emption indication for DL + pre-EmptIndication-DL-r16 ENUMERATED {supported} OPTIONAL, + ... +} + +-- TAG-PHY-PARAMETERSSHAREDSPECTRUMCHACCESS-STOP +-- TAG-POSSRS-RRC-INACTIVE-OUTSIDEINITIALUL-BWP-START + +PosSRS-RRC-Inactive-OutsideInitialUL-BWP-r17::= SEQUENCE { + -- R1 27-15b: Positioning SRS transmission in RRC_INACTIVE state configured outside initial UL BWP + maxSRSposBandwidthForEachSCS-withinCC-FR1-r17 ENUMERATED {bw5, bw10, bw15, bw20, bw25, bw30, bw35, bw40, + bw45, bw50, bw60, bw70, bw80, bw90, bw100} OPTIONAL, + maxSRSposBandwidthForEachSCS-withinCC-FR2-r17 ENUMERATED {bw50, bw100, bw200, bw400} OPTIONAL, + maxNumOfSRSposResourceSets-r17 ENUMERATED {n1, n2, n4, n8, n12, n16} OPTIONAL, + maxNumOfPeriodicSRSposResources-r17 ENUMERATED {n1, n2, n4, n8, n16, n32, n64} OPTIONAL, + maxNumOfPeriodicSRSposResourcesPerSlot-r17 ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10, n12, n14} OPTIONAL, + differentNumerologyBetweenSRSposAndInitialBWP-r17 ENUMERATED {supported} OPTIONAL, + srsPosWithoutRestrictionOnBWP-r17 ENUMERATED {supported} OPTIONAL, + maxNumOfPeriodicAndSemipersistentSRSposResources-r17 ENUMERATED {n1, n2, n4, n8, n16, n32, n64} OPTIONAL, + maxNumOfPeriodicAndSemipersistentSRSposResourcesPerSlot-r17 ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10, n12, n14} OPTIONAL, + differentCenterFreqBetweenSRSposAndInitialBWP-r17 ENUMERATED {supported} OPTIONAL, + switchingTimeSRS-TX-OtherTX-r17 ENUMERATED {us100, us140, us200, us300, us500} OPTIONAL, + -- R1 27-15c: Support of positioning SRS transmission in RRC_INACTIVE state outside initial BWP with semi-persistent SRS + maxNumOfSemiPersistentSRSposResources-r17 ENUMERATED {n1, n2, n4, n8, n16, n32, n64} OPTIONAL, + maxNumOfSemiPersistentSRSposResourcesPerSlot-r17 ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10, n12, n14} OPTIONAL, + ... +} + +-- TAG-POSSRS-RRC-INACTIVE-OUTSIDEINITIALUL-BWP-STOP +-- TAG-POWSAV-PARAMETERS-START + +PowSav-Parameters-r16 ::= SEQUENCE { + powSav-ParametersCommon-r16 PowSav-ParametersCommon-r16 OPTIONAL, + powSav-ParametersFRX-Diff-r16 PowSav-ParametersFRX-Diff-r16 OPTIONAL, + ... +} + +PowSav-Parameters-v1700 ::= SEQUENCE { + powSav-ParametersFR2-2-r17 PowSav-ParametersFR2-2-r17 OPTIONAL, + ... +} + +PowSav-ParametersCommon-r16 ::= SEQUENCE { + drx-Preference-r16 ENUMERATED {supported} OPTIONAL, + maxCC-Preference-r16 ENUMERATED {supported} OPTIONAL, + releasePreference-r16 ENUMERATED {supported} OPTIONAL, + -- R1 19-4a: UE assistance information + minSchedulingOffsetPreference-r16 ENUMERATED {supported} OPTIONAL, + ... +} + +PowSav-ParametersFRX-Diff-r16 ::= SEQUENCE { + maxBW-Preference-r16 ENUMERATED {supported} OPTIONAL, + maxMIMO-LayerPreference-r16 ENUMERATED {supported} OPTIONAL, + ... +} + +PowSav-ParametersFR2-2-r17 ::= SEQUENCE { + maxBW-Preference-r17 ENUMERATED {supported} OPTIONAL, + maxMIMO-LayerPreference-r17 ENUMERATED {supported} OPTIONAL, + ... +} + +-- TAG-POWSAV-PARAMETERS-STOP +-- TAG-PROCESSINGPARAMETERS-START + +ProcessingParameters ::= SEQUENCE { + fallback ENUMERATED {sc, cap1-only}, + differentTB-PerSlot SEQUENCE { + upto1 NumberOfCarriers OPTIONAL, + upto2 NumberOfCarriers OPTIONAL, + upto4 NumberOfCarriers OPTIONAL, + upto7 NumberOfCarriers OPTIONAL + } OPTIONAL +} + +NumberOfCarriers ::= INTEGER (1..16) + +-- TAG-PROCESSINGPARAMETERS-STOP +-- TAG-PRS-PROCESSINGCAPABILITYOUTSIDEMGINPPWPERType-START + +PRS-ProcessingCapabilityOutsideMGinPPWperType-r17 ::= SEQUENCE { + prsProcessingType-r17 ENUMERATED {type1A, type1B, type2}, + ppw-dl-PRS-BufferType-r17 ENUMERATED {type1, type2, ...}, + ppw-durationOfPRS-Processing-r17 CHOICE { + ppw-durationOfPRS-Processing1-r17 SEQUENCE { + ppw-durationOfPRS-ProcessingSymbolsN-r17 ENUMERATED {msDot125, msDot25, msDot5, ms1, ms2, ms4, ms6, ms8, ms12, + ms16, ms20, ms25, ms30, ms32, ms35, ms40, ms45, ms50}, + ppw-durationOfPRS-ProcessingSymbolsT-r17 ENUMERATED {ms1, ms2, ms4, ms8, ms16, ms20, ms30, ms40, ms80, + ms160, ms320, ms640, ms1280} + }, + ppw-durationOfPRS-Processing2-r17 SEQUENCE { + ppw-durationOfPRS-ProcessingSymbolsN2-r17 ENUMERATED {msDot125, msDot25, msDot5, ms1, ms2, ms3, ms4, ms5, + ms6, ms8, ms12}, + ppw-durationOfPRS-ProcessingSymbolsT2-r17 ENUMERATED {ms4, ms5, ms6, ms8} + } + } OPTIONAL, + ppw-maxNumOfDL-PRS-ResProcessedPerSlot-r17 SEQUENCE { + scs15-r17 ENUMERATED {n1, n2, n4, n6, n8, n12, n16, n24, n32, n48, n64} OPTIONAL, + scs30-r17 ENUMERATED {n1, n2, n4, n6, n8, n12, n16, n24, n32, n48, n64} OPTIONAL, + scs60-r17 ENUMERATED {n1, n2, n4, n6, n8, n12, n16, n24, n32, n48, n64} OPTIONAL, + scs120-r17 ENUMERATED {n1, n2, n4, n6, n8, n12, n16, n24, n32, n48, n64} OPTIONAL, + ... + }, + ppw-maxNumOfDL-Bandwidth-r17 CHOICE { + fr1-r17 ENUMERATED {mhz5, mhz10, mhz20, mhz40, mhz50, mhz80, mhz100}, + fr2-r17 ENUMERATED {mhz50, mhz100, mhz200, mhz400} + } OPTIONAL +} + +-- TAG-PRS-PROCESSINGCAPABILITYOUTSIDEMGINPPWPERType-STOP +-- TAG-RAT-TYPE-START + +RAT-Type ::= ENUMERATED {nr, eutra-nr, eutra, utra-fdd-v1610, ...} + +-- TAG-RAT-TYPE-STOP +-- TAG-REDCAPPARAMETERS-START + +RedCapParameters-r17::= SEQUENCE { + -- R1 28-1: RedCap UE + supportOfRedCap-r17 ENUMERATED {supported} OPTIONAL, + supportOf16DRB-RedCap-r17 ENUMERATED {supported} OPTIONAL +} + +-- TAG-REDCAPPARAMETERS-STOP +-- TAG-RF-PARAMETERS-START + +RF-Parameters ::= SEQUENCE { + supportedBandListNR SEQUENCE (SIZE (1..maxBands)) OF BandNR, + supportedBandCombinationList BandCombinationList OPTIONAL, + appliedFreqBandListFilter FreqBandList OPTIONAL, + ..., + [[ + supportedBandCombinationList-v1540 BandCombinationList-v1540 OPTIONAL, + srs-SwitchingTimeRequested ENUMERATED {true} OPTIONAL + ]], + [[ + supportedBandCombinationList-v1550 BandCombinationList-v1550 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1560 BandCombinationList-v1560 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1610 BandCombinationList-v1610 OPTIONAL, + supportedBandCombinationListSidelinkEUTRA-NR-r16 BandCombinationListSidelinkEUTRA-NR-r16 OPTIONAL, + supportedBandCombinationList-UplinkTxSwitch-r16 BandCombinationList-UplinkTxSwitch-r16 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1630 BandCombinationList-v1630 OPTIONAL, + supportedBandCombinationListSidelinkEUTRA-NR-v1630 BandCombinationListSidelinkEUTRA-NR-v1630 OPTIONAL, + supportedBandCombinationList-UplinkTxSwitch-v1630 BandCombinationList-UplinkTxSwitch-v1630 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1640 BandCombinationList-v1640 OPTIONAL, + supportedBandCombinationList-UplinkTxSwitch-v1640 BandCombinationList-UplinkTxSwitch-v1640 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1650 BandCombinationList-v1650 OPTIONAL, + supportedBandCombinationList-UplinkTxSwitch-v1650 BandCombinationList-UplinkTxSwitch-v1650 OPTIONAL + ]], + [[ + extendedBand-n77-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + supportedBandCombinationList-UplinkTxSwitch-v1670 BandCombinationList-UplinkTxSwitch-v1670 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1680 BandCombinationList-v1680 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1690 BandCombinationList-v1690 OPTIONAL, + supportedBandCombinationList-UplinkTxSwitch-v1690 BandCombinationList-UplinkTxSwitch-v1690 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1700 BandCombinationList-v1700 OPTIONAL, + supportedBandCombinationList-UplinkTxSwitch-v1700 BandCombinationList-UplinkTxSwitch-v1700 OPTIONAL, + supportedBandCombinationListSL-RelayDiscovery-r17 OCTET STRING OPTIONAL, -- Contains PC5 BandCombinationListSidelinkNR-r16 + supportedBandCombinationListSL-NonRelayDiscovery-r17 OCTET STRING OPTIONAL, -- Contains PC5 BandCombinationListSidelinkNR-r16 + supportedBandCombinationListSidelinkEUTRA-NR-v1710 BandCombinationListSidelinkEUTRA-NR-v1710 OPTIONAL, + sidelinkRequested-r17 ENUMERATED {true} OPTIONAL, + extendedBand-n77-2-r17 ENUMERATED {supported} OPTIONAL + ]], + [[ + supportedBandCombinationList-v1720 BandCombinationList-v1720 OPTIONAL, + supportedBandCombinationList-UplinkTxSwitch-v1720 BandCombinationList-UplinkTxSwitch-v1720 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1730 BandCombinationList-v1730 OPTIONAL, + supportedBandCombinationList-UplinkTxSwitch-v1730 BandCombinationList-UplinkTxSwitch-v1730 OPTIONAL, + supportedBandCombinationListSL-RelayDiscovery-v1730 BandCombinationListSL-Discovery-r17 OPTIONAL, + supportedBandCombinationListSL-NonRelayDiscovery-v1730 BandCombinationListSL-Discovery-r17 OPTIONAL + ]] +} + +RF-Parameters-v15g0 ::= SEQUENCE { + supportedBandCombinationList-v15g0 BandCombinationList-v15g0 OPTIONAL +} + +RF-Parameters-v16a0 ::= SEQUENCE { + supportedBandCombinationList-v16a0 BandCombinationList-v16a0 OPTIONAL, + supportedBandCombinationList-UplinkTxSwitch-v16a0 BandCombinationList-UplinkTxSwitch-v16a0 OPTIONAL +} + +BandNR ::= SEQUENCE { + bandNR FreqBandIndicatorNR, + modifiedMPR-Behaviour BIT STRING (SIZE (8)) OPTIONAL, + mimo-ParametersPerBand MIMO-ParametersPerBand OPTIONAL, + extendedCP ENUMERATED {supported} OPTIONAL, + multipleTCI ENUMERATED {supported} OPTIONAL, + bwp-WithoutRestriction ENUMERATED {supported} OPTIONAL, + bwp-SameNumerology ENUMERATED {upto2, upto4} OPTIONAL, + bwp-DiffNumerology ENUMERATED {upto4} OPTIONAL, + crossCarrierScheduling-SameSCS ENUMERATED {supported} OPTIONAL, + pdsch-256QAM-FR2 ENUMERATED {supported} OPTIONAL, + pusch-256QAM ENUMERATED {supported} OPTIONAL, + ue-PowerClass ENUMERATED {pc1, pc2, pc3, pc4} OPTIONAL, + rateMatchingLTE-CRS ENUMERATED {supported} OPTIONAL, + channelBWs-DL CHOICE { + fr1 SEQUENCE { + scs-15kHz BIT STRING (SIZE (10)) OPTIONAL, + scs-30kHz BIT STRING (SIZE (10)) OPTIONAL, + scs-60kHz BIT STRING (SIZE (10)) OPTIONAL + }, + fr2 SEQUENCE { + scs-60kHz BIT STRING (SIZE (3)) OPTIONAL, + scs-120kHz BIT STRING (SIZE (3)) OPTIONAL + } + } OPTIONAL, + channelBWs-UL CHOICE { + fr1 SEQUENCE { + scs-15kHz BIT STRING (SIZE (10)) OPTIONAL, + scs-30kHz BIT STRING (SIZE (10)) OPTIONAL, + scs-60kHz BIT STRING (SIZE (10)) OPTIONAL + }, + fr2 SEQUENCE { + scs-60kHz BIT STRING (SIZE (3)) OPTIONAL, + scs-120kHz BIT STRING (SIZE (3)) OPTIONAL + } + } OPTIONAL, + ..., + [[ + maxUplinkDutyCycle-PC2-FR1 ENUMERATED {n60, n70, n80, n90, n100} OPTIONAL + ]], + [[ + pucch-SpatialRelInfoMAC-CE ENUMERATED {supported} OPTIONAL, + powerBoosting-pi2BPSK ENUMERATED {supported} OPTIONAL + ]], + [[ + maxUplinkDutyCycle-FR2 ENUMERATED {n15, n20, n25, n30, n40, n50, n60, n70, n80, n90, n100} OPTIONAL + ]], + [[ + channelBWs-DL-v1590 CHOICE { + fr1 SEQUENCE { + scs-15kHz BIT STRING (SIZE (16)) OPTIONAL, + scs-30kHz BIT STRING (SIZE (16)) OPTIONAL, + scs-60kHz BIT STRING (SIZE (16)) OPTIONAL + }, + fr2 SEQUENCE { + scs-60kHz BIT STRING (SIZE (8)) OPTIONAL, + scs-120kHz BIT STRING (SIZE (8)) OPTIONAL + } + } OPTIONAL, + channelBWs-UL-v1590 CHOICE { + fr1 SEQUENCE { + scs-15kHz BIT STRING (SIZE (16)) OPTIONAL, + scs-30kHz BIT STRING (SIZE (16)) OPTIONAL, + scs-60kHz BIT STRING (SIZE (16)) OPTIONAL + }, + fr2 SEQUENCE { + scs-60kHz BIT STRING (SIZE (8)) OPTIONAL, + scs-120kHz BIT STRING (SIZE (8)) OPTIONAL + } + } OPTIONAL + ]], + [[ + asymmetricBandwidthCombinationSet BIT STRING (SIZE (1..32)) OPTIONAL + ]], + [[ + -- R1 10: NR-unlicensed + sharedSpectrumChAccessParamsPerBand-r16 SharedSpectrumChAccessParamsPerBand-r16 OPTIONAL, + -- R1 11-7b: Independent cancellation of the overlapping PUSCHs in an intra-band UL CA + cancelOverlappingPUSCH-r16 ENUMERATED {supported} OPTIONAL, + -- R1 14-1: Multiple LTE-CRS rate matching patterns + multipleRateMatchingEUTRA-CRS-r16 SEQUENCE { + maxNumberPatterns-r16 INTEGER (2..6), + maxNumberNon-OverlapPatterns-r16 INTEGER (1..3) + } OPTIONAL, + -- R1 14-1a: Two LTE-CRS overlapping rate matching patterns within a part of NR carrier using 15 kHz overlapping with a LTE carrier + overlapRateMatchingEUTRA-CRS-r16 ENUMERATED {supported} OPTIONAL, + -- R1 14-2: PDSCH Type B mapping of length 9 and 10 OFDM symbols + pdsch-MappingTypeB-Alt-r16 ENUMERATED {supported} OPTIONAL, + -- R1 14-3: One slot periodic TRS configuration for FR1 + oneSlotPeriodicTRS-r16 ENUMERATED {supported} OPTIONAL, + olpc-SRS-Pos-r16 OLPC-SRS-Pos-r16 OPTIONAL, + spatialRelationsSRS-Pos-r16 SpatialRelationsSRS-Pos-r16 OPTIONAL, + simulSRS-MIMO-TransWithinBand-r16 ENUMERATED {n2} OPTIONAL, + channelBW-DL-IAB-r16 CHOICE { + fr1-100mhz SEQUENCE { + scs-15kHz ENUMERATED {supported} OPTIONAL, + scs-30kHz ENUMERATED {supported} OPTIONAL, + scs-60kHz ENUMERATED {supported} OPTIONAL + }, + fr2-200mhz SEQUENCE { + scs-60kHz ENUMERATED {supported} OPTIONAL, + scs-120kHz ENUMERATED {supported} OPTIONAL + } + } OPTIONAL, + channelBW-UL-IAB-r16 CHOICE { + fr1-100mhz SEQUENCE { + scs-15kHz ENUMERATED {supported} OPTIONAL, + scs-30kHz ENUMERATED {supported} OPTIONAL, + scs-60kHz ENUMERATED {supported} OPTIONAL + }, + fr2-200mhz SEQUENCE { + scs-60kHz ENUMERATED {supported} OPTIONAL, + scs-120kHz ENUMERATED {supported} OPTIONAL + } + } OPTIONAL, + rasterShift7dot5-IAB-r16 ENUMERATED {supported} OPTIONAL, + ue-PowerClass-v1610 ENUMERATED {pc1dot5} OPTIONAL, + condHandover-r16 ENUMERATED {supported} OPTIONAL, + condHandoverFailure-r16 ENUMERATED {supported} OPTIONAL, + condHandoverTwoTriggerEvents-r16 ENUMERATED {supported} OPTIONAL, + condPSCellChange-r16 ENUMERATED {supported} OPTIONAL, + condPSCellChangeTwoTriggerEvents-r16 ENUMERATED {supported} OPTIONAL, + mpr-PowerBoost-FR2-r16 ENUMERATED {supported} OPTIONAL, + + -- R1 11-9: Multiple active configured grant configurations for a BWP of a serving cell + activeConfiguredGrant-r16 SEQUENCE { + maxNumberConfigsPerBWP-r16 ENUMERATED {n1, n2, n4, n8, n12}, + maxNumberConfigsAllCC-r16 INTEGER (2..32) + } OPTIONAL, + -- R1 11-9a: Joint release in a DCI for two or more configured grant Type 2 configurations for a given BWP of a serving cell + jointReleaseConfiguredGrantType2-r16 ENUMERATED {supported} OPTIONAL, + -- R1 12-2: Multiple SPS configurations + sps-r16 SEQUENCE { + maxNumberConfigsPerBWP-r16 INTEGER (1..8), + maxNumberConfigsAllCC-r16 INTEGER (2..32) + } OPTIONAL, + -- R1 12-2a: Joint release in a DCI for two or more SPS configurations for a given BWP of a serving cell + jointReleaseSPS-r16 ENUMERATED {supported} OPTIONAL, + -- R1 13-19: Simultaneous positioning SRS and MIMO SRS transmission within a band across multiple CCs + simulSRS-TransWithinBand-r16 ENUMERATED {n2} OPTIONAL, + trs-AdditionalBandwidth-r16 ENUMERATED {trs-AddBW-Set1, trs-AddBW-Set2} OPTIONAL, + handoverIntraF-IAB-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + -- R1 22-5a: Simultaneous transmission of SRS for antenna switching and SRS for CB/NCB /BM for intra-band UL CA + -- R1 22-5c: Simultaneous transmission of SRS for antenna switching and SRS for antenna switching for intra-band UL CA + simulTX-SRS-AntSwitchingIntraBandUL-CA-r16 SimulSRS-ForAntennaSwitching-r16 OPTIONAL, + -- R1 10: NR-unlicensed + sharedSpectrumChAccessParamsPerBand-v1630 SharedSpectrumChAccessParamsPerBand-v1630 OPTIONAL + ]], + [[ + handoverUTRA-FDD-r16 ENUMERATED {supported} OPTIONAL, + -- R4 7-4: Report the shorter transient capability supported by the UE: 2, 4 or 7us + enhancedUL-TransientPeriod-r16 ENUMERATED {us2, us4, us7} OPTIONAL, + sharedSpectrumChAccessParamsPerBand-v1640 SharedSpectrumChAccessParamsPerBand-v1640 OPTIONAL + ]], + [[ + type1-PUSCH-RepetitionMultiSlots-v1650 ENUMERATED {supported} OPTIONAL, + type2-PUSCH-RepetitionMultiSlots-v1650 ENUMERATED {supported} OPTIONAL, + pusch-RepetitionMultiSlots-v1650 ENUMERATED {supported} OPTIONAL, + configuredUL-GrantType1-v1650 ENUMERATED {supported} OPTIONAL, + configuredUL-GrantType2-v1650 ENUMERATED {supported} OPTIONAL, + sharedSpectrumChAccessParamsPerBand-v1650 SharedSpectrumChAccessParamsPerBand-v1650 OPTIONAL + ]], + [[ + enhancedSkipUplinkTxConfigured-v1660 ENUMERATED {supported} OPTIONAL, + enhancedSkipUplinkTxDynamic-v1660 ENUMERATED {supported} OPTIONAL + ]], + [[ + maxUplinkDutyCycle-PC1dot5-MPE-FR1-r16 ENUMERATED {n10, n15, n20, n25, n30, n40, n50, n60, n70, n80, n90, n100} OPTIONAL, + txDiversity-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + -- R1 36-1: Support of 1024QAM for PDSCH for FR1 + pdsch-1024QAM-FR1-r17 ENUMERATED {supported} OPTIONAL, + -- R4 22-1 support of FR2 HST operation + ue-PowerClass-v1700 ENUMERATED {pc5, pc6, pc7} OPTIONAL, + -- R1 24: NR extension to 71GHz (FR2-2) + fr2-2-AccessParamsPerBand-r17 FR2-2-AccessParamsPerBand-r17 OPTIONAL, + rlm-Relaxation-r17 ENUMERATED {supported} OPTIONAL, + bfd-Relaxation-r17 ENUMERATED {supported} OPTIONAL, + cg-SDT-r17 ENUMERATED {supported} OPTIONAL, + locationBasedCondHandover-r17 ENUMERATED {supported} OPTIONAL, + timeBasedCondHandover-r17 ENUMERATED {supported} OPTIONAL, + eventA4BasedCondHandover-r17 ENUMERATED {supported} OPTIONAL, + mn-InitiatedCondPSCellChangeNRDC-r17 ENUMERATED {supported} OPTIONAL, + sn-InitiatedCondPSCellChangeNRDC-r17 ENUMERATED {supported} OPTIONAL, + -- R1 29-3a: PDCCH skipping + pdcch-SkippingWithoutSSSG-r17 ENUMERATED {supported} OPTIONAL, + -- R1 29-3b: 2 search space sets group switching + sssg-Switching-1BitInd-r17 ENUMERATED {supported} OPTIONAL, + -- R1 29-3c: 3 search space sets group switching + sssg-Switching-2BitInd-r17 ENUMERATED {supported} OPTIONAL, + -- R1 29-3d: 2 search space sets group switching with PDCCH skipping + pdcch-SkippingWithSSSG-r17 ENUMERATED {supported} OPTIONAL, + -- R1 29-3e: Support Search space set group switching capability 2 for FR1 + searchSpaceSetGrp-switchCap2-r17 ENUMERATED {supported} OPTIONAL, + -- R1 26-1: Uplink Time and Frequency pre-compensation and timing relationship enhancements + uplinkPreCompensation-r17 ENUMERATED {supported} OPTIONAL, + -- R1 26-4: UE reporting of information related to TA pre-compensation + uplink-TA-Reporting-r17 ENUMERATED {supported} OPTIONAL, + -- R1 26-5: Increasing the number of HARQ processes + max-HARQ-ProcessNumber-r17 ENUMERATED {u16d32, u32d16, u32d32} OPTIONAL, + -- R1 26-6: Type-2 HARQ codebook enhancement + type2-HARQ-Codebook-r17 ENUMERATED {supported} OPTIONAL, + -- R1 26-6a: Type-1 HARQ codebook enhancement + type1-HARQ-Codebook-r17 ENUMERATED {supported} OPTIONAL, + -- R1 26-6b: Type-3 HARQ codebook enhancement + type3-HARQ-Codebook-r17 ENUMERATED {supported} OPTIONAL, + -- R1 26-9: UE-specific K_offset + ue-specific-K-Offset-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-1f: Multiple PDSCH scheduling by single DCI for 120kHz in FR2-1 + multiPDSCH-SingleDCI-FR2-1-SCS-120kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R1 24-1g: Multiple PUSCH scheduling by single DCI for 120kHz in FR2-1 + multiPUSCH-SingleDCI-FR2-1-SCS-120kHz-r17 ENUMERATED {supported} OPTIONAL, + -- R4 14-4: Parallel PRS measurements in RRC_INACTIVE state, FR1/FR2 diff + parallelPRS-MeasRRC-Inactive-r17 ENUMERATED {supported} OPTIONAL, + -- R1 27-1-2: Support of UE-TxTEGs for UL TDOA + nr-UE-TxTEG-ID-MaxSupport-r17 ENUMERATED {n1, n2, n3, n4, n6, n8} OPTIONAL, + -- R1 27-17: PRS processing in RRC_INACTIVE + prs-ProcessingRRC-Inactive-r17 ENUMERATED {supported} OPTIONAL, + -- R1 27-3-2: DL PRS measurement outside MG and in a PRS processing window + prs-ProcessingWindowType1A-r17 ENUMERATED {option1, option2, option3} OPTIONAL, + prs-ProcessingWindowType1B-r17 ENUMERATED {option1, option2, option3} OPTIONAL, + prs-ProcessingWindowType2-r17 ENUMERATED {option1, option2, option3} OPTIONAL, + -- R1 27-15: Positioning SRS transmission in RRC_INACTIVE state for initial UL BWP + srs-AllPosResourcesRRC-Inactive-r17 SRS-AllPosResourcesRRC-Inactive-r17 OPTIONAL, + -- R1 27-16: OLPC for positioning SRS in RRC_INACTIVE state - gNB + olpc-SRS-PosRRC-Inactive-r17 OLPC-SRS-Pos-r16 OPTIONAL, + -- R1 27-19: Spatial relation for positioning SRS in RRC_INACTIVE state - gNB + spatialRelationsSRS-PosRRC-Inactive-r17 SpatialRelationsSRS-Pos-r16 OPTIONAL, + -- R1 30-1: Increased maximum number of PUSCH Type A repetitions + maxNumberPUSCH-TypeA-Repetition-r17 ENUMERATED {supported} OPTIONAL, + -- R1 30-2: PUSCH Type A repetitions based on available slots + puschTypeA-RepetitionsAvailSlot-r17 ENUMERATED {supported} OPTIONAL, + -- R1 30-3: TB processing over multi-slot PUSCH + tb-ProcessingMultiSlotPUSCH-r17 ENUMERATED {supported} OPTIONAL, + -- R1 30-3a: Repetition of TB processing over multi-slot PUSCH + tb-ProcessingRepMultiSlotPUSCH-r17 ENUMERATED {supported} OPTIONAL, + -- R1 30-4: The maximum duration for DM-RS bundling + maxDurationDMRS-Bundling-r17 SEQUENCE { + fdd-r17 ENUMERATED {n4, n8, n16, n32} OPTIONAL, + tdd-r17 ENUMERATED {n2, n4, n8, n16} OPTIONAL + } OPTIONAL, + -- R1 30-6: Repetition of PUSCH transmission scheduled by RAR UL grant and DCI format 0_0 with CRC scrambled by TC-RNTI + pusch-RepetitionMsg3-r17 ENUMERATED {supported} OPTIONAL, + sharedSpectrumChAccessParamsPerBand-v1710 SharedSpectrumChAccessParamsPerBand-v1710 OPTIONAL, + -- R4 25-2: Parallel measurements on cells belonging to a different NGSO satellite than a serving satellite without scheduling restrictions + -- on normal operations with the serving cell + parallelMeasurementWithoutRestriction-r17 ENUMERATED {supported} OPTIONAL, + -- R4 25-5: Parallel measurements on multiple NGSO satellites within a SMTC + maxNumber-NGSO-SatellitesWithinOneSMTC-r17 ENUMERATED {n1, n2, n3, n4} OPTIONAL, + -- R1 26-10: K1 range extension + k1-RangeExtension-r17 ENUMERATED {supported} OPTIONAL, + -- R1 35-1: Aperiodic CSI-RS for tracking for fast SCell activation + aperiodicCSI-RS-FastScellActivation-r17 SEQUENCE { + maxNumberAperiodicCSI-RS-PerCC-r17 ENUMERATED {n8, n16, n32, n48, n64, n128, n255}, + maxNumberAperiodicCSI-RS-AcrossCCs-r17 ENUMERATED {n8, n16, n32, n64, n128, n256, n512, n1024} + } OPTIONAL, + -- R1 35-2: Aperiodic CSI-RS bandwidth for tracking for fast SCell activation for 10MHz UE channel bandwidth + aperiodicCSI-RS-AdditionalBandwidth-r17 ENUMERATED {addBW-Set1, addBW-Set2} OPTIONAL, + -- R1 28-1a: RRC-configured DL BWP without CD-SSB or NCD-SSB + bwp-WithoutCD-SSB-OrNCD-SSB-RedCap-r17 ENUMERATED {supported} OPTIONAL, + -- R1 28-3: Half-duplex FDD operation type A for RedCap UE + halfDuplexFDD-TypeA-RedCap-r17 ENUMERATED {supported} OPTIONAL, + -- R1 27-15b: Positioning SRS transmission in RRC_INACTIVE state configured outside initial UL BWP + posSRS-RRC-Inactive-OutsideInitialUL-BWP-r17 PosSRS-RRC-Inactive-OutsideInitialUL-BWP-r17 OPTIONAL, + -- R4 15-3 UE support of CBW for 480kHz SCS + channelBWs-DL-SCS-480kHz-FR2-2-r17 BIT STRING (SIZE (8)) OPTIONAL, + channelBWs-UL-SCS-480kHz-FR2-2-r17 BIT STRING (SIZE (8)) OPTIONAL, + -- R4 15-4 UE support of CBW for 960kHz SCS + channelBWs-DL-SCS-960kHz-FR2-2-r17 BIT STRING (SIZE (8)) OPTIONAL, + channelBWs-UL-SCS-960kHz-FR2-2-r17 BIT STRING (SIZE (8)) OPTIONAL, + -- R4 17-1 UL gap for Tx power management + ul-GapFR2-r17 ENUMERATED {supported} OPTIONAL, + -- R1 25-4: One-shot HARQ ACK feedback triggered by DCI format 1_2 + oneShotHARQ-feedbackTriggeredByDCI-1-2-r17 ENUMERATED {supported} OPTIONAL, + -- R1 25-5: PHY priority handling for one-shot HARQ ACK feedback + oneShotHARQ-feedbackPhy-Priority-r17 ENUMERATED {supported} OPTIONAL, + -- R1 25-6: Enhanced type 3 HARQ-ACK codebook feedback + enhancedType3-HARQ-CodebookFeedback-r17 SEQUENCE { + enhancedType3-HARQ-Codebooks-r17 ENUMERATED {n1, n2, n4, n8}, + maxNumberPUCCH-Transmissions-r17 ENUMERATED {n1, n2, n3, n4, n5, n6, n7} + } OPTIONAL, + -- R1 25-7: Triggered HARQ-ACK codebook re-transmission + triggeredHARQ-CodebookRetx-r17 SEQUENCE { + minHARQ-Retx-Offset-r17 ENUMERATED {n-7, n-5, n-3, n-1, n1}, + maxHARQ-Retx-Offset-r17 ENUMERATED {n4, n6, n8, n10, n12, n14, n16, n18, n20, n22, n24} + } OPTIONAL + ]], + [[ + -- R4 22-2 support of one shot large UL timing adjustment + ue-OneShotUL-TimingAdj-r17 ENUMERATED {supported} OPTIONAL, + -- R1 25-2: Repetitions for PUCCH format 0, and 2 over multiple slots with K = 2, 4, 8 + pucch-Repetition-F0-2-r17 ENUMERATED {supported} OPTIONAL, + -- R1 25-11a: 4-bits subband CQI for NTN and unlicensed + cqi-4-BitsSubbandNTN-SharedSpectrumChAccess-r17 ENUMERATED {supported} OPTIONAL, + -- R1 25-16: HARQ-ACK with different priorities multiplexing on a PUCCH/PUSCH + mux-HARQ-ACK-DiffPriorities-r17 ENUMERATED {supported} OPTIONAL, + -- R1 25-20a: Propagation delay compensation based on legacy TA procedure for NTN and unlicensed + ta-BasedPDC-NTN-SharedSpectrumChAccess-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-2b: DCI-based enabling/disabling ACK/NACK-based feedback for dynamic scheduling for multicast + ack-NACK-FeedbackForMulticastWithDCI-Enabler-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-2e: Multiple G-RNTIs for group-common PDSCHs + maxNumberG-RNTI-r17 INTEGER (2..8) OPTIONAL, + -- R1 33-2f: Dynamic multicast with DCI format 4_2 + dynamicMulticastDCI-Format4-2-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-2i: Supported maximal modulation order for multicast PDSCH + maxModulationOrderForMulticast-r17 CHOICE { + fr1-r17 ENUMERATED {qam256, qam1024}, + fr2-r17 ENUMERATED {qam64, qam256} + } OPTIONAL, + -- R1 33-3-1: Dynamic Slot-level repetition for group-common PDSCH for TN and licensed + dynamicSlotRepetitionMulticastTN-NonSharedSpectrumChAccess-r17 ENUMERATED {n8, n16} OPTIONAL, + -- R1 33-3-1a: Dynamic Slot-level repetition for group-common PDSCH for NTN and unlicensed + dynamicSlotRepetitionMulticastNTN-SharedSpectrumChAccess-r17 ENUMERATED {n8, n16} OPTIONAL, + -- R1 33-4-1: DCI-based enabling/disabling NACK-only based feedback for dynamic scheduling for multicast + nack-OnlyFeedbackForMulticastWithDCI-Enabler-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-5-1b: DCI-based enabling/disabling ACK/NACK-based feedback for dynamic scheduling for multicast + ack-NACK-FeedbackForSPS-MulticastWithDCI-Enabler-r17 ENUMERATED {supported} OPTIONAL, + -- R1 33-5-1h: Multiple G-CS-RNTIs for SPS group-common PDSCHs + maxNumberG-CS-RNTI-r17 INTEGER (2..8) OPTIONAL, + -- R1 33-10: Support group-common PDSCH RE-level rate matching for multicast + re-LevelRateMatchingForMulticast-r17 ENUMERATED {supported} OPTIONAL, + -- R1 36-1a: Support of 1024QAM for PDSCH with maximum 2 MIMO layers for FR1 + pdsch-1024QAM-2MIMO-FR1-r17 ENUMERATED {supported} OPTIONAL, + -- R4 14-3 PRS measurement without MG + prs-MeasurementWithoutMG-r17 ENUMERATED {cpLength, quarterSymbol, halfSymbol, halfSlot} OPTIONAL, + -- R4 25-7: The number of target LEO satellites the UE can monitor per carrier + maxNumber-LEO-SatellitesPerCarrier-r17 INTEGER (3..4) OPTIONAL, + -- R1 27-3-3 DL PRS Processing Capability outside MG - buffering capability + prs-ProcessingCapabilityOutsideMGinPPW-r17 SEQUENCE (SIZE(1..3)) OF PRS-ProcessingCapabilityOutsideMGinPPWperType-r17 OPTIONAL, + -- R1 27-15a: Positioning SRS transmission in RRC_INACTIVE state for initial UL BWP with semi-persistent SRS + srs-SemiPersistent-PosResourcesRRC-Inactive-r17 SEQUENCE { + maxNumOfSemiPersistentSRSposResources-r17 ENUMERATED {n1, n2, n4, n8, n16, n32, n64}, + maxNumOfSemiPersistentSRSposResourcesPerSlot-r17 ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10, n12, n14} + } OPTIONAL, + -- R2: UE support of CBW for 120kHz SCS + channelBWs-DL-SCS-120kHz-FR2-2-r17 BIT STRING (SIZE (8)) OPTIONAL, + channelBWs-UL-SCS-120kHz-FR2-2-r17 BIT STRING (SIZE (8)) OPTIONAL + ]], + [[ + -- R1 30-4a: DM-RS bundling for PUSCH repetition type A + dmrs-BundlingPUSCH-RepTypeA-r17 ENUMERATED {supported} OPTIONAL, + -- R1 30-4b: DM-RS bundling for PUSCH repetition type B + dmrs-BundlingPUSCH-RepTypeB-r17 ENUMERATED {supported} OPTIONAL, + -- R1 30-4c: DM-RS bundling for TB processing over multi-slot PUSCH + dmrs-BundlingPUSCH-multiSlot-r17 ENUMERATED {supported} OPTIONAL, + -- R1 30-4d: DMRS bundling for PUCCH repetitions + dmrs-BundlingPUCCH-Rep-r17 ENUMERATED {supported} OPTIONAL, + -- R1 30-4e: Enhanced inter-slot frequency hopping with inter-slot bundling for PUSCH + interSlotFreqHopInterSlotBundlingPUSCH-r17 ENUMERATED {supported} OPTIONAL, + -- R1 30-4f: Enhanced inter-slot frequency hopping for PUCCH repetitions with DMRS bundling + interSlotFreqHopPUCCH-r17 ENUMERATED {supported} OPTIONAL, + -- R1 30-4g: Restart DM-RS bundling + dmrs-BundlingRestart-r17 ENUMERATED {supported} OPTIONAL, + -- R1 30-4h: DM-RS bundling for non-back-to-back transmission + dmrs-BundlingNonBackToBackTX-r17 ENUMERATED {supported} OPTIONAL + ]] +} + +-- TAG-RF-PARAMETERS-STOP +-- TAG-RF-PARAMETERSMRDC-START + +RF-ParametersMRDC ::= SEQUENCE { + supportedBandCombinationList BandCombinationList OPTIONAL, + appliedFreqBandListFilter FreqBandList OPTIONAL, + ..., + [[ + srs-SwitchingTimeRequested ENUMERATED {true} OPTIONAL, + supportedBandCombinationList-v1540 BandCombinationList-v1540 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1550 BandCombinationList-v1550 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1560 BandCombinationList-v1560 OPTIONAL, + supportedBandCombinationListNEDC-Only BandCombinationList OPTIONAL + ]], + [[ + supportedBandCombinationList-v1570 BandCombinationList-v1570 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1580 BandCombinationList-v1580 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1590 BandCombinationList-v1590 OPTIONAL + ]], + [[ + supportedBandCombinationListNEDC-Only-v15a0 SEQUENCE { + supportedBandCombinationList-v1540 BandCombinationList-v1540 OPTIONAL, + supportedBandCombinationList-v1560 BandCombinationList-v1560 OPTIONAL, + supportedBandCombinationList-v1570 BandCombinationList-v1570 OPTIONAL, + supportedBandCombinationList-v1580 BandCombinationList-v1580 OPTIONAL, + supportedBandCombinationList-v1590 BandCombinationList-v1590 OPTIONAL + } OPTIONAL + ]], + [[ + supportedBandCombinationList-v1610 BandCombinationList-v1610 OPTIONAL, + supportedBandCombinationListNEDC-Only-v1610 BandCombinationList-v1610 OPTIONAL, + supportedBandCombinationList-UplinkTxSwitch-r16 BandCombinationList-UplinkTxSwitch-r16 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1630 BandCombinationList-v1630 OPTIONAL, + supportedBandCombinationListNEDC-Only-v1630 BandCombinationList-v1630 OPTIONAL, + supportedBandCombinationList-UplinkTxSwitch-v1630 BandCombinationList-UplinkTxSwitch-v1630 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1640 BandCombinationList-v1640 OPTIONAL, + supportedBandCombinationListNEDC-Only-v1640 BandCombinationList-v1640 OPTIONAL, + supportedBandCombinationList-UplinkTxSwitch-v1640 BandCombinationList-UplinkTxSwitch-v1640 OPTIONAL + ]], + [[ + supportedBandCombinationList-UplinkTxSwitch-v1670 BandCombinationList-UplinkTxSwitch-v1670 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1700 BandCombinationList-v1700 OPTIONAL, + supportedBandCombinationList-UplinkTxSwitch-v1700 BandCombinationList-UplinkTxSwitch-v1700 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1720 BandCombinationList-v1720 OPTIONAL, + supportedBandCombinationListNEDC-Only-v1720 SEQUENCE { + supportedBandCombinationList-v1700 BandCombinationList-v1700 OPTIONAL, + supportedBandCombinationList-v1720 BandCombinationList-v1720 OPTIONAL + } OPTIONAL, + supportedBandCombinationList-UplinkTxSwitch-v1720 BandCombinationList-UplinkTxSwitch-v1720 OPTIONAL + ]], + [[ + supportedBandCombinationList-v1730 BandCombinationList-v1730 OPTIONAL, + supportedBandCombinationListNEDC-Only-v1730 BandCombinationList-v1730 OPTIONAL, + supportedBandCombinationList-UplinkTxSwitch-v1730 BandCombinationList-UplinkTxSwitch-v1730 OPTIONAL + ]] +} + +RF-ParametersMRDC-v15g0 ::= SEQUENCE { + supportedBandCombinationList-v15g0 BandCombinationList-v15g0 OPTIONAL, + supportedBandCombinationListNEDC-Only-v15g0 BandCombinationList-v15g0 OPTIONAL +} + +-- TAG-RF-PARAMETERSMRDC-STOP +-- TAG-RLC-PARAMETERS-START + +RLC-Parameters ::= SEQUENCE { + am-WithShortSN ENUMERATED {supported} OPTIONAL, + um-WithShortSN ENUMERATED {supported} OPTIONAL, + um-WithLongSN ENUMERATED {supported} OPTIONAL, + ..., + [[ + extendedT-PollRetransmit-r16 ENUMERATED {supported} OPTIONAL, + extendedT-StatusProhibit-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + am-WithLongSN-RedCap-r17 ENUMERATED {supported} OPTIONAL + ]] +} + +-- TAG-RLC-PARAMETERS-STOP +-- TAG-SDAP-PARAMETERS-START + +SDAP-Parameters ::= SEQUENCE { + as-ReflectiveQoS ENUMERATED {true} OPTIONAL, + ..., + [[ + sdap-QOS-IAB-r16 ENUMERATED {supported} OPTIONAL, + sdapHeaderIAB-r16 ENUMERATED {supported} OPTIONAL + ]] + +} + +-- TAG-SDAP-PARAMETERS-STOP +-- TAG-SIDELINKPARAMETERS-START + +SidelinkParameters-r16 ::= SEQUENCE { + sidelinkParametersNR-r16 SidelinkParametersNR-r16 OPTIONAL, + sidelinkParametersEUTRA-r16 SidelinkParametersEUTRA-r16 OPTIONAL +} + +SidelinkParametersNR-r16 ::= SEQUENCE { + rlc-ParametersSidelink-r16 RLC-ParametersSidelink-r16 OPTIONAL, + mac-ParametersSidelink-r16 MAC-ParametersSidelink-r16 OPTIONAL, + fdd-Add-UE-Sidelink-Capabilities-r16 UE-SidelinkCapabilityAddXDD-Mode-r16 OPTIONAL, + tdd-Add-UE-Sidelink-Capabilities-r16 UE-SidelinkCapabilityAddXDD-Mode-r16 OPTIONAL, + supportedBandListSidelink-r16 SEQUENCE (SIZE (1..maxBands)) OF BandSidelink-r16 OPTIONAL, + ..., + [[ + relayParameters-r17 RelayParameters-r17 OPTIONAL + ]], + [[ + -- R1 32-x: Use of new P0 parameters for open loop power control + p0-OLPC-Sidelink-r17 ENUMERATED {supported} OPTIONAL + ]] +} + +SidelinkParametersEUTRA-r16 ::= SEQUENCE { + sl-ParametersEUTRA1-r16 OCTET STRING OPTIONAL, + sl-ParametersEUTRA2-r16 OCTET STRING OPTIONAL, + sl-ParametersEUTRA3-r16 OCTET STRING OPTIONAL, + supportedBandListSidelinkEUTRA-r16 SEQUENCE (SIZE (1..maxBandsEUTRA)) OF BandSidelinkEUTRA-r16 OPTIONAL, + ... +} + +RLC-ParametersSidelink-r16 ::= SEQUENCE { + am-WithLongSN-Sidelink-r16 ENUMERATED {supported} OPTIONAL, + um-WithLongSN-Sidelink-r16 ENUMERATED {supported} OPTIONAL, + ... +} + +MAC-ParametersSidelink-r16 ::= SEQUENCE { + mac-ParametersSidelinkCommon-r16 MAC-ParametersSidelinkCommon-r16 OPTIONAL, + mac-ParametersSidelinkXDD-Diff-r16 MAC-ParametersSidelinkXDD-Diff-r16 OPTIONAL, + ... +} + +UE-SidelinkCapabilityAddXDD-Mode-r16 ::= SEQUENCE { + mac-ParametersSidelinkXDD-Diff-r16 MAC-ParametersSidelinkXDD-Diff-r16 OPTIONAL +} + +MAC-ParametersSidelinkCommon-r16 ::= SEQUENCE { + lcp-RestrictionSidelink-r16 ENUMERATED {supported} OPTIONAL, + multipleConfiguredGrantsSidelink-r16 ENUMERATED {supported} OPTIONAL, + ..., + [[ + drx-OnSidelink-r17 ENUMERATED {supported} OPTIONAL + ]] +} + +MAC-ParametersSidelinkXDD-Diff-r16 ::= SEQUENCE { + multipleSR-ConfigurationsSidelink-r16 ENUMERATED {supported} OPTIONAL, + logicalChannelSR-DelayTimerSidelink-r16 ENUMERATED {supported} OPTIONAL, + ... +} + +BandSidelinkEUTRA-r16 ::= SEQUENCE { + freqBandSidelinkEUTRA-r16 FreqBandIndicatorEUTRA, + -- R1 15-7: Transmitting LTE sidelink mode 3 scheduled by NR Uu + gnb-ScheduledMode3SidelinkEUTRA-r16 SEQUENCE { + gnb-ScheduledMode3DelaySidelinkEUTRA-r16 ENUMERATED {ms0, ms0dot25, ms0dot5, ms0dot625, ms0dot75, ms1, + ms1dot25, ms1dot5, ms1dot75, ms2, ms2dot5, ms3, ms4, + ms5, ms6, ms8, ms10, ms20} + } OPTIONAL, + -- R1 15-9: Transmitting LTE sidelink mode 4 configured by NR Uu + gnb-ScheduledMode4SidelinkEUTRA-r16 ENUMERATED {supported} OPTIONAL +} + +BandSidelink-r16 ::= SEQUENCE { + freqBandSidelink-r16 FreqBandIndicatorNR, + --15-1 + sl-Reception-r16 SEQUENCE { + harq-RxProcessSidelink-r16 ENUMERATED {n16, n24, n32, n48, n64}, + pscch-RxSidelink-r16 ENUMERATED {value1, value2}, + scs-CP-PatternRxSidelink-r16 CHOICE { + fr1-r16 SEQUENCE { + scs-15kHz-r16 BIT STRING (SIZE (16)) OPTIONAL, + scs-30kHz-r16 BIT STRING (SIZE (16)) OPTIONAL, + scs-60kHz-r16 BIT STRING (SIZE (16)) OPTIONAL + }, + fr2-r16 SEQUENCE { + scs-60kHz-r16 BIT STRING (SIZE (16)) OPTIONAL, + scs-120kHz-r16 BIT STRING (SIZE (16)) OPTIONAL + } + } OPTIONAL, + extendedCP-RxSidelink-r16 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + --15-2 + sl-TransmissionMode1-r16 SEQUENCE { + harq-TxProcessModeOneSidelink-r16 ENUMERATED {n8, n16}, + scs-CP-PatternTxSidelinkModeOne-r16 CHOICE { + fr1-r16 SEQUENCE { + scs-15kHz-r16 BIT STRING (SIZE (16)) OPTIONAL, + scs-30kHz-r16 BIT STRING (SIZE (16)) OPTIONAL, + scs-60kHz-r16 BIT STRING (SIZE (16)) OPTIONAL + }, + fr2-r16 SEQUENCE { + scs-60kHz-r16 BIT STRING (SIZE (16)) OPTIONAL, + scs-120kHz-r16 BIT STRING (SIZE (16)) OPTIONAL + } + }, + extendedCP-TxSidelink-r16 ENUMERATED {supported} OPTIONAL, + harq-ReportOnPUCCH-r16 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + --15-4 + sync-Sidelink-r16 SEQUENCE { + gNB-Sync-r16 ENUMERATED {supported} OPTIONAL, + gNB-GNSS-UE-SyncWithPriorityOnGNB-ENB-r16 ENUMERATED {supported} OPTIONAL, + gNB-GNSS-UE-SyncWithPriorityOnGNSS-r16 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + --15-10 + sl-Tx-256QAM-r16 ENUMERATED {supported} OPTIONAL, + --15-11 + psfch-FormatZeroSidelink-r16 SEQUENCE { + psfch-RxNumber ENUMERATED {n5, n15, n25, n32, n35, n45, n50, n64}, + psfch-TxNumber ENUMERATED {n4, n8, n16} + } OPTIONAL, + --15-12 + lowSE-64QAM-MCS-TableSidelink-r16 ENUMERATED {supported} OPTIONAL, + --15-15 + enb-sync-Sidelink-r16 ENUMERATED {supported} OPTIONAL, + ..., + [[ + --15-3 + sl-TransmissionMode2-r16 SEQUENCE { + harq-TxProcessModeTwoSidelink-r16 ENUMERATED {n8, n16}, + scs-CP-PatternTxSidelinkModeTwo-r16 ENUMERATED {supported} OPTIONAL, + dl-openLoopPC-Sidelink-r16 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + --15-5 + congestionControlSidelink-r16 SEQUENCE { + cbr-ReportSidelink-r16 ENUMERATED {supported} OPTIONAL, + cbr-CR-TimeLimitSidelink-r16 ENUMERATED {time1, time2} + } OPTIONAL, + --15-22 + fewerSymbolSlotSidelink-r16 ENUMERATED {supported} OPTIONAL, + --15-23 + sl-openLoopPC-RSRP-ReportSidelink-r16 ENUMERATED {supported} OPTIONAL, + --13-1 + sl-Rx-256QAM-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + ue-PowerClassSidelink-r16 ENUMERATED {pc2, pc3, spare6, spare5, spare4, spare3, spare2, spare1} + OPTIONAL + ]], + [[ + --32-4a + sl-TransmissionMode2-RandomResourceSelection-r17 SEQUENCE { + harq-TxProcessModeTwoSidelink-r17 ENUMERATED {n8, n16}, + scs-CP-PatternTxSidelinkModeTwo-r17 CHOICE { + fr1-r17 SEQUENCE { + scs-15kHz-r17 BIT STRING (SIZE (16)) OPTIONAL, + scs-30kHz-r17 BIT STRING (SIZE (16)) OPTIONAL, + scs-60kHz-r17 BIT STRING (SIZE (16)) OPTIONAL + }, + fr2-r17 SEQUENCE { + scs-60kHz-r17 BIT STRING (SIZE (16)) OPTIONAL, + scs-120kHz-r17 BIT STRING (SIZE (16)) OPTIONAL + } + } OPTIONAL, + extendedCP-Mode2Random-r17 ENUMERATED {supported} OPTIONAL, + dl-openLoopPC-Sidelink-r17 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + --32-4b + sync-Sidelink-v1710 SEQUENCE { + sync-GNSS-r17 ENUMERATED {supported} OPTIONAL, + gNB-Sync-r17 ENUMERATED {supported} OPTIONAL, + gNB-GNSS-UE-SyncWithPriorityOnGNB-ENB-r17 ENUMERATED {supported} OPTIONAL, + gNB-GNSS-UE-SyncWithPriorityOnGNSS-r17 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + --32-4c + enb-sync-Sidelink-v1710 ENUMERATED {supported} OPTIONAL, + --32-5a-2 + rx-IUC-Scheme1-PreferredMode2Sidelink-r17 ENUMERATED {supported} OPTIONAL, + --32-5a-3 + rx-IUC-Scheme1-NonPreferredMode2Sidelink-r17 ENUMERATED {supported} OPTIONAL, + --32-5b-2 + rx-IUC-Scheme2-Mode2Sidelink-r17 ENUMERATED {n5, n15, n25, n32, n35, n45, n50, n64} OPTIONAL, + --32-6-1 + rx-IUC-Scheme1-SCI-r17 ENUMERATED {supported} OPTIONAL, + --32-6-2 + rx-IUC-Scheme1-SCI-ExplicitReq-r17 ENUMERATED {supported} OPTIONAL + ]] +} + +RelayParameters-r17 ::= SEQUENCE { + relayUE-Operation-L2-r17 ENUMERATED {supported} OPTIONAL, + remoteUE-Operation-L2-r17 ENUMERATED {supported} OPTIONAL, + remoteUE-PathSwitchToIdleInactiveRelay-r17 ENUMERATED {supported} OPTIONAL, + ... +} + +-- TAG-SIDELINKPARAMETERS-STOP +-- TAG-SIMULTANEOUSRXTXPERBANDPAIR-START + +SimultaneousRxTxPerBandPair ::= BIT STRING (SIZE (3..496)) + +-- TAG-SIMULTANEOUSRXTXPERBANDPAIR-STOP +-- TAG-SON-PARAMETERS-START + +SON-Parameters-r16 ::= SEQUENCE { + rach-Report-r16 ENUMERATED {supported} OPTIONAL, + ..., + [[ + rlfReportCHO-r17 ENUMERATED {supported} OPTIONAL, + rlfReportDAPS-r17 ENUMERATED {supported} OPTIONAL, + success-HO-Report-r17 ENUMERATED {supported} OPTIONAL, + twoStepRACH-Report-r17 ENUMERATED {supported} OPTIONAL, + pscell-MHI-Report-r17 ENUMERATED {supported} OPTIONAL, + onDemandSI-Report-r17 ENUMERATED {supported} OPTIONAL + ]] +} + +-- TAG-SON-PARAMETERS-STOP +-- TAG-SPATIALRELATIONSSRS-POS-START + +SpatialRelationsSRS-Pos-r16 ::= SEQUENCE { + spatialRelation-SRS-PosBasedOnSSB-Serving-r16 ENUMERATED {supported} OPTIONAL, + spatialRelation-SRS-PosBasedOnCSI-RS-Serving-r16 ENUMERATED {supported} OPTIONAL, + spatialRelation-SRS-PosBasedOnPRS-Serving-r16 ENUMERATED {supported} OPTIONAL, + spatialRelation-SRS-PosBasedOnSRS-r16 ENUMERATED {supported} OPTIONAL, + spatialRelation-SRS-PosBasedOnSSB-Neigh-r16 ENUMERATED {supported} OPTIONAL, + spatialRelation-SRS-PosBasedOnPRS-Neigh-r16 ENUMERATED {supported} OPTIONAL +} + +--TAG-SPATIALRELATIONSSRS-POS-STOP +-- TAG-SRS-ALLPOSRESOURCESRRC-INACTIVE-START + +SRS-AllPosResourcesRRC-Inactive-r17 ::= SEQUENCE { + srs-PosResourcesRRC-Inactive-r17 SEQUENCE { + -- R1 27-15: Positioning SRS transmission in RRC_INACTIVE state for initial UL BWP + maxNumberSRS-PosResourceSetPerBWP-r17 ENUMERATED {n1, n2, n4, n8, n12, n16}, + maxNumberSRS-PosResourcesPerBWP-r17 ENUMERATED {n1, n2, n4, n8, n16, n32, n64}, + maxNumberSRS-ResourcesPerBWP-PerSlot-r17 ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10, n12, n14}, + maxNumberPeriodicSRS-PosResourcesPerBWP-r17 ENUMERATED {n1, n2, n4, n8, n16, n32, n64}, + maxNumberPeriodicSRS-PosResourcesPerBWP-PerSlot-r17 ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10, n12, n14}, + dummy1 ENUMERATED {n1, n2, n4, n8, n16, n32, n64 }, + dummy2 ENUMERATED {n1, n2, n3, n4, n5, n6, n8, n10, n12, n14} + } +} + +-- TAG-SRS-ALLPOSRESOURCESRRC-INACTIVE-STOP +-- TAG-SRS-SWITCHINGTIMENR-START + +SRS-SwitchingTimeNR ::= SEQUENCE { + switchingTimeDL ENUMERATED {n0us, n30us, n100us, n140us, n200us, n300us, n500us, n900us} OPTIONAL, + switchingTimeUL ENUMERATED {n0us, n30us, n100us, n140us, n200us, n300us, n500us, n900us} OPTIONAL +} + +-- TAG-SRS-SWITCHINGTIMENR-STOP +-- TAG-SRS-SWITCHINGTIMEEUTRA-START + +SRS-SwitchingTimeEUTRA ::= SEQUENCE { + switchingTimeDL ENUMERATED {n0, n0dot5, n1, n1dot5, n2, n2dot5, n3, n3dot5, n4, n4dot5, n5, n5dot5, n6, n6dot5, n7} + OPTIONAL, + switchingTimeUL ENUMERATED {n0, n0dot5, n1, n1dot5, n2, n2dot5, n3, n3dot5, n4, n4dot5, n5, n5dot5, n6, n6dot5, n7} + OPTIONAL +} +-- TAG-SRS-SWITCHINGTIMEEUTRA-STOP +-- TAG-SUPPORTEDBANDWIDTH-START + +SupportedBandwidth ::= CHOICE { + fr1 ENUMERATED {mhz5, mhz10, mhz15, mhz20, mhz25, mhz30, mhz40, mhz50, mhz60, mhz80, mhz100}, + fr2 ENUMERATED {mhz50, mhz100, mhz200, mhz400} +} + +SupportedBandwidth-v1700 ::= CHOICE { + fr1-r17 ENUMERATED {mhz5, mhz10, mhz15, mhz20, mhz25, mhz30, mhz35, mhz40, mhz45, mhz50, mhz60, mhz70, mhz80, mhz90, mhz100}, + fr2-r17 ENUMERATED {mhz50, mhz100, mhz200, mhz400, mhz800, mhz1600, mhz2000} +} + +-- TAG-SUPPORTEDBANDWIDTH-STOP +-- TAG-UE-BASEDPERFMEAS-PARAMETERS-START + +UE-BasedPerfMeas-Parameters-r16 ::= SEQUENCE { + barometerMeasReport-r16 ENUMERATED {supported} OPTIONAL, + immMeasBT-r16 ENUMERATED {supported} OPTIONAL, + immMeasWLAN-r16 ENUMERATED {supported} OPTIONAL, + loggedMeasBT-r16 ENUMERATED {supported} OPTIONAL, + loggedMeasurements-r16 ENUMERATED {supported} OPTIONAL, + loggedMeasWLAN-r16 ENUMERATED {supported} OPTIONAL, + orientationMeasReport-r16 ENUMERATED {supported} OPTIONAL, + speedMeasReport-r16 ENUMERATED {supported} OPTIONAL, + gnss-Location-r16 ENUMERATED {supported} OPTIONAL, + ulPDCP-Delay-r16 ENUMERATED {supported} OPTIONAL, + ..., + [[ + sigBasedLogMDT-OverrideProtect-r17 ENUMERATED {supported} OPTIONAL, + multipleCEF-Report-r17 ENUMERATED {supported} OPTIONAL, + excessPacketDelay-r17 ENUMERATED {supported} OPTIONAL, + earlyMeasLog-r17 ENUMERATED {supported} OPTIONAL + ]] +} + +-- TAG-UE-BASEDPERFMEAS-PARAMETERS-STOP +-- TAG-UE-CAPABILITYRAT-CONTAINERLIST-START + +UE-CapabilityRAT-ContainerList ::= SEQUENCE (SIZE (0..maxRAT-CapabilityContainers)) OF UE-CapabilityRAT-Container + +UE-CapabilityRAT-Container ::= SEQUENCE { + rat-Type RAT-Type, + ue-CapabilityRAT-Container OCTET STRING +} + +-- TAG-UE-CAPABILITYRAT-CONTAINERLIST-STOP +-- TAG-UE-CAPABILITYRAT-REQUESTLIST-START + +UE-CapabilityRAT-RequestList ::= SEQUENCE (SIZE (1..maxRAT-CapabilityContainers)) OF UE-CapabilityRAT-Request + +UE-CapabilityRAT-Request ::= SEQUENCE { + rat-Type RAT-Type, + capabilityRequestFilter OCTET STRING OPTIONAL, -- Need N + ... +} + +-- TAG-UE-CAPABILITYRAT-REQUESTLIST-STOP +-- TAG-UE-CAPABILITYREQUESTFILTERCOMMON-START + +UE-CapabilityRequestFilterCommon ::= SEQUENCE { + mrdc-Request SEQUENCE { + omitEN-DC ENUMERATED {true} OPTIONAL, -- Need N + includeNR-DC ENUMERATED {true} OPTIONAL, -- Need N + includeNE-DC ENUMERATED {true} OPTIONAL -- Need N + } OPTIONAL, -- Need N + ..., + [[ + codebookTypeRequest-r16 SEQUENCE { + type1-SinglePanel-r16 ENUMERATED {true} OPTIONAL, -- Need N + type1-MultiPanel-r16 ENUMERATED {true} OPTIONAL, -- Need N + type2-r16 ENUMERATED {true} OPTIONAL, -- Need N + type2-PortSelection-r16 ENUMERATED {true} OPTIONAL -- Need N + } OPTIONAL, -- Need N + uplinkTxSwitchRequest-r16 ENUMERATED {true} OPTIONAL -- Need N + ]], + [[ + requestedCellGrouping-r16 SEQUENCE (SIZE (1..maxCellGroupings-r16)) OF CellGrouping-r16 OPTIONAL -- Cond NRDC + ]], + [[ + fallbackGroupFiveRequest-r17 ENUMERATED {true} OPTIONAL -- Need N + ]] +} + +CellGrouping-r16 ::= SEQUENCE { + mcg-r16 SEQUENCE (SIZE (1..maxBands)) OF FreqBandIndicatorNR, + scg-r16 SEQUENCE (SIZE (1..maxBands)) OF FreqBandIndicatorNR, + mode-r16 ENUMERATED {sync, async} +} + +-- TAG-UE-CAPABILITYREQUESTFILTERCOMMON-STOP +-- TAG-UE-CAPABILITYREQUESTFILTERNR-START + +UE-CapabilityRequestFilterNR ::= SEQUENCE { + frequencyBandListFilter FreqBandList OPTIONAL, -- Need N + nonCriticalExtension UE-CapabilityRequestFilterNR-v1540 OPTIONAL +} + +UE-CapabilityRequestFilterNR-v1540 ::= SEQUENCE { + srs-SwitchingTimeRequest ENUMERATED {true} OPTIONAL, -- Need N + nonCriticalExtension UE-CapabilityRequestFilterNR-v1710 OPTIONAL +} + +UE-CapabilityRequestFilterNR-v1710 ::= SEQUENCE { + sidelinkRequest-r17 ENUMERATED {true} OPTIONAL, -- Need N + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-UE-CAPABILITYREQUESTFILTERNR-STOP +-- TAG-UE-MRDC-CAPABILITY-START + +UE-MRDC-Capability ::= SEQUENCE { + measAndMobParametersMRDC MeasAndMobParametersMRDC OPTIONAL, + phy-ParametersMRDC-v1530 Phy-ParametersMRDC OPTIONAL, + rf-ParametersMRDC RF-ParametersMRDC, + generalParametersMRDC GeneralParametersMRDC-XDD-Diff OPTIONAL, + fdd-Add-UE-MRDC-Capabilities UE-MRDC-CapabilityAddXDD-Mode OPTIONAL, + tdd-Add-UE-MRDC-Capabilities UE-MRDC-CapabilityAddXDD-Mode OPTIONAL, + fr1-Add-UE-MRDC-Capabilities UE-MRDC-CapabilityAddFRX-Mode OPTIONAL, + fr2-Add-UE-MRDC-Capabilities UE-MRDC-CapabilityAddFRX-Mode OPTIONAL, + featureSetCombinations SEQUENCE (SIZE (1..maxFeatureSetCombinations)) OF FeatureSetCombination OPTIONAL, + pdcp-ParametersMRDC-v1530 PDCP-ParametersMRDC OPTIONAL, + lateNonCriticalExtension OCTET STRING (CONTAINING UE-MRDC-Capability-v15g0) OPTIONAL, + nonCriticalExtension UE-MRDC-Capability-v1560 OPTIONAL +} + +-- Regular non-critical extensions: +UE-MRDC-Capability-v1560 ::= SEQUENCE { + receivedFilters OCTET STRING (CONTAINING UECapabilityEnquiry-v1560-IEs) OPTIONAL, + measAndMobParametersMRDC-v1560 MeasAndMobParametersMRDC-v1560 OPTIONAL, + fdd-Add-UE-MRDC-Capabilities-v1560 UE-MRDC-CapabilityAddXDD-Mode-v1560 OPTIONAL, + tdd-Add-UE-MRDC-Capabilities-v1560 UE-MRDC-CapabilityAddXDD-Mode-v1560 OPTIONAL, + nonCriticalExtension UE-MRDC-Capability-v1610 OPTIONAL +} + +UE-MRDC-Capability-v1610 ::= SEQUENCE { + measAndMobParametersMRDC-v1610 MeasAndMobParametersMRDC-v1610 OPTIONAL, + generalParametersMRDC-v1610 GeneralParametersMRDC-v1610 OPTIONAL, + pdcp-ParametersMRDC-v1610 PDCP-ParametersMRDC-v1610 OPTIONAL, + nonCriticalExtension UE-MRDC-Capability-v1700 OPTIONAL +} + +UE-MRDC-Capability-v1700 ::= SEQUENCE { + measAndMobParametersMRDC-v1700 MeasAndMobParametersMRDC-v1700, + nonCriticalExtension UE-MRDC-Capability-v1730 OPTIONAL +} + +UE-MRDC-Capability-v1730 ::= SEQUENCE { + measAndMobParametersMRDC-v1730 MeasAndMobParametersMRDC-v1730 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- Late non-critical extensions: +UE-MRDC-Capability-v15g0 ::= SEQUENCE { + rf-ParametersMRDC-v15g0 RF-ParametersMRDC-v15g0 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +UE-MRDC-CapabilityAddXDD-Mode ::= SEQUENCE { + measAndMobParametersMRDC-XDD-Diff MeasAndMobParametersMRDC-XDD-Diff OPTIONAL, + generalParametersMRDC-XDD-Diff GeneralParametersMRDC-XDD-Diff OPTIONAL +} + +UE-MRDC-CapabilityAddXDD-Mode-v1560 ::= SEQUENCE { + measAndMobParametersMRDC-XDD-Diff-v1560 MeasAndMobParametersMRDC-XDD-Diff-v1560 OPTIONAL +} + +UE-MRDC-CapabilityAddFRX-Mode ::= SEQUENCE { + measAndMobParametersMRDC-FRX-Diff MeasAndMobParametersMRDC-FRX-Diff +} + + +GeneralParametersMRDC-XDD-Diff ::= SEQUENCE { + splitSRB-WithOneUL-Path ENUMERATED {supported} OPTIONAL, + splitDRB-withUL-Both-MCG-SCG ENUMERATED {supported} OPTIONAL, + srb3 ENUMERATED {supported} OPTIONAL, + dummy ENUMERATED {supported} OPTIONAL, + ... +} + +GeneralParametersMRDC-v1610 ::= SEQUENCE { + f1c-OverEUTRA-r16 ENUMERATED {supported} OPTIONAL +} + +-- TAG-UE-MRDC-CAPABILITY-STOP +-- TAG-UE-NR-CAPABILITY-START + +UE-NR-Capability ::= SEQUENCE { + accessStratumRelease AccessStratumRelease, + pdcp-Parameters PDCP-Parameters, + rlc-Parameters RLC-Parameters OPTIONAL, + mac-Parameters MAC-Parameters OPTIONAL, + phy-Parameters Phy-Parameters, + rf-Parameters RF-Parameters, + measAndMobParameters MeasAndMobParameters OPTIONAL, + fdd-Add-UE-NR-Capabilities UE-NR-CapabilityAddXDD-Mode OPTIONAL, + tdd-Add-UE-NR-Capabilities UE-NR-CapabilityAddXDD-Mode OPTIONAL, + fr1-Add-UE-NR-Capabilities UE-NR-CapabilityAddFRX-Mode OPTIONAL, + fr2-Add-UE-NR-Capabilities UE-NR-CapabilityAddFRX-Mode OPTIONAL, + featureSets FeatureSets OPTIONAL, + featureSetCombinations SEQUENCE (SIZE (1..maxFeatureSetCombinations)) OF FeatureSetCombination OPTIONAL, + lateNonCriticalExtension OCTET STRING (CONTAINING UE-NR-Capability-v15c0) OPTIONAL, + nonCriticalExtension UE-NR-Capability-v1530 OPTIONAL +} + +-- Regular non-critical Rel-15 extensions: +UE-NR-Capability-v1530 ::= SEQUENCE { + fdd-Add-UE-NR-Capabilities-v1530 UE-NR-CapabilityAddXDD-Mode-v1530 OPTIONAL, + tdd-Add-UE-NR-Capabilities-v1530 UE-NR-CapabilityAddXDD-Mode-v1530 OPTIONAL, + dummy ENUMERATED {supported} OPTIONAL, + interRAT-Parameters InterRAT-Parameters OPTIONAL, + inactiveState ENUMERATED {supported} OPTIONAL, + delayBudgetReporting ENUMERATED {supported} OPTIONAL, + nonCriticalExtension UE-NR-Capability-v1540 OPTIONAL +} + +UE-NR-Capability-v1540 ::= SEQUENCE { + sdap-Parameters SDAP-Parameters OPTIONAL, + overheatingInd ENUMERATED {supported} OPTIONAL, + ims-Parameters IMS-Parameters OPTIONAL, + fr1-Add-UE-NR-Capabilities-v1540 UE-NR-CapabilityAddFRX-Mode-v1540 OPTIONAL, + fr2-Add-UE-NR-Capabilities-v1540 UE-NR-CapabilityAddFRX-Mode-v1540 OPTIONAL, + fr1-fr2-Add-UE-NR-Capabilities UE-NR-CapabilityAddFRX-Mode OPTIONAL, + nonCriticalExtension UE-NR-Capability-v1550 OPTIONAL +} + +UE-NR-Capability-v1550 ::= SEQUENCE { + reducedCP-Latency ENUMERATED {supported} OPTIONAL, + nonCriticalExtension UE-NR-Capability-v1560 OPTIONAL +} + +UE-NR-Capability-v1560 ::= SEQUENCE { + nrdc-Parameters NRDC-Parameters OPTIONAL, + receivedFilters OCTET STRING (CONTAINING UECapabilityEnquiry-v1560-IEs) OPTIONAL, + nonCriticalExtension UE-NR-Capability-v1570 OPTIONAL +} + +UE-NR-Capability-v1570 ::= SEQUENCE { + nrdc-Parameters-v1570 NRDC-Parameters-v1570 OPTIONAL, + nonCriticalExtension UE-NR-Capability-v1610 OPTIONAL +} + +-- Late non-critical Rel-15 extensions: +UE-NR-Capability-v15c0 ::= SEQUENCE { + nrdc-Parameters-v15c0 NRDC-Parameters-v15c0 OPTIONAL, + partialFR2-FallbackRX-Req ENUMERATED {true} OPTIONAL, + nonCriticalExtension UE-NR-Capability-v15g0 OPTIONAL +} + +UE-NR-Capability-v15g0 ::= SEQUENCE { + rf-Parameters-v15g0 RF-Parameters-v15g0 OPTIONAL, + nonCriticalExtension UE-NR-Capability-v15j0 OPTIONAL +} + +UE-NR-Capability-v15j0 ::= SEQUENCE { + -- Following field is only for REL-15 late non-critical extensions + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UE-NR-Capability-v16a0 OPTIONAL +} + +-- Regular non-critical Rel-16 extensions: +UE-NR-Capability-v1610 ::= SEQUENCE { + inDeviceCoexInd-r16 ENUMERATED {supported} OPTIONAL, + dl-DedicatedMessageSegmentation-r16 ENUMERATED {supported} OPTIONAL, + nrdc-Parameters-v1610 NRDC-Parameters-v1610 OPTIONAL, + powSav-Parameters-r16 PowSav-Parameters-r16 OPTIONAL, + fr1-Add-UE-NR-Capabilities-v1610 UE-NR-CapabilityAddFRX-Mode-v1610 OPTIONAL, + fr2-Add-UE-NR-Capabilities-v1610 UE-NR-CapabilityAddFRX-Mode-v1610 OPTIONAL, + bh-RLF-Indication-r16 ENUMERATED {supported} OPTIONAL, + directSN-AdditionFirstRRC-IAB-r16 ENUMERATED {supported} OPTIONAL, + bap-Parameters-r16 BAP-Parameters-r16 OPTIONAL, + referenceTimeProvision-r16 ENUMERATED {supported} OPTIONAL, + sidelinkParameters-r16 SidelinkParameters-r16 OPTIONAL, + highSpeedParameters-r16 HighSpeedParameters-r16 OPTIONAL, + mac-Parameters-v1610 MAC-Parameters-v1610 OPTIONAL, + mcgRLF-RecoveryViaSCG-r16 ENUMERATED {supported} OPTIONAL, + resumeWithStoredMCG-SCells-r16 ENUMERATED {supported} OPTIONAL, + resumeWithStoredSCG-r16 ENUMERATED {supported} OPTIONAL, + resumeWithSCG-Config-r16 ENUMERATED {supported} OPTIONAL, + ue-BasedPerfMeas-Parameters-r16 UE-BasedPerfMeas-Parameters-r16 OPTIONAL, + son-Parameters-r16 SON-Parameters-r16 OPTIONAL, + onDemandSIB-Connected-r16 ENUMERATED {supported} OPTIONAL, + nonCriticalExtension UE-NR-Capability-v1640 OPTIONAL +} + +UE-NR-Capability-v1640 ::= SEQUENCE { + redirectAtResumeByNAS-r16 ENUMERATED {supported} OPTIONAL, + phy-ParametersSharedSpectrumChAccess-r16 Phy-ParametersSharedSpectrumChAccess-r16 OPTIONAL, + nonCriticalExtension UE-NR-Capability-v1650 OPTIONAL +} + +UE-NR-Capability-v1650 ::= SEQUENCE { + mpsPriorityIndication-r16 ENUMERATED {supported} OPTIONAL, + highSpeedParameters-v1650 HighSpeedParameters-v1650 OPTIONAL, + nonCriticalExtension UE-NR-Capability-v1690 OPTIONAL +} + +UE-NR-Capability-v1690 ::= SEQUENCE { + ul-RRC-Segmentation-r16 ENUMERATED {supported} OPTIONAL, + nonCriticalExtension UE-NR-Capability-v1700 OPTIONAL +} + +-- Late non-critical extensions from Rel-16 onwards: +UE-NR-Capability-v16a0 ::= SEQUENCE { + phy-Parameters-v16a0 Phy-Parameters-v16a0 OPTIONAL, + rf-Parameters-v16a0 RF-Parameters-v16a0 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- Regular non-critical Rel-17 extensions: +UE-NR-Capability-v1700 ::= SEQUENCE { + inactiveStatePO-Determination-r17 ENUMERATED {supported} OPTIONAL, + highSpeedParameters-v1700 HighSpeedParameters-v1700 OPTIONAL, + powSav-Parameters-v1700 PowSav-Parameters-v1700 OPTIONAL, + mac-Parameters-v1700 MAC-Parameters-v1700 OPTIONAL, + ims-Parameters-v1700 IMS-Parameters-v1700 OPTIONAL, + measAndMobParameters-v1700 MeasAndMobParameters-v1700, + appLayerMeasParameters-r17 AppLayerMeasParameters-r17 OPTIONAL, + redCapParameters-r17 RedCapParameters-r17 OPTIONAL, + ra-SDT-r17 ENUMERATED {supported} OPTIONAL, + srb-SDT-r17 ENUMERATED {supported} OPTIONAL, + gNB-SideRTT-BasedPDC-r17 ENUMERATED {supported} OPTIONAL, + bh-RLF-DetectionRecovery-Indication-r17 ENUMERATED {supported} OPTIONAL, + nrdc-Parameters-v1700 NRDC-Parameters-v1700 OPTIONAL, + bap-Parameters-v1700 BAP-Parameters-v1700 OPTIONAL, + musim-GapPreference-r17 ENUMERATED {supported} OPTIONAL, + musimLeaveConnected-r17 ENUMERATED {supported} OPTIONAL, + mbs-Parameters-r17 MBS-Parameters-r17, + nonTerrestrialNetwork-r17 ENUMERATED {supported} OPTIONAL, + ntn-ScenarioSupport-r17 ENUMERATED {gso, ngso} OPTIONAL, + sliceInfoforCellReselection-r17 ENUMERATED {supported} OPTIONAL, + ue-RadioPagingInfo-r17 UE-RadioPagingInfo-r17 OPTIONAL, + -- R4 17-2 UL gap pattern for Tx power management + ul-GapFR2-Pattern-r17 BIT STRING (SIZE (4)) OPTIONAL, + ntn-Parameters-r17 NTN-Parameters-r17 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +UE-NR-CapabilityAddXDD-Mode ::= SEQUENCE { + phy-ParametersXDD-Diff Phy-ParametersXDD-Diff OPTIONAL, + mac-ParametersXDD-Diff MAC-ParametersXDD-Diff OPTIONAL, + measAndMobParametersXDD-Diff MeasAndMobParametersXDD-Diff OPTIONAL +} + +UE-NR-CapabilityAddXDD-Mode-v1530 ::= SEQUENCE { + eutra-ParametersXDD-Diff EUTRA-ParametersXDD-Diff +} + +UE-NR-CapabilityAddFRX-Mode ::= SEQUENCE { + phy-ParametersFRX-Diff Phy-ParametersFRX-Diff OPTIONAL, + measAndMobParametersFRX-Diff MeasAndMobParametersFRX-Diff OPTIONAL +} + +UE-NR-CapabilityAddFRX-Mode-v1540 ::= SEQUENCE { + ims-ParametersFRX-Diff IMS-ParametersFRX-Diff OPTIONAL +} + +UE-NR-CapabilityAddFRX-Mode-v1610 ::= SEQUENCE { + powSav-ParametersFRX-Diff-r16 PowSav-ParametersFRX-Diff-r16 OPTIONAL, + mac-ParametersFRX-Diff-r16 MAC-ParametersFRX-Diff-r16 OPTIONAL +} + +BAP-Parameters-r16 ::= SEQUENCE { + flowControlBH-RLC-ChannelBased-r16 ENUMERATED {supported} OPTIONAL, + flowControlRouting-ID-Based-r16 ENUMERATED {supported} OPTIONAL +} + +BAP-Parameters-v1700 ::= SEQUENCE { + bapHeaderRewriting-Rerouting-r17 ENUMERATED {supported} OPTIONAL, + bapHeaderRewriting-Routing-r17 ENUMERATED {supported} OPTIONAL +} + +MBS-Parameters-r17 ::= SEQUENCE { + maxMRB-Add-r17 INTEGER (1..16) OPTIONAL +} + +-- TAG-UE-NR-CAPABILITY-STOP +-- TAG-UE-RADIOPAGINGINFO-START + +UE-RadioPagingInfo-r17 ::= SEQUENCE { + -- R1 29-1: Paging enhancement + pei-SubgroupingSupportBandList-r17 SEQUENCE (SIZE (1..maxBands)) OF FreqBandIndicatorNR OPTIONAL, + ... +} + +-- TAG-UE-RADIOPAGINGINFO-STOP +-- TAG-SHAREDSPECTRUMCHACCESSPARAMSPERBAND-START + +SharedSpectrumChAccessParamsPerBand-r16 ::= SEQUENCE { + + -- R1 10-1: UL channel access for dynamic channel access mode + ul-DynamicChAccess-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-1a: UL channel access for semi-static channel access mode + ul-Semi-StaticChAccess-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-2: SSB-based RRM for dynamic channel access mode + ssb-RRM-DynamicChAccess-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-2a: SSB-based RRM for semi-static channel access mode + ssb-RRM-Semi-StaticChAccess-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-2b: MIB reading on unlicensed cell + mib-Acquisition-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-2c: SSB-based RLM for dynamic channel access mode + ssb-RLM-DynamicChAccess-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-2d: SSB-based RLM for semi-static channel access mode + ssb-RLM-Semi-StaticChAccess-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-2e: SIB1 reception on unlicensed cell + sib1-Acquisition-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-2f: Support monitoring of extended RAR window + extRA-ResponseWindow-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-2g: SSB-based BFD/CBD for dynamic channel access mode + ssb-BFD-CBD-dynamicChannelAccess-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-2h: SSB-based BFD/CBD for semi-static channel access mode + ssb-BFD-CBD-semi-staticChannelAccess-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-2i: CSI-RS-based BFD/CBD for NR-U + csi-RS-BFD-CBD-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-7: UL channel access for 10 MHz SCell + ul-ChannelBW-SCell-10mhz-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-10: RSSI and channel occupancy measurement and reporting + rssi-ChannelOccupancyReporting-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-11:SRS starting position at any OFDM symbol in a slot + srs-StartAnyOFDM-Symbol-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-20: Support search space set configuration with freqMonitorLocation-r16 + searchSpaceFreqMonitorLocation-r16 INTEGER (1..5) OPTIONAL, + -- R1 10-20a: Support coreset configuration with rb-Offset + coreset-RB-Offset-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-23:CGI reading on unlicensed cell for ANR functionality + cgi-Acquisition-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-25: Enable configured UL transmissions when DCI 2_0 is configured but not detected + configuredUL-Tx-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-27: Wideband PRACH + prach-Wideband-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-29: Support available RB set indicator field in DCI 2_0 + dci-AvailableRB-Set-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-30: Support channel occupancy duration indicator field in DCI 2_0 + dci-ChOccupancyDuration-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-8: Type B PDSCH length {3, 5, 6, 8, 9, 10, 11, 12, 13} without DMRS shift due to CRS collision + typeB-PDSCH-length-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-9: Search space set group switching with explicit DCI 2_0 bit field trigger or with implicit PDCCH decoding with DCI 2_0 monitoring + searchSpaceSwitchWithDCI-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-9b: Search space set group switching with implicit PDCCH decoding without DCI 2_0 monitoring + searchSpaceSwitchWithoutDCI-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-9d: Support Search space set group switching capability 2 + searchSpaceSwitchCapability2-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-14: Non-numerical PDSCH to HARQ-ACK timing + non-numericalPDSCH-HARQ-timing-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-15: Enhanced dynamic HARQ codebook + enhancedDynamicHARQ-codebook-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-16: One-shot HARQ ACK feedback + oneShotHARQ-feedback-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-17: Multi-PUSCH UL grant + multiPUSCH-UL-grant-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-26: CSI-RS based RLM for NR-U + csi-RS-RLM-r16 ENUMERATED {supported} OPTIONAL, + dummy ENUMERATED {supported} OPTIONAL, + -- R1 10-31: Support of P/SP-CSI-RS reception with CSI-RS-ValidationWith-DCI-r16 configured + periodicAndSemi-PersistentCSI-RS-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-3: PRB interlace mapping for PUSCH + pusch-PRB-interlace-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-3a: PRB interlace mapping for PUCCH + pucch-F0-F1-PRB-Interlace-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-12: OCC for PRB interlace mapping for PF2 and PF3 + occ-PRB-PF2-PF3-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-13a: Extended CP range of more than one symbol for CG-PUSCH + extCP-rangeCG-PUSCH-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-18: Configured grant with retransmission in CG resources + configuredGrantWithReTx-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-21a: Support using ED threshold given by gNB for UL to DL COT sharing + ed-Threshold-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-21b: Support UL to DL COT sharing + ul-DL-COT-Sharing-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-24: CG-UCI multiplexing with HARQ ACK + mux-CG-UCI-HARQ-ACK-r16 ENUMERATED {supported} OPTIONAL, + -- R1 10-28: Configured grant with Rel-16 enhanced resource configuration + cg-resourceConfig-r16 ENUMERATED {supported} OPTIONAL +} + +SharedSpectrumChAccessParamsPerBand-v1630 ::= SEQUENCE { + -- R4 4-1: DL reception in intra-carrier guardband + dl-ReceptionIntraCellGuardband-r16 ENUMERATED {supported} OPTIONAL, + -- R4 4-2: DL reception when gNB does not transmit on all RB sets of a carrier as a result of LBT + dl-ReceptionLBT-subsetRB-r16 ENUMERATED {supported} OPTIONAL +} + +SharedSpectrumChAccessParamsPerBand-v1640 ::= SEQUENCE { + -- 10-26b(1-4): CSI-RS based RRM measurement with associated SS-block + csi-RSRP-AndRSRQ-MeasWithSSB-r16 ENUMERATED {supported} OPTIONAL, + -- 10-26c(1-5): CSI-RS based RRM measurement without associated SS-block + csi-RSRP-AndRSRQ-MeasWithoutSSB-r16 ENUMERATED {supported} OPTIONAL, + -- 10-26d(1-6): CSI-RS based RS-SINR measurement + csi-SINR-Meas-r16 ENUMERATED {supported} OPTIONAL, + -- 10-26e(1-8): RLM based on a mix of SS block and CSI-RS signals within active BWP + ssb-AndCSI-RS-RLM-r16 ENUMERATED {supported} OPTIONAL, + -- 10-26f(1-9): CSI-RS based contention free RA for HO + csi-RS-CFRA-ForHO-r16 ENUMERATED {supported} OPTIONAL +} + +SharedSpectrumChAccessParamsPerBand-v1650 ::= SEQUENCE { + -- Extension of R1 10-9 capability to configure up to 16 instead of 4 cells or cell groups, respectively + extendedSearchSpaceSwitchWithDCI-r16 ENUMERATED {supported} OPTIONAL +} + +SharedSpectrumChAccessParamsPerBand-v1710 ::= SEQUENCE { + -- R1 25-12: UE initiated semi-static channel occupancy with dependent configurations + ul-Semi-StaticChAccessDependentConfig-r17 ENUMERATED {supported} OPTIONAL, + -- R1 25-13: UE initiated semi-static channel occupancy with independent configurations + ul-Semi-StaticChAccessIndependentConfig-r17 ENUMERATED {supported} OPTIONAL +} + +-- TAG-SHAREDSPECTRUMCHACCESSPARAMSPERBAND-STOP +-- TAG-ABSOLUTETIMEINFO-START + +AbsoluteTimeInfo-r16 ::= BIT STRING (SIZE (48)) + +-- TAG-ABSOLUTETIMEINFO-STOP +-- TAG-APPLAYERMEASCONFIG-START + +AppLayerMeasConfig-r17 ::= SEQUENCE { + measConfigAppLayerToAddModList-r17 SEQUENCE (SIZE (1..maxNrofAppLayerMeas-r17)) OF MeasConfigAppLayer-r17 OPTIONAL, -- Need N + measConfigAppLayerToReleaseList-r17 SEQUENCE (SIZE (1..maxNrofAppLayerMeas-r17)) OF MeasConfigAppLayerId-r17 OPTIONAL, -- Need N + rrc-SegAllowed-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + ... +} + +MeasConfigAppLayer-r17 ::= SEQUENCE { + measConfigAppLayerId-r17 MeasConfigAppLayerId-r17, + measConfigAppLayerContainer-r17 OCTET STRING (SIZE (1..8000)) OPTIONAL, -- Need N + serviceType-r17 ENUMERATED {streaming, mtsi, vr, spare5, spare4, spare3, spare2, spare1} OPTIONAL, -- Need M + pauseReporting-r17 BOOLEAN OPTIONAL, -- Need M + transmissionOfSessionStartStop-r17 BOOLEAN OPTIONAL, -- Need M + ran-VisibleParameters-r17 SetupRelease {RAN-VisibleParameters-r17} OPTIONAL, -- Cond ServiceType + ... +} + +RAN-VisibleParameters-r17 ::= SEQUENCE { + ran-VisiblePeriodicity-r17 ENUMERATED {ms120, ms240, ms480, ms640, ms1024} OPTIONAL, -- Need S + numberOfBufferLevelEntries-r17 INTEGER (1..8) OPTIONAL, -- Need R + reportPlayoutDelayForMediaStartup-r17 BOOLEAN OPTIONAL, -- Need M + ... +} + +-- TAG-APPLAYERMEASCONFIG-STOP +-- TAG-AREACONFIGURATION-START + +AreaConfiguration-r16 ::= SEQUENCE { + areaConfig-r16 AreaConfig-r16, + interFreqTargetList-r16 SEQUENCE(SIZE (1..maxFreq)) OF InterFreqTargetInfo-r16 OPTIONAL -- Need R +} + +AreaConfiguration-v1700 ::= SEQUENCE { + areaConfig-r17 AreaConfig-r16 OPTIONAL, -- Need R + interFreqTargetList-r17 SEQUENCE(SIZE (1..maxFreq)) OF InterFreqTargetInfo-r16 OPTIONAL -- Need R +} + +AreaConfig-r16 ::= CHOICE { + cellGlobalIdList-r16 CellGlobalIdList-r16, + trackingAreaCodeList-r16 TrackingAreaCodeList-r16, + trackingAreaIdentityList-r16 TrackingAreaIdentityList-r16 +} + +InterFreqTargetInfo-r16 ::= SEQUENCE { + dl-CarrierFreq-r16 ARFCN-ValueNR, + cellList-r16 SEQUENCE (SIZE (1..32)) OF PhysCellId OPTIONAL -- Need R +} + +CellGlobalIdList-r16 ::= SEQUENCE (SIZE (1..32)) OF CGI-Info-Logging-r16 + +TrackingAreaCodeList-r16 ::= SEQUENCE (SIZE (1..8)) OF TrackingAreaCode + +TrackingAreaIdentityList-r16 ::= SEQUENCE (SIZE (1..8)) OF TrackingAreaIdentity-r16 + +TrackingAreaIdentity-r16 ::= SEQUENCE { + plmn-Identity-r16 PLMN-Identity, + trackingAreaCode-r16 TrackingAreaCode +} + +-- TAG-AREACONFIGURATION-STOP +-- TAG-BTNAMELIST-START + +BT-NameList-r16 ::= SEQUENCE (SIZE (1..maxBT-Name-r16)) OF BT-Name-r16 + +BT-Name-r16 ::= OCTET STRING (SIZE (1..248)) + +-- TAG-BTNAMELIST-STOP +-- TAG-DEDICATEDINFOF1C-START + +DedicatedInfoF1c-r17 ::= OCTET STRING + +-- TAG-DEDICATEDINFOF1C-STOP +-- TAG-EUTRA-ALLOWEDMEASBANDWIDTH-START + +EUTRA-AllowedMeasBandwidth ::= ENUMERATED {mbw6, mbw15, mbw25, mbw50, mbw75, mbw100} + +-- TAG-EUTRA-ALLOWEDMEASBANDWIDTH-STOP +-- TAG-EUTRA-MBSFN-SUBFRAMECONFIGLIST-START + +EUTRA-MBSFN-SubframeConfigList ::= SEQUENCE (SIZE (1..maxMBSFN-Allocations)) OF EUTRA-MBSFN-SubframeConfig + +EUTRA-MBSFN-SubframeConfig ::= SEQUENCE { + radioframeAllocationPeriod ENUMERATED {n1, n2, n4, n8, n16, n32}, + radioframeAllocationOffset INTEGER (0..7), + subframeAllocation1 CHOICE { + oneFrame BIT STRING (SIZE(6)), + fourFrames BIT STRING (SIZE(24)) + }, + subframeAllocation2 CHOICE { + oneFrame BIT STRING (SIZE(2)), + fourFrames BIT STRING (SIZE(8)) + } OPTIONAL, -- Need R + ... +} + +-- TAG-EUTRA-MBSFN-SUBFRAMECONFIGLIST-STOP +-- TAG-EUTRA-MULTIBANDINFOLIST-START + +EUTRA-MultiBandInfoList ::= SEQUENCE (SIZE (1..maxMultiBands)) OF EUTRA-MultiBandInfo + +EUTRA-MultiBandInfo ::= SEQUENCE { + eutra-FreqBandIndicator FreqBandIndicatorEUTRA, + eutra-NS-PmaxList EUTRA-NS-PmaxList OPTIONAL -- Need R +} + +-- TAG-EUTRA-MULTIBANDINFOLIST-STOP +-- TAG-EUTRA-NS-PMAXLIST-START + +EUTRA-NS-PmaxList ::= SEQUENCE (SIZE (1..maxEUTRA-NS-Pmax)) OF EUTRA-NS-PmaxValue + +EUTRA-NS-PmaxValue ::= SEQUENCE { + additionalPmax INTEGER (-30..33) OPTIONAL, -- Need R + additionalSpectrumEmission INTEGER (1..288) OPTIONAL -- Need R +} + +-- TAG-EUTRA-NS-PMAXLIST-STOP +-- TAG-EUTRA-PHYSCELLID-START + +EUTRA-PhysCellId ::= INTEGER (0..503) + +-- TAG-EUTRA-PHYSCELLID-STOP +-- TAG-EUTRA-PHYSCELLIDRANGE-START + +EUTRA-PhysCellIdRange ::= SEQUENCE { + start EUTRA-PhysCellId, + range ENUMERATED {n4, n8, n12, n16, n24, n32, n48, n64, n84, n96, + n128, n168, n252, n504, spare2, spare1} OPTIONAL -- Need N +} + +-- TAG-EUTRA-PHYSCELLIDRANGE-STOP +-- TAG-EUTRA-PRESENCEANTENNAPORT1-START + +EUTRA-PresenceAntennaPort1 ::= BOOLEAN + +-- TAG-EUTRA-PRESENCEANTENNAPORT1-STOP +-- TAG-EUTRA-Q-OFFSETRANGE-START + +EUTRA-Q-OffsetRange ::= ENUMERATED { + dB-24, dB-22, dB-20, dB-18, dB-16, dB-14, + dB-12, dB-10, dB-8, dB-6, dB-5, dB-4, dB-3, + dB-2, dB-1, dB0, dB1, dB2, dB3, dB4, dB5, + dB6, dB8, dB10, dB12, dB14, dB16, dB18, + dB20, dB22, dB24} + +-- TAG-EUTRA-Q-OFFSETRANGE-STOP +-- TAG-IABIPADDRESS-START + +IAB-IP-Address-r16 ::= CHOICE { + iPv4-Address-r16 BIT STRING (SIZE(32)), + iPv6-Address-r16 BIT STRING (SIZE(128)), + iPv6-Prefix-r16 BIT STRING (SIZE(64)), + ... +} + +-- TAG-IABIPADDRESS-STOP +-- TAG-IABIPADDRESSINDEX-START + +IAB-IP-AddressIndex-r16 ::= INTEGER (1..maxIAB-IP-Address-r16) + +-- TAG-IABIPADDRESSINDEX-STOP +-- TAG-IAB-IP-USAGE-START + +IAB-IP-Usage-r16 ::= ENUMERATED {f1-C, f1-U, non-F1, spare} + +-- TAG-IAB-IP-USAGE-STOP +-- TAG-LOGGINGDURATION-START + +LoggingDuration-r16 ::= ENUMERATED { + min10, min20, min40, min60, min90, min120, spare2, spare1} + +-- TAG-LOGGINGDURATION-STOP +-- TAG-LOGGINGINTERVAL-START + +LoggingInterval-r16 ::= ENUMERATED { + ms320, ms640, ms1280, ms2560, ms5120, ms10240, ms20480, + ms30720, ms40960, ms61440 , infinity} + +-- TAG-LOGGINGINTERVAL-STOP +-- TAG-LOGMEASRESULTLISTBT-START + +LogMeasResultListBT-r16 ::= SEQUENCE (SIZE (1..maxBT-IdReport-r16)) OF LogMeasResultBT-r16 + +LogMeasResultBT-r16 ::= SEQUENCE { + bt-Addr-r16 BIT STRING (SIZE (48)), + rssi-BT-r16 INTEGER (-128..127) OPTIONAL, + ... +} + +-- TAG-LOGMEASRESULTLISTBT-STOP +-- TAG-LOGMEASRESULTLISTWLAN-START + +LogMeasResultListWLAN-r16 ::= SEQUENCE (SIZE (1..maxWLAN-Id-Report-r16)) OF LogMeasResultWLAN-r16 + +LogMeasResultWLAN-r16 ::= SEQUENCE { + wlan-Identifiers-r16 WLAN-Identifiers-r16, + rssiWLAN-r16 WLAN-RSSI-Range-r16 OPTIONAL, + rtt-WLAN-r16 WLAN-RTT-r16 OPTIONAL, + ... +} + +WLAN-Identifiers-r16 ::= SEQUENCE { + ssid-r16 OCTET STRING (SIZE (1..32)) OPTIONAL, + bssid-r16 OCTET STRING (SIZE (6)) OPTIONAL, + hessid-r16 OCTET STRING (SIZE (6)) OPTIONAL, + ... +} + +WLAN-RSSI-Range-r16 ::= INTEGER(0..141) + +WLAN-RTT-r16 ::= SEQUENCE { + rttValue-r16 INTEGER (0..16777215), + rttUnits-r16 ENUMERATED { + microseconds, + hundredsofnanoseconds, + tensofnanoseconds, + nanoseconds, + tenthsofnanoseconds, + ...}, + rttAccuracy-r16 INTEGER (0..255) OPTIONAL, + ... +} + +-- TAG-LOGMEASRESULTLISTWLAN-STOP +-- TAG-MEASCONFIGAPPLAYERID-START + +MeasConfigAppLayerId-r17 ::= INTEGER (0..maxNrofAppLayerMeas-1-r17) + +-- TAG-MEASCONFIGAPPLAYERID-STOP +-- TAG-OTHERCONFIG-START + +OtherConfig ::= SEQUENCE { + delayBudgetReportingConfig CHOICE{ + release NULL, + setup SEQUENCE{ + delayBudgetReportingProhibitTimer ENUMERATED {s0, s0dot4, s0dot8, s1dot6, s3, s6, s12, s30} + } + } OPTIONAL -- Need M +} + +OtherConfig-v1540 ::= SEQUENCE { + overheatingAssistanceConfig SetupRelease {OverheatingAssistanceConfig} OPTIONAL, -- Need M + ... +} +CandidateServingFreqListNR-r16 ::= SEQUENCE (SIZE (1..maxFreqIDC-r16)) OF ARFCN-ValueNR + +OtherConfig-v1610 ::= SEQUENCE { + idc-AssistanceConfig-r16 SetupRelease {IDC-AssistanceConfig-r16} OPTIONAL, -- Need M + drx-PreferenceConfig-r16 SetupRelease {DRX-PreferenceConfig-r16} OPTIONAL, -- Need M + maxBW-PreferenceConfig-r16 SetupRelease {MaxBW-PreferenceConfig-r16} OPTIONAL, -- Need M + maxCC-PreferenceConfig-r16 SetupRelease {MaxCC-PreferenceConfig-r16} OPTIONAL, -- Need M + maxMIMO-LayerPreferenceConfig-r16 SetupRelease {MaxMIMO-LayerPreferenceConfig-r16} OPTIONAL, -- Need M + minSchedulingOffsetPreferenceConfig-r16 SetupRelease {MinSchedulingOffsetPreferenceConfig-r16} OPTIONAL, -- Need M + releasePreferenceConfig-r16 SetupRelease {ReleasePreferenceConfig-r16} OPTIONAL, -- Need M + referenceTimePreferenceReporting-r16 ENUMERATED {true} OPTIONAL, -- Need R + btNameList-r16 SetupRelease {BT-NameList-r16} OPTIONAL, -- Need M + wlanNameList-r16 SetupRelease {WLAN-NameList-r16} OPTIONAL, -- Need M + sensorNameList-r16 SetupRelease {Sensor-NameList-r16} OPTIONAL, -- Need M + obtainCommonLocation-r16 ENUMERATED {true} OPTIONAL, -- Need R + sl-AssistanceConfigNR-r16 ENUMERATED{true} OPTIONAL -- Need R +} + +OtherConfig-v1700 ::= SEQUENCE { + ul-GapFR2-PreferenceConfig-r17 ENUMERATED {true} OPTIONAL, -- Need R + musim-GapAssistanceConfig-r17 SetupRelease {MUSIM-GapAssistanceConfig-r17} OPTIONAL, -- Need M + musim-LeaveAssistanceConfig-r17 SetupRelease {MUSIM-LeaveAssistanceConfig-r17} OPTIONAL, -- Need M + successHO-Config-r17 SetupRelease {SuccessHO-Config-r17} OPTIONAL, -- Need M + maxBW-PreferenceConfigFR2-2-r17 ENUMERATED {true} OPTIONAL, -- Cond maxBW + maxMIMO-LayerPreferenceConfigFR2-2-r17 ENUMERATED {true} OPTIONAL, -- Cond maxMIMO + minSchedulingOffsetPreferenceConfigExt-r17 ENUMERATED {true} OPTIONAL, -- Cond minOffset + rlm-RelaxationReportingConfig-r17 SetupRelease {RLM-RelaxationReportingConfig-r17} OPTIONAL, -- Need M + bfd-RelaxationReportingConfig-r17 SetupRelease {BFD-RelaxationReportingConfig-r17} OPTIONAL, -- Need M + scg-DeactivationPreferenceConfig-r17 SetupRelease {SCG-DeactivationPreferenceConfig-r17} OPTIONAL, -- Cond SCG + rrm-MeasRelaxationReportingConfig-r17 SetupRelease {RRM-MeasRelaxationReportingConfig-r17} OPTIONAL, -- Need M + propDelayDiffReportConfig-r17 SetupRelease {PropDelayDiffReportConfig-r17} OPTIONAL -- Need M +} + +MUSIM-GapAssistanceConfig-r17 ::= SEQUENCE { + musim-GapProhibitTimer-r17 ENUMERATED {s0, s0dot1, s0dot2, s0dot3, s0dot4, s0dot5, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10} +} + +MUSIM-LeaveAssistanceConfig-r17 ::= SEQUENCE { + musim-LeaveWithoutResponseTimer-r17 ENUMERATED {ms10, ms20, ms40, ms60, ms80, ms100, spare2, spare1} +} + +SuccessHO-Config-r17 ::= SEQUENCE { + thresholdPercentageT304-r17 ENUMERATED {p40, p60, p80, spare5, spare4, spare3, spare2, spare1} OPTIONAL, --Need R + thresholdPercentageT310-r17 ENUMERATED {p40, p60, p80, spare5, spare4, spare3, spare2, spare1} OPTIONAL, --Need R + thresholdPercentageT312-r17 ENUMERATED {p20, p40, p60, p80, spare4, spare3, spare2, spare1} OPTIONAL, --Need R + sourceDAPS-FailureReporting-r17 ENUMERATED {true} OPTIONAL, --Need R + ... +} + +OverheatingAssistanceConfig ::= SEQUENCE { + overheatingIndicationProhibitTimer ENUMERATED {s0, s0dot5, s1, s2, s5, s10, s20, s30, + s60, s90, s120, s300, s600, spare3, spare2, spare1} +} + +IDC-AssistanceConfig-r16 ::= SEQUENCE { + candidateServingFreqListNR-r16 CandidateServingFreqListNR-r16 OPTIONAL, -- Need R + ... +} + +DRX-PreferenceConfig-r16 ::= SEQUENCE { + drx-PreferenceProhibitTimer-r16 ENUMERATED { + s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, + s8, s9, s10, s20, s30, spare2, spare1} +} + +MaxBW-PreferenceConfig-r16 ::= SEQUENCE { + maxBW-PreferenceProhibitTimer-r16 ENUMERATED { + s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, + s8, s9, s10, s20, s30, spare2, spare1} +} + +MaxCC-PreferenceConfig-r16 ::= SEQUENCE { + maxCC-PreferenceProhibitTimer-r16 ENUMERATED { + s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, + s8, s9, s10, s20, s30, spare2, spare1} +} + +MaxMIMO-LayerPreferenceConfig-r16 ::= SEQUENCE { + maxMIMO-LayerPreferenceProhibitTimer-r16 ENUMERATED { + s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, + s8, s9, s10, s20, s30, spare2, spare1} +} + +MinSchedulingOffsetPreferenceConfig-r16 ::= SEQUENCE { + minSchedulingOffsetPreferenceProhibitTimer-r16 ENUMERATED { + s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, + s8, s9, s10, s20, s30, spare2, spare1} +} + +ReleasePreferenceConfig-r16 ::= SEQUENCE { + releasePreferenceProhibitTimer-r16 ENUMERATED { + s0, s0dot5, s1, s2, s3, s4, s5, s6, s7, + s8, s9, s10, s20, s30, infinity, spare1}, + connectedReporting ENUMERATED {true} OPTIONAL -- Need R +} + +RLM-RelaxationReportingConfig-r17 ::= SEQUENCE { + rlm-RelaxtionReportingProhibitTimer ENUMERATED {s0, s0dot5, s1, s2, s5, s10, s20, s30, + s60, s90, s120, s300, s600, infinity, spare2, spare1} +} + +BFD-RelaxationReportingConfig-r17 ::= SEQUENCE { + bfd-RelaxtionReportingProhibitTimer ENUMERATED {s0, s0dot5, s1, s2, s5, s10, s20, s30, + s60, s90, s120, s300, s600, infinity, spare2, spare1} +} + +SCG-DeactivationPreferenceConfig-r17 ::= SEQUENCE { + scg-DeactivationPreferenceProhibitTimer-r17 ENUMERATED { + s0, s1, s2, s4, s8, s10, s15, s30, + s60, s120, s180, s240, s300, s600, s900, s1800} +} + +RRM-MeasRelaxationReportingConfig-r17 ::= SEQUENCE { + s-SearchDeltaP-Stationary-r17 ENUMERATED {dB2, dB3, dB6, dB9, dB12, dB15, spare2, spare1}, + t-SearchDeltaP-Stationary-r17 ENUMERATED {s5, s10, s20, s30, s60, s120, s180, s240, s300, spare7, spare6, spare5, + spare4, spare3, spare2, spare1} +} + +PropDelayDiffReportConfig-r17 ::= SEQUENCE { + threshPropDelayDiff-r17 ENUMERATED {ms0dot5, ms1, ms2, ms3, ms4, ms5, ms6 ,ms7, ms8, ms9, ms10, spare5, + spare4, spare3, spare2, spare1} OPTIONAL, -- Need M + neighCellInfoList-r17 SEQUENCE (SIZE (1..maxCellNTN-r17)) OF NeighbourCellInfo-r17 OPTIONAL -- Need M +} + +NeighbourCellInfo-r17 ::= SEQUENCE { +epochTime-r17 EpochTime-r17, +ephemerisInfo-r17 EphemerisInfo-r17 +} + +-- TAG-OTHERCONFIG-STOP +-- TAG-PHYSCELLIDUTRA-FDD-START + +PhysCellIdUTRA-FDD-r16 ::= INTEGER (0..511) + +-- TAG-PHYSCELLIDUTRA-FDD-STOP +-- TAG-RRC-TRANSACTIONIDENTIFIER-START + +RRC-TransactionIdentifier ::= INTEGER (0..3) + +-- TAG-RRC-TRANSACTIONIDENTIFIER-STOP +-- TAG-SENSORNAMELIST-START + +Sensor-NameList-r16 ::= SEQUENCE { + measUncomBarPre-r16 ENUMERATED {true} OPTIONAL, -- Need R + measUeSpeed ENUMERATED {true} OPTIONAL, -- Need R + measUeOrientation ENUMERATED {true} OPTIONAL -- Need R +} + +-- TAG-SENSORNAMELIST-STOP +-- TAG-TRACEREFERENCE-START + +TraceReference-r16 ::= SEQUENCE { + plmn-Identity-r16 PLMN-Identity, + traceId-r16 OCTET STRING (SIZE (3)) +} + +-- TAG-TRACEREFERENCE-STOP +-- TAG-UE-MeasurementsAvailable-START + +UE-MeasurementsAvailable-r16 ::= SEQUENCE { + logMeasAvailable-r16 ENUMERATED {true} OPTIONAL, + logMeasAvailableBT-r16 ENUMERATED {true} OPTIONAL, + logMeasAvailableWLAN-r16 ENUMERATED {true} OPTIONAL, + connEstFailInfoAvailable-r16 ENUMERATED {true} OPTIONAL, + rlf-InfoAvailable-r16 ENUMERATED {true} OPTIONAL, + ..., + [[ + successHO-InfoAvailable-r17 ENUMERATED {true} OPTIONAL, + sigLogMeasConfigAvailable-r17 BOOLEAN OPTIONAL + ]] +} + +-- TAG-UE-MeasurementsAvailable-STOP +-- TAG-UTRA-FDD-Q-OFFSETRANGE-START + +UTRA-FDD-Q-OffsetRange-r16 ::= ENUMERATED { + dB-24, dB-22, dB-20, dB-18, dB-16, dB-14, + dB-12, dB-10, dB-8, dB-6, dB-5, dB-4, dB-3, + dB-2, dB-1, dB0, dB1, dB2, dB3, dB4, dB5, + dB6, dB8, dB10, dB12, dB14, dB16, dB18, + dB20, dB22, dB24} + +-- TAG-UTRA-FDD-Q-OFFSETRANGE-STOP +-- TAG-VISITEDCELLINFOLIST-START + +VisitedCellInfoList-r16 ::= SEQUENCE (SIZE (1..maxCellHistory-r16)) OF VisitedCellInfo-r16 + +VisitedCellInfo-r16 ::= SEQUENCE { + visitedCellId-r16 CHOICE { + nr-CellId-r16 CHOICE { + cgi-Info CGI-Info-Logging-r16, + pci-arfcn-r16 PCI-ARFCN-NR-r16 + }, + eutra-CellId-r16 CHOICE { + cellGlobalId-r16 CGI-InfoEUTRA, + pci-arfcn-r16 PCI-ARFCN-EUTRA-r16 + } + } OPTIONAL, + timeSpent-r16 INTEGER (0..4095), + ..., + [[ + visitedPSCellInfoListReport-r17 VisitedPSCellInfoList-r17 OPTIONAL + ]] +} + +VisitedPSCellInfoList-r17 ::= SEQUENCE (SIZE (1..maxPSCellHistory-r17)) OF VisitedPSCellInfo-r17 + +VisitedPSCellInfo-r17 ::= SEQUENCE { + visitedCellId-r17 CHOICE { + nr-CellId-r17 CHOICE { + cgi-Info-r17 CGI-Info-Logging-r16, + pci-arfcn-r17 PCI-ARFCN-NR-r16 + }, + eutra-CellId-r17 CHOICE { + cellGlobalId-r17 CGI-InfoEUTRALogging, + pci-arfcn-r17 PCI-ARFCN-EUTRA-r16 + } + } OPTIONAL, + timeSpent-r17 INTEGER (0..4095), + ... +} + +-- TAG-VISITEDCELLINFOLIST-STOP +-- TAG-WLANNAMELIST-START + +WLAN-NameList-r16 ::= SEQUENCE (SIZE (1..maxWLAN-Name-r16)) OF WLAN-Name-r16 + +WLAN-Name-r16 ::= OCTET STRING (SIZE (1..32)) + +-- TAG-SL-BWP-CONFIG-START + +SL-BWP-Config-r16 ::= SEQUENCE { + sl-BWP-Id BWP-Id, + sl-BWP-Generic-r16 SL-BWP-Generic-r16 OPTIONAL, -- Need M + sl-BWP-PoolConfig-r16 SL-BWP-PoolConfig-r16 OPTIONAL, -- Need M + ..., + [[ + sl-BWP-PoolConfigPS-r17 SetupRelease {SL-BWP-PoolConfig-r16} OPTIONAL, -- Need M + sl-BWP-DiscPoolConfig-r17 SetupRelease {SL-BWP-DiscPoolConfig-r17} OPTIONAL -- Need M + ]] +} + +SL-BWP-Generic-r16 ::= SEQUENCE { + sl-BWP-r16 BWP OPTIONAL, -- Need M + sl-LengthSymbols-r16 ENUMERATED {sym7, sym8, sym9, sym10, sym11, sym12, sym13, sym14} OPTIONAL, -- Need M + sl-StartSymbol-r16 ENUMERATED {sym0, sym1, sym2, sym3, sym4, sym5, sym6, sym7} OPTIONAL, -- Need M + sl-PSBCH-Config-r16 SetupRelease {SL-PSBCH-Config-r16} OPTIONAL, -- Need M + sl-TxDirectCurrentLocation-r16 INTEGER (0..3301) OPTIONAL, -- Need M + ... +} + +-- TAG-SL-BWP-CONFIG-STOP +-- TAG-SL-BWP-CONFIGCOMMON-START + +SL-BWP-ConfigCommon-r16 ::= SEQUENCE { + sl-BWP-Generic-r16 SL-BWP-Generic-r16 OPTIONAL, -- Need R + sl-BWP-PoolConfigCommon-r16 SL-BWP-PoolConfigCommon-r16 OPTIONAL, -- Need R + ..., + [[ + sl-BWP-PoolConfigCommonPS-r17 SL-BWP-PoolConfigCommon-r16 OPTIONAL, -- Need R + sl-BWP-DiscPoolConfigCommon-r17 SL-BWP-DiscPoolConfigCommon-r17 OPTIONAL -- Need R + ]] +} + +-- TAG-SL-BWP-CONFIGCOMMON-STOP +-- TAG-SL-BWP-DISCPOOLCONFIG-START + +SL-BWP-DiscPoolConfig-r17 ::= SEQUENCE { + sl-DiscRxPool-r17 SEQUENCE (SIZE (1..maxNrofRXPool-r16)) OF SL-ResourcePool-r16 OPTIONAL, -- Cond HO + sl-DiscTxPoolSelected-r17 SL-TxPoolDedicated-r16 OPTIONAL, -- Need M + sl-DiscTxPoolScheduling-r17 SL-TxPoolDedicated-r16 OPTIONAL -- Need N +} + +-- TAG-SL-BWP-DISCPOOLCONFIG-STOP +-- TAG-SL-BWP-DISCPOOLCONFIGCOMMON-START + +SL-BWP-DiscPoolConfigCommon-r17 ::= SEQUENCE { + sl-DiscRxPool-r17 SEQUENCE (SIZE (1..maxNrofRXPool-r16)) OF SL-ResourcePool-r16 OPTIONAL, -- Need R + sl-DiscTxPoolSelected-r17 SEQUENCE (SIZE (1..maxNrofTXPool-r16)) OF SL-ResourcePoolConfig-r16 OPTIONAL, -- Need R + ... +} + +-- TAG-SL-BWP-DISCPOOLCONFIGCOMMON-STOP +-- TAG-SL-BWP-POOLCONFIG-START + +SL-BWP-PoolConfig-r16 ::= SEQUENCE { + sl-RxPool-r16 SEQUENCE (SIZE (1..maxNrofRXPool-r16)) OF SL-ResourcePool-r16 OPTIONAL, -- Cond HO + sl-TxPoolSelectedNormal-r16 SL-TxPoolDedicated-r16 OPTIONAL, -- Need M + sl-TxPoolScheduling-r16 SL-TxPoolDedicated-r16 OPTIONAL, -- Need N + sl-TxPoolExceptional-r16 SL-ResourcePoolConfig-r16 OPTIONAL -- Need M +} + +SL-TxPoolDedicated-r16 ::= SEQUENCE { + sl-PoolToReleaseList-r16 SEQUENCE (SIZE (1..maxNrofTXPool-r16)) OF SL-ResourcePoolID-r16 OPTIONAL, -- Need N + sl-PoolToAddModList-r16 SEQUENCE (SIZE (1..maxNrofTXPool-r16)) OF SL-ResourcePoolConfig-r16 OPTIONAL -- Need N +} + +SL-ResourcePoolConfig-r16 ::= SEQUENCE { + sl-ResourcePoolID-r16 SL-ResourcePoolID-r16, + sl-ResourcePool-r16 SL-ResourcePool-r16 OPTIONAL -- Need M +} + +SL-ResourcePoolID-r16 ::= INTEGER (1..maxNrofPoolID-r16) + +-- TAG-SL-BWP-POOLCONFIG-STOP +-- TAG-SL-BWP-POOLCONFIGCOMMON-START + +SL-BWP-PoolConfigCommon-r16 ::= SEQUENCE { + sl-RxPool-r16 SEQUENCE (SIZE (1..maxNrofRXPool-r16)) OF SL-ResourcePool-r16 OPTIONAL, -- Need R + sl-TxPoolSelectedNormal-r16 SEQUENCE (SIZE (1..maxNrofTXPool-r16)) OF SL-ResourcePoolConfig-r16 OPTIONAL, -- Need R + sl-TxPoolExceptional-r16 SL-ResourcePoolConfig-r16 OPTIONAL -- Need R +} + +-- TAG-SL-BWP-POOLCONFIGCOMMON-STOP +-- TAG-SL-CBR-PRIORITYTXCONFIGLIST-START + +SL-CBR-PriorityTxConfigList-r16 ::= SEQUENCE (SIZE (1..8)) OF SL-PriorityTxConfigIndex-r16 + +SL-CBR-PriorityTxConfigList-v1650 ::= SEQUENCE (SIZE (1..8)) OF SL-PriorityTxConfigIndex-v1650 + +SL-PriorityTxConfigIndex-r16 ::= SEQUENCE { + sl-PriorityThreshold-r16 INTEGER (1..8) OPTIONAL, -- Need M + sl-DefaultTxConfigIndex-r16 INTEGER (0..maxCBR-Level-1-r16) OPTIONAL, -- Need M + sl-CBR-ConfigIndex-r16 INTEGER (0..maxCBR-Config-1-r16) OPTIONAL, -- Need M + sl-Tx-ConfigIndexList-r16 SEQUENCE (SIZE (1.. maxCBR-Level-r16)) OF SL-TxConfigIndex-r16 OPTIONAL -- Need M +} + +SL-PriorityTxConfigIndex-v1650 ::= SEQUENCE { + sl-MCS-RangeList-r16 SEQUENCE (SIZE (1..maxCBR-Level-r16)) OF SL-MinMaxMCS-List-r16 OPTIONAL -- Need M +} + +SL-TxConfigIndex-r16 ::= INTEGER (0..maxTxConfig-1-r16) + +-- TAG-SL-CBR-PRIORITYTXCONFIGLIST-STOP +-- TAG-SL-CBR-COMMONTXCONFIGLIST-START + +SL-CBR-CommonTxConfigList-r16 ::= SEQUENCE { + sl-CBR-RangeConfigList-r16 SEQUENCE (SIZE (1..maxCBR-Config-r16)) OF SL-CBR-LevelsConfig-r16 OPTIONAL, -- Need M + sl-CBR-PSSCH-TxConfigList-r16 SEQUENCE (SIZE (1.. maxTxConfig-r16)) OF SL-CBR-PSSCH-TxConfig-r16 OPTIONAL -- Need M +} + +SL-CBR-LevelsConfig-r16 ::= SEQUENCE (SIZE (1..maxCBR-Level-r16)) OF SL-CBR-r16 + +SL-CBR-PSSCH-TxConfig-r16 ::= SEQUENCE { + sl-CR-Limit-r16 INTEGER(0..10000) OPTIONAL, -- Need M + sl-TxParameters-r16 SL-PSSCH-TxParameters-r16 OPTIONAL -- Need M +} + +SL-CBR-r16 ::= INTEGER (0..100) + +-- TAG-SL-CBR-COMMONTXCONFIGLIST-STOP +-- TAG-SL-CONFIGDEDICATEDNR-START + +SL-ConfigDedicatedNR-r16 ::= SEQUENCE { + sl-PHY-MAC-RLC-Config-r16 SL-PHY-MAC-RLC-Config-r16 OPTIONAL, -- Need M + sl-RadioBearerToReleaseList-r16 SEQUENCE (SIZE (1..maxNrofSLRB-r16)) OF SLRB-Uu-ConfigIndex-r16 OPTIONAL, -- Need N + sl-RadioBearerToAddModList-r16 SEQUENCE (SIZE (1..maxNrofSLRB-r16)) OF SL-RadioBearerConfig-r16 OPTIONAL, -- Need N + sl-MeasConfigInfoToReleaseList-r16 SEQUENCE (SIZE (1..maxNrofSL-Dest-r16)) OF SL-DestinationIndex-r16 OPTIONAL, -- Need N + sl-MeasConfigInfoToAddModList-r16 SEQUENCE (SIZE (1..maxNrofSL-Dest-r16)) OF SL-MeasConfigInfo-r16 OPTIONAL, -- Need N + t400-r16 ENUMERATED {ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000} OPTIONAL, -- Need M + ..., + [[ + sl-PHY-MAC-RLC-Config-v1700 SetupRelease { SL-PHY-MAC-RLC-Config-v1700 } OPTIONAL, -- Need M + sl-DiscConfig-r17 SetupRelease { SL-DiscConfig-r17} OPTIONAL -- Need M + ]] +} + +SL-DestinationIndex-r16 ::= INTEGER (0..maxNrofSL-Dest-1-r16) + +SL-PHY-MAC-RLC-Config-r16::= SEQUENCE { + sl-ScheduledConfig-r16 SetupRelease { SL-ScheduledConfig-r16 } OPTIONAL, -- Need M + sl-UE-SelectedConfig-r16 SetupRelease { SL-UE-SelectedConfig-r16 } OPTIONAL, -- Need M + sl-FreqInfoToReleaseList-r16 SEQUENCE (SIZE (1..maxNrofFreqSL-r16)) OF SL-Freq-Id-r16 OPTIONAL, -- Need N + sl-FreqInfoToAddModList-r16 SEQUENCE (SIZE (1..maxNrofFreqSL-r16)) OF SL-FreqConfig-r16 OPTIONAL, -- Need N + sl-RLC-BearerToReleaseList-r16 SEQUENCE (SIZE (1..maxSL-LCID-r16)) OF SL-RLC-BearerConfigIndex-r16 OPTIONAL, -- Need N + sl-RLC-BearerToAddModList-r16 SEQUENCE (SIZE (1..maxSL-LCID-r16)) OF SL-RLC-BearerConfig-r16 OPTIONAL, -- Need N + sl-MaxNumConsecutiveDTX-r16 ENUMERATED {n1, n2, n3, n4, n6, n8, n16, n32} OPTIONAL, -- Need M + sl-CSI-Acquisition-r16 ENUMERATED {enabled} OPTIONAL, -- Need R + sl-CSI-SchedulingRequestId-r16 SetupRelease {SchedulingRequestId} OPTIONAL, -- Need M + sl-SSB-PriorityNR-r16 INTEGER (1..8) OPTIONAL, -- Need R + networkControlledSyncTx-r16 ENUMERATED {on, off} OPTIONAL -- Need M +} + +SL-PHY-MAC-RLC-Config-v1700 ::= SEQUENCE { + sl-DRX-Config-r17 SL-DRX-Config-r17 OPTIONAL, -- Need M + sl-RLC-ChannelToReleaseList-r17 SEQUENCE (SIZE (1..maxSL-LCID-r16)) OF SL-RLC-ChannelID-r17 OPTIONAL, -- Cond L2U2N + sl-RLC-ChannelToAddModList-r17 SEQUENCE (SIZE (1..maxSL-LCID-r16)) OF SL-RLC-ChannelConfig-r17 OPTIONAL, -- Cond L2U2N + ... +} + +SL-DiscConfig-r17::= SEQUENCE { + sl-RelayUE-Config-r17 SetupRelease { SL-RelayUE-Config-r17} OPTIONAL, -- Cond L2RelayUE + sl-RemoteUE-Config-r17 SetupRelease { SL-RemoteUE-Config-r17} OPTIONAL -- Cond L2RemoteUE +} + +-- TAG-SL-CONFIGDEDICATEDNR-STOP +-- TAG-SL-CONFIGUREDGRANTCONFIG-START + +SL-ConfiguredGrantConfig-r16 ::= SEQUENCE { + sl-ConfigIndexCG-r16 SL-ConfigIndexCG-r16, + sl-PeriodCG-r16 SL-PeriodCG-r16 OPTIONAL, -- Need M + sl-NrOfHARQ-Processes-r16 INTEGER (1..16) OPTIONAL, -- Need M + sl-HARQ-ProcID-offset-r16 INTEGER (0..15) OPTIONAL, -- Need M + sl-CG-MaxTransNumList-r16 SL-CG-MaxTransNumList-r16 OPTIONAL, -- Need M + rrc-ConfiguredSidelinkGrant-r16 SEQUENCE { + sl-TimeResourceCG-Type1-r16 INTEGER (0..496) OPTIONAL, -- Need M + sl-StartSubchannelCG-Type1-r16 INTEGER (0..26) OPTIONAL, -- Need M + sl-FreqResourceCG-Type1-r16 INTEGER (0..6929) OPTIONAL, -- Need M + sl-TimeOffsetCG-Type1-r16 INTEGER (0..7999) OPTIONAL, -- Need R + sl-N1PUCCH-AN-r16 PUCCH-ResourceId OPTIONAL, -- Need M + sl-PSFCH-ToPUCCH-CG-Type1-r16 INTEGER (0..15) OPTIONAL, -- Need M + sl-ResourcePoolID-r16 SL-ResourcePoolID-r16 OPTIONAL, -- Need M + sl-TimeReferenceSFN-Type1-r16 ENUMERATED {sfn512} OPTIONAL -- Need S + } OPTIONAL, -- Need M + ..., + [[ + sl-N1PUCCH-AN-Type2-r16 PUCCH-ResourceId OPTIONAL -- Need M + ]] +} + +SL-ConfigIndexCG-r16 ::= INTEGER (0..maxNrofCG-SL-1-r16) + +SL-CG-MaxTransNumList-r16 ::= SEQUENCE (SIZE (1..8)) OF SL-CG-MaxTransNum-r16 + +SL-CG-MaxTransNum-r16 ::= SEQUENCE { + sl-Priority-r16 INTEGER (1..8), + sl-MaxTransNum-r16 INTEGER (1..32) +} + +SL-PeriodCG-r16 ::= CHOICE{ + sl-PeriodCG1-r16 ENUMERATED {ms100, ms200, ms300, ms400, ms500, ms600, ms700, ms800, ms900, ms1000, spare6, + spare5, spare4, spare3, spare2, spare1}, + sl-PeriodCG2-r16 INTEGER (1..99) +} + +-- TAG-SL-CONFIGUREDGRANTCONFIG-STOP +-- TAG-SL-DESTINATIONIDENTITY-START + +SL-DestinationIdentity-r16 ::= BIT STRING (SIZE (24)) + +-- TAG-SL-DESTINATIONIDENTITY-STOP +-- TAG-SL-DRX-CONFIG-START + +SL-DRX-Config-r17 ::= SEQUENCE { + sl-DRX-ConfigGC-BC-r17 SL-DRX-ConfigGC-BC-r17 OPTIONAL, -- Cond HO + sl-DRX-ConfigUC-ToReleaseList-r17 SEQUENCE (SIZE (1..maxNrofSL-Dest-r16)) OF SL-DestinationIndex-r16 OPTIONAL, -- Need N + sl-DRX-ConfigUC-ToAddModList-r17 SEQUENCE (SIZE (1..maxNrofSL-Dest-r16)) OF SL-DRX-ConfigUC-Info-r17 OPTIONAL, -- Need N + ... +} + +SL-DRX-ConfigUC-Info-r17 ::= SEQUENCE { + sl-DestinationIndex-r17 SL-DestinationIndex-r16 OPTIONAL, -- Need N + sl-DRX-ConfigUC-r17 SL-DRX-ConfigUC-r17 OPTIONAL, -- Need N + ... +} + +-- TAG-SL-DRX-CONFIG-STOP +-- TAG-SL-DRX-CONFIGGC-BC-START + +SL-DRX-ConfigGC-BC-r17 ::= SEQUENCE { + sl-DRX-GC-BC-PerQoS-List-r17 SEQUENCE (SIZE (1..maxSL-GC-BC-DRX-QoS-r17)) OF SL-DRX-GC-BC-QoS-r17 OPTIONAL, -- Need M + sl-DRX-GC-generic-r17 SL-DRX-GC-Generic-r17 OPTIONAL, -- Need M + sl-DefaultDRX-GC-BC-r17 SL-DRX-GC-BC-QoS-r17 OPTIONAL, -- Need M + ... +} + +SL-DRX-GC-BC-QoS-r17 ::= SEQUENCE { + sl-DRX-GC-BC-MappedQoS-FlowList-r17 SEQUENCE (SIZE (1..maxNrofSL-QFIs-r16)) OF SL-QoS-Profile-r16 OPTIONAL, -- Need M + sl-DRX-GC-BC-OnDurationTimer-r17 CHOICE { + subMilliSeconds INTEGER (1..31), + milliSeconds ENUMERATED { + ms1, ms2, ms3, ms4, ms5,ms6, ms8, ms10, ms20, ms30, ms40, ms50, ms60, + ms80, ms100, ms200, ms300, ms400, ms500, ms600, ms800, ms1000, ms1200, + ms1600, spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1} + }, + sl-DRX-GC-InactivityTimer-r17 ENUMERATED { + ms0, ms1, ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, ms40, ms50, ms60, ms80, + ms100, ms200, ms300, ms500, ms750, ms1280, ms1920, ms2560, spare9, spare8, + spare7, spare6, spare5, spare4, spare3, spare2, spare1}, + sl-DRX-GC-BC-Cycle-r17 ENUMERATED { + ms10, ms20, ms32, ms40, ms60, ms64, ms70, ms80, ms128, ms160, ms256, ms320, ms512, + ms640, ms1024, ms1280, ms2048, ms2560, ms5120, ms10240, spare12, spare11, spare10, + spare9, spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1}, + ... +} + +SL-DRX-GC-Generic-r17 ::= SEQUENCE { + sl-DRX-GC-HARQ-RTT-Timer1-r17 ENUMERATED {sl0, sl1, sl2, sl4, spare4, spare3, spare2, spare1} OPTIONAL, -- Need M + sl-DRX-GC-HARQ-RTT-Timer2-r17 ENUMERATED {sl0, sl1, sl2, sl4, spare4, spare3, spare2, spare1} OPTIONAL, -- Need M + sl-DRX-GC-RetransmissionTimer-r17 ENUMERATED { + sl0, sl1, sl2, sl4, sl6, sl8, sl16, sl24, sl33, sl40, sl64, sl80, sl96, sl112, sl128, + sl160, sl320, spare15, spare14, spare13, spare12, spare11, spare10, spare9, spare8, + spare7, spare6, spare5, spare4, spare3, spare2, spare1} +} + +-- TAG-SL-DRX-CONFIGGC-BC-STOP +-- TAG-DRX-CONFIGUC-START + +SL-DRX-ConfigUC-r17 ::= SEQUENCE { + sl-drx-onDurationTimer-r17 CHOICE { + subMilliSeconds INTEGER (1..31), + milliSeconds ENUMERATED { + ms1, ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, ms40, ms50, ms60, + ms80, ms100, ms200, ms300, ms400, ms500, ms600, ms800, ms1000, ms1200, + ms1600, spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1} + }, + sl-drx-InactivityTimer-r17 ENUMERATED { + ms0, ms1, ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, ms40, ms50, ms60, ms80, + ms100, ms200, ms300, ms500, ms750, ms1280, ms1920, ms2560, spare9, spare8, + spare7, spare6, spare5, spare4, spare3, spare2, spare1}, + sl-drx-HARQ-RTT-Timer1-r17 ENUMERATED {sl0, sl1, sl2, sl4, spare4, spare3, spare2, spare1} OPTIONAL, -- Need M + sl-drx-HARQ-RTT-Timer2-r17 ENUMERATED {sl0, sl1, sl2, sl4, spare4, spare3, spare2, spare1} OPTIONAL, -- Need M + sl-drx-RetransmissionTimer-r17 ENUMERATED { + sl0, sl1, sl2, sl4, sl6, sl8, sl16, sl24, sl33, sl40, sl64, sl80, sl96, sl112, sl128, + sl160, sl320, spare15, spare14, spare13, spare12, spare11, spare10, spare9, + spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1}, + sl-drx-CycleStartOffset-r17 CHOICE { + ms10 INTEGER(0..9), + ms20 INTEGER(0..19), + ms32 INTEGER(0..31), + ms40 INTEGER(0..39), + ms60 INTEGER(0..59), + ms64 INTEGER(0..63), + ms70 INTEGER(0..69), + ms80 INTEGER(0..79), + ms128 INTEGER(0..127), + ms160 INTEGER(0..159), + ms256 INTEGER(0..255), + ms320 INTEGER(0..319), + ms512 INTEGER(0..511), + ms640 INTEGER(0..639), + ms1024 INTEGER(0..1023), + ms1280 INTEGER(0..1279), + ms2048 INTEGER(0..2047), + ms2560 INTEGER(0..2559), + ms5120 INTEGER(0..5119), + ms10240 INTEGER(0..10239) + }, + sl-drx-SlotOffset INTEGER (0..31) +} + +-- TAG-SL-DRX-CONFIGUC-STOP +-- TAG-DRX-CONFIGUCSEMISTATIC-START + +SL-DRX-ConfigUC-SemiStatic-r17 ::= SEQUENCE { + sl-drx-onDurationTimer-r17 CHOICE { + subMilliSeconds INTEGER (1..31), + milliSeconds ENUMERATED { + ms1, ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, ms40, ms50, ms60, + ms80, ms100, ms200, ms300, ms400, ms500, ms600, ms800, ms1000, ms1200, + ms1600, spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1} + }, + sl-drx-CycleStartOffset-r17 CHOICE { + ms10 INTEGER(0..9), + ms20 INTEGER(0..19), + ms32 INTEGER(0..31), + ms40 INTEGER(0..39), + ms60 INTEGER(0..59), + ms64 INTEGER(0..63), + ms70 INTEGER(0..69), + ms80 INTEGER(0..79), + ms128 INTEGER(0..127), + ms160 INTEGER(0..159), + ms256 INTEGER(0..255), + ms320 INTEGER(0..319), + ms512 INTEGER(0..511), + ms640 INTEGER(0..639), + ms1024 INTEGER(0..1023), + ms1280 INTEGER(0..1279), + ms2048 INTEGER(0..2047), + ms2560 INTEGER(0..2559), + ms5120 INTEGER(0..5119), + ms10240 INTEGER(0..10239) + }, + sl-drx-SlotOffset-r17 INTEGER (0..31) +} + +-- TAG-SL-DRX-CONFIGUCSEMISTATIC-STOP +-- TAG-SL-FREQCONFIG-START + +SL-FreqConfig-r16 ::= SEQUENCE { + sl-Freq-Id-r16 SL-Freq-Id-r16, + sl-SCS-SpecificCarrierList-r16 SEQUENCE (SIZE (1..maxSCSs)) OF SCS-SpecificCarrier, + sl-AbsoluteFrequencyPointA-r16 ARFCN-ValueNR OPTIONAL, -- Need M + sl-AbsoluteFrequencySSB-r16 ARFCN-ValueNR OPTIONAL, -- Need R + frequencyShift7p5khzSL-r16 ENUMERATED {true} OPTIONAL, -- Cond V2X-SL-Shared + valueN-r16 INTEGER (-1..1), + sl-BWP-ToReleaseList-r16 SEQUENCE (SIZE (1..maxNrofSL-BWPs-r16)) OF BWP-Id OPTIONAL, -- Need N + sl-BWP-ToAddModList-r16 SEQUENCE (SIZE (1..maxNrofSL-BWPs-r16)) OF SL-BWP-Config-r16 OPTIONAL, -- Need N + sl-SyncConfigList-r16 SL-SyncConfigList-r16 OPTIONAL, -- Need M + sl-SyncPriority-r16 ENUMERATED {gnss, gnbEnb} OPTIONAL -- Need M +} + +SL-Freq-Id-r16 ::= INTEGER (1.. maxNrofFreqSL-r16) + +-- TAG-SL-FREQCONFIG-STOP +-- TAG-SL-FREQCONFIGCOMMON-START + +SL-FreqConfigCommon-r16 ::= SEQUENCE { + sl-SCS-SpecificCarrierList-r16 SEQUENCE (SIZE (1..maxSCSs)) OF SCS-SpecificCarrier, + sl-AbsoluteFrequencyPointA-r16 ARFCN-ValueNR, + sl-AbsoluteFrequencySSB-r16 ARFCN-ValueNR OPTIONAL, -- Need R + frequencyShift7p5khzSL-r16 ENUMERATED {true} OPTIONAL, -- Cond V2X-SL-Shared + valueN-r16 INTEGER (-1..1), + sl-BWP-List-r16 SEQUENCE (SIZE (1..maxNrofSL-BWPs-r16)) OF SL-BWP-ConfigCommon-r16 OPTIONAL, -- Need R + sl-SyncPriority-r16 ENUMERATED {gnss, gnbEnb} OPTIONAL, -- Need R + sl-NbAsSync-r16 BOOLEAN OPTIONAL, -- Need R + sl-SyncConfigList-r16 SL-SyncConfigList-r16 OPTIONAL, -- Need R + ... +} +-- TAG-SL-FREQCONFIGCOMMON-STOP +-- TAG-SL-INTERUE-COORDINATIONCONFIG-START + +SL-InterUE-CoordinationConfig-r17 ::= SEQUENCE { + sl-InterUE-CoordinationScheme1-r17 SL-InterUE-CoordinationScheme1-r17 OPTIONAL, -- Need M + sl-InterUE-CoordinationScheme2-r17 SL-InterUE-CoordinationScheme2-r17 OPTIONAL, -- Need M + ... +} + +SL-InterUE-CoordinationScheme1-r17 ::= SEQUENCE { + sl-IUC-Explicit-r17 ENUMERATED {enabled, disabled} OPTIONAL, -- Need M + sl-IUC-Condition-r17 ENUMERATED {enabled, disabled} OPTIONAL, -- Need M + sl-Condition1-A-2-r17 ENUMERATED {disabled} OPTIONAL, -- Need M + sl-ThresholdRSRP-Condition1-B-1-Option1List-r17 SEQUENCE (SIZE (1..8)) OF SL-ThresholdRSRP-Condition1-B-1-r17 OPTIONAL, -- Need M + sl-ThresholdRSRP-Condition1-B-1-Option2List-r17 SEQUENCE (SIZE (1..8)) OF SL-ThresholdRSRP-Condition1-B-1-r17 OPTIONAL, -- Need M + sl-ContainerCoordInfo-r17 ENUMERATED {enabled, disabled} OPTIONAL, -- Need M + sl-ContainerRequest-r17 ENUMERATED {enabled, disabled} OPTIONAL, -- Need M + sl-TriggerConditionCoordInfo-r17 INTEGER (0..1) OPTIONAL, -- Need M + sl-TriggerConditionRequest-r17 INTEGER (0..1) OPTIONAL, -- Need M + sl-PriorityCoordInfoExplicit-r17 INTEGER (1..8) OPTIONAL, -- Need M + sl-PriorityCoordInfoCondition-r17 INTEGER (1..8) OPTIONAL, -- Need M + sl-PriorityRequest-r17 INTEGER (1..8) OPTIONAL, -- Need M + sl-PriorityPreferredResourceSet-r17 INTEGER (1..8) OPTIONAL, -- Need M + sl-MaxSlotOffsetTRIV-r17 INTEGER (1..8000) OPTIONAL, -- Need M + sl-NumSubCH-PreferredResourceSet-r17 INTEGER (1..27) OPTIONAL, -- Need M + sl-ReservedPeriodPreferredResourceSet-r17 INTEGER (1..16) OPTIONAL, -- Need M + sl-DetermineResourceType-r17 ENUMERATED {uea, ueb} OPTIONAL, -- Need M + ... +} + +SL-InterUE-CoordinationScheme2-r17 ::= SEQUENCE { + sl-IUC-Scheme2-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + sl-RB-SetPSFCH-r17 BIT STRING (SIZE (10..275)) OPTIONAL, -- Need M + sl-TypeUE-A-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + sl-PSFCH-Occasion-r17 INTEGER (0..1) OPTIONAL, -- Need M + sl-SlotLevelResourceExclusion-r17 ENUMERATED {enabled} OPTIONAL, -- Need R + sl-OptionForCondition2-A-1-r17 INTEGER (0..1) OPTIONAL, -- Need M + sl-IndicationUE-B-r17 ENUMERATED {enabled, disabled} OPTIONAL, -- Need M + ..., + [[ + sl-DeltaRSRP-Thresh-v1720 INTEGER (-30..30) OPTIONAL -- Need M + ]] +} + + +SL-ThresholdRSRP-Condition1-B-1-r17 ::= SEQUENCE { + sl-Priority-r17 INTEGER (1..8), + sl-ThresholdRSRP-Condition1-B-1-r17 INTEGER (0..66) +} + +-- TAG-SL-INTERUE-COORDINATIONCONFIG-STOP +-- TAG-SL-LOGICALCHANNELCONFIG-START + +SL-LogicalChannelConfig-r16 ::= SEQUENCE { + sl-Priority-r16 INTEGER (1..8), + sl-PrioritisedBitRate-r16 ENUMERATED {kBps0, kBps8, kBps16, kBps32, kBps64, kBps128, kBps256, kBps512, + kBps1024, kBps2048, kBps4096, kBps8192, kBps16384, kBps32768, kBps65536, infinity}, + sl-BucketSizeDuration-r16 ENUMERATED {ms5, ms10, ms20, ms50, ms100, ms150, ms300, ms500, ms1000, + spare7, spare6, spare5, spare4, spare3,spare2, spare1}, + sl-ConfiguredGrantType1Allowed-r16 ENUMERATED {true} OPTIONAL, -- Need R + sl-HARQ-FeedbackEnabled-r16 ENUMERATED {enabled, disabled } OPTIONAL, -- Need R + sl-AllowedCG-List-r16 SEQUENCE (SIZE (0.. maxNrofCG-SL-1-r16)) OF SL-ConfigIndexCG-r16 + OPTIONAL, -- Need R + sl-AllowedSCS-List-r16 SEQUENCE (SIZE (1..maxSCSs)) OF SubcarrierSpacing OPTIONAL, -- Need R + sl-MaxPUSCH-Duration-r16 ENUMERATED {ms0p02, ms0p04, ms0p0625, ms0p125, ms0p25, ms0p5, spare2, spare1} + OPTIONAL, -- Need R + sl-LogicalChannelGroup-r16 INTEGER (0..maxLCG-ID) OPTIONAL, -- Need R + sl-SchedulingRequestId-r16 SchedulingRequestId OPTIONAL, -- Need R + sl-LogicalChannelSR-DelayTimerApplied-r16 BOOLEAN OPTIONAL, -- Need R + ... +} +-- TAG-SL-LOGICALCHANNELCONFIG-STOP +-- TAG-SL-L2RELAYUE-CONFIG-START + +SL-L2RelayUE-Config-r17 ::= SEQUENCE { + sl-RemoteUE-ToAddModList-r17 SEQUENCE (SIZE (1..maxNrofRemoteUE-r17)) OF SL-RemoteUE-ToAddMod-r17 OPTIONAL, -- Need N + sl-RemoteUE-ToReleaseList-r17 SEQUENCE (SIZE (1..maxNrofRemoteUE-r17)) OF SL-DestinationIdentity-r16 OPTIONAL, -- Need N + ... +} + +SL-RemoteUE-ToAddMod-r17 ::= SEQUENCE { + sl-L2IdentityRemote-r17 SL-DestinationIdentity-r16, + sl-SRAP-ConfigRelay-r17 SL-SRAP-Config-r17 OPTIONAL, -- Need M + ... +} + +-- TAG-SL-L2RELAYUE-CONFIG-STOP +-- TAG-SL-L2REMOTEUE-CONFIG-START + +SL-L2RemoteUE-Config-r17 ::= SEQUENCE { + sl-SRAP-ConfigRemote-r17 SL-SRAP-Config-r17 OPTIONAL, --Need M + sl-UEIdentityRemote-r17 RNTI-Value OPTIONAL, -- Cond FirstRRCReconfig + ... +} +-- TAG-SL-L2REMOTEUE-CONFIG-STOP +-- TAG-SL-MEASCONFIGCOMMON-START + +SL-MeasConfigCommon-r16 ::= SEQUENCE { + sl-MeasObjectListCommon-r16 SL-MeasObjectList-r16 OPTIONAL, -- Need R + sl-ReportConfigListCommon-r16 SL-ReportConfigList-r16 OPTIONAL, -- Need R + sl-MeasIdListCommon-r16 SL-MeasIdList-r16 OPTIONAL, -- Need R + sl-QuantityConfigCommon-r16 SL-QuantityConfig-r16 OPTIONAL, -- Need R + ... +} + +-- TAG-SL-MEASCONFIGCOMMON-STOP +-- TAG-SL-MEASCONFIGINFO-START + +SL-MeasConfigInfo-r16 ::= SEQUENCE { + sl-DestinationIndex-r16 SL-DestinationIndex-r16, + sl-MeasConfig-r16 SL-MeasConfig-r16, + ... +} + +SL-MeasConfig-r16 ::= SEQUENCE { + sl-MeasObjectToRemoveList-r16 SL-MeasObjectToRemoveList-r16 OPTIONAL, -- Need N + sl-MeasObjectToAddModList-r16 SL-MeasObjectList-r16 OPTIONAL, -- Need N + sl-ReportConfigToRemoveList-r16 SL-ReportConfigToRemoveList-r16 OPTIONAL, -- Need N + sl-ReportConfigToAddModList-r16 SL-ReportConfigList-r16 OPTIONAL, -- Need N + sl-MeasIdToRemoveList-r16 SL-MeasIdToRemoveList-r16 OPTIONAL, -- Need N + sl-MeasIdToAddModList-r16 SL-MeasIdList-r16 OPTIONAL, -- Need N + sl-QuantityConfig-r16 SL-QuantityConfig-r16 OPTIONAL, -- Need M + ... +} + +SL-MeasObjectToRemoveList-r16 ::= SEQUENCE (SIZE (1..maxNrofSL-ObjectId-r16)) OF SL-MeasObjectId-r16 + +SL-ReportConfigToRemoveList-r16 ::= SEQUENCE (SIZE (1..maxNrofSL-ReportConfigId-r16)) OF SL-ReportConfigId-r16 + +SL-MeasIdToRemoveList-r16 ::= SEQUENCE (SIZE (1..maxNrofSL-MeasId-r16)) OF SL-MeasId-r16 + +-- TAG-SL-MEASCONFIGINFO-STOP +-- TAG-SL-MEASIDLIST-START + +SL-MeasIdList-r16 ::= SEQUENCE (SIZE (1..maxNrofSL-MeasId-r16)) OF SL-MeasIdInfo-r16 + +SL-MeasIdInfo-r16 ::= SEQUENCE { + sl-MeasId-r16 SL-MeasId-r16, + sl-MeasObjectId-r16 SL-MeasObjectId-r16, + sl-ReportConfigId-r16 SL-ReportConfigId-r16, + ... +} + +SL-MeasId-r16 ::= INTEGER (1..maxNrofSL-MeasId-r16) + +-- TAG-SL-MEASIDLIST-STOP +-- TAG-SL-MEASOBJECTLIST-START + +SL-MeasObjectList-r16 ::= SEQUENCE (SIZE (1..maxNrofSL-ObjectId-r16)) OF SL-MeasObjectInfo-r16 + +SL-MeasObjectInfo-r16 ::= SEQUENCE { + sl-MeasObjectId-r16 SL-MeasObjectId-r16, + sl-MeasObject-r16 SL-MeasObject-r16, + ... +} + +SL-MeasObjectId-r16 ::= INTEGER (1..maxNrofSL-ObjectId-r16) + +SL-MeasObject-r16 ::= SEQUENCE { + frequencyInfoSL-r16 ARFCN-ValueNR, + ... +} + +-- TAG-SL-MEASOBJECTLIST-STOP +-- TAG-SL-PAGINGIDENTITYREMOTEUE-START + +SL-PagingIdentityRemoteUE-r17 ::= SEQUENCE { + ng-5G-S-TMSI-r17 NG-5G-S-TMSI, + fullI-RNTI-r17 I-RNTI-Value OPTIONAL -- Need R +} + +-- TAG-SL-PAGINGIDENTITYREMOTEUE-STOP +-- TAG-SL-PBPS-CPS-CONFIG-START + +SL-PBPS-CPS-Config-r17 ::= SEQUENCE { +sl-AllowedResourceSelectionConfig-r17 ENUMERATED {c1, c2, c3, c4, c5, c6, c7} OPTIONAL, -- Need M +sl-MinNumCandidateSlotsPeriodic-r17 INTEGER (1..32) OPTIONAL, -- Need M +sl-PBPS-OccasionReservePeriodList-r17 SEQUENCE (SIZE (1..16)) OF INTEGER (1..16) OPTIONAL, -- Need M +sl-Additional-PBPS-Occasion-r17 ENUMERATED { monitored } OPTIONAL, -- Need M +sl-CPS-WindowPeriodic-r17 INTEGER (5..30) OPTIONAL, -- Need M +sl-MinNumCandidateSlotsAperiodic-r17 INTEGER (1..32) OPTIONAL, -- Need M +sl-MinNumRssiMeasurementSlots-r17 INTEGER (1..800) OPTIONAL, -- Need M +sl-DefaultCBR-RandomSelection-r17 INTEGER (0..100) OPTIONAL, -- Need M +sl-DefaultCBR-PartialSensing-r17 INTEGER (0..100) OPTIONAL, -- Need M +sl-CPS-WindowAperiodic-r17 INTEGER (0..30) OPTIONAL, -- Need M +sl-PartialSensingInactiveTime-r17 ENUMERATED { enabled, disabled } OPTIONAL, -- Need M + ... +} + +-- TAG-SL-PBPS-CPS-CONFIG-STOP +-- TAG-SL-PDCP-CONFIG-START + +SL-PDCP-Config-r16 ::= SEQUENCE { + sl-DiscardTimer-r16 ENUMERATED {ms3, ms10, ms20, ms25, ms30, ms40, ms50, ms60, ms75, ms100, ms150, ms200, + ms250, ms300, ms500, ms750, ms1500, infinity} OPTIONAL, -- Cond Setup + sl-PDCP-SN-Size-r16 ENUMERATED {len12bits, len18bits} OPTIONAL, -- Cond Setup2 + sl-OutOfOrderDelivery ENUMERATED { true } OPTIONAL, -- Need R + ... +} + +-- TAG-SL-PDCP-CONFIG-STOP +-- TAG-SL-PSBCH-CONFIG-START + +SL-PSBCH-Config-r16 ::= SEQUENCE { + dl-P0-PSBCH-r16 INTEGER (-16..15) OPTIONAL, -- Need M + dl-Alpha-PSBCH-r16 ENUMERATED {alpha0, alpha04, alpha05, alpha06, alpha07, alpha08, alpha09, alpha1} OPTIONAL, -- Need M + ..., + [[ + dl-P0-PSBCH-r17 INTEGER (-202..24) OPTIONAL -- Need M + ]] +} + +-- TAG-SL-PSBCH-CONFIG-STOP +-- TAG-SL-PSSCH-TXCONFIGLIST-START + +SL-PSSCH-TxConfigList-r16 ::= SEQUENCE (SIZE (1..maxPSSCH-TxConfig-r16)) OF SL-PSSCH-TxConfig-r16 + +SL-PSSCH-TxConfig-r16 ::= SEQUENCE { + sl-TypeTxSync-r16 SL-TypeTxSync-r16 OPTIONAL, -- Need R + sl-ThresUE-Speed-r16 ENUMERATED {kmph60, kmph80, kmph100, kmph120, + kmph140, kmph160, kmph180, kmph200}, + sl-ParametersAboveThres-r16 SL-PSSCH-TxParameters-r16, + sl-ParametersBelowThres-r16 SL-PSSCH-TxParameters-r16, + ..., + [[ + sl-ParametersAboveThres-v1650 SL-MinMaxMCS-List-r16 OPTIONAL, -- Need R + sl-ParametersBelowThres-v1650 SL-MinMaxMCS-List-r16 OPTIONAL -- Need R + ]] +} + + +SL-PSSCH-TxParameters-r16 ::= SEQUENCE { + sl-MinMCS-PSSCH-r16 INTEGER (0..27), + sl-MaxMCS-PSSCH-r16 INTEGER (0..31), + sl-MinSubChannelNumPSSCH-r16 INTEGER (1..27), + sl-MaxSubchannelNumPSSCH-r16 INTEGER (1..27), + sl-MaxTxTransNumPSSCH-r16 INTEGER (1..32), + sl-MaxTxPower-r16 SL-TxPower-r16 OPTIONAL -- Cond CBR +} + +-- TAG-SL-PSSCH-TXCONFIGLIST-STOP +-- TAG-SL-QOS-FLOWIDENTITY-START + +SL-QoS-FlowIdentity-r16 ::= INTEGER (1..maxNrofSL-QFIs-r16) + +-- TAG-SL-QOS-FLOWIDENTITY-STOP +-- TAG-SL-QOS-PROFILE-START + +SL-QoS-Profile-r16 ::= SEQUENCE { + sl-PQI-r16 SL-PQI-r16 OPTIONAL, -- Need R + sl-GFBR-r16 INTEGER (0..4000000000) OPTIONAL, -- Need R + sl-MFBR-r16 INTEGER (0..4000000000) OPTIONAL, -- Need R + sl-Range-r16 INTEGER (1..1000) OPTIONAL, -- Need R + ... +} + +SL-PQI-r16 ::= CHOICE { + sl-StandardizedPQI-r16 INTEGER (0..255), + sl-Non-StandardizedPQI-r16 SEQUENCE { + sl-ResourceType-r16 ENUMERATED {gbr, non-GBR, delayCriticalGBR, spare1} OPTIONAL, -- Need R + sl-PriorityLevel-r16 INTEGER (1..8) OPTIONAL, -- Need R + sl-PacketDelayBudget-r16 INTEGER (0..1023) OPTIONAL, -- Need R + sl-PacketErrorRate-r16 INTEGER (0..9) OPTIONAL, -- Need R + sl-AveragingWindow-r16 INTEGER (0..4095) OPTIONAL, -- Need R + sl-MaxDataBurstVolume-r16 INTEGER (0..4095) OPTIONAL, -- Need R + ... + } +} + +-- TAG-SL-QOS-PROFILE-STOP +-- TAG-SL-QUANTITYCONFIG-START + +SL-QuantityConfig-r16 ::= SEQUENCE { + sl-FilterCoefficientDMRS-r16 FilterCoefficient DEFAULT fc4, + ... +} + +-- TAG-SL-QuantityConfig-STOP +-- TAG-SL-RADIOBEARERCONFIG-START + +SL-RadioBearerConfig-r16 ::= SEQUENCE { + slrb-Uu-ConfigIndex-r16 SLRB-Uu-ConfigIndex-r16, + sl-SDAP-Config-r16 SL-SDAP-Config-r16 OPTIONAL, -- Cond SLRBSetup + sl-PDCP-Config-r16 SL-PDCP-Config-r16 OPTIONAL, -- Cond SLRBSetup + sl-TransRange-r16 ENUMERATED {m20, m50, m80, m100, m120, m150, m180, m200, m220, m250, m270, m300, m350, m370, + m400, m420, m450, m480, m500, m550, m600, m700, m1000, spare9, spare8, spare7, spare6, + spare5, spare4, spare3, spare2, spare1} OPTIONAL, -- Need R + ... +} + +-- TAG-SL-RADIOBEARERCONFIG-STOP +-- TAG-SL-RELAYUE-CONFIG-START + +SL-RelayUE-Config-r17::= SEQUENCE { + threshHighRelay-r17 RSRP-Range OPTIONAL, -- Need R + threshLowRelay-r17 RSRP-Range OPTIONAL, -- Need R + hystMaxRelay-r17 Hysteresis OPTIONAL, -- Cond ThreshHighRelay + hystMinRelay-r17 Hysteresis OPTIONAL -- Cond ThreshLowRelay +} + +-- TAG-SL-RELAYUE-CONFIG-STOP +-- TAG-SL-REMOTEUE-CONFIG-START + +SL-RemoteUE-Config-r17::= SEQUENCE { + threshHighRemote-r17 RSRP-Range OPTIONAL, -- Need R + hystMaxRemote-r17 Hysteresis OPTIONAL, -- Cond ThreshHighRemote + sl-ReselectionConfig-r17 SL-ReselectionConfig-r17 OPTIONAL -- Need R +} + +SL-ReselectionConfig-r17::= SEQUENCE { + sl-RSRP-Thresh-r17 SL-RSRP-Range-r16 OPTIONAL, -- Need R + sl-FilterCoefficientRSRP-r17 FilterCoefficient OPTIONAL, -- Need R + sl-HystMin-r17 Hysteresis OPTIONAL -- Cond SL-RSRP-Thresh +} + +-- TAG-SL-REMOTEUE-CONFIG-STOP +-- TAG-SL-REPORTCONFIGLIST-START + +SL-ReportConfigList-r16 ::= SEQUENCE (SIZE (1..maxNrofSL-ReportConfigId-r16)) OF SL-ReportConfigInfo-r16 + +SL-ReportConfigInfo-r16 ::= SEQUENCE { + sl-ReportConfigId-r16 SL-ReportConfigId-r16, + sl-ReportConfig-r16 SL-ReportConfig-r16, + ... +} + +SL-ReportConfigId-r16 ::= INTEGER (1..maxNrofSL-ReportConfigId-r16) + +SL-ReportConfig-r16 ::= SEQUENCE { + sl-ReportType-r16 CHOICE { + sl-Periodical-r16 SL-PeriodicalReportConfig-r16, + sl-EventTriggered-r16 SL-EventTriggerConfig-r16, + ... + }, + ... +} + +SL-PeriodicalReportConfig-r16 ::= SEQUENCE { + sl-ReportInterval-r16 ReportInterval, + sl-ReportAmount-r16 ENUMERATED {r1, r2, r4, r8, r16, r32, r64, infinity}, + sl-ReportQuantity-r16 SL-MeasReportQuantity-r16, + sl-RS-Type-r16 SL-RS-Type-r16, + ... +} + +SL-EventTriggerConfig-r16 ::= SEQUENCE { + sl-EventId-r16 CHOICE { + eventS1-r16 SEQUENCE { + s1-Threshold-r16 SL-MeasTriggerQuantity-r16, + sl-ReportOnLeave-r16 BOOLEAN, + sl-Hysteresis-r16 Hysteresis, + sl-TimeToTrigger-r16 TimeToTrigger, + ... + }, + eventS2-r16 SEQUENCE { + s2-Threshold-r16 SL-MeasTriggerQuantity-r16, + sl-ReportOnLeave-r16 BOOLEAN, + sl-Hysteresis-r16 Hysteresis, + sl-TimeToTrigger-r16 TimeToTrigger, + ... + }, + ... + }, + sl-ReportInterval-r16 ReportInterval, + sl-ReportAmount-r16 ENUMERATED {r1, r2, r4, r8, r16, r32, r64, infinity}, + sl-ReportQuantity-r16 SL-MeasReportQuantity-r16, + sl-RS-Type-r16 SL-RS-Type-r16, + ... +} + +SL-MeasReportQuantity-r16 ::= CHOICE { + sl-RSRP-r16 BOOLEAN, + ... +} + +SL-MeasTriggerQuantity-r16 ::= CHOICE { + sl-RSRP-r16 RSRP-Range, + ... +} + +SL-RS-Type-r16 ::= ENUMERATED {dmrs, spare3, spare2, spare1} + +-- TAG-SL-REPORTCONFIGLIST-STOP +-- TAG-SL-RESOURCEPOOL-START + +SL-ResourcePool-r16 ::= SEQUENCE { + sl-PSCCH-Config-r16 SetupRelease { SL-PSCCH-Config-r16 } OPTIONAL, -- Need M + sl-PSSCH-Config-r16 SetupRelease { SL-PSSCH-Config-r16 } OPTIONAL, -- Need M + sl-PSFCH-Config-r16 SetupRelease { SL-PSFCH-Config-r16 } OPTIONAL, -- Need M + sl-SyncAllowed-r16 SL-SyncAllowed-r16 OPTIONAL, -- Need M + sl-SubchannelSize-r16 ENUMERATED {n10, n12, n15, n20, n25, n50, n75, n100} OPTIONAL, -- Need M + dummy INTEGER (10..160) OPTIONAL, -- Need M + sl-StartRB-Subchannel-r16 INTEGER (0..265) OPTIONAL, -- Need M + sl-NumSubchannel-r16 INTEGER (1..27) OPTIONAL, -- Need M + sl-Additional-MCS-Table-r16 ENUMERATED {qam256, qam64LowSE, qam256-qam64LowSE } OPTIONAL, -- Need M + sl-ThreshS-RSSI-CBR-r16 INTEGER (0..45) OPTIONAL, -- Need M + sl-TimeWindowSizeCBR-r16 ENUMERATED {ms100, slot100} OPTIONAL, -- Need M + sl-TimeWindowSizeCR-r16 ENUMERATED {ms1000, slot1000} OPTIONAL, -- Need M + sl-PTRS-Config-r16 SL-PTRS-Config-r16 OPTIONAL, -- Need M + sl-UE-SelectedConfigRP-r16 SL-UE-SelectedConfigRP-r16 OPTIONAL, -- Need M + sl-RxParametersNcell-r16 SEQUENCE { + sl-TDD-Configuration-r16 TDD-UL-DL-ConfigCommon OPTIONAL, -- Need M + sl-SyncConfigIndex-r16 INTEGER (0..15) + } OPTIONAL, -- Need M + sl-ZoneConfigMCR-List-r16 SEQUENCE (SIZE (16)) OF SL-ZoneConfigMCR-r16 OPTIONAL, -- Need M + sl-FilterCoefficient-r16 FilterCoefficient OPTIONAL, -- Need M + sl-RB-Number-r16 INTEGER (10..275) OPTIONAL, -- Need M + sl-PreemptionEnable-r16 ENUMERATED {enabled, pl1, pl2, pl3, pl4, pl5, pl6, pl7, pl8} OPTIONAL, -- Need R + sl-PriorityThreshold-UL-URLLC-r16 INTEGER (1..9) OPTIONAL, -- Need M + sl-PriorityThreshold-r16 INTEGER (1..9) OPTIONAL, -- Need M + sl-X-Overhead-r16 ENUMERATED {n0,n3, n6, n9} OPTIONAL, -- Need S + sl-PowerControl-r16 SL-PowerControl-r16 OPTIONAL, -- Need M + sl-TxPercentageList-r16 SL-TxPercentageList-r16 OPTIONAL, -- Need M + sl-MinMaxMCS-List-r16 SL-MinMaxMCS-List-r16 OPTIONAL, -- Need M + ..., + [[ + sl-TimeResource-r16 BIT STRING (SIZE (10..160)) OPTIONAL -- Need M + ]], + [[ + sl-PBPS-CPS-Config-r17 SetupRelease { SL-PBPS-CPS-Config-r17 } OPTIONAL, -- Need M + sl-InterUE-CoordinationConfig-r17 SetupRelease { SL-InterUE-CoordinationConfig-r17 } OPTIONAL -- Need M + ]] +} + +SL-ZoneConfigMCR-r16 ::= SEQUENCE { + sl-ZoneConfigMCR-Index-r16 INTEGER (0..15), + sl-TransRange-r16 ENUMERATED {m20, m50, m80, m100, m120, m150, m180, m200, m220, m250, m270, m300, m350, + m370, m400, m420, m450, m480, m500, m550, m600, m700, m1000, spare9, spare8, + spare7, spare6, spare5, spare4, spare3, spare2, spare1} + OPTIONAL, -- Need M + sl-ZoneConfig-r16 SL-ZoneConfig-r16 OPTIONAL, -- Need M + ... +} + +SL-SyncAllowed-r16 ::= SEQUENCE { + gnss-Sync-r16 ENUMERATED {true} OPTIONAL, -- Need R + gnbEnb-Sync-r16 ENUMERATED {true} OPTIONAL, -- Need R + ue-Sync-r16 ENUMERATED {true} OPTIONAL -- Need R +} + +SL-PSCCH-Config-r16 ::= SEQUENCE { + sl-TimeResourcePSCCH-r16 ENUMERATED {n2, n3} OPTIONAL, -- Need M + sl-FreqResourcePSCCH-r16 ENUMERATED {n10,n12, n15, n20, n25} OPTIONAL, -- Need M + sl-DMRS-ScrambleID-r16 INTEGER (0..65535) OPTIONAL, -- Need M + sl-NumReservedBits-r16 INTEGER (2..4) OPTIONAL, -- Need M + ... +} + +SL-PSSCH-Config-r16 ::= SEQUENCE { + sl-PSSCH-DMRS-TimePatternList-r16 SEQUENCE (SIZE (1..3)) OF INTEGER (2..4) OPTIONAL, -- Need M + sl-BetaOffsets2ndSCI-r16 SEQUENCE (SIZE (4)) OF SL-BetaOffsets-r16 OPTIONAL, -- Need M + sl-Scaling-r16 ENUMERATED {f0p5, f0p65, f0p8, f1} OPTIONAL, -- Need M + ... +} + +SL-PSFCH-Config-r16 ::= SEQUENCE { + sl-PSFCH-Period-r16 ENUMERATED {sl0, sl1, sl2, sl4} OPTIONAL, -- Need M + sl-PSFCH-RB-Set-r16 BIT STRING (SIZE (10..275)) OPTIONAL, -- Need M + sl-NumMuxCS-Pair-r16 ENUMERATED {n1, n2, n3, n6} OPTIONAL, -- Need M + sl-MinTimeGapPSFCH-r16 ENUMERATED {sl2, sl3} OPTIONAL, -- Need M + sl-PSFCH-HopID-r16 INTEGER (0..1023) OPTIONAL, -- Need M + sl-PSFCH-CandidateResourceType-r16 ENUMERATED {startSubCH, allocSubCH} OPTIONAL, -- Need M + ... +} +SL-PTRS-Config-r16 ::= SEQUENCE { + sl-PTRS-FreqDensity-r16 SEQUENCE (SIZE (2)) OF INTEGER (1..276) OPTIONAL, -- Need M + sl-PTRS-TimeDensity-r16 SEQUENCE (SIZE (3)) OF INTEGER (0..29) OPTIONAL, -- Need M + sl-PTRS-RE-Offset-r16 ENUMERATED {offset01, offset10, offset11} OPTIONAL, -- Need M + ... +} + +SL-UE-SelectedConfigRP-r16 ::= SEQUENCE { + sl-CBR-PriorityTxConfigList-r16 SL-CBR-PriorityTxConfigList-r16 OPTIONAL, -- Need M + sl-Thres-RSRP-List-r16 SL-Thres-RSRP-List-r16 OPTIONAL, -- Need M + sl-MultiReserveResource-r16 ENUMERATED {enabled} OPTIONAL, -- Need M + sl-MaxNumPerReserve-r16 ENUMERATED {n2, n3} OPTIONAL, -- Need M + sl-SensingWindow-r16 ENUMERATED {ms100, ms1100} OPTIONAL, -- Need M + sl-SelectionWindowList-r16 SL-SelectionWindowList-r16 OPTIONAL, -- Need M + sl-ResourceReservePeriodList-r16 SEQUENCE (SIZE (1..16)) OF SL-ResourceReservePeriod-r16 OPTIONAL, -- Need M + sl-RS-ForSensing-r16 ENUMERATED {pscch, pssch}, + ..., + [[ + sl-CBR-PriorityTxConfigList-v1650 SL-CBR-PriorityTxConfigList-v1650 OPTIONAL -- Need M + ]] +} + +SL-ResourceReservePeriod-r16 ::= CHOICE { + sl-ResourceReservePeriod1-r16 ENUMERATED {ms0, ms100, ms200, ms300, ms400, ms500, ms600, ms700, ms800, ms900, ms1000}, + sl-ResourceReservePeriod2-r16 INTEGER (1..99) +} + +SL-SelectionWindowList-r16 ::= SEQUENCE (SIZE (8)) OF SL-SelectionWindowConfig-r16 + +SL-SelectionWindowConfig-r16 ::= SEQUENCE { + sl-Priority-r16 INTEGER (1..8), + sl-SelectionWindow-r16 ENUMERATED {n1, n5, n10, n20} +} + +SL-TxPercentageList-r16 ::= SEQUENCE (SIZE (8)) OF SL-TxPercentageConfig-r16 + +SL-TxPercentageConfig-r16 ::= SEQUENCE { + sl-Priority-r16 INTEGER (1..8), + sl-TxPercentage-r16 ENUMERATED {p20, p35, p50} +} + +SL-MinMaxMCS-List-r16 ::= SEQUENCE (SIZE (1..3)) OF SL-MinMaxMCS-Config-r16 + +SL-MinMaxMCS-Config-r16 ::= SEQUENCE { + sl-MCS-Table-r16 ENUMERATED {qam64, qam256, qam64LowSE}, + sl-MinMCS-PSSCH-r16 INTEGER (0..27), + sl-MaxMCS-PSSCH-r16 INTEGER (0..31) +} + +SL-BetaOffsets-r16 ::= INTEGER (0..31) + +SL-PowerControl-r16 ::= SEQUENCE { + sl-MaxTransPower-r16 INTEGER (-30..33), + sl-Alpha-PSSCH-PSCCH-r16 ENUMERATED {alpha0, alpha04, alpha05, alpha06, alpha07, alpha08, alpha09, alpha1} OPTIONAL, -- Need M + dl-Alpha-PSSCH-PSCCH-r16 ENUMERATED {alpha0, alpha04, alpha05, alpha06, alpha07, alpha08, alpha09, alpha1} OPTIONAL, -- Need S + sl-P0-PSSCH-PSCCH-r16 INTEGER (-16..15) OPTIONAL, -- Need S + dl-P0-PSSCH-PSCCH-r16 INTEGER (-16..15) OPTIONAL, -- Need M + dl-Alpha-PSFCH-r16 ENUMERATED {alpha0, alpha04, alpha05, alpha06, alpha07, alpha08, alpha09, alpha1} OPTIONAL, -- Need S + dl-P0-PSFCH-r16 INTEGER (-16..15) OPTIONAL, -- Need M + ..., + [[ + dl-P0-PSSCH-PSCCH-r17 INTEGER (-202..24) OPTIONAL, -- Need M + sl-P0-PSSCH-PSCCH-r17 INTEGER (-202..24) OPTIONAL, -- Need S + dl-P0-PSFCH-r17 INTEGER (-202..24) OPTIONAL -- Need M + ]] +} + +-- TAG-SL-RESOURCEPOOL-STOP +-- TAG-SL-RLC-BEARERCONFIG-START + +SL-RLC-BearerConfig-r16 ::= SEQUENCE { + sl-RLC-BearerConfigIndex-r16 SL-RLC-BearerConfigIndex-r16, + sl-ServedRadioBearer-r16 SLRB-Uu-ConfigIndex-r16 OPTIONAL, -- Cond LCH-SetupOnly + sl-RLC-Config-r16 SL-RLC-Config-r16 OPTIONAL, -- Cond LCH-Setup + sl-MAC-LogicalChannelConfig-r16 SL-LogicalChannelConfig-r16 OPTIONAL, -- Cond LCH-Setup + ... +} + +-- TAG-SL-RLC-BEARERCONFIG-STOP +-- TAG-SL-RLC-BEARERCONFIGINDEX-START + +SL-RLC-BearerConfigIndex-r16 ::= INTEGER (1..maxSL-LCID-r16) + +-- TAG-RLC-BEARERCONFIGINDEX-STOP +-- TAG-SL-RLC-RLC-CHANNEL-CONFIG-START + +SL-RLC-ChannelConfig-r17 ::= SEQUENCE { + sl-RLC-ChannelID-r17 SL-RLC-ChannelID-r17, + sl-RLC-Config-r17 SL-RLC-Config-r16 OPTIONAL, -- Need M + sl-MAC-LogicalChannelConfig-r17 SL-LogicalChannelConfig-r16 OPTIONAL, -- Need M + sl-PacketDelayBudget-r17 INTEGER (0..1023) OPTIONAL, -- Need M + ...} + +-- TAG-SL-RLC-CHANNEL-CONFIG-STOP +-- TAG-SL-RLC-CHANNELID-START + +SL-RLC-ChannelID-r17 ::= INTEGER (1..maxSL-LCID-r16) + +-- TAG-SL-RLC-CHANNELID-STOP +-- TAG-SL-RLC-CONFIG-START + +SL-RLC-Config-r16 ::= CHOICE { + sl-AM-RLC-r16 SEQUENCE { + sl-SN-FieldLengthAM-r16 SN-FieldLengthAM OPTIONAL, -- Cond SLRBSetup + sl-T-PollRetransmit-r16 T-PollRetransmit, + sl-PollPDU-r16 PollPDU, + sl-PollByte-r16 PollByte, + sl-MaxRetxThreshold-r16 ENUMERATED { t1, t2, t3, t4, t6, t8, t16, t32 }, + ... + }, + sl-UM-RLC-r16 SEQUENCE { + sl-SN-FieldLengthUM-r16 SN-FieldLengthUM OPTIONAL, -- Cond SLRBSetup + ... + }, + ... +} + +-- TAG-SL-RLC-CONFIG-STOP +-- TAG-SL-SCHEDULEDCONFIG-START + +SL-ScheduledConfig-r16 ::= SEQUENCE { + sl-RNTI-r16 RNTI-Value, + mac-MainConfigSL-r16 MAC-MainConfigSL-r16 OPTIONAL, -- Need M + sl-CS-RNTI-r16 RNTI-Value OPTIONAL, -- Need M + sl-PSFCH-ToPUCCH-r16 SEQUENCE (SIZE (1..8)) OF INTEGER (0..15) OPTIONAL, -- Need M + sl-ConfiguredGrantConfigList-r16 SL-ConfiguredGrantConfigList-r16 OPTIONAL, -- Need M + ..., + [[ + sl-DCI-ToSL-Trans-r16 SEQUENCE (SIZE (1..8)) OF INTEGER (1..32) OPTIONAL -- Need M + ]] +} + +MAC-MainConfigSL-r16 ::= SEQUENCE { + sl-BSR-Config-r16 BSR-Config OPTIONAL, -- Need M + ul-PrioritizationThres-r16 INTEGER (1..16) OPTIONAL, -- Need M + sl-PrioritizationThres-r16 INTEGER (1..8) OPTIONAL, -- Need M + ... +} + +SL-ConfiguredGrantConfigList-r16 ::= SEQUENCE { + sl-ConfiguredGrantConfigToReleaseList-r16 SEQUENCE (SIZE (1..maxNrofCG-SL-r16)) OF SL-ConfigIndexCG-r16 OPTIONAL, -- Need N + sl-ConfiguredGrantConfigToAddModList-r16 SEQUENCE (SIZE (1..maxNrofCG-SL-r16)) OF SL-ConfiguredGrantConfig-r16 OPTIONAL -- Need N +} + +-- TAG-SL-SCHEDULEDCONFIG-STOP +-- TAG-SL-SDAP-CONFIG-START + +SL-SDAP-Config-r16 ::= SEQUENCE { + sl-SDAP-Header-r16 ENUMERATED {present, absent}, + sl-DefaultRB-r16 BOOLEAN, + sl-MappedQoS-Flows-r16 CHOICE { + sl-MappedQoS-FlowsList-r16 SEQUENCE (SIZE (1..maxNrofSL-QFIs-r16)) OF SL-QoS-Profile-r16, + sl-MappedQoS-FlowsListDedicated-r16 SL-MappedQoS-FlowsListDedicated-r16 + } OPTIONAL, -- Need M + sl-CastType-r16 ENUMERATED {broadcast, groupcast, unicast, spare1} OPTIONAL, -- Need M + ... +} + +SL-MappedQoS-FlowsListDedicated-r16 ::= SEQUENCE { + sl-MappedQoS-FlowsToAddList-r16 SEQUENCE (SIZE (1..maxNrofSL-QFIs-r16)) OF SL-QoS-FlowIdentity-r16 OPTIONAL, -- Need N + sl-MappedQoS-FlowsToReleaseList-r16 SEQUENCE (SIZE (1..maxNrofSL-QFIs-r16)) OF SL-QoS-FlowIdentity-r16 OPTIONAL -- Need N +} + +-- TAG-SL-SDAP-CONFIG-STOP +-- TAG-SL-SERVINGCELLINFO-START + +SL-ServingCellInfo-r17 ::= SEQUENCE { + sl-PhysCellId-r17 PhysCellId, + sl-CarrierFreqNR-r17 ARFCN-ValueNR +} + +-- TAG-SL-SERVINGCELLINFO-STOP +-- TAG-SL-SOURCEIDENTITY-START + +SL-SourceIdentity-r17 ::= BIT STRING (SIZE (24)) + +-- TAG-SL-SOURCEIDENTITY-STOP +-- TAG-SL-SRAP-CONFIG-START + +SL-SRAP-Config-r17 ::= SEQUENCE { + sl-LocalIdentity-r17 INTEGER (0..255) OPTIONAL, -- Need M + sl-MappingToAddModList-r17 SEQUENCE (SIZE (1..maxLC-ID)) OF SL-MappingToAddMod-r17 OPTIONAL, -- Need N + sl-MappingToReleaseList-r17 SEQUENCE (SIZE (1..maxLC-ID)) OF SL-RemoteUE-RB-Identity-r17 OPTIONAL, -- Need N + ... +} + +SL-MappingToAddMod-r17 ::= SEQUENCE { + sl-RemoteUE-RB-Identity-r17 SL-RemoteUE-RB-Identity-r17, + sl-EgressRLC-ChannelUu-r17 Uu-RelayRLC-ChannelID-r17 OPTIONAL, -- Cond L2RelayUE + sl-EgressRLC-ChannelPC5-r17 SL-RLC-ChannelID-r17 OPTIONAL, -- Need N + ... +} + +SL-RemoteUE-RB-Identity-r17 ::= CHOICE { + srb-Identity-r17 INTEGER (0..3), + drb-Identity-r17 DRB-Identity, + ... +} + +-- TAG-SL-SRAP-CONFIG-STOP +-- TAG-SL-SYNCCONFIG-START + +SL-SyncConfigList-r16 ::= SEQUENCE (SIZE (1..maxSL-SyncConfig-r16)) OF SL-SyncConfig-r16 + +SL-SyncConfig-r16 ::= SEQUENCE { + sl-SyncRefMinHyst-r16 ENUMERATED {dB0, dB3, dB6, dB9, dB12} OPTIONAL, -- Need R + sl-SyncRefDiffHyst-r16 ENUMERATED {dB0, dB3, dB6, dB9, dB12, dBinf} OPTIONAL, -- Need R + sl-filterCoefficient-r16 FilterCoefficient OPTIONAL, -- Need R + sl-SSB-TimeAllocation1-r16 SL-SSB-TimeAllocation-r16 OPTIONAL, -- Need R + sl-SSB-TimeAllocation2-r16 SL-SSB-TimeAllocation-r16 OPTIONAL, -- Need R + sl-SSB-TimeAllocation3-r16 SL-SSB-TimeAllocation-r16 OPTIONAL, -- Need R + sl-SSID-r16 INTEGER (0..671) OPTIONAL, -- Need R + txParameters-r16 SEQUENCE { + syncTxThreshIC-r16 SL-RSRP-Range-r16 OPTIONAL, -- Need R + syncTxThreshOoC-r16 SL-RSRP-Range-r16 OPTIONAL, -- Need R + syncInfoReserved-r16 BIT STRING (SIZE (2)) OPTIONAL -- Need R + }, + gnss-Sync-r16 ENUMERATED {true} OPTIONAL, -- Need R + ... +} + +SL-RSRP-Range-r16 ::= INTEGER (0..13) + +SL-SSB-TimeAllocation-r16 ::= SEQUENCE { + sl-NumSSB-WithinPeriod-r16 ENUMERATED {n1, n2, n4, n8, n16, n32, n64} OPTIONAL, -- Need R + sl-TimeOffsetSSB-r16 INTEGER (0..1279) OPTIONAL, -- Need R + sl-TimeInterval-r16 INTEGER (0..639) OPTIONAL -- Need R +} + +-- TAG-SL-SYNCCONFIG-STOP +-- TAG-SL-THRES-RSRP-LIST-START + +SL-Thres-RSRP-List-r16 ::= SEQUENCE (SIZE (64)) OF SL-Thres-RSRP-r16 + +SL-Thres-RSRP-r16 ::= INTEGER (0..66) + +-- TAG-SL-THRES-RSRP-LIST-STOP +-- TAG-SL-TXPOWER-START + +SL-TxPower-r16 ::= CHOICE{ + minusinfinity-r16 NULL, + txPower-r16 INTEGER (-30..33) +} + +-- TAG-SL-TXPOWER-STOP +-- TAG-SL-TYPETXSYNC-START + +SL-TypeTxSync-r16 ::= ENUMERATED {gnss, gnbEnb, ue} + +-- TAG-SL-TYPETXSYNC-STOP +-- TAG-SL-UE-SELECTEDCONFIG-START + +SL-UE-SelectedConfig-r16 ::= SEQUENCE { + sl-PSSCH-TxConfigList-r16 SL-PSSCH-TxConfigList-r16 OPTIONAL, -- Need R + sl-ProbResourceKeep-r16 ENUMERATED {v0, v0dot2, v0dot4, v0dot6, v0dot8} OPTIONAL, -- Need R + sl-ReselectAfter-r16 ENUMERATED {n1, n2, n3, n4, n5, n6, n7, n8, n9} OPTIONAL, -- Need R + sl-CBR-CommonTxConfigList-r16 SL-CBR-CommonTxConfigList-r16 OPTIONAL, -- Need R + ul-PrioritizationThres-r16 INTEGER (1..16) OPTIONAL, -- Need R + sl-PrioritizationThres-r16 INTEGER (1..8) OPTIONAL, -- Need R + ... +} + +-- TAG-SL-UE-SELECTEDCONFIG-STOP +-- TAG-SL-ZONECONFIG-START + +SL-ZoneConfig-r16 ::= SEQUENCE { + sl-ZoneLength-r16 ENUMERATED { m5, m10, m20, m30, m40, m50, spare2, spare1}, + ... +} + +-- TAG-SL-ZONECONFIG-STOP +-- TAG-SLRB-UU-CONFIGINDEX-START + +SLRB-Uu-ConfigIndex-r16 ::= INTEGER (1..maxNrofSLRB-r16) + +-- TAG-SLRB-UU-CONFIGINDEX-STOP +-- TAG-CARRIERFREQLISTMBS-START + +CarrierFreqListMBS-r17 ::= SEQUENCE (SIZE (1..maxFreqMBS-r17)) OF ARFCN-ValueNR + +-- TAG-CARRIERFREQLISTMBS-STOP +-- TAG-CFR-CONFIGMCCH-MTCH-START + +CFR-ConfigMCCH-MTCH-r17 ::= SEQUENCE { + locationAndBandwidthBroadcast-r17 LocationAndBandwidthBroadcast-r17 OPTIONAL, -- Need S + pdsch-ConfigMCCH-r17 PDSCH-ConfigBroadcast-r17 OPTIONAL, -- Need S + commonControlResourceSetExt-r17 ControlResourceSet OPTIONAL -- Cond NotSIB1CommonControlResource +} + +LocationAndBandwidthBroadcast-r17 ::= CHOICE { + sameAsSib1ConfiguredLocationAndBW NULL, + locationAndBandwidth INTEGER (0..37949) +} + +-- TAG-CFR-CONFIGMCCH-MTCH-STOP +-- TAG-DRX-CONFIGPTM-START + +DRX-ConfigPTM-r17 ::= SEQUENCE { + drx-onDurationTimerPTM-r17 CHOICE { + subMilliSeconds INTEGER (1..31), + milliSeconds ENUMERATED { + ms1, ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, ms40, ms50, ms60, + ms80, ms100, ms200, ms300, ms400, ms500, ms600, ms800, ms1000, ms1200, + ms1600, spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1 + } + }, + drx-InactivityTimerPTM-r17 ENUMERATED { + ms0, ms1, ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, ms40, ms50, ms60, ms80, + ms100, ms200, ms300, ms500, ms750, ms1280, ms1920, ms2560, spare9, spare8, + spare7, spare6, spare5, spare4, spare3, spare2, spare1 + }, + drx-HARQ-RTT-TimerDL-PTM-r17 INTEGER (0..56) OPTIONAL, -- Cond HARQFeedback + drx-RetransmissionTimerDL-PTM-r17 ENUMERATED { + sl0, sl1, sl2, sl4, sl6, sl8, sl16, sl24, sl33, sl40, sl64, sl80, sl96, sl112, sl128, + sl160, sl320, spare15, spare14, spare13, spare12, spare11, spare10, spare9, + spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1 + } OPTIONAL, -- Cond HARQFeedback + drx-LongCycleStartOffsetPTM-r17 CHOICE { + ms10 INTEGER(0..9), + ms20 INTEGER(0..19), + ms32 INTEGER(0..31), + ms40 INTEGER(0..39), + ms60 INTEGER(0..59), + ms64 INTEGER(0..63), + ms70 INTEGER(0..69), + ms80 INTEGER(0..79), + ms128 INTEGER(0..127), + ms160 INTEGER(0..159), + ms256 INTEGER(0..255), + ms320 INTEGER(0..319), + ms512 INTEGER(0..511), + ms640 INTEGER(0..639), + ms1024 INTEGER(0..1023), + ms1280 INTEGER(0..1279), + ms2048 INTEGER(0..2047), + ms2560 INTEGER(0..2559), + ms5120 INTEGER(0..5119), + ms10240 INTEGER(0..10239) + }, + drx-SlotOffsetPTM-r17 INTEGER (0..31) +} + +-- TAG-DRX-CONFIGPTM-STOP +-- TAG-MBS-NEIGHBOURCELLLIST-START + +MBS-NeighbourCellList-r17 ::= SEQUENCE (SIZE (0..maxNeighCellMBS-r17)) OF MBS-NeighbourCell-r17 + +MBS-NeighbourCell-r17 ::= SEQUENCE { + physCellId-r17 PhysCellId, + carrierFreq-r17 ARFCN-ValueNR OPTIONAL -- Need S +} + +-- TAG-MBS-NEIGHBOURCELLLIST-STOP +-- TAG-MBS-SERVICELIST-START + +MBS-ServiceList-r17 ::= SEQUENCE (SIZE (1..maxNrofMBS-ServiceListPerUE-r17)) OF MBS-ServiceInfo-r17 + +MBS-ServiceInfo-r17 ::= SEQUENCE { + tmgi-r17 TMGI-r17 +} + +-- TAG-MBS-SERVICELIST-STOP +-- TAG-MBS-SESSIONINFOLIST-START + +MBS-SessionInfoList-r17 ::= SEQUENCE (SIZE (1..maxNrofMBS-Session-r17)) OF MBS-SessionInfo-r17 + +MBS-SessionInfo-r17 ::= SEQUENCE { + mbs-SessionId-r17 TMGI-r17, + g-RNTI-r17 RNTI-Value, + mrb-ListBroadcast-r17 MRB-ListBroadcast-r17, + mtch-SchedulingInfo-r17 DRX-ConfigPTM-Index-r17 OPTIONAL, -- Need S + mtch-NeighbourCell-r17 BIT STRING (SIZE(maxNeighCellMBS-r17)) OPTIONAL, -- Need S + pdsch-ConfigIndex-r17 PDSCH-ConfigIndex-r17 OPTIONAL, -- Need S + mtch-SSB-MappingWindowIndex-r17 MTCH-SSB-MappingWindowIndex-r17 OPTIONAL -- Cond MTCH-Mapping +} + +DRX-ConfigPTM-Index-r17 ::= INTEGER (0..maxNrofDRX-ConfigPTM-1-r17) + +PDSCH-ConfigIndex-r17 ::= INTEGER (0..maxNrofPDSCH-ConfigPTM-1-r17) + +MTCH-SSB-MappingWindowIndex-r17 ::= INTEGER (0..maxNrofMTCH-SSB-MappingWindow-1-r17) + +MRB-ListBroadcast-r17 ::= SEQUENCE (SIZE (1..maxNrofMRB-Broadcast-r17)) OF MRB-InfoBroadcast-r17 + +MRB-InfoBroadcast-r17 ::= SEQUENCE { + pdcp-Config-r17 MRB-PDCP-ConfigBroadcast-r17, + rlc-Config-r17 MRB-RLC-ConfigBroadcast-r17, + ... +} + +MRB-PDCP-ConfigBroadcast-r17 ::= SEQUENCE { + pdcp-SN-SizeDL-r17 ENUMERATED {len12bits} OPTIONAL, -- Need S + headerCompression-r17 CHOICE { + notUsed NULL, + rohc SEQUENCE { + maxCID-r17 INTEGER (1..16) DEFAULT 15, + profiles-r17 SEQUENCE { + profile0x0000-r17 BOOLEAN, + profile0x0001-r17 BOOLEAN, + profile0x0002-r17 BOOLEAN + } + } + }, + t-Reordering-r17 ENUMERATED {ms1, ms10, ms40, ms160, ms500, ms1000, ms1250, ms2750} OPTIONAL -- Need S +} + +MRB-RLC-ConfigBroadcast-r17 ::= SEQUENCE { + logicalChannelIdentity-r17 LogicalChannelIdentity, + sn-FieldLength-r17 ENUMERATED {size6} OPTIONAL, -- Need S + t-Reassembly-r17 T-Reassembly OPTIONAL -- Need S +} + +-- TAG-MBS-SESSIONINFOLIST-STOP +-- TAG-MTCH-SSB-MAPPINGWINDOWLIST-START + +MTCH-SSB-MappingWindowList-r17 ::= SEQUENCE (SIZE (1..maxNrofMTCH-SSB-MappingWindow-r17)) OF MTCH-SSB-MappingWindowCycleOffset-r17 + +MTCH-SSB-MappingWindowCycleOffset-r17 ::= CHOICE { + ms10 INTEGER(0..9), + ms20 INTEGER(0..19), + ms32 INTEGER(0..31), + ms64 INTEGER(0..63), + ms128 INTEGER(0..127), + ms256 INTEGER(0..255) +} + +-- TAG-MTCH-SSB-MAPPINGWINDOWLIST-STOP +-- TAG-PDSCH-CONFIGBROADCAST-START + +PDSCH-ConfigBroadcast-r17 ::= SEQUENCE { + pdschConfigList-r17 SEQUENCE (SIZE (1..maxNrofPDSCH-ConfigPTM-r17) ) OF PDSCH-ConfigPTM-r17, + pdsch-TimeDomainAllocationList-r17 PDSCH-TimeDomainResourceAllocationList-r16 OPTIONAL, -- Need R + rateMatchPatternToAddModList-r17 SEQUENCE (SIZE (1..maxNrofRateMatchPatterns)) OF RateMatchPattern OPTIONAL, -- Need R + lte-CRS-ToMatchAround-r17 RateMatchPatternLTE-CRS OPTIONAL, -- Need R + mcs-Table-r17 ENUMERATED {qam256, qam64LowSE} OPTIONAL, -- Need S + xOverhead-r17 ENUMERATED {xOh6, xOh12, xOh18} OPTIONAL -- Need S +} + +PDSCH-ConfigPTM-r17 ::= SEQUENCE { + dataScramblingIdentityPDSCH-r17 INTEGER (0..1023) OPTIONAL, -- Need S + dmrs-ScramblingID0-r17 INTEGER (0..65535) OPTIONAL, -- Need S + pdsch-AggregationFactor-r17 ENUMERATED {n2, n4, n8} OPTIONAL -- Need S +} + +-- TAG-PDSCH-CONFIGBROADCAST-STOP +-- TAG-TMGI-START + +TMGI-r17 ::= SEQUENCE { + plmn-Id-r17 CHOICE { + plmn-Index INTEGER (1..maxPLMN), + explicitValue PLMN-Identity + }, + serviceId-r17 OCTET STRING (SIZE (3)) +} + +-- TAG-TMGI-STOP +-- TAG-MULTIPLICITY-AND-TYPE-CONSTRAINT-DEFINITIONS-START + +maxAdditionalRACH-r17 INTEGER ::= 256 -- Maximum number of additional RACH configurations. +maxAI-DCI-PayloadSize-r16 INTEGER ::= 128 --Maximum size of the DCI payload scrambled with ai-RNTI +maxAI-DCI-PayloadSize-1-r16 INTEGER ::= 127 --Maximum size of the DCI payload scrambled with ai-RNTI minus 1 +maxBandComb INTEGER ::= 65536 -- Maximum number of DL band combinations +maxBandsUTRA-FDD-r16 INTEGER ::= 64 -- Maximum number of bands listed in UTRA-FDD UE caps +maxBH-RLC-ChannelID-r16 INTEGER ::= 65536 -- Maximum value of BH RLC Channel ID +maxBT-IdReport-r16 INTEGER ::= 32 -- Maximum number of Bluetooth IDs to report +maxBT-Name-r16 INTEGER ::= 4 -- Maximum number of Bluetooth name +maxCAG-Cell-r16 INTEGER ::= 16 -- Maximum number of NR CAG cell ranges in SIB3, SIB4 +maxTwoPUCCH-Grp-ConfigList-r16 INTEGER ::= 32 -- Maximum number of supported configuration(s) of {primary PUCCH group + -- config, secondary PUCCH group config} +maxTwoPUCCH-Grp-ConfigList-r17 INTEGER ::= 16 -- Maximum number of supported configuration(s) of {primary PUCCH group + -- config, secondary PUCCH group config} for PUCCH cell switching +maxCBR-Config-r16 INTEGER ::= 8 -- Maximum number of CBR range configurations for sidelink communication + -- congestion control +maxCBR-Config-1-r16 INTEGER ::= 7 -- Maximum number of CBR range configurations for sidelink communication + -- congestion control minus 1 +maxCBR-Level-r16 INTEGER ::= 16 -- Maximum number of CBR levels +maxCBR-Level-1-r16 INTEGER ::= 15 -- Maximum number of CBR levels minus 1 +maxCellExcluded INTEGER ::= 16 -- Maximum number of NR exclude-listed cell ranges in SIB3, SIB4 +maxCellGroupings-r16 INTEGER ::= 32 -- Maximum number of cell groupings for NR-DC +maxCellHistory-r16 INTEGER ::= 16 -- Maximum number of visited PCells reported +maxPSCellHistory-r17 INTEGER ::= 16 -- Maximum number of visited PSCells across all reported PCells +maxCellInter INTEGER ::= 16 -- Maximum number of inter-Freq cells listed in SIB4 +maxCellIntra INTEGER ::= 16 -- Maximum number of intra-Freq cells listed in SIB3 +maxCellMeasEUTRA INTEGER ::= 32 -- Maximum number of cells in E-UTRAN +maxCellMeasIdle-r16 INTEGER ::= 8 -- Maximum number of cells per carrier for idle/inactive measurements +maxCellMeasUTRA-FDD-r16 INTEGER ::= 32 -- Maximum number of cells in FDD UTRAN +maxCellNTN-r17 INTEGER ::= 4 -- Maximum number of NTN neighbour cells for which assistance information is + -- provided +maxCarrierTypePairList-r16 INTEGER ::= 16 -- Maximum number of supported carrier type pair of (carrier type on which + -- CSI measurement is performed, carrier type on which CSI reporting is + -- performed) for CSI reporting cross PUCCH group +maxCellAllowed INTEGER ::= 16 -- Maximum number of NR allow-listed cell ranges in SIB3, SIB4 +maxEARFCN INTEGER ::= 262143 -- Maximum value of E-UTRA carrier frequency +maxEUTRA-CellExcluded INTEGER ::= 16 -- Maximum number of E-UTRA exclude-listed physical cell identity ranges + -- in SIB5 +maxEUTRA-NS-Pmax INTEGER ::= 8 -- Maximum number of NS and P-Max values per band +maxFeatureCombPreamblesPerRACHResource-r17 INTEGER ::= 256 -- Maximum number of feature combination preambles. +maxLogMeasReport-r16 INTEGER ::= 520 -- Maximum number of entries for logged measurements +maxMultiBands INTEGER ::= 8 -- Maximum number of additional frequency bands that a cell belongs to +maxNARFCN INTEGER ::= 3279165 -- Maximum value of NR carrier frequency +maxNR-NS-Pmax INTEGER ::= 8 -- Maximum number of NS and P-Max values per band +maxFreqIdle-r16 INTEGER ::= 8 -- Maximum number of carrier frequencies for idle/inactive measurements +maxNrofServingCells INTEGER ::= 32 -- Max number of serving cells (SpCells + SCells) +maxNrofServingCells-1 INTEGER ::= 31 -- Max number of serving cells (SpCells + SCells) minus 1 +maxNrofAggregatedCellsPerCellGroup INTEGER ::= 16 +maxNrofAggregatedCellsPerCellGroupMinus4-r16 INTEGER ::= 12 +maxNrofDUCells-r16 INTEGER ::= 512 -- Max number of cells configured on the collocated IAB-DU +maxNrofAppLayerMeas-r17 INTEGER ::= 16 -- Max number of simultaneous application layer measurements +maxNrofAppLayerMeas-1-r17 INTEGER ::= 15 -- Max number of simultaneous application layer measurements minus 1 +maxNrofAvailabilityCombinationsPerSet-r16 INTEGER ::= 512 -- Max number of AvailabilityCombinationId used in the DCI format 2_5 +maxNrofAvailabilityCombinationsPerSet-1-r16 INTEGER ::= 511 -- Max number of AvailabilityCombinationId used in the DCI format 2_5 minus 1 +maxNrofIABResourceConfig-r17 INTEGER ::= 65536 -- Max number of IAB-ResourceConfigID used in MAC CE +maxNrofIABResourceConfig-1-r17 INTEGER ::= 65535 -- Max number of IAB-ResourceConfigID used in MAC CE minus 1 +maxNrofSCellActRS-r17 INTEGER ::= 255 -- Max number of RS configurations per SCell for SCell activation +maxNrofSCells INTEGER ::= 31 -- Max number of secondary serving cells per cell group +maxNrofCellMeas INTEGER ::= 32 -- Maximum number of entries in each of the cell lists in a measurement object +maxNrofCRS-IM-InterfCell-r17 INTEGER ::= 8 -- Maximum number of LTE interference cells for CRS-IM per UE +maxNrofRelayMeas-r17 INTEGER ::= 32 -- Maximum number of L2 U2N Relay UEs to measure for each measurement object + -- on sidelink frequency +maxNrofCG-SL-r16 INTEGER ::= 8 -- Max number of sidelink configured grant +maxNrofCG-SL-1-r16 INTEGER ::= 7 -- Max number of sidelink configured grant minus 1 +maxSL-GC-BC-DRX-QoS-r17 INTEGER ::= 16 -- Max number of sidelink DRX configurations for NR + -- sidelink groupcast/broadcast communication +maxNrofSL-RxInfoSet-r17 INTEGER ::= 4 -- Max number of sidelink DRX configuration sets in sidelink DRX assistant + -- information +maxNrofSS-BlocksToAverage INTEGER ::= 16 -- Max number for the (max) number of SS blocks to average to determine cell measurement +maxNrofCondCells-r16 INTEGER ::= 8 -- Max number of conditional candidate SpCells +maxNrofCondCells-1-r17 INTEGER ::= 7 -- Max number of conditional candidate SpCells minus 1 +maxNrofCSI-RS-ResourcesToAverage INTEGER ::= 16 -- Max number for the (max) number of CSI-RS to average to determine cell measurement +maxNrofDL-Allocations INTEGER ::= 16 -- Maximum number of PDSCH time domain resource allocations +maxNrofDL-AllocationsExt-r17 INTEGER ::= 64 -- Maximum number of PDSCH time domain resource allocations for multi-PDSCH + -- scheduling +maxNrofPDU-Sessions-r17 INTEGER ::= 256 -- Maximum number of PDU Sessions +maxNrofSR-ConfigPerCellGroup INTEGER ::= 8 -- Maximum number of SR configurations per cell group +maxLCG-ID INTEGER ::= 7 -- Maximum value of LCG ID +maxLCG-ID-IAB-r17 INTEGER ::= 255 -- Maximum value of LCG ID for IAB-MT +maxLC-ID INTEGER ::= 32 -- Maximum value of Logical Channel ID +maxLC-ID-Iab-r16 INTEGER ::= 65855 -- Maximum value of BH Logical Channel ID extension +maxLTE-CRS-Patterns-r16 INTEGER ::= 3 -- Maximum number of additional LTE CRS rate matching patterns +maxNrofTAGs INTEGER ::= 4 -- Maximum number of Timing Advance Groups +maxNrofTAGs-1 INTEGER ::= 3 -- Maximum number of Timing Advance Groups minus 1 +maxNrofBWPs INTEGER ::= 4 -- Maximum number of BWPs per serving cell +maxNrofCombIDC INTEGER ::= 128 -- Maximum number of reported MR-DC combinations for IDC +maxNrofSymbols-1 INTEGER ::= 13 -- Maximum index identifying a symbol within a slot (14 symbols, indexed from 0..13) +maxNrofSlots INTEGER ::= 320 -- Maximum number of slots in a 10 ms period +maxNrofSlots-1 INTEGER ::= 319 -- Maximum number of slots in a 10 ms period minus 1 +maxNrofPhysicalResourceBlocks INTEGER ::= 275 -- Maximum number of PRBs +maxNrofPhysicalResourceBlocks-1 INTEGER ::= 274 -- Maximum number of PRBs minus 1 +maxNrofPhysicalResourceBlocksPlus1 INTEGER ::= 276 -- Maximum number of PRBs plus 1 +maxNrofControlResourceSets INTEGER ::= 12 -- Max number of CoReSets configurable on a serving cell +maxNrofControlResourceSets-1 INTEGER ::= 11 -- Max number of CoReSets configurable on a serving cell minus 1 +maxNrofControlResourceSets-1-r16 INTEGER ::= 15 -- Max number of CoReSets configurable on a serving cell extended in minus 1 +maxNrofCoresetPools-r16 INTEGER ::= 2 -- Maximum number of CORESET pools +maxCoReSetDuration INTEGER ::= 3 -- Max number of OFDM symbols in a control resource set +maxNrofSearchSpaces-1 INTEGER ::= 39 -- Max number of Search Spaces minus 1 +maxNrofSearchSpacesLinks-1-r17 INTEGER ::= 39 -- Max number of Search Space links minus 1 +maxNrofBFDResourcePerSet-r17 INTEGER ::= 64 -- Max number of reference signal in one BFD set +maxSFI-DCI-PayloadSize INTEGER ::= 128 -- Max number payload of a DCI scrambled with SFI-RNTI +maxSFI-DCI-PayloadSize-1 INTEGER ::= 127 -- Max number payload of a DCI scrambled with SFI-RNTI minus 1 +maxIAB-IP-Address-r16 INTEGER ::= 32 -- Max number of assigned IP addresses +maxINT-DCI-PayloadSize INTEGER ::= 126 -- Max number payload of a DCI scrambled with INT-RNTI +maxINT-DCI-PayloadSize-1 INTEGER ::= 125 -- Max number payload of a DCI scrambled with INT-RNTI minus 1 +maxNrofRateMatchPatterns INTEGER ::= 4 -- Max number of rate matching patterns that may be configured +maxNrofRateMatchPatterns-1 INTEGER ::= 3 -- Max number of rate matching patterns that may be configured minus 1 +maxNrofRateMatchPatternsPerGroup INTEGER ::= 8 -- Max number of rate matching patterns that may be configured in one group +maxNrofCSI-ReportConfigurations INTEGER ::= 48 -- Maximum number of report configurations +maxNrofCSI-ReportConfigurations-1 INTEGER ::= 47 -- Maximum number of report configurations minus 1 +maxNrofCSI-ResourceConfigurations INTEGER ::= 112 -- Maximum number of resource configurations +maxNrofCSI-ResourceConfigurations-1 INTEGER ::= 111 -- Maximum number of resource configurations minus 1 +maxNrofAP-CSI-RS-ResourcesPerSet INTEGER ::= 16 +maxNrOfCSI-AperiodicTriggers INTEGER ::= 128 -- Maximum number of triggers for aperiodic CSI reporting +maxNrofReportConfigPerAperiodicTrigger INTEGER ::= 16 -- Maximum number of report configurations per trigger state for aperiodic reporting +maxNrofNZP-CSI-RS-Resources INTEGER ::= 192 -- Maximum number of Non-Zero-Power (NZP) CSI-RS resources +maxNrofNZP-CSI-RS-Resources-1 INTEGER ::= 191 -- Maximum number of Non-Zero-Power (NZP) CSI-RS resources minus 1 +maxNrofNZP-CSI-RS-ResourcesPerSet INTEGER ::= 64 -- Maximum number of NZP CSI-RS resources per resource set +maxNrofNZP-CSI-RS-ResourceSets INTEGER ::= 64 -- Maximum number of NZP CSI-RS resource sets per cell +maxNrofNZP-CSI-RS-ResourceSets-1 INTEGER ::= 63 -- Maximum number of NZP CSI-RS resource sets per cell minus 1 +maxNrofNZP-CSI-RS-ResourceSetsPerConfig INTEGER ::= 16 -- Maximum number of resource sets per resource configuration +maxNrofNZP-CSI-RS-ResourcesPerConfig INTEGER ::= 128 -- Maximum number of resources per resource configuration +maxNrofZP-CSI-RS-Resources INTEGER ::= 32 -- Maximum number of Zero-Power (ZP) CSI-RS resources +maxNrofZP-CSI-RS-Resources-1 INTEGER ::= 31 -- Maximum number of Zero-Power (ZP) CSI-RS resources minus 1 +maxNrofZP-CSI-RS-ResourceSets-1 INTEGER ::= 15 +maxNrofZP-CSI-RS-ResourcesPerSet INTEGER ::= 16 +maxNrofZP-CSI-RS-ResourceSets INTEGER ::= 16 +maxNrofCSI-IM-Resources INTEGER ::= 32 -- Maximum number of CSI-IM resources +maxNrofCSI-IM-Resources-1 INTEGER ::= 31 -- Maximum number of CSI-IM resources minus 1 +maxNrofCSI-IM-ResourcesPerSet INTEGER ::= 8 -- Maximum number of CSI-IM resources per set +maxNrofCSI-IM-ResourceSets INTEGER ::= 64 -- Maximum number of NZP CSI-IM resource sets per cell +maxNrofCSI-IM-ResourceSets-1 INTEGER ::= 63 -- Maximum number of NZP CSI-IM resource sets per cell minus 1 +maxNrofCSI-IM-ResourceSetsPerConfig INTEGER ::= 16 -- Maximum number of CSI IM resource sets per resource configuration +maxNrofCSI-SSB-ResourcePerSet INTEGER ::= 64 -- Maximum number of SSB resources in a resource set +maxNrofCSI-SSB-ResourceSets INTEGER ::= 64 -- Maximum number of CSI SSB resource sets per cell +maxNrofCSI-SSB-ResourceSets-1 INTEGER ::= 63 -- Maximum number of CSI SSB resource sets per cell minus 1 +maxNrofCSI-SSB-ResourceSetsPerConfig INTEGER ::= 1 -- Maximum number of CSI SSB resource sets per resource configuration +maxNrofCSI-SSB-ResourceSetsPerConfigExt INTEGER ::= 2 -- Maximum number of CSI SSB resource sets per resource configuration + -- extended +maxNrofFailureDetectionResources INTEGER ::= 10 -- Maximum number of failure detection resources +maxNrofFailureDetectionResources-1 INTEGER ::= 9 -- Maximum number of failure detection resources minus 1 +maxNrofFailureDetectionResources-1-r17 INTEGER ::= 63 -- Maximum number of the enhanced failure detection resources minus 1 +maxNrofFreqSL-r16 INTEGER ::= 8 -- Maximum number of carrier frequency for NR sidelink communication +maxNrofSL-BWPs-r16 INTEGER ::= 4 -- Maximum number of BWP for NR sidelink communication +maxFreqSL-EUTRA-r16 INTEGER ::= 8 -- Maximum number of EUTRA anchor carrier frequency for NR sidelink communication +maxNrofSL-MeasId-r16 INTEGER ::= 64 -- Maximum number of sidelink measurement identity (RSRP) per destination +maxNrofSL-ObjectId-r16 INTEGER ::= 64 -- Maximum number of sidelink measurement objects (RSRP) per destination +maxNrofSL-ReportConfigId-r16 INTEGER ::= 64 -- Maximum number of sidelink measurement reporting configuration(RSRP) per destination +maxNrofSL-PoolToMeasureNR-r16 INTEGER ::= 8 -- Maximum number of resource pool for NR sidelink measurement to measure for + -- each measurement object (for CBR) +maxFreqSL-NR-r16 INTEGER ::= 8 -- Maximum number of NR anchor carrier frequency for NR sidelink communication +maxNrofSL-QFIs-r16 INTEGER ::= 2048 -- Maximum number of QoS flow for NR sidelink communication per UE +maxNrofSL-QFIsPerDest-r16 INTEGER ::= 64 -- Maximum number of QoS flow per destination for NR sidelink communication +maxNrofObjectId INTEGER ::= 64 -- Maximum number of measurement objects +maxNrofPageRec INTEGER ::= 32 -- Maximum number of page records +maxNrofPCI-Ranges INTEGER ::= 8 -- Maximum number of PCI ranges +maxPLMN INTEGER ::= 12 -- Maximum number of PLMNs broadcast and reported by UE at establishment +maxTAC-r17 INTEGER ::= 12 -- Maximum number of Tracking Area Codes to which a cell belongs to +maxNrofCSI-RS-ResourcesRRM INTEGER ::= 96 -- Maximum number of CSI-RS resources per cell for an RRM measurement object +maxNrofCSI-RS-ResourcesRRM-1 INTEGER ::= 95 -- Maximum number of CSI-RS resources per cell for an RRM measurement object + -- minus 1. +maxNrofMeasId INTEGER ::= 64 -- Maximum number of configured measurements +maxNrofQuantityConfig INTEGER ::= 2 -- Maximum number of quantity configurations +maxNrofCSI-RS-CellsRRM INTEGER ::= 96 -- Maximum number of cells with CSI-RS resources for an RRM measurement object +maxNrofSL-Dest-r16 INTEGER ::= 32 -- Maximum number of destination for NR sidelink communication and discovery +maxNrofSL-Dest-1-r16 INTEGER ::= 31 -- Highest index of destination for NR sidelink communication and discovery +maxNrofSLRB-r16 INTEGER ::= 512 -- Maximum number of radio bearer for NR sidelink communication per UE +maxSL-LCID-r16 INTEGER ::= 512 -- Maximum number of RLC bearer for NR sidelink communication per UE +maxSL-SyncConfig-r16 INTEGER ::= 16 -- Maximum number of sidelink Sync configurations +maxNrofRXPool-r16 INTEGER ::= 16 -- Maximum number of Rx resource pool for NR sidelink communication and + -- discovery +maxNrofTXPool-r16 INTEGER ::= 8 -- Maximum number of Tx resource pool for NR sidelink communication and + -- discovery +maxNrofPoolID-r16 INTEGER ::= 16 -- Maximum index of resource pool for NR sidelink communication and + -- discovery +maxNrofSRS-PathlossReferenceRS-r16 INTEGER ::= 64 -- Maximum number of RSs used as pathloss reference for SRS power control. +maxNrofSRS-PathlossReferenceRS-1-r16 INTEGER ::= 63 -- Maximum number of RSs used as pathloss reference for SRS power control + -- minus 1. +maxNrofSRS-ResourceSets INTEGER ::= 16 -- Maximum number of SRS resource sets in a BWP. +maxNrofSRS-ResourceSets-1 INTEGER ::= 15 -- Maximum number of SRS resource sets in a BWP minus 1. +maxNrofSRS-PosResourceSets-r16 INTEGER ::= 16 -- Maximum number of SRS Positioning resource sets in a BWP. +maxNrofSRS-PosResourceSets-1-r16 INTEGER ::= 15 -- Maximum number of SRS Positioning resource sets in a BWP minus 1. +maxNrofSRS-Resources INTEGER ::= 64 -- Maximum number of SRS resources. +maxNrofSRS-Resources-1 INTEGER ::= 63 -- Maximum number of SRS resources minus 1. +maxNrofSRS-PosResources-r16 INTEGER ::= 64 -- Maximum number of SRS Positioning resources. +maxNrofSRS-PosResources-1-r16 INTEGER ::= 63 -- Maximum number of SRS Positioning resources minus 1. +maxNrofSRS-ResourcesPerSet INTEGER ::= 16 -- Maximum number of SRS resources in an SRS resource set +maxNrofSRS-TriggerStates-1 INTEGER ::= 3 -- Maximum number of SRS trigger states minus 1, i.e., the largest code point. +maxNrofSRS-TriggerStates-2 INTEGER ::= 2 -- Maximum number of SRS trigger states minus 2. +maxRAT-CapabilityContainers INTEGER ::= 8 -- Maximum number of interworking RAT containers (incl NR and MRDC) +maxSimultaneousBands INTEGER ::= 32 -- Maximum number of simultaneously aggregated bands +maxULTxSwitchingBandPairs INTEGER ::= 32 -- Maximum number of band pairs supporting dynamic UL Tx switching in a band + -- combination. +maxNrofSlotFormatCombinationsPerSet INTEGER ::= 512 -- Maximum number of Slot Format Combinations in a SF-Set. +maxNrofSlotFormatCombinationsPerSet-1 INTEGER ::= 511 -- Maximum number of Slot Format Combinations in a SF-Set minus 1. +maxNrofTrafficPattern-r16 INTEGER ::= 8 -- Maximum number of Traffic Pattern for NR sidelink communication. +maxNrofPUCCH-Resources INTEGER ::= 128 +maxNrofPUCCH-Resources-1 INTEGER ::= 127 +maxNrofPUCCH-ResourceSets INTEGER ::= 4 -- Maximum number of PUCCH Resource Sets +maxNrofPUCCH-ResourceSets-1 INTEGER ::= 3 -- Maximum number of PUCCH Resource Sets minus 1. +maxNrofPUCCH-ResourcesPerSet INTEGER ::= 32 -- Maximum number of PUCCH Resources per PUCCH-ResourceSet +maxNrofPUCCH-P0-PerSet INTEGER ::= 8 -- Maximum number of P0-pucch present in a p0-pucch set +maxNrofPUCCH-PathlossReferenceRSs INTEGER ::= 4 -- Maximum number of RSs used as pathloss reference for PUCCH power control. +maxNrofPUCCH-PathlossReferenceRSs-1 INTEGER ::= 3 -- Maximum number of RSs used as pathloss reference for PUCCH power control + -- minus 1. +maxNrofPUCCH-PathlossReferenceRSs-r16 INTEGER ::= 64 -- Maximum number of RSs used as pathloss reference for PUCCH power control + -- extended. +maxNrofPUCCH-PathlossReferenceRSs-1-r16 INTEGER ::= 63 -- Maximum number of RSs used as pathloss reference for PUCCH power control + -- minus 1 extended. +maxNrofPUCCH-PathlossReferenceRSs-1-r17 INTEGER ::= 7 -- Maximum number of RSs used as pathloss reference for PUCCH power control + -- minus 1. +maxNrofPUCCH-PathlossReferenceRSsDiff-r16 INTEGER ::= 60 -- Difference between the extended maximum and the non-extended maximum +maxNrofPUCCH-ResourceGroups-r16 INTEGER ::= 4 -- Maximum number of PUCCH resources groups. +maxNrofPUCCH-ResourcesPerGroup-r16 INTEGER ::= 128 -- Maximum number of PUCCH resources in a PUCCH group. +maxNrofPowerControlSetInfos-r17 INTEGER ::= 8 -- Maximum number of PUCCH power control set infos +maxNrofMultiplePUSCHs-r16 INTEGER ::= 8 -- Maximum number of multiple PUSCHs in PUSCH TDRA list +maxNrofP0-PUSCH-AlphaSets INTEGER ::= 30 -- Maximum number of P0-pusch-alpha-sets (see TS 38.213 [13], clause 7.1) +maxNrofP0-PUSCH-AlphaSets-1 INTEGER ::= 29 -- Maximum number of P0-pusch-alpha-sets minus 1 (see TS 38.213 [13], clause 7.1) +maxNrofPUSCH-PathlossReferenceRSs INTEGER ::= 4 -- Maximum number of RSs used as pathloss reference for PUSCH power control. +maxNrofPUSCH-PathlossReferenceRSs-1 INTEGER ::= 3 -- Maximum number of RSs used as pathloss reference for PUSCH power control + -- minus 1. +maxNrofPUSCH-PathlossReferenceRSs-r16 INTEGER ::= 64 -- Maximum number of RSs used as pathloss reference for PUSCH power control + -- extended +maxNrofPUSCH-PathlossReferenceRSs-1-r16 INTEGER ::= 63 -- Maximum number of RSs used as pathloss reference for PUSCH power control + -- extended minus 1 +maxNrofPUSCH-PathlossReferenceRSsDiff-r16 INTEGER ::= 60 -- Difference between maxNrofPUSCH-PathlossReferenceRSs-r16 and + -- maxNrofPUSCH-PathlossReferenceRSs +maxNrofPathlossReferenceRSs-r17 INTEGER ::= 64 -- Maximum number of RSs used as pathloss reference for PUSCH, PUCCH, SRS + -- power control for unified TCI state operation +maxNrofPathlossReferenceRSs-1-r17 INTEGER ::= 63 -- Maximum number of RSs used as pathloss reference for PUSCH, PUCCH, SRS + -- power control for unified TCI state operation minus 1 +maxNrofNAICS-Entries INTEGER ::= 8 -- Maximum number of supported NAICS capability set +maxBands INTEGER ::= 1024 -- Maximum number of supported bands in UE capability. +maxBandsMRDC INTEGER ::= 1280 +maxBandsEUTRA INTEGER ::= 256 +maxCellReport INTEGER ::= 8 +maxDRB INTEGER ::= 29 -- Maximum number of DRBs (that can be added in DRB-ToAddModList). +maxFreq INTEGER ::= 8 -- Max number of frequencies. +maxFreqLayers INTEGER ::= 4 -- Max number of frequency layers. +maxFreqPlus1 INTEGER ::= 9 -- Max number of frequencies for Slicing. +maxFreqIDC-r16 INTEGER ::= 128 -- Max number of frequencies for IDC indication. +maxCombIDC-r16 INTEGER ::= 128 -- Max number of reported UL CA for IDC indication. +maxFreqIDC-MRDC INTEGER ::= 32 -- Maximum number of candidate NR frequencies for MR-DC IDC indication +maxNrofCandidateBeams INTEGER ::= 16 -- Max number of PRACH-ResourceDedicatedBFR in BFR config. +maxNrofCandidateBeams-r16 INTEGER ::= 64 -- Max number of candidate beam resources in BFR config. +maxNrofCandidateBeamsExt-r16 INTEGER ::= 48 -- Max number of PRACH-ResourceDedicatedBFR in the CandidateBeamRSListExt +maxNrofPCIsPerSMTC INTEGER ::= 64 -- Maximum number of PCIs per SMTC. +maxNrofQFIs INTEGER ::= 64 +maxNrofResourceAvailabilityPerCombination-r16 INTEGER ::= 256 +maxNrOfSemiPersistentPUSCH-Triggers INTEGER ::= 64 -- Maximum number of triggers for semi persistent reporting on PUSCH +maxNrofSR-Resources INTEGER ::= 8 -- Maximum number of SR resources per BWP in a cell. +maxNrofSlotFormatsPerCombination INTEGER ::= 256 +maxNrofSpatialRelationInfos INTEGER ::= 8 +maxNrofSpatialRelationInfos-plus-1 INTEGER ::= 9 +maxNrofSpatialRelationInfos-r16 INTEGER ::= 64 +maxNrofSpatialRelationInfosDiff-r16 INTEGER ::= 56 -- Difference between maxNrofSpatialRelationInfos-r16 and maxNrofSpatialRelationInfos +maxNrofIndexesToReport INTEGER ::= 32 +maxNrofIndexesToReport2 INTEGER ::= 64 +maxNrofSSBs-r16 INTEGER ::= 64 -- Maximum number of SSB resources in a resource set. +maxNrofSSBs-1 INTEGER ::= 63 -- Maximum number of SSB resources in a resource set minus 1. +maxNrofS-NSSAI INTEGER ::= 8 -- Maximum number of S-NSSAI. +maxNrofTCI-StatesPDCCH INTEGER ::= 64 +maxNrofTCI-States INTEGER ::= 128 -- Maximum number of TCI states. +maxNrofTCI-States-1 INTEGER ::= 127 -- Maximum number of TCI states minus 1. +maxUL-TCI-r17 INTEGER ::= 64 -- Maximum number of TCI states. +maxUL-TCI-1-r17 INTEGER ::= 63 -- Maximum number of TCI states minus 1. +maxNrofAdditionalPCI-r17 INTEGER ::= 7 -- Maximum number of additional PCI +maxMPE-Resources-r17 INTEGER ::= 64 -- Maximum number of pooled MPE resources +maxNrofUL-Allocations INTEGER ::= 16 -- Maximum number of PUSCH time domain resource allocations. +maxQFI INTEGER ::= 63 +maxRA-CSIRS-Resources INTEGER ::= 96 +maxRA-OccasionsPerCSIRS INTEGER ::= 64 -- Maximum number of RA occasions for one CSI-RS +maxRA-Occasions-1 INTEGER ::= 511 -- Maximum number of RA occasions in the system +maxRA-SSB-Resources INTEGER ::= 64 +maxSCSs INTEGER ::= 5 +maxSecondaryCellGroups INTEGER ::= 3 +maxNrofServingCellsEUTRA INTEGER ::= 32 +maxMBSFN-Allocations INTEGER ::= 8 +maxNrofMultiBands INTEGER ::= 8 +maxCellSFTD INTEGER ::= 3 -- Maximum number of cells for SFTD reporting +maxReportConfigId INTEGER ::= 64 +maxNrofCodebooks INTEGER ::= 16 -- Maximum number of codebooks supported by the UE +maxNrofCSI-RS-ResourcesExt-r16 INTEGER ::= 16 -- Maximum number of codebook resources supported by the UE for eType2/Codebook combo +maxNrofCSI-RS-ResourcesExt-r17 INTEGER ::= 8 -- Maximum number of codebook resources for fetype2R1 and fetype2R2 +maxNrofCSI-RS-Resources INTEGER ::= 7 -- Maximum number of codebook resources supported by the UE +maxNrofCSI-RS-ResourcesAlt-r16 INTEGER ::= 512 -- Maximum number of alternative codebook resources supported by the UE +maxNrofCSI-RS-ResourcesAlt-1-r16 INTEGER ::= 511 -- Maximum number of alternative codebook resources supported by the UE minus 1 +maxNrofSRI-PUSCH-Mappings INTEGER ::= 16 +maxNrofSRI-PUSCH-Mappings-1 INTEGER ::= 15 +maxSIB INTEGER::= 32 -- Maximum number of SIBs +maxSI-Message INTEGER::= 32 -- Maximum number of SI messages +maxSIB-MessagePlus1-r17 INTEGER::= 33 -- Maximum number of SIB messages plus 1 +maxPO-perPF INTEGER ::= 4 -- Maximum number of paging occasion per paging frame +maxPEI-perPF-r17 INTEGER ::= 4 -- Maximum number of PEI occasion per paging frame +maxAccessCat-1 INTEGER ::= 63 -- Maximum number of Access Categories minus 1 +maxBarringInfoSet INTEGER ::= 8 -- Maximum number of access control parameter sets +maxCellEUTRA INTEGER ::= 8 -- Maximum number of E-UTRA cells in SIB list +maxEUTRA-Carrier INTEGER ::= 8 -- Maximum number of E-UTRA carriers in SIB list +maxPLMNIdentities INTEGER ::= 8 -- Maximum number of PLMN identities in RAN area configurations +maxDownlinkFeatureSets INTEGER ::= 1024 -- (for NR DL) Total number of FeatureSets (size of the pool) +maxUplinkFeatureSets INTEGER ::= 1024 -- (for NR UL) Total number of FeatureSets (size of the pool) +maxEUTRA-DL-FeatureSets INTEGER ::= 256 -- (for E-UTRA) Total number of FeatureSets (size of the pool) +maxEUTRA-UL-FeatureSets INTEGER ::= 256 -- (for E-UTRA) Total number of FeatureSets (size of the pool) +maxFeatureSetsPerBand INTEGER ::= 128 -- (for NR) The number of feature sets associated with one band. +maxPerCC-FeatureSets INTEGER ::= 1024 -- (for NR) Total number of CC-specific FeatureSets (size of the pool) +maxFeatureSetCombinations INTEGER ::= 1024 -- (for MR-DC/NR)Total number of Feature set combinations (size of the pool) +maxInterRAT-RSTD-Freq INTEGER ::= 3 +maxGIN-r17 INTEGER ::= 24 -- Maximum number of broadcast GINs +maxHRNN-Len-r16 INTEGER ::= 48 -- Maximum length of HRNNs +maxNPN-r16 INTEGER ::= 12 -- Maximum number of NPNs broadcast and reported by UE at establishment +maxNrOfMinSchedulingOffsetValues-r16 INTEGER ::= 2 -- Maximum number of min. scheduling offset (K0/K2) configurations +maxK0-SchedulingOffset-r16 INTEGER ::= 16 -- Maximum number of slots configured as min. scheduling offset (K0) +maxK2-SchedulingOffset-r16 INTEGER ::= 16 -- Maximum number of slots configured as min. scheduling offset (K2) +maxK0-SchedulingOffset-r17 INTEGER ::= 64 -- Maximum number of slots configured as min. scheduling offset (K0) +maxK2-SchedulingOffset-r17 INTEGER ::= 64 -- Maximum number of slots configured as min. scheduling offset (K2) +maxDCI-2-6-Size-r16 INTEGER ::= 140 -- Maximum size of DCI format 2-6 +maxDCI-2-7-Size-r17 INTEGER ::= 43 -- Maximum size of DCI format 2-7 +maxDCI-2-6-Size-1-r16 INTEGER ::= 139 -- Maximum DCI format 2-6 size minus 1 +maxNrofUL-Allocations-r16 INTEGER ::= 64 -- Maximum number of PUSCH time domain resource allocations +maxNrofP0-PUSCH-Set-r16 INTEGER ::= 2 -- Maximum number of P0 PUSCH set(s) +maxOnDemandSIB-r16 INTEGER ::= 8 -- Maximum number of SIB(s) that can be requested on-demand +maxOnDemandPosSIB-r16 INTEGER ::= 32 -- Maximum number of posSIB(s) that can be requested on-demand +maxCI-DCI-PayloadSize-r16 INTEGER ::= 126 -- Maximum number of the DCI size for CI +maxCI-DCI-PayloadSize-1-r16 INTEGER ::= 125 -- Maximum number of the DCI size for CI minus 1 +maxUu-RelayRLC-ChannelID-r17 INTEGER ::= 32 -- Maximum value of Uu Relay RLC channel ID +maxWLAN-Id-Report-r16 INTEGER ::= 32 -- Maximum number of WLAN IDs to report +maxWLAN-Name-r16 INTEGER ::= 4 -- Maximum number of WLAN name +maxRAReport-r16 INTEGER ::= 8 -- Maximum number of RA procedures information to be included in the RA report +maxTxConfig-r16 INTEGER ::= 64 -- Maximum number of sidelink transmission parameters configurations +maxTxConfig-1-r16 INTEGER ::= 63 -- Maximum number of sidelink transmission parameters configurations minus 1 +maxPSSCH-TxConfig-r16 INTEGER ::= 16 -- Maximum number of PSSCH TX configurations +maxNrofCLI-RSSI-Resources-r16 INTEGER ::= 64 -- Maximum number of CLI-RSSI resources for UE +maxNrofCLI-RSSI-Resources-1-r16 INTEGER ::= 63 -- Maximum number of CLI-RSSI resources for UE minus 1 +maxNrofCLI-SRS-Resources-r16 INTEGER ::= 32 -- Maximum number of SRS resources for CLI measurement for UE +maxCLI-Report-r16 INTEGER ::= 8 +maxNrofCC-Group-r17 INTEGER ::= 16 -- Maximum number of CC groups for DC location report +maxNrofConfiguredGrantConfig-r16 INTEGER ::= 12 -- Maximum number of configured grant configurations per BWP +maxNrofConfiguredGrantConfig-1-r16 INTEGER ::= 11 -- Maximum number of configured grant configurations per BWP minus 1 +maxNrofCG-Type2DeactivationState INTEGER ::= 16 -- Maximum number of deactivation state for type 2 configured grants per BWP +maxNrofConfiguredGrantConfigMAC-1-r16 INTEGER ::= 31 -- Maximum number of configured grant configurations per MAC entity minus 1 +maxNrofSPS-Config-r16 INTEGER ::= 8 -- Maximum number of SPS configurations per BWP +maxNrofSPS-Config-1-r16 INTEGER ::= 7 -- Maximum number of SPS configurations per BWP minus 1 +maxNrofSPS-DeactivationState INTEGER ::= 16 -- Maximum number of deactivation state for SPS per BWP +maxNrofPPW-Config-r17 INTEGER ::= 4 -- Maximum number of Preconfigured PRS processing windows per DL BWP +maxNrofPPW-ID-1-r17 INTEGER ::= 15 -- Maximum number of Preconfigured PRS processing windows minus 1 +maxNrOfTxTEGReport-r17 INTEGER ::= 256 -- Maximum number of UE Tx Timing Error Group Report +maxNrOfTxTEG-ID-1-r17 INTEGER ::= 7 -- Maximum number of UE Tx Timing Error Group ID minus 1 +maxNrofDormancyGroups INTEGER ::= 5 -- +maxNrofPagingSubgroups-r17 INTEGER ::= 8 -- Maximum number of paging subgroups per paging occasion +maxNrofPUCCH-ResourceGroups-1-r16 INTEGER ::= 3 -- +maxNrofReqComDC-Location-r17 INTEGER ::= 128 -- Maximum number of requested carriers/BWPs combinations for DC location + -- report +maxNrofServingCellsTCI-r16 INTEGER ::= 32 -- Maximum number of serving cells in simultaneousTCI-UpdateList +maxNrofTxDC-TwoCarrier-r16 INTEGER ::= 64 -- Maximum number of UL Tx DC locations reported by the UE for 2CC uplink CA +maxNrofRB-SetGroups-r17 INTEGER ::= 8 -- Maximum number of RB set groups +maxNrofRB-Sets-r17 INTEGER ::= 8 -- Maximum number of RB sets +maxNrofEnhType3HARQ-ACK-r17 INTEGER ::= 8 -- Maximum number of enhanced type 3 HARQ-ACK codebook +maxNrofEnhType3HARQ-ACK-1-r17 INTEGER ::= 7 -- Maximum number of enhanced type 3 HARQ-ACK codebook minus 1 +maxNrofPRS-ResourcesPerSet-r17 INTEGER ::= 64 -- Maximum number of PRS resources for one set +maxNrofPRS-ResourcesPerSet-1-r17 INTEGER ::= 63 -- Maximum number of PRS resources for one set minus 1 +maxNrofPRS-ResourceOffsetValue-1-r17 INTEGER ::= 511 +maxNrofGapId-r17 INTEGER ::= 8 -- Maximum number of measurement gap ID is FFS +maxNrofPreConfigPosGapId-r17 INTEGER ::= 16 -- Maximum number of preconfigured positioning measurement gap +maxNrOfGapPri-r17 INTEGER ::= 16 -- Maximum number of gap priority level +maxCEFReport-r17 INTEGER ::= 4 -- Maximum number of CEF reports by the UE +maxNrofMultiplePDSCHs-r17 INTEGER ::= 8 -- Maximum number of PDSCHs in PDSCH TDRA list +maxSliceInfo-r17 INTEGER ::= 8 -- Maximum number of NSAGs +maxCellSlice-r17 INTEGER ::= 16 -- Maximum number of cells supporting the NSAG +maxNrofTRS-ResourceSets-r17 INTEGER ::= 64 -- Maximum number of TRS resource sets +maxNrofSearchSpaceGroups-1-r17 INTEGER ::= 2 -- Maximum number of search space groups minus 1 +maxNrofRemoteUE-r17 INTEGER ::= 32 -- Maximum number of connected L2 U2N Remote UEs +maxDCI-4-2-Size-r17 INTEGER ::= 140 -- Maximum size of DCI format 4-2 +maxFreqMBS-r17 INTEGER ::= 16 -- Maximum number of MBS frequencies reported in MBSInterestIndication +maxNrofDRX-ConfigPTM-r17 INTEGER ::= 64 -- Max number of DRX configuration for PTM provided in MBS broadcast in a + -- cell +maxNrofDRX-ConfigPTM-1-r17 INTEGER ::= 63 -- Max number of DRX configuration for PTM provided in MBS broadcast in a + -- cell minus 1 +maxNrofMBS-ServiceListPerUE-r17 INTEGER ::= 16 -- Maximum number of services which the UE can include in the MBS interest + -- indication +maxNrofMBS-Session-r17 INTEGER ::= 1024 -- Maximum number of MBS sessions provided in MBS broadcast in a cell +maxNrofMTCH-SSB-MappingWindow-r17 INTEGER ::= 16 -- Maximum number of MTCH to SSB beam mapping pattern +maxNrofMTCH-SSB-MappingWindow-1-r17 INTEGER ::= 15 -- Maximum number of MTCH to SSB beam mapping pattern minus 1 +maxNrofMRB-Broadcast-r17 INTEGER ::= 4 -- Maximum number of broadcast MRBs configured for one MBS broadcast service +maxNrofPageGroup-r17 INTEGER ::= 32 -- Maximum number of paging groups in a paging message +maxNrofPDSCH-ConfigPTM-r17 INTEGER ::= 16 -- Maximum number of PDSCH configuration groups for PTM +maxNrofPDSCH-ConfigPTM-1-r17 INTEGER ::= 15 -- Maximum number of PDSCH configuration groups for PTM minus 1 +maxG-RNTI-r17 INTEGER ::= 16 -- Maximum number of G-RNTI that can be configured for a UE. +maxG-RNTI-1-r17 INTEGER ::= 15 -- Maximum number of G-RNTI that can be configured for a UE minus 1. +maxG-CS-RNTI-r17 INTEGER ::= 8 -- Maximum number of G-CS-RNTI that can be configured for a UE. +maxG-CS-RNTI-1-r17 INTEGER ::= 7 -- Maximum number of G-CS-RNTI that can be configured for a UE minus 1. +maxMRB-r17 INTEGER ::= 32 -- Maximum number of multicast MRBs (that can be added in MRB-ToAddModLIst) +maxFSAI-MBS-r17 INTEGER ::= 64 -- Maximum number of MBS frequency selection area identities +maxNeighCellMBS-r17 INTEGER ::= 8 -- Maximum number of MBS broadcast neighbour cells +maxNrofPdcch-BlindDetectionMixed-1-r16 INTEGER ::= 7 -- Maximum number of combinations of mixed Rel-16 and Rel-15 PDCCH + -- monitoring capabilities minus 1 +maxNrofPdcch-BlindDetection-r17 INTEGER ::= 16 -- Maximum number of combinations of PDCCH blind detection monitoring + -- capabilities + +-- TAG-MULTIPLICITY-AND-TYPE-CONSTRAINT-DEFINITIONS-STOP + +END + +-- TAG-PC5-RRC-DEFINITIONS-START + +PC5-RRC-Definitions DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + CellAccessRelatedInfo, + SetupRelease, + RRC-TransactionIdentifier, + SN-FieldLengthAM, + SN-FieldLengthUM, + LogicalChannelIdentity, + maxNrofSLRB-r16, + maxNrofSL-RxInfoSet-r17, + maxNrofSL-QFIs-r16, + maxNrofSL-QFIsPerDest-r16, + PagingCycle, + PagingRecord, + RSRP-Range, + SL-MeasConfig-r16, + SL-MeasId-r16, + FreqBandList, + FreqBandIndicatorNR, + maxNrofRelayMeas-r17, + maxSimultaneousBands, + maxBandComb, + maxBands, + maxSIB-MessagePlus1-r17, + maxSL-LCID-r16, + BandParametersSidelink-r16, + RLC-ParametersSidelink-r16, + SIB1, + SL-DRX-ConfigUC-r17, + SL-DRX-ConfigUC-SemiStatic-r17, + SL-PagingIdentityRemoteUE-r17, + SL-RLC-ChannelID-r17, + SL-SourceIdentity-r17, + SystemInformation +FROM NR-RRC-Definitions; + +-- TAG-PC5-RRC-DEFINITIONS-STOP +-- TAG-SBCCH-SL-BCH-MESSAGE-START + +SBCCH-SL-BCH-Message ::= SEQUENCE { + message SBCCH-SL-BCH-MessageType +} + +SBCCH-SL-BCH-MessageType::= CHOICE { + c1 CHOICE { + masterInformationBlockSidelink MasterInformationBlockSidelink, + spare1 NULL + }, + messageClassExtension SEQUENCE {} +} + +-- TAG-SBCCH-SL-BCH-MESSAGE-STOP +-- TAG-SCCH-MESSAGE-START + +SCCH-Message ::= SEQUENCE { + message SCCH-MessageType +} + +SCCH-MessageType ::= CHOICE { + c1 CHOICE { + measurementReportSidelink MeasurementReportSidelink, + rrcReconfigurationSidelink RRCReconfigurationSidelink, + rrcReconfigurationCompleteSidelink RRCReconfigurationCompleteSidelink, + rrcReconfigurationFailureSidelink RRCReconfigurationFailureSidelink, + ueCapabilityEnquirySidelink UECapabilityEnquirySidelink, + ueCapabilityInformationSidelink UECapabilityInformationSidelink, + uuMessageTransferSidelink-r17 UuMessageTransferSidelink-r17, + remoteUEInformationSidelink-r17 RemoteUEInformationSidelink-r17 + }, + messageClassExtension CHOICE { + c2 CHOICE { + notificationMessageSidelink-r17 NotificationMessageSidelink-r17, + ueAssistanceInformationSidelink-r17 UEAssistanceInformationSidelink-r17, + spare6 NULL, spare5 NULL, spare4 NULL, spare3 NULL, spare2 NULL, spare1 NULL + }, + messageClassExtensionFuture-r17 SEQUENCE {} + } +} + +-- TAG-SCCH-MESSAGE-STOP +-- TAG-MASTERINFORMATIONBLOCKSIDELINK-START + +MasterInformationBlockSidelink ::= SEQUENCE { + sl-TDD-Config-r16 BIT STRING (SIZE (12)), + inCoverage-r16 BOOLEAN, + directFrameNumber-r16 BIT STRING (SIZE (10)), + slotIndex-r16 BIT STRING (SIZE (7)), + reservedBits-r16 BIT STRING (SIZE (2)) +} + +-- TAG-MASTERINFORMATIONBLOCKSIDELINK-STOP +-- TAG-MEASUREMENTREPORTSIDELINK-START + +MeasurementReportSidelink ::= SEQUENCE { + criticalExtensions CHOICE { + measurementReportSidelink-r16 MeasurementReportSidelink-r16-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +MeasurementReportSidelink-r16-IEs ::= SEQUENCE { + sl-measResults-r16 SL-MeasResults-r16, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +SL-MeasResults-r16 ::= SEQUENCE { + sl-MeasId-r16 SL-MeasId-r16, + sl-MeasResult-r16 SL-MeasResult-r16, + ... +} + +SL-MeasResult-r16 ::= SEQUENCE { + sl-ResultDMRS-r16 SL-MeasQuantityResult-r16 OPTIONAL, + ... +} + +SL-MeasQuantityResult-r16 ::= SEQUENCE { + sl-RSRP-r16 RSRP-Range OPTIONAL, + ... +} + +SL-MeasResultListRelay-r17 ::= SEQUENCE (SIZE (1..maxNrofRelayMeas-r17)) OF SL-MeasResultRelay-r17 + +SL-MeasResultRelay-r17 ::= SEQUENCE { + cellIdentity-r17 CellAccessRelatedInfo, + sl-RelayUE-Identity-r17 SL-SourceIdentity-r17, + sl-MeasResult-r17 SL-MeasResult-r16, + ... +} + +-- TAG-MEASUREMENTREPORTSIDELINK-STOP +-- TAG-NOTIFICATIONMESSAGESIDELINK-START + +NotificationMessageSidelink-r17 ::= SEQUENCE { + criticalExtensions CHOICE { + notificationMessageSidelink-r17 NotificationMessageSidelink-r17-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +NotificationMessageSidelink-r17-IEs ::= SEQUENCE { + indicationType-r17 ENUMERATED { + relayUE-Uu-RLF, relayUE-HO, relayUE-CellReselection, + relayUE-Uu-RRC-Failure + } OPTIONAL, -- Need N + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-NOTIFICATIONMESSAGESIDELINK -STOP +-- TAG-REMOTEUEINFORMATIONSIDELINK-START + +RemoteUEInformationSidelink-r17 ::= SEQUENCE { + criticalExtensions CHOICE { + remoteUEInformationSidelink-r17 RemoteUEInformationSidelink-r17-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RemoteUEInformationSidelink-r17-IEs ::= SEQUENCE { + sl-RequestedSIB-List-r17 SetupRelease { SL-RequestedSIB-List-r17} OPTIONAL, -- Need M + sl-PagingInfo-RemoteUE-r17 SetupRelease { SL-PagingInfo-RemoteUE-r17} OPTIONAL, -- Need M + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +SL-RequestedSIB-List-r17 ::= SEQUENCE (SIZE (maxSIB-MessagePlus1-r17)) OF SL-SIB-ReqInfo-r17 + +SL-PagingInfo-RemoteUE-r17 ::= SEQUENCE { + sl-PagingIdentityRemoteUE-r17 SL-PagingIdentityRemoteUE-r17, + sl-PagingCycleRemoteUE-r17 PagingCycle OPTIONAL -- Need M +} + +SL-SIB-ReqInfo-r17 ::= ENUMERATED { sib1, sib2, sib3, sib4, sib5, sib6, sib7, sib8, sib9, sib10, sib11, sib12, sib13, + sib14, sib15, sib16, sib17, sib18, sib19, sib20, sib21, spare11, spare10, spare9, + spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1, ... } + +-- TAG-REMOTEUEINFORMATIONSIDELINK-STOP +-- TAG-RRCRECONFIGURATIONSIDELINK-START + +RRCReconfigurationSidelink ::= SEQUENCE { + rrc-TransactionIdentifier-r16 RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcReconfigurationSidelink-r16 RRCReconfigurationSidelink-r16-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCReconfigurationSidelink-r16-IEs ::= SEQUENCE { + slrb-ConfigToAddModList-r16 SEQUENCE (SIZE (1..maxNrofSLRB-r16)) OF SLRB-Config-r16 OPTIONAL, -- Need N + slrb-ConfigToReleaseList-r16 SEQUENCE (SIZE (1..maxNrofSLRB-r16)) OF SLRB-PC5-ConfigIndex-r16 OPTIONAL, -- Need N + sl-MeasConfig-r16 SetupRelease {SL-MeasConfig-r16} OPTIONAL, -- Need M + sl-CSI-RS-Config-r16 SetupRelease {SL-CSI-RS-Config-r16} OPTIONAL, -- Need M + sl-ResetConfig-r16 ENUMERATED {true} OPTIONAL, -- Need N + sl-LatencyBoundCSI-Report-r16 INTEGER (3..160) OPTIONAL, -- Need M + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCReconfigurationSidelink-v1700-IEs OPTIONAL +} + +RRCReconfigurationSidelink-v1700-IEs ::= SEQUENCE { + sl-DRX-ConfigUC-PC5-r17 SetupRelease { SL-DRX-ConfigUC-r17 } OPTIONAL, -- Need M + sl-LatencyBoundIUC-Report-r17 SetupRelease { SL-LatencyBoundIUC-Report-r17 } OPTIONAL, -- Need M + sl-RLC-ChannelToReleaseListPC5-r17 SEQUENCE (SIZE (1..maxSL-LCID-r16)) OF SL-RLC-ChannelID-r17 OPTIONAL, -- Need N + sl-RLC-ChannelToAddModListPC5-r17 SEQUENCE (SIZE (1..maxSL-LCID-r16)) OF SL-RLC-ChannelConfigPC5-r17 OPTIONAL, -- Need N + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +SL-LatencyBoundIUC-Report-r17::= INTEGER (3..160) + +SLRB-Config-r16::= SEQUENCE { + slrb-PC5-ConfigIndex-r16 SLRB-PC5-ConfigIndex-r16, + sl-SDAP-ConfigPC5-r16 SL-SDAP-ConfigPC5-r16 OPTIONAL, -- Need M + sl-PDCP-ConfigPC5-r16 SL-PDCP-ConfigPC5-r16 OPTIONAL, -- Need M + sl-RLC-ConfigPC5-r16 SL-RLC-ConfigPC5-r16 OPTIONAL, -- Need M + sl-MAC-LogicalChannelConfigPC5-r16 SL-LogicalChannelConfigPC5-r16 OPTIONAL, -- Need M + ... +} + +SLRB-PC5-ConfigIndex-r16 ::= INTEGER (1..maxNrofSLRB-r16) + +SL-SDAP-ConfigPC5-r16 ::= SEQUENCE { + sl-MappedQoS-FlowsToAddList-r16 SEQUENCE (SIZE (1.. maxNrofSL-QFIsPerDest-r16)) OF SL-PQFI-r16 OPTIONAL, -- Need N + sl-MappedQoS-FlowsToReleaseList-r16 SEQUENCE (SIZE (1.. maxNrofSL-QFIsPerDest-r16)) OF SL-PQFI-r16 OPTIONAL, -- Need N + sl-SDAP-Header-r16 ENUMERATED {present, absent}, + ... +} + +SL-PDCP-ConfigPC5-r16 ::= SEQUENCE { + sl-PDCP-SN-Size-r16 ENUMERATED {len12bits, len18bits} OPTIONAL, -- Need M + sl-OutOfOrderDelivery-r16 ENUMERATED { true } OPTIONAL, -- Need R + ... +} + +SL-RLC-ConfigPC5-r16 ::= CHOICE { + sl-AM-RLC-r16 SEQUENCE { + sl-SN-FieldLengthAM-r16 SN-FieldLengthAM OPTIONAL, -- Need M + ... + }, + sl-UM-Bi-Directional-RLC-r16 SEQUENCE { + sl-SN-FieldLengthUM-r16 SN-FieldLengthUM OPTIONAL, -- Need M + ... + }, + sl-UM-Uni-Directional-RLC-r16 SEQUENCE { + sl-SN-FieldLengthUM-r16 SN-FieldLengthUM OPTIONAL, -- Need M + ... + } +} + +SL-LogicalChannelConfigPC5-r16 ::= SEQUENCE { + sl-LogicalChannelIdentity-r16 LogicalChannelIdentity, + ... +} + +SL-PQFI-r16 ::= INTEGER (1..64) + +SL-CSI-RS-Config-r16 ::= SEQUENCE { + sl-CSI-RS-FreqAllocation-r16 CHOICE { + sl-OneAntennaPort-r16 BIT STRING (SIZE (12)), + sl-TwoAntennaPort-r16 BIT STRING (SIZE (6)) + } OPTIONAL, -- Need M + sl-CSI-RS-FirstSymbol-r16 INTEGER (3..12) OPTIONAL, -- Need M + ... +} + +SL-RLC-ChannelConfigPC5-r17::= SEQUENCE { + sl-RLC-ChannelID-PC5-r17 SL-RLC-ChannelID-r17, + sl-RLC-ConfigPC5-r17 SL-RLC-ConfigPC5-r16 OPTIONAL, -- Need M + sl-MAC-LogicalChannelConfigPC5-r17 SL-LogicalChannelConfigPC5-r16 OPTIONAL, -- Need M + ... +} + +-- TAG-RRCRECONFIGURATIONSIDELINK-STOP +-- TAG-RRCRECONFIGURATIONCOMPLETESIDELINK-START + +RRCReconfigurationCompleteSidelink ::= SEQUENCE { + rrc-TransactionIdentifier-r16 RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcReconfigurationCompleteSidelink-r16 RRCReconfigurationCompleteSidelink-r16-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCReconfigurationCompleteSidelink-r16-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension RRCReconfigurationCompleteSidelink-v1710-IEs OPTIONAL +} + +RRCReconfigurationCompleteSidelink-v1710-IEs ::= SEQUENCE { + dummy ENUMERATED {true}, + nonCriticalExtension RRCReconfigurationCompleteSidelink-v1720-IEs OPTIONAL +} + + +RRCReconfigurationCompleteSidelink-v1720-IEs ::= SEQUENCE { + sl-DRX-ConfigReject-v1720 ENUMERATED {true} OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-RRCRECONFIGURATIONCOMPLETESIDELINK-STOP +-- TAG-RRCRECONFIGURATIONFAILURESIDELINK-START + +RRCReconfigurationFailureSidelink ::= SEQUENCE { + rrc-TransactionIdentifier-r16 RRC-TransactionIdentifier, + criticalExtensions CHOICE { + rrcReconfigurationFailureSidelink-r16 RRCReconfigurationFailureSidelink-r16-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +RRCReconfigurationFailureSidelink-r16-IEs ::= SEQUENCE { + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-RRCRECONFIGURATIONFAILURESIDELINK-STOP +-- TAG-UEASSISTANCEINFORMATIONSIDELINK-START + +UEAssistanceInformationSidelink-r17 ::= SEQUENCE { + criticalExtensions CHOICE { + ueAssistanceInformationSidelink-r17 UEAssistanceInformationSidelink-r17-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +UEAssistanceInformationSidelink-r17-IEs ::= SEQUENCE { + sl-PreferredDRX-ConfigList-r17 SEQUENCE (SIZE (1..maxNrofSL-RxInfoSet-r17)) OF SL-DRX-ConfigUC-SemiStatic-r17 + OPTIONAL, -- Need R + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-UEASSISTANCEINFORMATIONSIDELINK-STOP +-- TAG-UECAPABILITYENQUIRYSIDELINK-START + +UECapabilityEnquirySidelink ::= SEQUENCE { + rrc-TransactionIdentifier-r16 RRC-TransactionIdentifier, + criticalExtensions CHOICE { + ueCapabilityEnquirySidelink-r16 UECapabilityEnquirySidelink-r16-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +UECapabilityEnquirySidelink-r16-IEs ::= SEQUENCE { + frequencyBandListFilterSidelink-r16 FreqBandList OPTIONAL, -- Need N + ue-CapabilityInformationSidelink-r16 OCTET STRING OPTIONAL, -- Need N + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE{} OPTIONAL +} + +-- TAG-UECAPABILITYENQUIRYSIDELINK-STOP +-- TAG-UECAPABILITYINFORMATIONSIDELINK-START + +UECapabilityInformationSidelink ::= SEQUENCE { + rrc-TransactionIdentifier-r16 RRC-TransactionIdentifier, + criticalExtensions CHOICE { + ueCapabilityInformationSidelink-r16 UECapabilityInformationSidelink-r16-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +UECapabilityInformationSidelink-r16-IEs ::= SEQUENCE { + accessStratumReleaseSidelink-r16 AccessStratumReleaseSidelink-r16, + pdcp-ParametersSidelink-r16 PDCP-ParametersSidelink-r16 OPTIONAL, + rlc-ParametersSidelink-r16 RLC-ParametersSidelink-r16 OPTIONAL, + supportedBandCombinationListSidelinkNR-r16 BandCombinationListSidelinkNR-r16 OPTIONAL, + supportedBandListSidelink-r16 SEQUENCE (SIZE (1..maxBands)) OF BandSidelinkPC5-r16 OPTIONAL, + appliedFreqBandListFilter-r16 FreqBandList OPTIONAL, + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension UECapabilityInformationSidelink-v1700-IEs OPTIONAL +} + +UECapabilityInformationSidelink-v1700-IEs ::= SEQUENCE { + mac-ParametersSidelink-r17 MAC-ParametersSidelink-r17 OPTIONAL, + supportedBandCombinationListSidelinkNR-v1710 BandCombinationListSidelinkNR-v1710 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +MAC-ParametersSidelink-r17 ::= SEQUENCE { + drx-OnSidelink-r17 ENUMERATED {supported} OPTIONAL, + ... +} + +AccessStratumReleaseSidelink-r16 ::= ENUMERATED { rel16, rel17, spare6, spare5, spare4, spare3, spare2, spare1, ... } + +PDCP-ParametersSidelink-r16 ::= SEQUENCE { + outOfOrderDeliverySidelink-r16 ENUMERATED {supported} OPTIONAL, + ... +} + +BandCombinationListSidelinkNR-r16 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombinationParametersSidelinkNR-r16 + +BandCombinationListSidelinkNR-v1710 ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombinationParametersSidelinkNR-v1710 + +BandCombinationParametersSidelinkNR-r16 ::= SEQUENCE (SIZE (1..maxSimultaneousBands)) OF BandParametersSidelink-r16 + +BandCombinationParametersSidelinkNR-v1710 ::= SEQUENCE (SIZE (1..maxSimultaneousBands)) OF BandParametersSidelink-v1710 + +BandParametersSidelink-v1710 ::= SEQUENCE { + --32-5a-1 + tx-IUC-Scheme1-Mode2Sidelink-r17 ENUMERATED {supported} OPTIONAL, + --32-5b-1 + tx-IUC-Scheme2-Mode2Sidelink-r17 ENUMERATED {n4, n8, n16} OPTIONAL +} + +BandSidelinkPC5-r16 ::= SEQUENCE { + freqBandSidelink-r16 FreqBandIndicatorNR, + --15-1 + sl-Reception-r16 SEQUENCE { + harq-RxProcessSidelink-r16 ENUMERATED {n16, n24, n32, n64}, + pscch-RxSidelink-r16 ENUMERATED {value1, value2}, + scs-CP-PatternRxSidelink-r16 CHOICE { + fr1-r16 SEQUENCE { + scs-15kHz-r16 BIT STRING (SIZE (16)) OPTIONAL, + scs-30kHz-r16 BIT STRING (SIZE (16)) OPTIONAL, + scs-60kHz-r16 BIT STRING (SIZE (16)) OPTIONAL + }, + fr2-r16 SEQUENCE { + scs-60kHz-r16 BIT STRING (SIZE (16)) OPTIONAL, + scs-120kHz-r16 BIT STRING (SIZE (16)) OPTIONAL + } + } OPTIONAL, + extendedCP-RxSidelink-r16 ENUMERATED {supported} OPTIONAL + } OPTIONAL, + --15-10 + sl-Tx-256QAM-r16 ENUMERATED {supported} OPTIONAL, + --15-12 + lowSE-64QAM-MCS-TableSidelink-r16 ENUMERATED {supported} OPTIONAL, + ..., + [[ + --15-14 + csi-ReportSidelink-r16 SEQUENCE { + csi-RS-PortsSidelink-r16 ENUMERATED {p1, p2} + } OPTIONAL, + --15-19 + rankTwoReception-r16 ENUMERATED {supported} OPTIONAL, + --15-23 + sl-openLoopPC-RSRP-ReportSidelink-r16 ENUMERATED {supported} OPTIONAL, + --13-1 + sl-Rx-256QAM-r16 ENUMERATED {supported} OPTIONAL + ]], + [[ + --32-5a-2 + rx-IUC-Scheme1-PreferredMode2Sidelink-r17 ENUMERATED {supported} OPTIONAL, + --32-5a-3 + rx-IUC-Scheme1-NonPreferredMode2Sidelink-r17 ENUMERATED {supported} OPTIONAL, + --32-5b-2 + rx-IUC-Scheme2-Mode2Sidelink-r17 ENUMERATED {n5, n15, n25, n32, n35, n45, n50, n64} OPTIONAL, + --32-6-1 + rx-IUC-Scheme1-SCI-r17 ENUMERATED {supported} OPTIONAL, + --32-6-2 + rx-IUC-Scheme1-SCI-ExplicitReq-r17 ENUMERATED {supported} OPTIONAL, + --32-7 + scheme2-ConflictDeterminationRSRP-r17 ENUMERATED {supported} OPTIONAL + ]] +} + +-- TAG-UECAPABILITYINFORMATIONSIDELINK-STOP +-- TAG-UUMESSAGETRANSFERSIDELINK-START + +UuMessageTransferSidelink-r17 ::= SEQUENCE { + criticalExtensions CHOICE { + uuMessageTransferSidelink-r17 UuMessageTransferSidelink-r17-IEs, + criticalExtensionsFuture SEQUENCE {} + } +} + +UuMessageTransferSidelink-r17-IEs ::= SEQUENCE { + sl-PagingDelivery-r17 OCTET STRING (CONTAINING PagingRecord) OPTIONAL, -- Need N + sl-SIB1-Delivery-r17 OCTET STRING (CONTAINING SIB1) OPTIONAL, -- Need N + sl-SystemInformationDelivery-r17 OCTET STRING (CONTAINING SystemInformation) OPTIONAL, -- Need N + lateNonCriticalExtension OCTET STRING OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-UUMESSAGETRANSFERSIDELINK-STOP + +END + +-- NR-UE-VARIABLES-START + +NR-UE-Variables DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + AreaConfiguration-v1700, + ARFCN-ValueNR, + CellIdentity, + EUTRA-PhysCellId, + maxCEFReport-r17, + MeasId, + MeasIdToAddModList, + MeasIdleCarrierEUTRA-r16, + MeasIdleCarrierNR-r16, + MeasResultIdleEUTRA-r16, + MeasResultIdleNR-r16, + MeasObjectToAddModList, + PhysCellId, + RNTI-Value, + ReportConfigToAddModList, + RSRP-Range, + SL-MeasId-r16, + SL-MeasIdList-r16, + SL-MeasObjectList-r16, + SL-ReportConfigList-r16, + SL-QuantityConfig-r16, + Tx-PoolMeasList-r16, + QuantityConfig, + maxNrofCellMeas, + maxNrofMeasId, + maxFreqIdle-r16, + PhysCellIdUTRA-FDD-r16, + ValidityAreaList-r16, + CondReconfigToAddModList-r16, + ConnEstFailReport-r16, + LoggingDuration-r16, + LoggingInterval-r16, + LogMeasInfoList-r16, + LogMeasInfo-r16, + RA-Report-r16, + RLF-Report-r16, + TraceReference-r16, + WLAN-Identifiers-r16, + WLAN-NameList-r16, + BT-NameList-r16, + PLMN-Identity, + maxNrofRelayMeas-r17, + maxPLMN, + RA-ReportList-r16, + VisitedCellInfoList-r16, + AbsoluteTimeInfo-r16, + LoggedEventTriggerConfig-r16, + LoggedPeriodicalReportConfig-r16, + Sensor-NameList-r16, + SL-SourceIdentity-r17, + SuccessHO-Report-r17, + PLMN-IdentityList2-r16, + AreaConfiguration-r16, + maxNrofSL-MeasId-r16, + maxNrofFreqSL-r16, + maxNrofCLI-RSSI-Resources-r16, + maxNrofCLI-SRS-Resources-r16, + RSSI-ResourceId-r16, + SRS-ResourceId, + VisitedPSCellInfoList-r17 +FROM NR-RRC-Definitions; + +-- NR-UE-VARIABLES-STOP +-- TAG-VARCONDITIONALRECONFIG-START + +VarConditionalReconfig ::= SEQUENCE { + condReconfigList CondReconfigToAddModList-r16 OPTIONAL +} + +-- TAG-VARCONDITIONALRECONFIG-STOP +-- TAG-VARCONNESTFAILREPORT-START + +VarConnEstFailReport-r16 ::= SEQUENCE { + connEstFailReport-r16 ConnEstFailReport-r16, + plmn-Identity-r16 PLMN-Identity +} + +-- TAG-VARCONNESTFAILREPORT-STOP +-- TAG-VARCONNESTFAILREPORTLIST-START + +VarConnEstFailReportList-r17 ::= SEQUENCE { + connEstFailReportList-r17 SEQUENCE (SIZE (1..maxCEFReport-r17)) OF VarConnEstFailReport-r16 +} + +-- TAG-VARCONNESTFAILREPORTLIST-STOP +-- TAG-VARLOGMEASCONFIG-START + +VarLogMeasConfig-r16-IEs ::= SEQUENCE { + areaConfiguration-r16 AreaConfiguration-r16 OPTIONAL, + bt-NameList-r16 BT-NameList-r16 OPTIONAL, + wlan-NameList-r16 WLAN-NameList-r16 OPTIONAL, + sensor-NameList-r16 Sensor-NameList-r16 OPTIONAL, + loggingDuration-r16 LoggingDuration-r16, + reportType CHOICE { + periodical LoggedPeriodicalReportConfig-r16, + eventTriggered LoggedEventTriggerConfig-r16 + }, + earlyMeasIndication-r17 ENUMERATED {true} OPTIONAL, + areaConfiguration-v1700 AreaConfiguration-v1700 OPTIONAL +} +-- TAG-VARLOGMEASCONFIG-STOP +-- TAG-VARLOGMEASREPORT-START + +VarLogMeasReport-r16 ::= SEQUENCE { + absoluteTimeInfo-r16 AbsoluteTimeInfo-r16, + traceReference-r16 TraceReference-r16, + traceRecordingSessionRef-r16 OCTET STRING (SIZE (2)), + tce-Id-r16 OCTET STRING (SIZE (1)), + logMeasInfoList-r16 LogMeasInfoList-r16, + plmn-IdentityList-r16 PLMN-IdentityList2-r16, + sigLoggedMeasType-r17 ENUMERATED {true} +} + +-- TAG-VARLOGMEASREPORT-STOP +-- TAG-VARMEASCONFIG-START + +VarMeasConfig ::= SEQUENCE { + -- Measurement identities + measIdList MeasIdToAddModList OPTIONAL, + -- Measurement objects + measObjectList MeasObjectToAddModList OPTIONAL, + -- Reporting configurations + reportConfigList ReportConfigToAddModList OPTIONAL, + -- Other parameters + quantityConfig QuantityConfig OPTIONAL, + s-MeasureConfig CHOICE { + ssb-RSRP RSRP-Range, + csi-RSRP RSRP-Range + } OPTIONAL +} + +-- TAG-VARMEASCONFIG-STOP +-- TAG-VARMEASCONFIGSL-START + +VarMeasConfigSL-r16 ::= SEQUENCE { + -- NR sidelink measurement identities + sl-MeasIdList-r16 SL-MeasIdList-r16 OPTIONAL, + -- NR sidelink measurement objects + sl-MeasObjectList-r16 SL-MeasObjectList-r16 OPTIONAL, + -- NR sidelink reporting configurations + sl-reportConfigList-r16 SL-ReportConfigList-r16 OPTIONAL, + -- Other parameters + sl-QuantityConfig-r16 SL-QuantityConfig-r16 OPTIONAL +} + +-- TAG-VARMEASCONFIGSL-STOP +-- TAG-VARMEASIDLECONFIG-START + +VarMeasIdleConfig-r16 ::= SEQUENCE { + measIdleCarrierListNR-r16 SEQUENCE (SIZE (1..maxFreqIdle-r16)) OF MeasIdleCarrierNR-r16 OPTIONAL, + measIdleCarrierListEUTRA-r16 SEQUENCE (SIZE (1..maxFreqIdle-r16)) OF MeasIdleCarrierEUTRA-r16 OPTIONAL, + measIdleDuration-r16 ENUMERATED {sec10, sec30, sec60, sec120, sec180, sec240, sec300, spare}, + validityAreaList-r16 ValidityAreaList-r16 OPTIONAL +} + +-- TAG-VARMEASIDLECONFIG-STOP +-- TAG-VARMEASIDLEREPORT-START + +VarMeasIdleReport-r16 ::= SEQUENCE { + measReportIdleNR-r16 MeasResultIdleNR-r16 OPTIONAL, + measReportIdleEUTRA-r16 MeasResultIdleEUTRA-r16 OPTIONAL +} + +-- TAG-VARMEASIDLEREPORT-STOP +-- TAG-VARMEASREPORTLIST-START + +VarMeasReportList ::= SEQUENCE (SIZE (1..maxNrofMeasId)) OF VarMeasReport + +VarMeasReport ::= SEQUENCE { + -- List of measurement that have been triggered + measId MeasId, + cellsTriggeredList CellsTriggeredList OPTIONAL, + numberOfReportsSent INTEGER, + cli-TriggeredList-r16 CLI-TriggeredList-r16 OPTIONAL, + tx-PoolMeasToAddModListNR-r16 Tx-PoolMeasList-r16 OPTIONAL, + relaysTriggeredList-r17 RelaysTriggeredList-r17 OPTIONAL +} + +CellsTriggeredList ::= SEQUENCE (SIZE (1..maxNrofCellMeas)) OF CHOICE { + physCellId PhysCellId, + physCellIdEUTRA EUTRA-PhysCellId, + physCellIdUTRA-FDD-r16 PhysCellIdUTRA-FDD-r16 + } + +CLI-TriggeredList-r16 ::= CHOICE { + srs-RSRP-TriggeredList-r16 SRS-RSRP-TriggeredList-r16, + cli-RSSI-TriggeredList-r16 CLI-RSSI-TriggeredList-r16 + } + +SRS-RSRP-TriggeredList-r16 ::= SEQUENCE (SIZE (1.. maxNrofCLI-SRS-Resources-r16)) OF SRS-ResourceId + +CLI-RSSI-TriggeredList-r16 ::= SEQUENCE (SIZE (1.. maxNrofCLI-RSSI-Resources-r16)) OF RSSI-ResourceId-r16 + +RelaysTriggeredList-r17 ::= SEQUENCE (SIZE (1.. maxNrofRelayMeas-r17)) OF SL-SourceIdentity-r17 + +-- TAG-VARMEASREPORTLIST-STOP +-- TAG-VARMEASREPORTLISTSL-START + +VarMeasReportListSL-r16 ::= SEQUENCE (SIZE (1..maxNrofSL-MeasId-r16)) OF VarMeasReportSL-r16 + +VarMeasReportSL-r16 ::= SEQUENCE { + -- List of NR sidelink measurement that have been triggered + sl-MeasId-r16 SL-MeasId-r16, + sl-FrequencyTriggeredList-r16 SEQUENCE (SIZE (1..maxNrofFreqSL-r16)) OF ARFCN-ValueNR OPTIONAL, + sl-NumberOfReportsSent-r16 INTEGER +} + +-- TAG-VARMEASREPORTLISTSL-STOP +-- TAG-VARMOBILITYHISTORYREPORT-START + +VarMobilityHistoryReport-r16 ::= VisitedCellInfoList-r16 + +VarMobilityHistoryReport-r17 ::= SEQUENCE { + visitedCellInfoList-r16 VisitedCellInfoList-r16, + visitedPSCellInfoListReport-r17 VisitedPSCellInfoList-r17 OPTIONAL +} + +-- TAG-VARMOBILITYHISTORYREPORT-STOP +-- TAG-VARPENDINGRNA-UPDATE-START + +VarPendingRNA-Update ::= SEQUENCE { + pendingRNA-Update BOOLEAN OPTIONAL +} + +-- TAG-VARPENDINGRNA-UPDATE-STOP +-- TAG-VARRA-REPORT-START + +VarRA-Report-r16 ::= SEQUENCE { + ra-ReportList-r16 RA-ReportList-r16, + plmn-IdentityList-r16 PLMN-IdentityList-r16 +} + +PLMN-IdentityList-r16 ::= SEQUENCE (SIZE (1..maxPLMN)) OF PLMN-Identity + +-- TAG-VARRA-REPORT-STOP +-- TAG-VARRESUMEMAC-INPUT-START + +VarResumeMAC-Input ::= SEQUENCE { + sourcePhysCellId PhysCellId, + targetCellIdentity CellIdentity, + source-c-RNTI RNTI-Value +} + +-- TAG-VARRESUMEMAC-INPUT-STOP +-- TAG-VARRLF-REPORT-START + +VarRLF-Report-r16 ::= SEQUENCE { + rlf-Report-r16 RLF-Report-r16, + plmn-IdentityList-r16 PLMN-IdentityList2-r16 +} + +-- TAG-VARRLF-REPORT-STOP +-- TAG-VARSHORTMAC-INPUT-START + +VarShortMAC-Input ::= SEQUENCE { + sourcePhysCellId PhysCellId, + targetCellIdentity CellIdentity, + source-c-RNTI RNTI-Value +} + +-- TAG-VARSHORTMAC-INPUT-STOP +-- TAG-VARSUCCESSHO-Report-START + +VarSuccessHO-Report-r17-IEs ::= SEQUENCE { + successHO-Report-r17 SuccessHO-Report-r17, + plmn-IdentityList-r17 PLMN-IdentityList2-r16 +} +-- TAG-VARSUCCESSHO-Report-STOP + +END + +-- TAG-NR-SIDELINK-PRECONF-DEFINITIONS-START + +NR-Sidelink-Preconf DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + SL-RemoteUE-Config-r17, + SL-DRX-ConfigGC-BC-r17, + SL-FreqConfigCommon-r16, + SL-RadioBearerConfig-r16, + SL-RLC-BearerConfig-r16, + SL-EUTRA-AnchorCarrierFreqList-r16, + SL-NR-AnchorCarrierFreqList-r16, + SL-MeasConfigCommon-r16, + SL-UE-SelectedConfig-r16, + TDD-UL-DL-ConfigCommon, + maxNrofFreqSL-r16, + maxNrofSLRB-r16, + maxSL-LCID-r16 +FROM NR-RRC-Definitions; + +-- TAG-NR-SIDELINK-PRECONF-DEFINITIONS-STOP +-- TAG-SL-PRECONFIGURATIONNR-START + +SL-PreconfigurationNR-r16 ::= SEQUENCE { + sidelinkPreconfigNR-r16 SidelinkPreconfigNR-r16, + ... +} + +SidelinkPreconfigNR-r16 ::= SEQUENCE { + sl-PreconfigFreqInfoList-r16 SEQUENCE (SIZE (1..maxNrofFreqSL-r16)) OF SL-FreqConfigCommon-r16 OPTIONAL, + sl-PreconfigNR-AnchorCarrierFreqList-r16 SL-NR-AnchorCarrierFreqList-r16 OPTIONAL, + sl-PreconfigEUTRA-AnchorCarrierFreqList-r16 SL-EUTRA-AnchorCarrierFreqList-r16 OPTIONAL, + sl-RadioBearerPreConfigList-r16 SEQUENCE (SIZE (1..maxNrofSLRB-r16)) OF SL-RadioBearerConfig-r16 OPTIONAL, + sl-RLC-BearerPreConfigList-r16 SEQUENCE (SIZE (1..maxSL-LCID-r16)) OF SL-RLC-BearerConfig-r16 OPTIONAL, + sl-MeasPreConfig-r16 SL-MeasConfigCommon-r16 OPTIONAL, + sl-OffsetDFN-r16 INTEGER (1..1000) OPTIONAL, + t400-r16 ENUMERATED{ms100, ms200, ms300, ms400, ms600, ms1000, ms1500, ms2000} OPTIONAL, + sl-MaxNumConsecutiveDTX-r16 ENUMERATED {n1, n2, n3, n4, n6, n8, n16, n32} OPTIONAL, + sl-SSB-PriorityNR-r16 INTEGER (1..8) OPTIONAL, + sl-PreconfigGeneral-r16 SL-PreconfigGeneral-r16 OPTIONAL, + sl-UE-SelectedPreConfig-r16 SL-UE-SelectedConfig-r16 OPTIONAL, + sl-CSI-Acquisition-r16 ENUMERATED {enabled} OPTIONAL, + sl-RoHC-Profiles-r16 SL-RoHC-Profiles-r16 OPTIONAL, + sl-MaxCID-r16 INTEGER (1..16383) DEFAULT 15, + ..., + [[ + sl-DRX-PreConfigGC-BC-r17 SL-DRX-ConfigGC-BC-r17 OPTIONAL, + sl-TxProfileList-r17 SL-TxProfileList-r17 OPTIONAL, + sl-PreconfigDiscConfig-r17 SL-RemoteUE-Config-r17 OPTIONAL + ]] +} + +SL-TxProfileList-r17 ::= SEQUENCE (SIZE (1..256)) OF SL-TxProfile-r17 + +SL-TxProfile-r17 ::= ENUMERATED {drx-Compatible, drx-Incompatible, spare6, spare5, spare4, spare3,spare2, spare1} + +SL-PreconfigGeneral-r16 ::= SEQUENCE { + sl-TDD-Configuration-r16 TDD-UL-DL-ConfigCommon OPTIONAL, + reservedBits-r16 BIT STRING (SIZE (2)) OPTIONAL, + ... +} + +SL-RoHC-Profiles-r16 ::= SEQUENCE { + profile0x0001-r16 BOOLEAN, + profile0x0002-r16 BOOLEAN, + profile0x0003-r16 BOOLEAN, + profile0x0004-r16 BOOLEAN, + profile0x0006-r16 BOOLEAN, + profile0x0101-r16 BOOLEAN, + profile0x0102-r16 BOOLEAN, + profile0x0103-r16 BOOLEAN, + profile0x0104-r16 BOOLEAN +} + +-- TAG-SL-PRECONFIGURATIONNR-STOP + +END + +-- TAG-SL-ACCESSINFO-L2U2N-START + +NR-Sidelink-DiscoveryMessage DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN +IMPORTS + CellAccessRelatedInfo, + SL-ServingCellInfo-r17 +FROM NR-RRC-Definitions; + +SL-AccessInfo-L2U2N-r17 ::= SEQUENCE { + cellAccessRelatedInfo-r17 CellAccessRelatedInfo, + sl-ServingCellInfo-r17 SL-ServingCellInfo-r17, + ... +} + +-- TAG-SL-ACCESSINFO-L2U2N-STOP + +END + +-- TAG-NR-INTER-NODE-DEFINITIONS-START + +NR-InterNodeDefinitions DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + ARFCN-ValueNR, + ARFCN-ValueEUTRA, + CellIdentity, + CGI-InfoEUTRA, + CGI-InfoNR, + CondReconfigExecCondSCG-r17, + CSI-RS-Index, + CSI-RS-CellMobility, + DRX-Config, + EUTRA-PhysCellId, + FeatureSetDownlinkPerCC-Id, + FeatureSetUplinkPerCC-Id, + FreqBandIndicatorNR, + GapConfig, + maxBandComb, + maxBands, + maxBandsEUTRA, + maxCellSFTD, + maxFeatureSetsPerBand, + maxFreq, + maxFreqIDC-MRDC, + maxNrofCombIDC, + maxNrofCondCells-r16, + maxNrofCondCells-1-r17, + maxNrofPhysicalResourceBlocks, + maxNrofSCells, + maxNrofServingCells, + maxNrofServingCells-1, + maxNrofServingCellsEUTRA, + maxNrofIndexesToReport, + maxSimultaneousBands, + MBSInterestIndication-r17, + MeasQuantityResults, + MeasResultCellListSFTD-EUTRA, + MeasResultCellListSFTD-NR, + MeasResultList2NR, + MeasResultSCG-Failure, + MeasResultServFreqListEUTRA-SCG, + NeedForGapsInfoNR-r16, + NeedForGapNCSG-InfoNR-r17, + NeedForGapNCSG-InfoEUTRA-r17, + OverheatingAssistance, + OverheatingAssistance-r17, + P-Max, + PhysCellId, + RadioBearerConfig, + RAN-NotificationAreaInfo, + RRCReconfiguration, + ServCellIndex, + SetupRelease, + SSB-Index, + SSB-MTC, + SSB-ToMeasure, + SS-RSSI-Measurement, + ShortMAC-I, + SubcarrierSpacing, + UEAssistanceInformation, + UE-CapabilityRAT-ContainerList, + maxNrofCLI-RSSI-Resources-r16, + maxNrofCLI-SRS-Resources-r16, + RSSI-ResourceId-r16, + SDT-Config-r17, + SidelinkUEInformationNR-r16, + SRS-ResourceId, + UE-RadioPagingInfo-r17 +FROM NR-RRC-Definitions; + +-- TAG-NR-INTER-NODE-DEFINITIONS-STOP +-- TAG-CG-CANDIDATELIST-START + +CG-CandidateList ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + cg-CandidateList-r17 CG-CandidateList-r17-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +CG-CandidateList-r17-IEs ::= SEQUENCE { + cg-CandidateToAddModList-r17 SEQUENCE (SIZE (1..maxNrofCondCells-r16)) OF CG-CandidateInfo-r17 OPTIONAL, + cg-CandidateToReleaseList-r17 SEQUENCE (SIZE (1..maxNrofCondCells-r16)) OF CG-CandidateInfoId-r17 OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +CG-CandidateInfo-r17 ::= SEQUENCE { + cg-CandidateInfoId-r17 CG-CandidateInfoId-r17, + candidateCG-Config-r17 OCTET STRING (CONTAINING CG-Config) +} + +CG-CandidateInfoId-r17::= SEQUENCE { + ssbFrequency-r17 ARFCN-ValueNR, + physCellId-r17 PhysCellId +} + +-- TAG-CG-CANDIDATELIST-STOP +-- TAG-HANDOVER-COMMAND-START + +HandoverCommand ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + handoverCommand HandoverCommand-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +HandoverCommand-IEs ::= SEQUENCE { + handoverCommandMessage OCTET STRING (CONTAINING RRCReconfiguration), + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-HANDOVER-COMMAND-STOP +-- TAG-HANDOVER-PREPARATION-INFORMATION-START + +HandoverPreparationInformation ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + handoverPreparationInformation HandoverPreparationInformation-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +HandoverPreparationInformation-IEs ::= SEQUENCE { + ue-CapabilityRAT-List UE-CapabilityRAT-ContainerList, + sourceConfig AS-Config OPTIONAL, -- Cond HO + rrm-Config RRM-Config OPTIONAL, + as-Context AS-Context OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +AS-Config ::= SEQUENCE { + rrcReconfiguration OCTET STRING (CONTAINING RRCReconfiguration), + ..., + [[ + sourceRB-SN-Config OCTET STRING (CONTAINING RadioBearerConfig) OPTIONAL, + sourceSCG-NR-Config OCTET STRING (CONTAINING RRCReconfiguration) OPTIONAL, + sourceSCG-EUTRA-Config OCTET STRING OPTIONAL + ]], + [[ + sourceSCG-Configured ENUMERATED {true} OPTIONAL + ]], + [[ + sdt-Config-r17 SDT-Config-r17 OPTIONAL + ]] +} + +AS-Context ::= SEQUENCE { + reestablishmentInfo ReestablishmentInfo OPTIONAL, + configRestrictInfo ConfigRestrictInfoSCG OPTIONAL, + ..., + [[ ran-NotificationAreaInfo RAN-NotificationAreaInfo OPTIONAL + ]], + [[ ueAssistanceInformation OCTET STRING (CONTAINING UEAssistanceInformation) OPTIONAL -- Cond HO2 + ]], + [[ + selectedBandCombinationSN BandCombinationInfoSN OPTIONAL + ]], + [[ + configRestrictInfoDAPS-r16 ConfigRestrictInfoDAPS-r16 OPTIONAL, + sidelinkUEInformationNR-r16 OCTET STRING OPTIONAL, + sidelinkUEInformationEUTRA-r16 OCTET STRING OPTIONAL, + ueAssistanceInformationEUTRA-r16 OCTET STRING OPTIONAL, + ueAssistanceInformationSCG-r16 OCTET STRING (CONTAINING UEAssistanceInformation) OPTIONAL, -- Cond HO2 + needForGapsInfoNR-r16 NeedForGapsInfoNR-r16 OPTIONAL + ]], + [[ + configRestrictInfoDAPS-v1640 ConfigRestrictInfoDAPS-v1640 OPTIONAL + ]], + [[ + needForGapNCSG-InfoNR-r17 NeedForGapNCSG-InfoNR-r17 OPTIONAL, + needForGapNCSG-InfoEUTRA-r17 NeedForGapNCSG-InfoEUTRA-r17 OPTIONAL, + mbsInterestIndication-r17 OCTET STRING (CONTAINING MBSInterestIndication-r17) OPTIONAL + ]] +} + +ConfigRestrictInfoDAPS-r16 ::= SEQUENCE { + powerCoordination-r16 SEQUENCE { + p-DAPS-Source-r16 P-Max, + p-DAPS-Target-r16 P-Max, + uplinkPowerSharingDAPS-Mode-r16 ENUMERATED {semi-static-mode1, semi-static-mode2, dynamic } + } OPTIONAL +} + +ConfigRestrictInfoDAPS-v1640 ::= SEQUENCE { + sourceFeatureSetPerDownlinkCC-r16 FeatureSetDownlinkPerCC-Id, + sourceFeatureSetPerUplinkCC-r16 FeatureSetUplinkPerCC-Id +} + +ReestablishmentInfo ::= SEQUENCE { + sourcePhysCellId PhysCellId, + targetCellShortMAC-I ShortMAC-I, + additionalReestabInfoList ReestabNCellInfoList OPTIONAL +} + +ReestabNCellInfoList ::= SEQUENCE ( SIZE (1..maxCellPrep) ) OF ReestabNCellInfo + +ReestabNCellInfo::= SEQUENCE{ + cellIdentity CellIdentity, + key-gNodeB-Star BIT STRING (SIZE (256)), + shortMAC-I ShortMAC-I +} + +RRM-Config ::= SEQUENCE { + ue-InactiveTime ENUMERATED { + s1, s2, s3, s5, s7, s10, s15, s20, + s25, s30, s40, s50, min1, min1s20, min1s40, + min2, min2s30, min3, min3s30, min4, min5, min6, + min7, min8, min9, min10, min12, min14, min17, min20, + min24, min28, min33, min38, min44, min50, hr1, + hr1min30, hr2, hr2min30, hr3, hr3min30, hr4, hr5, hr6, + hr8, hr10, hr13, hr16, hr20, day1, day1hr12, day2, + day2hr12, day3, day4, day5, day7, day10, day14, day19, + day24, day30, dayMoreThan30} OPTIONAL, + candidateCellInfoList MeasResultList2NR OPTIONAL, + ..., + [[ + candidateCellInfoListSN-EUTRA MeasResultServFreqListEUTRA-SCG OPTIONAL + ]] +} + +-- TAG-HANDOVER-PREPARATION-INFORMATION-STOP +-- TAG-CG-CONFIG-START + +CG-Config ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + cg-Config CG-Config-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +CG-Config-IEs ::= SEQUENCE { + scg-CellGroupConfig OCTET STRING (CONTAINING RRCReconfiguration) OPTIONAL, + scg-RB-Config OCTET STRING (CONTAINING RadioBearerConfig) OPTIONAL, + configRestrictModReq ConfigRestrictModReqSCG OPTIONAL, + drx-InfoSCG DRX-Info OPTIONAL, + candidateCellInfoListSN OCTET STRING (CONTAINING MeasResultList2NR) OPTIONAL, + measConfigSN MeasConfigSN OPTIONAL, + selectedBandCombination BandCombinationInfoSN OPTIONAL, + fr-InfoListSCG FR-InfoList OPTIONAL, + candidateServingFreqListNR CandidateServingFreqListNR OPTIONAL, + nonCriticalExtension CG-Config-v1540-IEs OPTIONAL +} + +CG-Config-v1540-IEs ::= SEQUENCE { + pSCellFrequency ARFCN-ValueNR OPTIONAL, + reportCGI-RequestNR SEQUENCE { + requestedCellInfo SEQUENCE { + ssbFrequency ARFCN-ValueNR, + cellForWhichToReportCGI PhysCellId + } OPTIONAL + } OPTIONAL, + ph-InfoSCG PH-TypeListSCG OPTIONAL, + nonCriticalExtension CG-Config-v1560-IEs OPTIONAL +} + +CG-Config-v1560-IEs ::= SEQUENCE { + pSCellFrequencyEUTRA ARFCN-ValueEUTRA OPTIONAL, + scg-CellGroupConfigEUTRA OCTET STRING OPTIONAL, + candidateCellInfoListSN-EUTRA OCTET STRING OPTIONAL, + candidateServingFreqListEUTRA CandidateServingFreqListEUTRA OPTIONAL, + needForGaps ENUMERATED {true} OPTIONAL, + drx-ConfigSCG DRX-Config OPTIONAL, + reportCGI-RequestEUTRA SEQUENCE { + requestedCellInfoEUTRA SEQUENCE { + eutraFrequency ARFCN-ValueEUTRA, + cellForWhichToReportCGI-EUTRA EUTRA-PhysCellId + } OPTIONAL + } OPTIONAL, + nonCriticalExtension CG-Config-v1590-IEs OPTIONAL +} + +CG-Config-v1590-IEs ::= SEQUENCE { + scellFrequenciesSN-NR SEQUENCE (SIZE (1.. maxNrofServingCells-1)) OF ARFCN-ValueNR OPTIONAL, + scellFrequenciesSN-EUTRA SEQUENCE (SIZE (1.. maxNrofServingCells-1)) OF ARFCN-ValueEUTRA OPTIONAL, + nonCriticalExtension CG-Config-v1610-IEs OPTIONAL +} + +CG-Config-v1610-IEs ::= SEQUENCE { + drx-InfoSCG2 DRX-Info2 OPTIONAL, + nonCriticalExtension CG-Config-v1620-IEs OPTIONAL +} + +CG-Config-v1620-IEs ::= SEQUENCE { + ueAssistanceInformationSCG-r16 OCTET STRING (CONTAINING UEAssistanceInformation) OPTIONAL, + nonCriticalExtension CG-Config-v1630-IEs OPTIONAL +} + +CG-Config-v1630-IEs ::= SEQUENCE { + selectedToffset-r16 T-Offset-r16 OPTIONAL, + nonCriticalExtension CG-Config-v1640-IEs OPTIONAL +} + +CG-Config-v1640-IEs ::= SEQUENCE { + servCellInfoListSCG-NR-r16 ServCellInfoListSCG-NR-r16 OPTIONAL, + servCellInfoListSCG-EUTRA-r16 ServCellInfoListSCG-EUTRA-r16 OPTIONAL, + nonCriticalExtension CG-Config-v1700-IEs OPTIONAL +} + +CG-Config-v1700-IEs ::= SEQUENCE { + candidateCellInfoListCPC-r17 CandidateCellInfoListCPC-r17 OPTIONAL, + twoPHRModeSCG-r17 ENUMERATED {enabled} OPTIONAL, + nonCriticalExtension CG-Config-v1730-IEs OPTIONAL +} + +CG-Config-v1730-IEs ::= SEQUENCE { + fr1-Carriers-SCG-r17 INTEGER (1..32) OPTIONAL, + fr2-Carriers-SCG-r17 INTEGER (1..32) OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +ServCellInfoListSCG-NR-r16 ::= SEQUENCE (SIZE (1.. maxNrofServingCells)) OF ServCellInfoXCG-NR-r16 + +ServCellInfoXCG-NR-r16 ::= SEQUENCE { + dl-FreqInfo-NR-r16 FrequencyConfig-NR-r16 OPTIONAL, + ul-FreqInfo-NR-r16 FrequencyConfig-NR-r16 OPTIONAL, -- Cond FDD + ... +} + +FrequencyConfig-NR-r16 ::= SEQUENCE { + freqBandIndicatorNR-r16 FreqBandIndicatorNR, + carrierCenterFreq-NR-r16 ARFCN-ValueNR, + carrierBandwidth-NR-r16 INTEGER (1..maxNrofPhysicalResourceBlocks), + subcarrierSpacing-NR-r16 SubcarrierSpacing +} + +ServCellInfoListSCG-EUTRA-r16 ::= SEQUENCE (SIZE (1.. maxNrofServingCellsEUTRA)) OF ServCellInfoXCG-EUTRA-r16 + +ServCellInfoXCG-EUTRA-r16 ::= SEQUENCE { + dl-CarrierFreq-EUTRA-r16 ARFCN-ValueEUTRA OPTIONAL, + ul-CarrierFreq-EUTRA-r16 ARFCN-ValueEUTRA OPTIONAL, -- Cond FDD + transmissionBandwidth-EUTRA-r16 TransmissionBandwidth-EUTRA-r16 OPTIONAL, + ... +} + +TransmissionBandwidth-EUTRA-r16 ::= ENUMERATED {rb6, rb15, rb25, rb50, rb75, rb100} + +PH-TypeListSCG ::= SEQUENCE (SIZE (1..maxNrofServingCells)) OF PH-InfoSCG + +PH-InfoSCG ::= SEQUENCE { + servCellIndex ServCellIndex, + ph-Uplink PH-UplinkCarrierSCG, + ph-SupplementaryUplink PH-UplinkCarrierSCG OPTIONAL, + ..., + [[ + twoSRS-PUSCH-Repetition-r17 ENUMERATED{enabled} OPTIONAL + ]] +} + +PH-UplinkCarrierSCG ::= SEQUENCE{ + ph-Type1or3 ENUMERATED {type1, type3}, + ... +} + +MeasConfigSN ::= SEQUENCE { + measuredFrequenciesSN SEQUENCE (SIZE (1..maxMeasFreqsSN)) OF NR-FreqInfo OPTIONAL, + ... +} + +NR-FreqInfo ::= SEQUENCE { + measuredFrequency ARFCN-ValueNR OPTIONAL, + ... +} + +ConfigRestrictModReqSCG ::= SEQUENCE { + requestedBC-MRDC BandCombinationInfoSN OPTIONAL, + requestedP-MaxFR1 P-Max OPTIONAL, + ..., + [[ + requestedPDCCH-BlindDetectionSCG INTEGER (1..15) OPTIONAL, + requestedP-MaxEUTRA P-Max OPTIONAL + ]], + [[ + requestedP-MaxFR2-r16 P-Max OPTIONAL, + requestedMaxInterFreqMeasIdSCG-r16 INTEGER(1..maxMeasIdentitiesMN) OPTIONAL, + requestedMaxIntraFreqMeasIdSCG-r16 INTEGER(1..maxMeasIdentitiesMN) OPTIONAL, + requestedToffset-r16 T-Offset-r16 OPTIONAL + ]] +} + +BandCombinationIndex ::= INTEGER (1..maxBandComb) + +BandCombinationInfoSN ::= SEQUENCE { + bandCombinationIndex BandCombinationIndex, + requestedFeatureSets FeatureSetEntryIndex +} + +FR-InfoList ::= SEQUENCE (SIZE (1..maxNrofServingCells-1)) OF FR-Info + +FR-Info ::= SEQUENCE { + servCellIndex ServCellIndex, + fr-Type ENUMERATED {fr1, fr2} +} + +CandidateServingFreqListNR ::= SEQUENCE (SIZE (1.. maxFreqIDC-MRDC)) OF ARFCN-ValueNR + +CandidateServingFreqListEUTRA ::= SEQUENCE (SIZE (1.. maxFreqIDC-MRDC)) OF ARFCN-ValueEUTRA + +T-Offset-r16 ::= ENUMERATED {ms0dot5, ms0dot75, ms1, ms1dot5, ms2, ms2dot5, ms3, spare1} + +CandidateCellInfoListCPC-r17 ::= SEQUENCE (SIZE (1..maxFreq)) OF CandidateCellInfo-r17 + +CandidateCellInfo-r17 ::= SEQUENCE { + ssbFrequency-r17 ARFCN-ValueNR, + candidateList-r17 SEQUENCE (SIZE (1..maxNrofCondCells-r16)) OF CandidateCell-r17 +} + +CandidateCell-r17 ::= SEQUENCE { + physCellId-r17 PhysCellId, + condExecutionCondSCG-r17 OCTET STRING (CONTAINING CondReconfigExecCondSCG-r17) OPTIONAL +} + +-- TAG-CG-CONFIG-STOP +-- TAG-CG-CONFIG-INFO-START + +CG-ConfigInfo ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + cg-ConfigInfo CG-ConfigInfo-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +CG-ConfigInfo-IEs ::= SEQUENCE { + ue-CapabilityInfo OCTET STRING (CONTAINING UE-CapabilityRAT-ContainerList) OPTIONAL,-- Cond SN-AddMod + candidateCellInfoListMN MeasResultList2NR OPTIONAL, + candidateCellInfoListSN OCTET STRING (CONTAINING MeasResultList2NR) OPTIONAL, + measResultCellListSFTD-NR MeasResultCellListSFTD-NR OPTIONAL, + scgFailureInfo SEQUENCE { + failureType ENUMERATED { t310-Expiry, randomAccessProblem, + rlc-MaxNumRetx, synchReconfigFailure-SCG, + scg-reconfigFailure, + srb3-IntegrityFailure}, + measResultSCG OCTET STRING (CONTAINING MeasResultSCG-Failure) + } OPTIONAL, + configRestrictInfo ConfigRestrictInfoSCG OPTIONAL, + drx-InfoMCG DRX-Info OPTIONAL, + measConfigMN MeasConfigMN OPTIONAL, + sourceConfigSCG OCTET STRING (CONTAINING RRCReconfiguration) OPTIONAL, + scg-RB-Config OCTET STRING (CONTAINING RadioBearerConfig) OPTIONAL, + mcg-RB-Config OCTET STRING (CONTAINING RadioBearerConfig) OPTIONAL, + mrdc-AssistanceInfo MRDC-AssistanceInfo OPTIONAL, + nonCriticalExtension CG-ConfigInfo-v1540-IEs OPTIONAL +} + +CG-ConfigInfo-v1540-IEs ::= SEQUENCE { + ph-InfoMCG PH-TypeListMCG OPTIONAL, + measResultReportCGI SEQUENCE { + ssbFrequency ARFCN-ValueNR, + cellForWhichToReportCGI PhysCellId, + cgi-Info CGI-InfoNR + } OPTIONAL, + nonCriticalExtension CG-ConfigInfo-v1560-IEs OPTIONAL +} + +CG-ConfigInfo-v1560-IEs ::= SEQUENCE { + candidateCellInfoListMN-EUTRA OCTET STRING OPTIONAL, + candidateCellInfoListSN-EUTRA OCTET STRING OPTIONAL, + sourceConfigSCG-EUTRA OCTET STRING OPTIONAL, + scgFailureInfoEUTRA SEQUENCE { + failureTypeEUTRA ENUMERATED { t313-Expiry, randomAccessProblem, + rlc-MaxNumRetx, scg-ChangeFailure}, + measResultSCG-EUTRA OCTET STRING + } OPTIONAL, + drx-ConfigMCG DRX-Config OPTIONAL, + measResultReportCGI-EUTRA SEQUENCE { + eutraFrequency ARFCN-ValueEUTRA, + cellForWhichToReportCGI-EUTRA EUTRA-PhysCellId, + cgi-InfoEUTRA CGI-InfoEUTRA + } OPTIONAL, + measResultCellListSFTD-EUTRA MeasResultCellListSFTD-EUTRA OPTIONAL, + fr-InfoListMCG FR-InfoList OPTIONAL, + nonCriticalExtension CG-ConfigInfo-v1570-IEs OPTIONAL +} + +CG-ConfigInfo-v1570-IEs ::= SEQUENCE { + sftdFrequencyList-NR SFTD-FrequencyList-NR OPTIONAL, + sftdFrequencyList-EUTRA SFTD-FrequencyList-EUTRA OPTIONAL, + nonCriticalExtension CG-ConfigInfo-v1590-IEs OPTIONAL +} + +CG-ConfigInfo-v1590-IEs ::= SEQUENCE { + servFrequenciesMN-NR SEQUENCE (SIZE (1.. maxNrofServingCells-1)) OF ARFCN-ValueNR OPTIONAL, + nonCriticalExtension CG-ConfigInfo-v1610-IEs OPTIONAL +} + +CG-ConfigInfo-v1610-IEs ::= SEQUENCE { + drx-InfoMCG2 DRX-Info2 OPTIONAL, + alignedDRX-Indication ENUMERATED {true} OPTIONAL, + scgFailureInfo-r16 SEQUENCE { + failureType-r16 ENUMERATED { scg-lbtFailure-r16, beamFailureRecoveryFailure-r16, + t312-Expiry-r16, bh-RLF-r16, + beamFailure-r17, spare3, spare2, spare1}, + measResultSCG-r16 OCTET STRING (CONTAINING MeasResultSCG-Failure) + } OPTIONAL, + dummy1 SEQUENCE { + failureTypeEUTRA-r16 ENUMERATED { scg-lbtFailure-r16, beamFailureRecoveryFailure-r16, + t312-Expiry-r16, spare5, + spare4, spare3, spare2, spare1}, + measResultSCG-EUTRA-r16 OCTET STRING + } OPTIONAL, + sidelinkUEInformationNR-r16 OCTET STRING (CONTAINING SidelinkUEInformationNR-r16) OPTIONAL, + sidelinkUEInformationEUTRA-r16 OCTET STRING OPTIONAL, + nonCriticalExtension CG-ConfigInfo-v1620-IEs OPTIONAL +} + +CG-ConfigInfo-v1620-IEs ::= SEQUENCE { + ueAssistanceInformationSourceSCG-r16 OCTET STRING (CONTAINING UEAssistanceInformation) OPTIONAL, + nonCriticalExtension CG-ConfigInfo-v1640-IEs OPTIONAL +} + +CG-ConfigInfo-v1640-IEs ::= SEQUENCE { + servCellInfoListMCG-NR-r16 ServCellInfoListMCG-NR-r16 OPTIONAL, + servCellInfoListMCG-EUTRA-r16 ServCellInfoListMCG-EUTRA-r16 OPTIONAL, + nonCriticalExtension CG-ConfigInfo-v1700-IEs OPTIONAL +} + +CG-ConfigInfo-v1700-IEs ::= SEQUENCE { + candidateCellListCPC-r17 CandidateCellListCPC-r17 OPTIONAL, + twoPHRModeMCG-r17 ENUMERATED {enabled} OPTIONAL, + lowMobilityEvaluationConnectedInPCell-r17 ENUMERATED {enabled} OPTIONAL, + nonCriticalExtension CG-ConfigInfo-v1730-IEs OPTIONAL +} + +CG-ConfigInfo-v1730-IEs ::= SEQUENCE { + fr1-Carriers-MCG-r17 INTEGER (1..32) OPTIONAL, + fr2-Carriers-MCG-r17 INTEGER (1..32) OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +ServCellInfoListMCG-NR-r16 ::= SEQUENCE (SIZE (1.. maxNrofServingCells)) OF ServCellInfoXCG-NR-r16 + +ServCellInfoListMCG-EUTRA-r16 ::= SEQUENCE (SIZE (1.. maxNrofServingCellsEUTRA)) OF ServCellInfoXCG-EUTRA-r16 + +SFTD-FrequencyList-NR ::= SEQUENCE (SIZE (1..maxCellSFTD)) OF ARFCN-ValueNR + +SFTD-FrequencyList-EUTRA ::= SEQUENCE (SIZE (1..maxCellSFTD)) OF ARFCN-ValueEUTRA + +ConfigRestrictInfoSCG ::= SEQUENCE { + allowedBC-ListMRDC BandCombinationInfoList OPTIONAL, + powerCoordination-FR1 SEQUENCE { + p-maxNR-FR1 P-Max OPTIONAL, + p-maxEUTRA P-Max OPTIONAL, + p-maxUE-FR1 P-Max OPTIONAL + } OPTIONAL, + servCellIndexRangeSCG SEQUENCE { + lowBound ServCellIndex, + upBound ServCellIndex + } OPTIONAL, -- Cond SN-AddMod + maxMeasFreqsSCG INTEGER(1..maxMeasFreqsMN) OPTIONAL, + dummy INTEGER(1..maxMeasIdentitiesMN) OPTIONAL, + ..., + [[ + selectedBandEntriesMNList SEQUENCE (SIZE (1..maxBandComb)) OF SelectedBandEntriesMN OPTIONAL, + pdcch-BlindDetectionSCG INTEGER (1..15) OPTIONAL, + maxNumberROHC-ContextSessionsSN INTEGER(0.. 16384) OPTIONAL + ]], + [[ + maxIntraFreqMeasIdentitiesSCG INTEGER(1..maxMeasIdentitiesMN) OPTIONAL, + maxInterFreqMeasIdentitiesSCG INTEGER(1..maxMeasIdentitiesMN) OPTIONAL + ]], + [[ + p-maxNR-FR1-MCG-r16 P-Max OPTIONAL, + powerCoordination-FR2-r16 SEQUENCE { + p-maxNR-FR2-MCG-r16 P-Max OPTIONAL, + p-maxNR-FR2-SCG-r16 P-Max OPTIONAL, + p-maxUE-FR2-r16 P-Max OPTIONAL + } OPTIONAL, + nrdc-PC-mode-FR1-r16 ENUMERATED {semi-static-mode1, semi-static-mode2, dynamic} OPTIONAL, + nrdc-PC-mode-FR2-r16 ENUMERATED {semi-static-mode1, semi-static-mode2, dynamic} OPTIONAL, + maxMeasSRS-ResourceSCG-r16 INTEGER(0..maxNrofCLI-SRS-Resources-r16) OPTIONAL, + maxMeasCLI-ResourceSCG-r16 INTEGER(0..maxNrofCLI-RSSI-Resources-r16) OPTIONAL, + maxNumberEHC-ContextsSN-r16 INTEGER(0..65536) OPTIONAL, + allowedReducedConfigForOverheating-r16 OverheatingAssistance OPTIONAL, + maxToffset-r16 T-Offset-r16 OPTIONAL + ]], + [[ + allowedReducedConfigForOverheating-r17 OverheatingAssistance-r17 OPTIONAL, + maxNumberUDC-DRB-r17 INTEGER(0..2) OPTIONAL, + maxNumberCPCCandidates-r17 INTEGER(0..maxNrofCondCells-1-r17) OPTIONAL + ]] +} + +SelectedBandEntriesMN ::= SEQUENCE (SIZE (1..maxSimultaneousBands)) OF BandEntryIndex + +BandEntryIndex ::= INTEGER (0.. maxNrofServingCells) + +PH-TypeListMCG ::= SEQUENCE (SIZE (1..maxNrofServingCells)) OF PH-InfoMCG + +PH-InfoMCG ::= SEQUENCE { + servCellIndex ServCellIndex, + ph-Uplink PH-UplinkCarrierMCG, + ph-SupplementaryUplink PH-UplinkCarrierMCG OPTIONAL, + ..., + [[ + twoSRS-PUSCH-Repetition-r17 ENUMERATED{enabled} OPTIONAL + ]] +} + +PH-UplinkCarrierMCG ::= SEQUENCE{ + ph-Type1or3 ENUMERATED {type1, type3}, + ... +} + +BandCombinationInfoList ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombinationInfo + +BandCombinationInfo ::= SEQUENCE { + bandCombinationIndex BandCombinationIndex, + allowedFeatureSetsList SEQUENCE (SIZE (1..maxFeatureSetsPerBand)) OF FeatureSetEntryIndex +} + +FeatureSetEntryIndex ::= INTEGER (1.. maxFeatureSetsPerBand) + +DRX-Info ::= SEQUENCE { + drx-LongCycleStartOffset CHOICE { + ms10 INTEGER(0..9), + ms20 INTEGER(0..19), + ms32 INTEGER(0..31), + ms40 INTEGER(0..39), + ms60 INTEGER(0..59), + ms64 INTEGER(0..63), + ms70 INTEGER(0..69), + ms80 INTEGER(0..79), + ms128 INTEGER(0..127), + ms160 INTEGER(0..159), + ms256 INTEGER(0..255), + ms320 INTEGER(0..319), + ms512 INTEGER(0..511), + ms640 INTEGER(0..639), + ms1024 INTEGER(0..1023), + ms1280 INTEGER(0..1279), + ms2048 INTEGER(0..2047), + ms2560 INTEGER(0..2559), + ms5120 INTEGER(0..5119), + ms10240 INTEGER(0..10239) + }, + shortDRX SEQUENCE { + drx-ShortCycle ENUMERATED { + ms2, ms3, ms4, ms5, ms6, ms7, ms8, ms10, ms14, ms16, ms20, ms30, ms32, + ms35, ms40, ms64, ms80, ms128, ms160, ms256, ms320, ms512, ms640, spare9, + spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1 }, + drx-ShortCycleTimer INTEGER (1..16) + } OPTIONAL +} + +DRX-Info2 ::= SEQUENCE { + drx-onDurationTimer CHOICE { + subMilliSeconds INTEGER (1..31), + milliSeconds ENUMERATED { + ms1, ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30, ms40, ms50, ms60, + ms80, ms100, ms200, ms300, ms400, ms500, ms600, ms800, ms1000, ms1200, + ms1600, spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1 } + } +} + +MeasConfigMN ::= SEQUENCE { + measuredFrequenciesMN SEQUENCE (SIZE (1..maxMeasFreqsMN)) OF NR-FreqInfo OPTIONAL, + measGapConfig SetupRelease { GapConfig } OPTIONAL, + gapPurpose ENUMERATED {perUE, perFR1} OPTIONAL, + ..., + [[ + measGapConfigFR2 SetupRelease { GapConfig } OPTIONAL + ]], + [[ + interFreqNoGap-r16 ENUMERATED {true} OPTIONAL + ]] +} + +MRDC-AssistanceInfo ::= SEQUENCE { + affectedCarrierFreqCombInfoListMRDC SEQUENCE (SIZE (1..maxNrofCombIDC)) OF AffectedCarrierFreqCombInfoMRDC, + ..., + [[ + overheatingAssistanceSCG-r16 OCTET STRING (CONTAINING OverheatingAssistance) OPTIONAL + ]], + [[ + overheatingAssistanceSCG-FR2-2-r17 OCTET STRING (CONTAINING OverheatingAssistance-r17) OPTIONAL + ]] +} + +AffectedCarrierFreqCombInfoMRDC ::= SEQUENCE { + victimSystemType VictimSystemType, + interferenceDirectionMRDC ENUMERATED {eutra-nr, nr, other, utra-nr-other, nr-other, spare3, spare2, spare1}, + affectedCarrierFreqCombMRDC SEQUENCE { + affectedCarrierFreqCombEUTRA AffectedCarrierFreqCombEUTRA OPTIONAL, + affectedCarrierFreqCombNR AffectedCarrierFreqCombNR + } OPTIONAL +} + +VictimSystemType ::= SEQUENCE { + gps ENUMERATED {true} OPTIONAL, + glonass ENUMERATED {true} OPTIONAL, + bds ENUMERATED {true} OPTIONAL, + galileo ENUMERATED {true} OPTIONAL, + wlan ENUMERATED {true} OPTIONAL, + bluetooth ENUMERATED {true} OPTIONAL +} + +AffectedCarrierFreqCombEUTRA ::= SEQUENCE (SIZE (1..maxNrofServingCellsEUTRA)) OF ARFCN-ValueEUTRA + +AffectedCarrierFreqCombNR ::= SEQUENCE (SIZE (1..maxNrofServingCells)) OF ARFCN-ValueNR + +CandidateCellListCPC-r17 ::= SEQUENCE (SIZE (1..maxFreq)) OF CandidateCellCPC-r17 + +CandidateCellCPC-r17 ::= SEQUENCE { + ssbFrequency-r17 ARFCN-ValueNR, + candidateCellList-r17 SEQUENCE (SIZE (1..maxNrofCondCells-r16)) OF PhysCellId +} + +-- TAG-CG-CONFIG-INFO-STOP +-- TAG-MEASUREMENT-TIMING-CONFIGURATION-START + +MeasurementTimingConfiguration ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + measTimingConf MeasurementTimingConfiguration-IEs, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +MeasurementTimingConfiguration-IEs ::= SEQUENCE { + measTiming MeasTimingList OPTIONAL, + nonCriticalExtension MeasurementTimingConfiguration-v1550-IEs OPTIONAL +} + +MeasurementTimingConfiguration-v1550-IEs ::= SEQUENCE { + campOnFirstSSB BOOLEAN, + psCellOnlyOnFirstSSB BOOLEAN, + nonCriticalExtension MeasurementTimingConfiguration-v1610-IEs OPTIONAL +} + +MeasurementTimingConfiguration-v1610-IEs ::= SEQUENCE { + csi-RS-Config-r16 SEQUENCE { + csi-RS-SubcarrierSpacing-r16 SubcarrierSpacing, + csi-RS-CellMobility-r16 CSI-RS-CellMobility, + refSSBFreq-r16 ARFCN-ValueNR + }, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +MeasTimingList ::= SEQUENCE (SIZE (1..maxMeasFreqsMN)) OF MeasTiming + +MeasTiming ::= SEQUENCE { + frequencyAndTiming SEQUENCE { + carrierFreq ARFCN-ValueNR, + ssbSubcarrierSpacing SubcarrierSpacing, + ssb-MeasurementTimingConfiguration SSB-MTC, + ss-RSSI-Measurement SS-RSSI-Measurement OPTIONAL + } OPTIONAL, + ..., + [[ + ssb-ToMeasure SSB-ToMeasure OPTIONAL, + physCellId PhysCellId OPTIONAL + ]] +} + +-- TAG-MEASUREMENT-TIMING-CONFIGURATION-STOP +-- TAG-UE-RADIO-PAGING-INFORMATION-START + +UERadioPagingInformation ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + ueRadioPagingInformation UERadioPagingInformation-IEs, + spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +UERadioPagingInformation-IEs ::= SEQUENCE { + supportedBandListNRForPaging SEQUENCE (SIZE (1..maxBands)) OF FreqBandIndicatorNR OPTIONAL, + nonCriticalExtension UERadioPagingInformation-v15e0-IEs OPTIONAL +} + +UERadioPagingInformation-v15e0-IEs ::= SEQUENCE { + dl-SchedulingOffset-PDSCH-TypeA-FDD-FR1 ENUMERATED {supported} OPTIONAL, + dl-SchedulingOffset-PDSCH-TypeA-TDD-FR1 ENUMERATED {supported} OPTIONAL, + dl-SchedulingOffset-PDSCH-TypeA-TDD-FR2 ENUMERATED {supported} OPTIONAL, + dl-SchedulingOffset-PDSCH-TypeB-FDD-FR1 ENUMERATED {supported} OPTIONAL, + dl-SchedulingOffset-PDSCH-TypeB-TDD-FR1 ENUMERATED {supported} OPTIONAL, + dl-SchedulingOffset-PDSCH-TypeB-TDD-FR2 ENUMERATED {supported} OPTIONAL, + nonCriticalExtension UERadioPagingInformation-v1700-IEs OPTIONAL +} + +UERadioPagingInformation-v1700-IEs ::= SEQUENCE { + ue-RadioPagingInfo-r17 OCTET STRING (CONTAINING UE-RadioPagingInfo-r17) OPTIONAL, + inactiveStatePO-Determination-r17 ENUMERATED {supported} OPTIONAL, + numberOfRxRedCap-r17 ENUMERATED {one, two} OPTIONAL, + halfDuplexFDD-TypeA-RedCap-r17 SEQUENCE (SIZE (1..maxBands)) OF FreqBandIndicatorNR OPTIONAL, + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-UE-RADIO-PAGING-INFORMATION-STOP +-- TAG-UE-RADIO-ACCESS-CAPABILITY-INFORMATION-START + +UERadioAccessCapabilityInformation ::= SEQUENCE { + criticalExtensions CHOICE { + c1 CHOICE{ + ueRadioAccessCapabilityInformation UERadioAccessCapabilityInformation-IEs, + spare7 NULL, + spare6 NULL, spare5 NULL, spare4 NULL, + spare3 NULL, spare2 NULL, spare1 NULL + }, + criticalExtensionsFuture SEQUENCE {} + } +} + +UERadioAccessCapabilityInformation-IEs ::= SEQUENCE { + ue-RadioAccessCapabilityInfo OCTET STRING (CONTAINING UE-CapabilityRAT-ContainerList), + nonCriticalExtension SEQUENCE {} OPTIONAL +} + +-- TAG-UE-RADIO-ACCESS-CAPABILITY-INFORMATION-STOP +-- TAG-NR-MULTIPLICITY-AND-CONSTRAINTS-START + +maxMeasFreqsMN INTEGER ::= 32 -- Maximum number of MN-configured measurement frequencies +maxMeasFreqsSN INTEGER ::= 32 -- Maximum number of SN-configured measurement frequencies +maxMeasIdentitiesMN INTEGER ::= 62 -- Maximum number of measurement identities that a UE can be configured with +maxCellPrep INTEGER ::= 32 -- Maximum number of cells prepared for handover + +-- TAG-NR-MULTIPLICITY-AND-CONSTRAINTS-STOP + +END + diff --git a/openair2/RRC/NR/MESSAGES/ASN.1/nr-rrc-17.3.0.cmake b/openair2/RRC/NR/MESSAGES/ASN.1/nr-rrc-17.3.0.cmake new file mode 100644 index 0000000000..28416eabba --- /dev/null +++ b/openair2/RRC/NR/MESSAGES/ASN.1/nr-rrc-17.3.0.cmake @@ -0,0 +1,4183 @@ +set(NR_RRC_GRAMMAR ASN.1/nr-rrc-17.3.0.asn1) + +set(nr_rrc_source +asn_application.c +asn_bit_data.c +asn_codecs_prim.c +asn_internal.c +asn_random_fill.c +asn_SEQUENCE_OF.c +asn_SET_OF.c +ber_decoder.c +ber_tlv_length.c +ber_tlv_tag.c +BIT_STRING.c +BOOLEAN.c +constraints.c +constr_CHOICE.c +constr_SEQUENCE.c +constr_SEQUENCE_OF.c +constr_SET_OF.c +constr_TYPE.c +der_encoder.c +INTEGER.c +NativeEnumerated.c +NativeInteger.c +NR_AbsoluteTimeInfo-r16.c +NR_AccessStratumRelease.c +NR_AccessStratumReleaseSidelink-r16.c +NR_AdditionalPCIIndex-r17.c +NR_AdditionalRACH-ConfigList-r17.c +NR_AdditionalRACH-Config-r17.c +NR_AdditionalSpectrumEmission.c +NR_AffectedCarrierFreqCombEUTRA.c +NR_AffectedCarrierFreqCombInfoMRDC.c +NR_AffectedCarrierFreqCombList-r16.c +NR_AffectedCarrierFreqCombNR.c +NR_AffectedCarrierFreqComb-r16.c +NR_AffectedCarrierFreqList-r16.c +NR_AffectedCarrierFreq-r16.c +NR_AggregatedBandwidth.c +NR_AI-RNTI-r16.c +NR_Alpha.c +NR_AMF-Identifier.c +NR_AppLayerBufferLevel-r17.c +NR_AppLayerMeasConfig-r17.c +NR_AppLayerMeasParameters-r17.c +NR_ApplicableDisasterInfo-r17.c +NR_AreaConfig-r16.c +NR_AreaConfiguration-r16.c +NR_AreaConfiguration-v1700.c +NR_ARFCN-ValueEUTRA.c +NR_ARFCN-ValueNR.c +NR_ARFCN-ValueUTRA-FDD-r16.c +NR_AS-Config.c +NR_AS-Context.c +NR_AvailabilityCombinationId-r16.c +NR_AvailabilityCombination-r16.c +NR_AvailabilityCombinationRB-Groups-r17.c +NR_AvailabilityCombinationsPerCellIndex-r16.c +NR_AvailabilityCombinationsPerCell-r16.c +NR_AvailabilityIndicator-r16.c +NR_AvailableRB-SetsPerCell-r16.c +NR_AvailableSlotOffset-r17.c +NR_BandCombination.c +NR_BandCombinationIndex.c +NR_BandCombinationInfo.c +NR_BandCombinationInfoList.c +NR_BandCombinationInfoSN.c +NR_BandCombinationList.c +NR_BandCombinationListSidelinkEUTRA-NR-r16.c +NR_BandCombinationListSidelinkEUTRA-NR-v1630.c +NR_BandCombinationListSidelinkEUTRA-NR-v1710.c +NR_BandCombinationListSidelinkNR-r16.c +NR_BandCombinationListSidelinkNR-v1710.c +NR_BandCombinationListSL-Discovery-r17.c +NR_BandCombinationList-UplinkTxSwitch-r16.c +NR_BandCombinationList-UplinkTxSwitch-v1630.c +NR_BandCombinationList-UplinkTxSwitch-v1640.c +NR_BandCombinationList-UplinkTxSwitch-v1650.c +NR_BandCombinationList-UplinkTxSwitch-v1670.c +NR_BandCombinationList-UplinkTxSwitch-v1690.c +NR_BandCombinationList-UplinkTxSwitch-v16a0.c +NR_BandCombinationList-UplinkTxSwitch-v1700.c +NR_BandCombinationList-UplinkTxSwitch-v1720.c +NR_BandCombinationList-UplinkTxSwitch-v1730.c +NR_BandCombinationList-v1540.c +NR_BandCombinationList-v1550.c +NR_BandCombinationList-v1560.c +NR_BandCombinationList-v1570.c +NR_BandCombinationList-v1580.c +NR_BandCombinationList-v1590.c +NR_BandCombinationList-v15g0.c +NR_BandCombinationList-v1610.c +NR_BandCombinationList-v1630.c +NR_BandCombinationList-v1640.c +NR_BandCombinationList-v1650.c +NR_BandCombinationList-v1680.c +NR_BandCombinationList-v1690.c +NR_BandCombinationList-v16a0.c +NR_BandCombinationList-v1700.c +NR_BandCombinationList-v1720.c +NR_BandCombinationList-v1730.c +NR_BandCombinationParametersSidelinkEUTRA-NR-r16.c +NR_BandCombinationParametersSidelinkEUTRA-NR-v1630.c +NR_BandCombinationParametersSidelinkEUTRA-NR-v1710.c +NR_BandCombinationParametersSidelinkNR-r16.c +NR_BandCombinationParametersSidelinkNR-v1710.c +NR_BandCombination-UplinkTxSwitch-r16.c +NR_BandCombination-UplinkTxSwitch-v1630.c +NR_BandCombination-UplinkTxSwitch-v1640.c +NR_BandCombination-UplinkTxSwitch-v1650.c +NR_BandCombination-UplinkTxSwitch-v1670.c +NR_BandCombination-UplinkTxSwitch-v1690.c +NR_BandCombination-UplinkTxSwitch-v16a0.c +NR_BandCombination-UplinkTxSwitch-v1700.c +NR_BandCombination-UplinkTxSwitch-v1720.c +NR_BandCombination-UplinkTxSwitch-v1730.c +NR_BandCombination-v1540.c +NR_BandCombination-v1550.c +NR_BandCombination-v1560.c +NR_BandCombination-v1570.c +NR_BandCombination-v1580.c +NR_BandCombination-v1590.c +NR_BandCombination-v15g0.c +NR_BandCombination-v1610.c +NR_BandCombination-v1630.c +NR_BandCombination-v1640.c +NR_BandCombination-v1650.c +NR_BandCombination-v1680.c +NR_BandCombination-v1690.c +NR_BandCombination-v16a0.c +NR_BandCombination-v1700.c +NR_BandCombination-v1720.c +NR_BandCombination-v1730.c +NR_BandEntryIndex.c +NR_BandNR.c +NR_BandParameters.c +NR_BandParametersSidelinkDiscovery-r17.c +NR_BandParametersSidelinkEUTRA-NR-r16.c +NR_BandParametersSidelinkEUTRA-NR-v1630.c +NR_BandParametersSidelinkEUTRA-NR-v1710.c +NR_BandParametersSidelink-r16.c +NR_BandParametersSidelink-v1710.c +NR_BandParameters-v1540.c +NR_BandParameters-v1610.c +NR_BandParameters-v1710.c +NR_BandParameters-v1730.c +NR_BandSidelinkEUTRA-r16.c +NR_BandSidelinkPC5-r16.c +NR_BandSidelink-r16.c +NR_BAP-Config-r16.c +NR_BAP-Parameters-r16.c +NR_BAP-Parameters-v1700.c +NR_BAP-RoutingID-r16.c +NR_BCCH-BCH-Message.c +NR_BCCH-BCH-MessageType.c +NR_BCCH-Config.c +NR_BCCH-DL-SCH-Message.c +NR_BCCH-DL-SCH-MessageType.c +NR_BeamFailureDetection-r17.c +NR_BeamFailureDetectionSet-r17.c +NR_BeamFailureRecoveryConfig.c +NR_BeamFailureRecoveryRSConfig-r16.c +NR_BeamLinkMonitoringRS-Id-r17.c +NR_BeamLinkMonitoringRS-r17.c +NR_BeamManagementSSB-CSI-RS.c +NR_BeamMeasConfigIdle-NR-r16.c +NR_BetaOffsets.c +NR_BetaOffsetsCrossPri-r17.c +NR_BetaOffsetsCrossPriSelCG-r17.c +NR_BetaOffsetsCrossPriSelDCI-0-2-r17.c +NR_BetaOffsetsCrossPriSel-r17.c +NR_BFD-RelaxationReportingConfig-r17.c +NR_BFR-CSIRS-Resource.c +NR_BFR-SSB-Resource.c +NR_BH-LogicalChannelIdentity-Ext-r16.c +NR_BH-LogicalChannelIdentity-r16.c +NR_BH-RLC-ChannelConfig-r16.c +NR_BH-RLC-ChannelID-r16.c +NR_BSR-Config.c +NR_BT-NameList-r16.c +NR_BT-Name-r16.c +NR_BWP.c +NR_BWP-Downlink.c +NR_BWP-DownlinkCommon.c +NR_BWP-DownlinkDedicated.c +NR_BWP-DownlinkDedicatedSDT-r17.c +NR_BWP-Id.c +NR_BWP-Uplink.c +NR_BWP-UplinkCommon.c +NR_BWP-UplinkDedicated.c +NR_BWP-UplinkDedicatedSDT-r17.c +NR_CA-BandwidthClassEUTRA.c +NR_CA-BandwidthClassNR.c +NR_CAG-IdentityInfo-r16.c +NR_CandidateBeamRSListExt-r16.c +NR_CandidateBeamRS-r16.c +NR_CandidateCellCPC-r17.c +NR_CandidateCellInfoListCPC-r17.c +NR_CandidateCellInfo-r17.c +NR_CandidateCellListCPC-r17.c +NR_CandidateCell-r17.c +NR_CandidateServingFreqListEUTRA.c +NR_CandidateServingFreqListNR.c +NR_CandidateServingFreqListNR-r16.c +NR_CA-ParametersEUTRA.c +NR_CA-ParametersEUTRA-v1560.c +NR_CA-ParametersEUTRA-v1570.c +NR_CA-ParametersNR.c +NR_CA-ParametersNRDC.c +NR_CA-ParametersNRDC-v15g0.c +NR_CA-ParametersNRDC-v1610.c +NR_CA-ParametersNRDC-v1630.c +NR_CA-ParametersNRDC-v1640.c +NR_CA-ParametersNRDC-v1650.c +NR_CA-ParametersNRDC-v16a0.c +NR_CA-ParametersNRDC-v1700.c +NR_CA-ParametersNRDC-v1720.c +NR_CA-ParametersNRDC-v1730.c +NR_CA-ParametersNR-v1540.c +NR_CA-ParametersNR-v1550.c +NR_CA-ParametersNR-v1560.c +NR_CA-ParametersNR-v15g0.c +NR_CA-ParametersNR-v1610.c +NR_CA-ParametersNR-v1630.c +NR_CA-ParametersNR-v1640.c +NR_CA-ParametersNR-v1690.c +NR_CA-ParametersNR-v16a0.c +NR_CA-ParametersNR-v1700.c +NR_CA-ParametersNR-v1720.c +NR_CA-ParametersNR-v1730.c +NR_CarrierAggregationVariant.c +NR_CarrierFreqEUTRA.c +NR_CarrierFreqEUTRA-v1610.c +NR_CarrierFreqEUTRA-v1700.c +NR_CarrierFreqListEUTRA.c +NR_CarrierFreqListEUTRA-v1610.c +NR_CarrierFreqListEUTRA-v1700.c +NR_CarrierFreqListMBS-r17.c +NR_CarrierInfoNR.c +NR_CarrierState-r17.c +NR_CarrierTypePair-r16.c +NR_CC-Group-r17.c +NR_CC-State-r17.c +NR_CellAccessRelatedInfo.c +NR_CellAccessRelatedInfo-EUTRA-5GC.c +NR_CellAccessRelatedInfo-EUTRA-EPC.c +NR_CellGlobalIdList-r16.c +NR_CellGroupConfig.c +NR_CellGroupForSwitch-r16.c +NR_CellGroupId.c +NR_CellGrouping-r16.c +NR_CellIdentity.c +NR_CellIdentity-EUTRA-5GC.c +NR_CellListEUTRA-r16.c +NR_CellListNR-r16.c +NR_CellReselectionPriorities.c +NR_CellReselectionPriority.c +NR_CellReselectionSubPriority.c +NR_CellsToAddMod.c +NR_CellsToAddModExt-v1710.c +NR_CellsToAddModList.c +NR_CellsToAddModListExt-v1710.c +NR_CellsToAddModListUTRA-FDD-r16.c +NR_CellsToAddModUTRA-FDD-r16.c +NR_CellsTriggeredList.c +NR_CFRA.c +NR_CFRA-CSIRS-Resource.c +NR_CFRA-SSB-Resource.c +NR_CFRA-TwoStep-r16.c +NR_CFR-ConfigMCCH-MTCH-r17.c +NR_CFR-ConfigMulticast-r17.c +NR_CG-CandidateInfoId-r17.c +NR_CG-CandidateInfo-r17.c +NR_CG-CandidateList.c +NR_CG-CandidateList-r17-IEs.c +NR_CG-Config.c +NR_CG-Config-IEs.c +NR_CG-ConfigInfo.c +NR_CG-ConfigInfo-IEs.c +NR_CG-ConfigInfo-v1540-IEs.c +NR_CG-ConfigInfo-v1560-IEs.c +NR_CG-ConfigInfo-v1570-IEs.c +NR_CG-ConfigInfo-v1590-IEs.c +NR_CG-ConfigInfo-v1610-IEs.c +NR_CG-ConfigInfo-v1620-IEs.c +NR_CG-ConfigInfo-v1640-IEs.c +NR_CG-ConfigInfo-v1700-IEs.c +NR_CG-ConfigInfo-v1730-IEs.c +NR_CG-Config-v1540-IEs.c +NR_CG-Config-v1560-IEs.c +NR_CG-Config-v1590-IEs.c +NR_CG-Config-v1610-IEs.c +NR_CG-Config-v1620-IEs.c +NR_CG-Config-v1630-IEs.c +NR_CG-Config-v1640-IEs.c +NR_CG-Config-v1700-IEs.c +NR_CG-Config-v1730-IEs.c +NR_CG-COT-Sharing-r16.c +NR_CG-COT-Sharing-r17.c +NR_CGI-InfoEUTRA.c +NR_CGI-InfoEUTRALogging.c +NR_CGI-Info-Logging-r16.c +NR_CGI-InfoNR.c +NR_CG-SDT-ConfigLCH-Restriction-r17.c +NR_CG-SDT-Configuration-r17.c +NR_CG-SDT-TA-ValidationConfig-r17.c +NR_CG-StartingOffsets-r16.c +NR_CG-UCI-OnPUSCH.c +NR_ChannelAccessConfig-r16.c +NR_ChoCandidateCellList-r17.c +NR_ChoCandidateCell-r17.c +NR_CI-ConfigurationPerServingCell-r16.c +NR_CipheringAlgorithm.c +NR_CLI-EventTriggerConfig-r16.c +NR_CLI-PeriodicalReportConfig-r16.c +NR_CLI-ResourceConfig-r16.c +NR_CLI-RSSI-Range-r16.c +NR_CLI-RSSI-TriggeredList-r16.c +NR_CLI-TriggeredList-r16.c +NR_CMRGroupingAndPairing-r17.c +NR_CodebookComboParameterMixedTypePerBC-r17.c +NR_CodebookComboParameterMixedType-r17.c +NR_CodebookComboParameterMultiTRP-PerBC-r17.c +NR_CodebookComboParameterMultiTRP-r17.c +NR_CodebookComboParametersAdditionPerBC-r16.c +NR_CodebookComboParametersAddition-r16.c +NR_CodebookConfig.c +NR_CodebookConfig-r16.c +NR_CodebookConfig-r17.c +NR_CodebookConfig-v1730.c +NR_CodebookParametersAdditionPerBC-r16.c +NR_CodebookParametersAddition-r16.c +NR_CodebookParameters.c +NR_CodebookParametersfetype2PerBC-r17.c +NR_CodebookParametersfetype2-r17.c +NR_CodebookParameters-v1610.c +NR_CodebookVariantsList-r16.c +NR_CO-Duration-r16.c +NR_CO-Duration-r17.c +NR_CO-DurationsPerCell-r16.c +NR_CO-DurationsPerCell-r17.c +NR_CommonLocationInfo-r16.c +NR_ConditionalReconfiguration-r16.c +NR_CondReconfigExecCondSCG-r17.c +NR_CondReconfigId-r16.c +NR_CondReconfigToAddModList-r16.c +NR_CondReconfigToAddMod-r16.c +NR_CondReconfigToRemoveList-r16.c +NR_CondTriggerConfig-r16.c +NR_ConfigRestrictInfoDAPS-r16.c +NR_ConfigRestrictInfoDAPS-v1640.c +NR_ConfigRestrictInfoSCG.c +NR_ConfigRestrictModReqSCG.c +NR_ConfiguredGrantConfig.c +NR_ConfiguredGrantConfigIndexMAC-r16.c +NR_ConfiguredGrantConfigIndex-r16.c +NR_ConfiguredGrantConfigToAddModList-r16.c +NR_ConfiguredGrantConfigToReleaseList-r16.c +NR_ConfiguredGrantConfigType2DeactivationStateList-r16.c +NR_ConfiguredGrantConfigType2DeactivationState-r16.c +NR_ConnEstFailReportList-r17.c +NR_ConnEstFailReport-r16.c +NR_ConnEstFailureControl.c +NR_ControlResourceSet.c +NR_ControlResourceSetId.c +NR_ControlResourceSetId-r16.c +NR_ControlResourceSetId-v1610.c +NR_ControlResourceSetZero.c +NR_CounterCheck.c +NR_CounterCheck-IEs.c +NR_CounterCheckResponse.c +NR_CounterCheckResponse-IEs.c +NR_CrossCarrierSchedulingConfig.c +NR_CrossCarrierSchedulingSCell-SpCell-r17.c +NR_CRS-InterfMitigation-r17.c +NR_CSI-AperiodicTriggerState.c +NR_CSI-AperiodicTriggerStateList.c +NR_CSI-AssociatedReportConfigInfo.c +NR_CSI-FrequencyOccupation.c +NR_CSI-IM-Resource.c +NR_CSI-IM-ResourceId.c +NR_CSI-IM-ResourceSet.c +NR_CSI-IM-ResourceSetId.c +NR_CSI-MeasConfig.c +NR_CSI-MultiTRP-SupportedCombinations-r17.c +NR_CSI-ReportConfig.c +NR_CSI-ReportConfigId.c +NR_CSI-ReportFramework.c +NR_CSI-ReportFrameworkExt-r16.c +NR_CSI-ReportPeriodicityAndOffset.c +NR_CSI-ResourceConfig.c +NR_CSI-ResourceConfigId.c +NR_CSI-ResourcePeriodicityAndOffset.c +NR_CSI-RS-CellMobility.c +NR_CSI-RS-ForTracking.c +NR_CSI-RS-IM-ReceptionForFeedback.c +NR_CSI-RS-Index.c +NR_CSI-RS-ProcFrameworkForSRS.c +NR_CSI-RS-ResourceConfigMobility.c +NR_CSI-RS-ResourceMapping.c +NR_CSI-RS-Resource-Mobility.c +NR_CSI-SemiPersistentOnPUSCH-TriggerState.c +NR_CSI-SemiPersistentOnPUSCH-TriggerStateList.c +NR_CSI-SSB-ResourceSet.c +NR_CSI-SSB-ResourceSetId.c +NR_DAPS-UplinkPowerConfig-r16.c +NR_DataInactivityTimer.c +NR_DCP-Config-r16.c +NR_DeactivatedSCG-Config-r17.c +NR_DedicatedInfoF1c-r17.c +NR_DedicatedNAS-Message.c +NR_DedicatedSIBRequest-r16.c +NR_DedicatedSIBRequest-r16-IEs.c +NR_DefaultDC-Location-r17.c +NR_DelayBudgetReport.c +NR_DiscardTimerExt2-r17.c +NR_DiscardTimerExt-r16.c +NR_DL-AM-RLC.c +NR_DL-AM-RLC-v1610.c +NR_DL-AM-RLC-v1700.c +NR_DL-CCCH-Message.c +NR_DL-CCCH-MessageType.c +NR_DL-DataToUL-ACK-DCI-1-2-r16.c +NR_DL-DataToUL-ACK-DCI-1-2-r17.c +NR_DL-DataToUL-ACK-MulticastDCI-Format4-1-r17.c +NR_DL-DataToUL-ACK-r16.c +NR_DL-DataToUL-ACK-r17.c +NR_DL-DataToUL-ACK-v1700.c +NR_DL-DCCH-Message.c +NR_DL-DCCH-MessageType.c +NR_DLDedicatedMessageSegment-r16.c +NR_DLDedicatedMessageSegment-r16-IEs.c +NR_DLInformationTransfer.c +NR_DLInformationTransfer-IEs.c +NR_DLInformationTransferMRDC-r16.c +NR_DLInformationTransferMRDC-r16-IEs.c +NR_DLInformationTransfer-v1610-IEs.c +NR_DLInformationTransfer-v1700-IEs.c +NR_DL-PPW-ID-r17.c +NR_DL-PPW-PeriodicityAndStartSlot-r17.c +NR_DL-PPW-PreConfig-r17.c +NR_DL-PPW-PreConfigToAddModList-r17.c +NR_DL-PPW-PreConfigToReleaseList-r17.c +NR_DL-PRS-Info-r16.c +NR_DL-PRS-QCL-Info-r17.c +NR_DL-UM-RLC.c +NR_DL-UM-RLC-v1700.c +NR_DMRS-BundlingPUCCH-Config-r17.c +NR_DMRS-BundlingPUSCH-Config-r17.c +NR_DMRS-DownlinkConfig.c +NR_DMRS-UplinkConfig.c +NR_DMRS-UplinkTransformPrecoding-r16.c +NR_DormancyGroupID-r16.c +NR_DormantBWP-Config-r16.c +NR_DownlinkConfigCommon.c +NR_DownlinkConfigCommonSIB.c +NR_DownlinkHARQ-FeedbackDisabled-r17.c +NR_DownlinkPreemption.c +NR_DRB-CountInfo.c +NR_DRB-CountInfoList.c +NR_DRB-CountMSB-Info.c +NR_DRB-CountMSB-InfoList.c +NR_DRB-Identity.c +NR_DRB-ToAddMod.c +NR_DRB-ToAddModList.c +NR_DRB-ToReleaseList.c +NR_DRX-Config.c +NR_DRX-ConfigExt-v1700.c +NR_DRX-ConfigPTM-Index-r17.c +NR_DRX-ConfigPTM-r17.c +NR_DRX-ConfigSecondaryGroup-r16.c +NR_DRX-ConfigSL-r17.c +NR_DRX-Info2.c +NR_DRX-Info.c +NR_DRX-PreferenceConfig-r16.c +NR_DRX-Preference-r16.c +NR_DummyA.c +NR_DummyB.c +NR_DummyC.c +NR_DummyD.c +NR_DummyE.c +NR_DummyF.c +NR_DummyG.c +NR_DummyH.c +NR_DummyI.c +NR_DummyJ.c +NR_DummyPathlossReferenceRS-v1710.c +NR_Dummy-TDRA-List.c +NR_EphemerisInfo-r17.c +NR_EpochTime-r17.c +NR_EstablishmentCause.c +NR_EthernetHeaderCompression-r16.c +NR_EUTRA-AllowedMeasBandwidth.c +NR_EUTRA-Cell.c +NR_EUTRA-CellIndex.c +NR_EUTRA-CellIndexList.c +NR_EUTRA-ExcludedCell.c +NR_EUTRA-FreqExcludedCellList.c +NR_EUTRA-FreqNeighCellInfo.c +NR_EUTRA-FreqNeighCellList.c +NR_EUTRA-FreqNeighHSDN-CellList-r17.c +NR_EUTRA-MBSFN-SubframeConfig.c +NR_EUTRA-MBSFN-SubframeConfigList.c +NR_EUTRA-MultiBandInfo.c +NR_EUTRA-MultiBandInfoList.c +NR_EUTRA-NS-PmaxList.c +NR_EUTRA-NS-PmaxValue.c +NR_EUTRA-Parameters.c +NR_EUTRA-ParametersCommon.c +NR_EUTRA-ParametersXDD-Diff.c +NR_EUTRA-PhysCellId.c +NR_EUTRA-PhysCellIdRange.c +NR_EUTRA-PresenceAntennaPort1.c +NR_EUTRA-Q-OffsetRange.c +NR_EUTRA-RSTD-Info.c +NR_EUTRA-RSTD-InfoList.c +NR_EventTriggerConfig.c +NR_EventTriggerConfigInterRAT.c +NR_EventTriggerConfigNR-SL-r16.c +NR_EventType-r16.c +NR_ExcessDelay-DRB-IdentityInfo-r17.c +NR_ExtendedPagingCycle-r17.c +NR_FailureInfoDAPS-r16.c +NR_FailureInfoRLC-Bearer.c +NR_FailureInformation.c +NR_FailureInformation-IEs.c +NR_FailureInformation-v1610-IEs.c +NR_FailureReportMCG-r16.c +NR_FailureReportSCG.c +NR_FailureReportSCG-EUTRA.c +NR_FDM-TDM-r16.c +NR_FeatureCombinationPreambles-r17.c +NR_FeatureCombination-r17.c +NR_FeaturePriority-r17.c +NR_FeatureSet.c +NR_FeatureSetCombination.c +NR_FeatureSetCombinationId.c +NR_FeatureSetDownlink.c +NR_FeatureSetDownlinkId.c +NR_FeatureSetDownlinkPerCC.c +NR_FeatureSetDownlinkPerCC-Id.c +NR_FeatureSetDownlinkPerCC-v1620.c +NR_FeatureSetDownlinkPerCC-v1700.c +NR_FeatureSetDownlinkPerCC-v1720.c +NR_FeatureSetDownlinkPerCC-v1730.c +NR_FeatureSetDownlink-v1540.c +NR_FeatureSetDownlink-v15a0.c +NR_FeatureSetDownlink-v1610.c +NR_FeatureSetDownlink-v1700.c +NR_FeatureSetDownlink-v1720.c +NR_FeatureSetDownlink-v1730.c +NR_FeatureSetEntryIndex.c +NR_FeatureSetEUTRA-DownlinkId.c +NR_FeatureSetEUTRA-UplinkId.c +NR_FeatureSets.c +NR_FeatureSetsPerBand.c +NR_FeatureSetUplink.c +NR_FeatureSetUplinkId.c +NR_FeatureSetUplinkPerCC.c +NR_FeatureSetUplinkPerCC-Id.c +NR_FeatureSetUplinkPerCC-v1540.c +NR_FeatureSetUplinkPerCC-v1700.c +NR_FeatureSetUplink-v1540.c +NR_FeatureSetUplink-v1610.c +NR_FeatureSetUplink-v1630.c +NR_FeatureSetUplink-v1640.c +NR_FeatureSetUplink-v1710.c +NR_FeatureSetUplink-v1720.c +NR_FilterCoefficient.c +NR_FilterConfig.c +NR_FilterConfigCLI-r16.c +NR_FR2-2-AccessParamsPerBand-r17.c +NR_FreqBandIndicatorEUTRA.c +NR_FreqBandIndicatorNR.c +NR_FreqBandInformation.c +NR_FreqBandInformationEUTRA.c +NR_FreqBandInformationNR.c +NR_FreqBandList.c +NR_FreqPriorityDedicatedSlicing-r17.c +NR_FreqPriorityEUTRA.c +NR_FreqPriorityListDedicatedSlicing-r17.c +NR_FreqPriorityListEUTRA.c +NR_FreqPriorityListNR.c +NR_FreqPriorityListSlicing-r17.c +NR_FreqPriorityNR.c +NR_FreqPrioritySlicing-r17.c +NR_FreqSeparationClass.c +NR_FreqSeparationClassDL-Only-r16.c +NR_FreqSeparationClassDL-v1620.c +NR_FreqSeparationClassUL-v1620.c +NR_FrequencyComponent-r17.c +NR_FrequencyConfig-NR-r16.c +NR_FrequencyHoppingOffsetListsDCI-0-2-r16.c +NR_FrequencyInfoDL.c +NR_FrequencyInfoDL-SIB.c +NR_FrequencyInfoUL.c +NR_FrequencyInfoUL-SIB.c +NR_FR-Info.c +NR_FR-InfoList.c +NR_GapConfig.c +NR_GapConfig-r17.c +NR_GapPriority-r17.c +NR_GeneralParametersMRDC-v1610.c +NR_GeneralParametersMRDC-XDD-Diff.c +NR_GIN-Element-r17.c +NR_GINs-PerSNPN-r17.c +NR_GNSS-ID-r16.c +NR_GoodServingCellEvaluation-r17.c +NR_GroupB-ConfiguredTwoStepRA-r16.c +NR_GuardBand-r16.c +NR_HandoverCommand.c +NR_HandoverCommand-IEs.c +NR_HandoverPreparationInformation.c +NR_HandoverPreparationInformation-IEs.c +NR_HighSpeedConfigFR2-r17.c +NR_HighSpeedConfig-r16.c +NR_HighSpeedConfig-v1700.c +NR_HighSpeedParameters-r16.c +NR_HighSpeedParameters-v1650.c +NR_HighSpeedParameters-v1700.c +NR_HRNN-List-r16.c +NR_HRNN-r16.c +NR_Hysteresis.c +NR_HysteresisLocation-r17.c +NR_IAB-IP-AddressAndTraffic-r16.c +NR_IAB-IP-AddressConfigurationList-r16.c +NR_IAB-IP-AddressConfiguration-r16.c +NR_IAB-IP-AddressIndex-r16.c +NR_IAB-IP-AddressNumReq-r16.c +NR_IAB-IP-AddressPrefixReq-r16.c +NR_IAB-IP-Address-r16.c +NR_IAB-IP-PrefixAndTraffic-r16.c +NR_IAB-IP-Usage-r16.c +NR_IABOtherInformation-r16.c +NR_IABOtherInformation-r16-IEs.c +NR_IAB-ResourceConfigID-r17.c +NR_IAB-ResourceConfig-r17.c +NR_IDC-AssistanceConfig-r16.c +NR_IDC-Assistance-r16.c +NR_IMS-Parameters.c +NR_IMS-ParametersCommon.c +NR_IMS-ParametersFR2-2-r17.c +NR_IMS-ParametersFRX-Diff.c +NR_IMS-Parameters-v1700.c +NR_InitialUE-Identity.c +NR_INT-ConfigurationPerServingCell.c +NR_IntegrityProtAlgorithm.c +NR_InterFreqAllowedCellList-r16.c +NR_InterFreqCAG-CellListPerPLMN-r16.c +NR_InterFreqCarrierFreqInfo.c +NR_InterFreqCarrierFreqInfo-v1610.c +NR_InterFreqCarrierFreqInfo-v1700.c +NR_InterFreqCarrierFreqInfo-v1720.c +NR_InterFreqCarrierFreqInfo-v1730.c +NR_InterFreqCarrierFreqList.c +NR_InterFreqCarrierFreqList-v1610.c +NR_InterFreqCarrierFreqList-v1700.c +NR_InterFreqCarrierFreqList-v1720.c +NR_InterFreqCarrierFreqList-v1730.c +NR_InterFreqExcludedCellList.c +NR_InterFreqNeighCellInfo.c +NR_InterFreqNeighCellInfo-v1610.c +NR_InterFreqNeighCellInfo-v1710.c +NR_InterFreqNeighCellList.c +NR_InterFreqNeighCellList-v1610.c +NR_InterFreqNeighCellList-v1710.c +NR_InterFreqNeighHSDN-CellList-r17.c +NR_InterFreqTargetInfo-r16.c +NR_InterRAT-Parameters.c +NR_IntraBandCC-Combination-r17.c +NR_IntraBandCC-CombinationReqList-r17.c +NR_IntraBandPowerClass-r16.c +NR_IntraCellGuardBandsPerSCS-r16.c +NR_IntraFreqAllowedCellList-r16.c +NR_IntraFreqCAG-CellListPerPLMN-r16.c +NR_IntraFreqExcludedCellList.c +NR_IntraFreqNeighCellInfo.c +NR_IntraFreqNeighCellInfo-v1610.c +NR_IntraFreqNeighCellInfo-v1710.c +NR_IntraFreqNeighCellList.c +NR_IntraFreqNeighCellList-v1610.c +NR_IntraFreqNeighCellList-v1710.c +NR_IntraFreqNeighHSDN-CellList-r17.c +NR_InvalidSymbolPattern-r16.c +NR_I-RNTI-Value.c +NR_LBT-FailureRecoveryConfig-r16.c +NR_LocationAndBandwidthBroadcast-r17.c +NR_LocationInfo-r16.c +NR_LocationMeasurementIndication.c +NR_LocationMeasurementIndication-IEs.c +NR_LocationMeasurementInfo.c +NR_LoggedEventTriggerConfig-r16.c +NR_LoggedMeasurementConfiguration-r16.c +NR_LoggedMeasurementConfiguration-r16-IEs.c +NR_LoggedMeasurementConfiguration-v1700-IEs.c +NR_LoggedPeriodicalReportConfig-r16.c +NR_LoggingDuration-r16.c +NR_LoggingInterval-r16.c +NR_LogicalChannelConfig.c +NR_LogicalChannelIdentity.c +NR_LogicalChannelIdentityExt-r17.c +NR_LogMeasInfoList-r16.c +NR_LogMeasInfo-r16.c +NR_LogMeasReport-r16.c +NR_LogMeasResultBT-r16.c +NR_LogMeasResultListBT-r16.c +NR_LogMeasResultListWLAN-r16.c +NR_LogMeasResultWLAN-r16.c +NR_LTE-CRS-PatternList-r16.c +NR_LTE-NeighCellsCRS-AssistInfoList-r17.c +NR_LTE-NeighCellsCRS-AssistInfo-r17.c +NR_MAC-CellGroupConfig.c +NR_MAC-MainConfigSL-r16.c +NR_MAC-Parameters.c +NR_MAC-ParametersCommon.c +NR_MAC-ParametersFR2-2-r17.c +NR_MAC-ParametersFRX-Diff-r16.c +NR_MAC-ParametersSidelinkCommon-r16.c +NR_MAC-ParametersSidelink-r16.c +NR_MAC-ParametersSidelink-r17.c +NR_MAC-ParametersSidelinkXDD-Diff-r16.c +NR_MAC-Parameters-v1610.c +NR_MAC-Parameters-v1700.c +NR_MAC-ParametersXDD-Diff.c +NR_MasterInformationBlockSidelink.c +NR_MasterKeyUpdate.c +NR_MaxBW-PreferenceConfig-r16.c +NR_MaxBW-PreferenceFR2-2-r17.c +NR_MaxBW-Preference-r16.c +NR_MaxCC-PreferenceConfig-r16.c +NR_MaxCC-Preference-r16.c +NR_MaxMIMO-LayerPreferenceConfig-r16.c +NR_MaxMIMO-LayerPreferenceFR2-2-r17.c +NR_MaxMIMO-LayerPreference-r16.c +NR_MaxMIMO-LayersDCI-0-2-r16.c +NR_MaxMIMO-LayersDL-r16.c +NR_MBSBroadcastConfiguration-r17.c +NR_MBSBroadcastConfiguration-r17-IEs.c +NR_MBS-FSAI-InterFreqList-r17.c +NR_MBS-FSAI-InterFreq-r17.c +NR_MBS-FSAI-List-r17.c +NR_MBS-FSAI-r17.c +NR_MBSInterestIndication-r17.c +NR_MBSInterestIndication-r17-IEs.c +NR_MBS-NeighbourCellList-r17.c +NR_MBS-NeighbourCell-r17.c +NR_MBS-Parameters-r17.c +NR_MBS-RNTI-SpecificConfigId-r17.c +NR_MBS-RNTI-SpecificConfig-r17.c +NR_MBS-ServiceInfo-r17.c +NR_MBS-ServiceList-r17.c +NR_MBS-SessionInfoList-r17.c +NR_MBS-SessionInfo-r17.c +NR_MCC.c +NR_MCCH-Config-r17.c +NR_MCCH-Message-r17.c +NR_MCCH-MessageType-r17.c +NR_MCCH-RepetitionPeriodAndOffset-r17.c +NR_MCC-MNC-Digit.c +NR_MCGFailureInformation-r16.c +NR_MCGFailureInformation-r16-IEs.c +NR_MeasAndMobParameters.c +NR_MeasAndMobParametersCommon.c +NR_MeasAndMobParametersFR2-2-r17.c +NR_MeasAndMobParametersFRX-Diff.c +NR_MeasAndMobParametersMRDC.c +NR_MeasAndMobParametersMRDC-Common.c +NR_MeasAndMobParametersMRDC-Common-v1610.c +NR_MeasAndMobParametersMRDC-Common-v1700.c +NR_MeasAndMobParametersMRDC-Common-v1730.c +NR_MeasAndMobParametersMRDC-FRX-Diff.c +NR_MeasAndMobParametersMRDC-v1560.c +NR_MeasAndMobParametersMRDC-v1610.c +NR_MeasAndMobParametersMRDC-v1700.c +NR_MeasAndMobParametersMRDC-v1730.c +NR_MeasAndMobParametersMRDC-XDD-Diff.c +NR_MeasAndMobParametersMRDC-XDD-Diff-v1560.c +NR_MeasAndMobParameters-v1700.c +NR_MeasAndMobParametersXDD-Diff.c +NR_MeasConfigAppLayerId-r17.c +NR_MeasConfigAppLayer-r17.c +NR_MeasConfig.c +NR_MeasConfigMN.c +NR_MeasConfigSN.c +NR_MeasGapConfig.c +NR_MeasGapId-r17.c +NR_MeasGapSharingConfig.c +NR_MeasGapSharingScheme.c +NR_MeasId.c +NR_MeasIdleCarrierEUTRA-r16.c +NR_MeasIdleCarrierNR-r16.c +NR_MeasIdleConfigDedicated-r16.c +NR_MeasIdleConfigSIB-r16.c +NR_MeasIdToAddMod.c +NR_MeasIdToAddModList.c +NR_MeasIdToRemoveList.c +NR_MeasObjectCLI-r16.c +NR_MeasObjectEUTRA.c +NR_MeasObjectId.c +NR_MeasObjectNR.c +NR_MeasObjectNR-SL-r16.c +NR_MeasObjectRxTxDiff-r17.c +NR_MeasObjectToAddMod.c +NR_MeasObjectToAddModList.c +NR_MeasObjectToRemoveList.c +NR_MeasObjectUTRA-FDD-r16.c +NR_MeasPosPreConfigGapId-r17.c +NR_MeasQuantityResults.c +NR_MeasQuantityResultsEUTRA.c +NR_MeasReportAppLayer-r17.c +NR_MeasReportQuantity.c +NR_MeasReportQuantityCLI-r16.c +NR_MeasReportQuantity-r16.c +NR_MeasReportQuantityUTRA-FDD-r16.c +NR_MeasResult2EUTRA.c +NR_MeasResult2EUTRA-r16.c +NR_MeasResult2NR.c +NR_MeasResult2NR-r16.c +NR_MeasResult2UTRA-FDD-r16.c +NR_MeasResultCBR-NR-r16.c +NR_MeasResultCellListSFTD-EUTRA.c +NR_MeasResultCellListSFTD-NR.c +NR_MeasResultCellSFTD-NR.c +NR_MeasResultCLI-r16.c +NR_MeasResultCLI-RSSI-r16.c +NR_MeasResultEUTRA.c +NR_MeasResultFailedCell-r16.c +NR_MeasResultForRSSI-r16.c +NR_MeasResultFreqList.c +NR_MeasResultFreqListFailMRDC.c +NR_MeasResultIdleEUTRA-r16.c +NR_MeasResultIdleNR-r16.c +NR_MeasResultList2EUTRA.c +NR_MeasResultList2EUTRA-r16.c +NR_MeasResultList2NR.c +NR_MeasResultList2NR-r16.c +NR_MeasResultList2UTRA.c +NR_MeasResultListCLI-RSSI-r16.c +NR_MeasResultListEUTRA.c +NR_MeasResultListLogging2NR-r16.c +NR_MeasResultListLoggingNR-r16.c +NR_MeasResultListNR.c +NR_MeasResultListSRS-RSRP-r16.c +NR_MeasResultListUTRA-FDD-r16.c +NR_MeasResultLogging2NR-r16.c +NR_MeasResultLoggingNR-r16.c +NR_MeasResultNR.c +NR_MeasResultNR-SL-r16.c +NR_MeasResultRLFNR-r16.c +NR_MeasResultRxTxTimeDiff-r17.c +NR_MeasResults.c +NR_MeasResultSCG-Failure.c +NR_MeasResultServFreqListEUTRA-SCG.c +NR_MeasResultServFreqListNR-SCG.c +NR_MeasResultServingCell-r16.c +NR_MeasResultServMO.c +NR_MeasResultServMOList.c +NR_MeasResultSFTD-EUTRA.c +NR_MeasResultsPerCarrierIdleEUTRA-r16.c +NR_MeasResultsPerCarrierIdleNR-r16.c +NR_MeasResultsPerCellIdleEUTRA-r16.c +NR_MeasResultsPerCellIdleNR-r16.c +NR_MeasResultSRS-RSRP-r16.c +NR_MeasResultsSL-r16.c +NR_MeasResultSuccessHONR-r17.c +NR_MeasResultUTRA-FDD-r16.c +NR_MeasRSSI-ReportConfig-r16.c +NR_MeasTiming.c +NR_MeasTimingList.c +NR_MeasTriggerQuantity.c +NR_MeasTriggerQuantityCLI-r16.c +NR_MeasTriggerQuantityEUTRA.c +NR_MeasTriggerQuantityOffset.c +NR_MeasTriggerQuantityUTRA-FDD-r16.c +NR_MeasurementReportAppLayerList-r17.c +NR_MeasurementReportAppLayer-r17.c +NR_MeasurementReportAppLayer-r17-IEs.c +NR_MeasurementReport.c +NR_MeasurementReport-IEs.c +NR_MeasurementReportSidelink.c +NR_MeasurementReportSidelink-r16-IEs.c +NR_MeasurementTimingConfiguration.c +NR_MeasurementTimingConfiguration-IEs.c +NR_MeasurementTimingConfiguration-v1550-IEs.c +NR_MeasurementTimingConfiguration-v1610-IEs.c +NR_MIB.c +NR_MIMO-LayersDL.c +NR_MIMO-LayersUL.c +NR_MIMO-ParametersPerBand.c +NR_MIMOParam-r17.c +NR_MinSchedulingOffsetK0-Values-r16.c +NR_MinSchedulingOffsetK0-Values-r17.c +NR_MinSchedulingOffsetK2-Values-r16.c +NR_MinSchedulingOffsetK2-Values-r17.c +NR_MinSchedulingOffsetPreferenceConfig-r16.c +NR_MinSchedulingOffsetPreferenceExt-r17.c +NR_MinSchedulingOffsetPreference-r16.c +NR_MinTimeGapFR2-2-r17.c +NR_MinTimeGap-r16.c +NR_MNC.c +NR_MobilityFromNRCommand.c +NR_MobilityFromNRCommand-IEs.c +NR_MobilityFromNRCommand-v1610-IEs.c +NR_MobilityHistoryReport-r16.c +NR_MobilityStateParameters.c +NR_ModulationOrder.c +NR_MPE-Config-FR2-r16.c +NR_MPE-Config-FR2-r17.c +NR_MPE-ResourceId-r17.c +NR_MPE-Resource-r17.c +NR_MRB-Identity-r17.c +NR_MRB-InfoBroadcast-r17.c +NR_MRB-ListBroadcast-r17.c +NR_MRB-PDCP-ConfigBroadcast-r17.c +NR_MRB-RLC-ConfigBroadcast-r17.c +NR_MRB-ToAddModList-r17.c +NR_MRB-ToAddMod-r17.c +NR_MRB-ToReleaseList-r17.c +NR_MRDC-AssistanceInfo.c +NR_MRDC-Parameters.c +NR_MRDC-Parameters-v1580.c +NR_MRDC-Parameters-v1590.c +NR_MRDC-Parameters-v15g0.c +NR_MRDC-Parameters-v1620.c +NR_MRDC-Parameters-v1630.c +NR_MRDC-Parameters-v1700.c +NR_MRDC-SecondaryCellGroupConfig.c +NR_MsgA-ConfigCommon-r16.c +NR_MsgA-DMRS-Config-r16.c +NR_MsgA-PUSCH-Config-r16.c +NR_MsgA-PUSCH-Resource-r16.c +NR_MTCH-SSB-MappingWindowCycleOffset-r17.c +NR_MTCH-SSB-MappingWindowIndex-r17.c +NR_MTCH-SSB-MappingWindowList-r17.c +NR_MultiBandInfoListEUTRA.c +NR_MulticastConfig-r17.c +NR_MulticastRLC-BearerConfig-r17.c +NR_MultiDCI-MultiTRP-r16.c +NR_MultiFrequencyBandListNR.c +NR_MultiFrequencyBandListNR-SIB.c +NR_MultiPDSCH-TDRA-List-r17.c +NR_MultiPDSCH-TDRA-r17.c +NR_MUSIM-Assistance-r17.c +NR_MUSIM-GapAssistanceConfig-r17.c +NR_MUSIM-GapConfig-r17.c +NR_MUSIM-GapId-r17.c +NR_MUSIM-GapInfo-r17.c +NR_MUSIM-GapPreferenceList-r17.c +NR_MUSIM-Gap-r17.c +NR_MUSIM-LeaveAssistanceConfig-r17.c +NR_MUSIM-Starting-SFN-AndSubframe-r17.c +NR_NAICS-Capability-Entry.c +NR_NeedForGapNCSG-ConfigEUTRA-r17.c +NR_NeedForGapNCSG-ConfigNR-r17.c +NR_NeedForGapNCSG-InfoEUTRA-r17.c +NR_NeedForGapNCSG-InfoNR-r17.c +NR_NeedForGapsBandListNR-r16.c +NR_NeedForGapsConfigNR-r16.c +NR_NeedForGapsInfoNR-r16.c +NR_NeedForGapsIntraFreqList-r16.c +NR_NeedForGapsIntraFreq-r16.c +NR_NeedForGapsNR-r16.c +NR_NeedForNCSG-BandListNR-r17.c +NR_NeedForNCSG-EUTRA-r17.c +NR_NeedForNCSG-IntraFreqList-r17.c +NR_NeedForNCSG-IntraFreq-r17.c +NR_NeedForNCSG-NR-r17.c +NR_NeighbourCellInfo-r17.c +NR_NextHopChainingCount.c +NR_NG-5G-S-TMSI.c +NR_NID-r16.c +NR_NonCellDefiningSSB-r17.c +NR_NotificationMessageSidelink-r17.c +NR_NotificationMessageSidelink-r17-IEs.c +NR_NPN-IdentityInfoList-r16.c +NR_NPN-IdentityInfo-r16.c +NR_NPN-Identity-r16.c +NR_NRDC-Parameters.c +NR_NRDC-Parameters-v1570.c +NR_NRDC-Parameters-v15c0.c +NR_NRDC-Parameters-v1610.c +NR_NRDC-Parameters-v1700.c +NR_NR-DL-PRS-PDC-Info-r17.c +NR_NR-DL-PRS-PDC-ResourceSet-r17.c +NR_NR-DL-PRS-Periodicity-and-ResourceSetSlotOffset-r17.c +NR_NR-DL-PRS-ResourceID-r17.c +NR_NR-DL-PRS-Resource-r17.c +NR_NR-FreqInfo.c +NR_NR-MultiBandInfo.c +NR_NR-NS-PmaxList.c +NR_NR-NS-PmaxValue.c +NR_NR-PRS-MeasurementInfoList-r16.c +NR_NR-PRS-MeasurementInfo-r16.c +NR_NR-RS-Type.c +NR_NR-TimeStamp-r17.c +NR_NSAG-IdentityInfo-r17.c +NR_NSAG-ID-r17.c +NR_NSAG-List-r17.c +NR_NTN-Config-r17.c +NR_NTN-NeighCellConfigList-r17.c +NR_NTN-NeighCellConfig-r17.c +NR_NTN-Parameters-r17.c +NR_NumberOfCarriers.c +NR_NumberOfMsg3-Repetitions-r17.c +NR_NZP-CSI-RS-Pairing-r17.c +NR_NZP-CSI-RS-Resource.c +NR_NZP-CSI-RS-ResourceId.c +NR_NZP-CSI-RS-ResourceSet.c +NR_NZP-CSI-RS-ResourceSetId.c +NR_OffsetValue-r17.c +NR_OLPC-SRS-Pos-r16.c +NR_OnDemandSIB-Request-r16.c +NR_Orbital-r17.c +NR_OtherConfig.c +NR_OtherConfig-v1540.c +NR_OtherConfig-v1610.c +NR_OtherConfig-v1700.c +NR_OutsideActiveTimeConfig-r16.c +NR_OverheatingAssistance.c +NR_OverheatingAssistanceConfig.c +NR_OverheatingAssistance-r17.c +NR_P0AlphaSet-r17.c +NR_P0-PUCCH.c +NR_P0-PUCCH-Id.c +NR_P0-PUSCH-AlphaSet.c +NR_P0-PUSCH-AlphaSetId.c +NR_P0-PUSCH-r16.c +NR_P0-PUSCH-SetId-r16.c +NR_P0-PUSCH-Set-r16.c +NR_Paging.c +NR_PagingCycle.c +NR_PagingGroupList-r17.c +NR_PagingRecord.c +NR_PagingRecordList.c +NR_PagingRecordList-v1700.c +NR_PagingRecord-v1700.c +NR_PagingUE-Identity.c +NR_Paging-v1700-IEs.c +NR_PathlossReferenceRS-Config.c +NR_PathlossReferenceRS-Id-r17.c +NR_PathlossReferenceRSList-r16.c +NR_PathlossReferenceRS-r16.c +NR_PathlossReferenceRS-r17.c +NR_PathlossReferenceRSs-v1610.c +NR_PCCH-Config.c +NR_PCCH-Message.c +NR_PCCH-MessageType.c +NR_PCI-ARFCN-EUTRA-r16.c +NR_PCI-ARFCN-NR-r16.c +NR_PCI-List.c +NR_PCI-Range.c +NR_PCI-RangeElement.c +NR_PCI-RangeIndex.c +NR_PCI-RangeIndexList.c +NR_PDCCH-BlindDetection2-r16.c +NR_PDCCH-BlindDetection3-r16.c +NR_PDCCH-BlindDetection.c +NR_PDCCH-BlindDetectionCA-CombIndicator-r16.c +NR_PDCCH-BlindDetectionCA-CombIndicator-r17.c +NR_PDCCH-BlindDetectionCA-Mixed1-r17.c +NR_PDCCH-BlindDetectionCA-MixedExt-r16.c +NR_PDCCH-BlindDetectionCA-Mixed-r17.c +NR_PDCCH-BlindDetectionCG-UE-Mixed1-r17.c +NR_PDCCH-BlindDetectionCG-UE-MixedExt-r16.c +NR_PDCCH-BlindDetectionCG-UE-Mixed-r17.c +NR_PDCCH-BlindDetectionMCG-SCG-r17.c +NR_PDCCH-BlindDetectionMixed1-r17.c +NR_PDCCH-BlindDetectionMixedList-r16.c +NR_PDCCH-BlindDetectionMixed-r17.c +NR_PDCCH-Config.c +NR_PDCCH-ConfigCommon.c +NR_PDCCH-ConfigSIB1.c +NR_PDCCH-MonitoringOccasions-r16.c +NR_PDCCH-RepetitionParameters-r17.c +NR_PDCCH-ServingCellConfig.c +NR_PDCP-Config.c +NR_PDCP-Parameters.c +NR_PDCP-ParametersMRDC.c +NR_PDCP-ParametersMRDC-v1610.c +NR_PDCP-ParametersSidelink-r16.c +NR_PDSCH-CodeBlockGroupTransmission.c +NR_PDSCH-CodeBlockGroupTransmissionList-r16.c +NR_PDSCH-ConfigBroadcast-r17.c +NR_PDSCH-Config.c +NR_PDSCH-ConfigCommon.c +NR_PDSCH-ConfigIndex-r17.c +NR_PDSCH-ConfigPTM-r17.c +NR_PDSCH-HARQ-ACK-CodebookList-r16.c +NR_PDSCH-HARQ-ACK-EnhType3Index-r17.c +NR_PDSCH-HARQ-ACK-EnhType3-r17.c +NR_PDSCH-ServingCellConfig.c +NR_PDSCH-TimeDomainResourceAllocation.c +NR_PDSCH-TimeDomainResourceAllocationList.c +NR_PDSCH-TimeDomainResourceAllocationList-r16.c +NR_PDSCH-TimeDomainResourceAllocation-r16.c +NR_PDU-SessionID.c +NR_PEI-Config-r17.c +NR_PeriodicalReportConfig.c +NR_PeriodicalReportConfigInterRAT.c +NR_PeriodicalReportConfigNR-SL-r16.c +NR_PeriodicRNAU-TimerValue.c +NR_PerRAAttemptInfoList-r16.c +NR_PerRAAttemptInfo-r16.c +NR_PerRACSI-RSInfo-r16.c +NR_PerRACSI-RSInfo-v1660.c +NR_PerRAInfoList-r16.c +NR_PerRAInfoList-v1660.c +NR_PerRAInfo-r16.c +NR_PerRASSBInfo-r16.c +NR_PH-InfoMCG.c +NR_PH-InfoSCG.c +NR_PHR-Config.c +NR_PH-TypeListMCG.c +NR_PH-TypeListSCG.c +NR_PH-UplinkCarrierMCG.c +NR_PH-UplinkCarrierSCG.c +NR_Phy-Parameters.c +NR_Phy-ParametersCommon.c +NR_Phy-ParametersCommon-v16a0.c +NR_Phy-ParametersFR1.c +NR_Phy-ParametersFR2.c +NR_Phy-ParametersFRX-Diff.c +NR_Phy-ParametersMRDC.c +NR_Phy-ParametersSharedSpectrumChAccess-r16.c +NR_Phy-Parameters-v16a0.c +NR_Phy-ParametersXDD-Diff.c +NR_PhysCellId.c +NR_PhysCellIdUTRA-FDD-r16.c +NR_PhysicalCellGroupConfig.c +NR_PLMN-Identity.c +NR_PLMN-Identity-EUTRA-5GC.c +NR_PLMN-IdentityInfo.c +NR_PLMN-IdentityInfoList.c +NR_PLMN-IdentityList2-r16.c +NR_PLMN-IdentityList-EUTRA-5GC.c +NR_PLMN-IdentityList-EUTRA-EPC.c +NR_PLMN-IdentityList-r16.c +NR_PLMN-RAN-AreaCell.c +NR_PLMN-RAN-AreaCellList.c +NR_PLMN-RAN-AreaConfig.c +NR_PLMN-RAN-AreaConfigList.c +NR_P-Max.c +NR_PollByte.c +NR_PollPDU.c +NR_PortIndex2.c +NR_PortIndex4.c +NR_PortIndex8.c +NR_PortIndexFor8Ranks.c +NR_PosGapConfig-r17.c +NR_PositionStateVector-r17.c +NR_PositionVelocity-r17.c +NR_PosMeasGapPreConfigToAddModList-r17.c +NR_PosMeasGapPreConfigToReleaseList-r17.c +NR_PosSchedulingInfo-r16.c +NR_PosSIB-MappingInfo-r16.c +NR_PosSIB-ReqInfo-r16.c +NR_PosSIB-Type-r16.c +NR_PosSI-SchedulingInfo-r16.c +NR_PosSRS-RRC-Inactive-OutsideInitialUL-BWP-r17.c +NR_PosSystemInformation-r16-IEs.c +NR_PowSav-ParametersCommon-r16.c +NR_PowSav-ParametersFR2-2-r17.c +NR_PowSav-ParametersFRX-Diff-r16.c +NR_PowSav-Parameters-r16.c +NR_PowSav-Parameters-v1700.c +NR_PRACH-ResourceDedicatedBFR.c +NR_PRB-Id.c +NR_ProcessingParameters.c +NR_PropagationDelayDifference-r17.c +NR_PropDelayDiffReportConfig-r17.c +NR_PRS-ProcessingCapabilityOutsideMGinPPWperType-r17.c +NR_PTRS-DensityRecommendationDL.c +NR_PTRS-DensityRecommendationUL.c +NR_PTRS-DownlinkConfig.c +NR_PTRS-UplinkConfig.c +NR_PUCCH-Config.c +NR_PUCCH-ConfigCommon.c +NR_PUCCH-ConfigurationList-r16.c +NR_PUCCH-CSI-Resource.c +NR_PUCCH-format0.c +NR_PUCCH-format1.c +NR_PUCCH-format2.c +NR_PUCCH-format3.c +NR_PUCCH-format4.c +NR_PUCCH-FormatConfig.c +NR_PUCCH-FormatConfigExt-r17.c +NR_PUCCH-Group-Config-r17.c +NR_PUCCH-Grp-CarrierTypes-r16.c +NR_PUCCH-MaxCodeRate.c +NR_PUCCH-PathlossReferenceRS.c +NR_PUCCH-PathlossReferenceRS-Id.c +NR_PUCCH-PathlossReferenceRS-Id-r17.c +NR_PUCCH-PathlossReferenceRS-Id-v1610.c +NR_PUCCH-PathlossReferenceRS-r16.c +NR_PUCCH-PowerControl.c +NR_PUCCH-PowerControlSetInfoId-r17.c +NR_PUCCH-PowerControlSetInfo-r17.c +NR_PUCCH-Resource.c +NR_PUCCH-ResourceExt-v1610.c +NR_PUCCH-ResourceGroupId-r16.c +NR_PUCCH-ResourceGroup-r16.c +NR_PUCCH-ResourceId.c +NR_PUCCH-ResourceSet.c +NR_PUCCH-ResourceSetId.c +NR_PUCCH-SpatialRelationInfo.c +NR_PUCCH-SpatialRelationInfoExt-r16.c +NR_PUCCH-SpatialRelationInfoId.c +NR_PUCCH-SpatialRelationInfoId-r16.c +NR_PUCCH-SpatialRelationInfoId-v1610.c +NR_PUCCH-SRS.c +NR_PUCCH-TPC-CommandConfig.c +NR_PUSCH-Allocation-r16.c +NR_PUSCH-CodeBlockGroupTransmission.c +NR_PUSCH-Config.c +NR_PUSCH-ConfigCommon.c +NR_PUSCH-PathlossReferenceRS.c +NR_PUSCH-PathlossReferenceRS-Id.c +NR_PUSCH-PathlossReferenceRS-Id-r17.c +NR_PUSCH-PathlossReferenceRS-Id-v1610.c +NR_PUSCH-PathlossReferenceRS-r16.c +NR_PUSCH-PowerControl.c +NR_PUSCH-PowerControl-v1610.c +NR_PUSCH-ServingCellConfig.c +NR_PUSCH-TimeDomainResourceAllocation.c +NR_PUSCH-TimeDomainResourceAllocationList.c +NR_PUSCH-TimeDomainResourceAllocationList-r16.c +NR_PUSCH-TimeDomainResourceAllocation-r16.c +NR_PUSCH-TPC-CommandConfig.c +NR_QCL-Info.c +NR_QFI.c +NR_Q-OffsetRange.c +NR_Q-OffsetRangeList.c +NR_Q-QualMin.c +NR_Q-RxLevMin.c +NR_QuantityConfig.c +NR_QuantityConfigNR.c +NR_QuantityConfigRS.c +NR_QuantityConfigUTRA-FDD-r16.c +NR_RACH-ConfigCommon.c +NR_RACH-ConfigCommonTwoStepRA-r16.c +NR_RACH-ConfigDedicated.c +NR_RACH-ConfigGeneric.c +NR_RACH-ConfigGenericTwoStepRA-r16.c +NR_RadioBearerConfig.c +NR_RadioLinkMonitoringConfig.c +NR_RadioLinkMonitoringRS.c +NR_RadioLinkMonitoringRS-Id.c +NR_RA-InformationCommon-r16.c +NR_RAN-AreaCode.c +NR_RAN-AreaConfig.c +NR_RangeToBestCell.c +NR_RAN-NotificationAreaInfo.c +NR_RAN-VisibleMeasurements-r17.c +NR_RAN-VisibleParameters-r17.c +NR_RA-Prioritization.c +NR_RA-PrioritizationForSlicing-r17.c +NR_RA-PrioritizationSliceInfoList-r17.c +NR_RA-PrioritizationSliceInfo-r17.c +NR_RA-ReportList-r16.c +NR_RA-Report-r16.c +NR_RateMatchPattern.c +NR_RateMatchPatternGroup.c +NR_RateMatchPatternId.c +NR_RateMatchPatternLTE-CRS.c +NR_RAT-Type.c +NR_RB-SetGroup-r17.c +NR_ReconfigurationWithSync.c +NR_RedCap-ConfigCommonSIB-r17.c +NR_RedCapParameters-r17.c +NR_RedirectedCarrierInfo.c +NR_RedirectedCarrierInfo-EUTRA.c +NR_ReducedAggregatedBandwidth.c +NR_ReducedAggregatedBandwidth-r17.c +NR_ReducedMaxBW-FRx-r16.c +NR_ReducedMaxCCs-r16.c +NR_ReestablishmentCause.c +NR_ReestablishmentInfo.c +NR_ReestabNCellInfo.c +NR_ReestabNCellInfoList.c +NR_ReestabUE-Identity.c +NR_ReferenceLocation-r17.c +NR_ReferenceSignalConfig.c +NR_ReferenceTimeInfo-r16.c +NR_ReferenceTime-r16.c +NR_RegisteredAMF.c +NR_RejectWaitTime.c +NR_RelayParameters-r17.c +NR_RelaysTriggeredList-r17.c +NR_ReleasePreferenceConfig-r16.c +NR_ReleasePreference-r16.c +NR_RemoteUEInformationSidelink-r17.c +NR_RemoteUEInformationSidelink-r17-IEs.c +NR_RepetitionSchemeConfig-r16.c +NR_RepetitionSchemeConfig-v1630.c +NR_RepFactorAndTimeGap-r17.c +NR_ReportCGI.c +NR_ReportCGI-EUTRA.c +NR_ReportConfigId.c +NR_ReportConfigInterRAT.c +NR_ReportConfigNR.c +NR_ReportConfigNR-SL-r16.c +NR_ReportConfigToAddMod.c +NR_ReportConfigToAddModList.c +NR_ReportConfigToRemoveList.c +NR_ReportInterval.c +NR_ReportSFTD-EUTRA.c +NR_ReportSFTD-NR.c +NR_ReportUplinkTxDirectCurrentMoreCarrier-r17.c +NR_ReselectionThreshold.c +NR_ReselectionThresholdQ.c +NR_ResultsPerCSI-RS-Index.c +NR_ResultsPerCSI-RS-IndexList.c +NR_ResultsPerSSB-Index.c +NR_ResultsPerSSB-IndexIdle-r16.c +NR_ResultsPerSSB-IndexList.c +NR_ResultsPerSSB-IndexList-r16.c +NR_ResumeCause.c +NR_RF-Parameters.c +NR_RF-ParametersMRDC.c +NR_RF-ParametersMRDC-v15g0.c +NR_RF-Parameters-v15g0.c +NR_RF-Parameters-v16a0.c +NR_RLC-BearerConfig.c +NR_RLC-Config.c +NR_RLC-Config-v1610.c +NR_RLC-Config-v1700.c +NR_RLC-Parameters.c +NR_RLC-ParametersSidelink-r16.c +NR_RLF-Report-r16.c +NR_RLF-TimersAndConstants.c +NR_RLM-RelaxationReportingConfig-r17.c +NR_RMTC-Config-r16.c +NR_RNTI-Value.c +NR_RRC-PosSystemInfoRequest-r16-IEs.c +NR_RRCReconfiguration.c +NR_RRCReconfigurationComplete.c +NR_RRCReconfigurationComplete-IEs.c +NR_RRCReconfigurationCompleteSidelink.c +NR_RRCReconfigurationCompleteSidelink-r16-IEs.c +NR_RRCReconfigurationCompleteSidelink-v1710-IEs.c +NR_RRCReconfigurationCompleteSidelink-v1720-IEs.c +NR_RRCReconfigurationComplete-v1530-IEs.c +NR_RRCReconfigurationComplete-v1560-IEs.c +NR_RRCReconfigurationComplete-v1610-IEs.c +NR_RRCReconfigurationComplete-v1640-IEs.c +NR_RRCReconfigurationComplete-v1700-IEs.c +NR_RRCReconfigurationComplete-v1720-IEs.c +NR_RRCReconfigurationFailureSidelink.c +NR_RRCReconfigurationFailureSidelink-r16-IEs.c +NR_RRCReconfiguration-IEs.c +NR_RRCReconfigurationSidelink.c +NR_RRCReconfigurationSidelink-r16-IEs.c +NR_RRCReconfigurationSidelink-v1700-IEs.c +NR_RRCReconfiguration-v1530-IEs.c +NR_RRCReconfiguration-v1540-IEs.c +NR_RRCReconfiguration-v1560-IEs.c +NR_RRCReconfiguration-v1610-IEs.c +NR_RRCReconfiguration-v1700-IEs.c +NR_RRCReestablishment.c +NR_RRCReestablishmentComplete.c +NR_RRCReestablishmentComplete-IEs.c +NR_RRCReestablishmentComplete-v1610-IEs.c +NR_RRCReestablishment-IEs.c +NR_RRCReestablishmentRequest.c +NR_RRCReestablishmentRequest-IEs.c +NR_RRCReestablishment-v1700-IEs.c +NR_RRCReject.c +NR_RRCReject-IEs.c +NR_RRCRelease.c +NR_RRCRelease-IEs.c +NR_RRCRelease-v1540-IEs.c +NR_RRCRelease-v1610-IEs.c +NR_RRCRelease-v1650-IEs.c +NR_RRCRelease-v1710-IEs.c +NR_RRCResume.c +NR_RRCResumeComplete.c +NR_RRCResumeComplete-IEs.c +NR_RRCResumeComplete-v1610-IEs.c +NR_RRCResumeComplete-v1640-IEs.c +NR_RRCResumeComplete-v1700-IEs.c +NR_RRCResumeComplete-v1720-IEs.c +NR_RRCResume-IEs.c +NR_RRCResumeRequest1.c +NR_RRCResumeRequest1-IEs.c +NR_RRCResumeRequest.c +NR_RRCResumeRequest-IEs.c +NR_RRCResume-v1560-IEs.c +NR_RRCResume-v1610-IEs.c +NR_RRCResume-v1700-IEs.c +NR_RRCSetup.c +NR_RRCSetupComplete.c +NR_RRCSetupComplete-IEs.c +NR_RRCSetupComplete-v1610-IEs.c +NR_RRCSetupComplete-v1690-IEs.c +NR_RRCSetupComplete-v1700-IEs.c +NR_RRCSetup-IEs.c +NR_RRCSetupRequest.c +NR_RRCSetupRequest-IEs.c +NR_RRCSetup-v1700-IEs.c +NR_RRCSystemInfoRequest.c +NR_RRCSystemInfoRequest-IEs.c +NR_RRC-TransactionIdentifier.c +NR_RRM-Config.c +NR_RRM-MeasRelaxationReportingConfig-r17.c +NR_RSRP-ChangeThreshold-r17.c +NR_RSRP-Range.c +NR_RSRP-RangeEUTRA.c +NR_RSRQ-Range.c +NR_RSRQ-RangeEUTRA.c +NR_RSRQ-RangeEUTRA-r16.c +NR_RSSI-PeriodicityAndOffset-r16.c +NR_RSSI-Range-r16.c +NR_RSSI-ResourceConfigCLI-r16.c +NR_RSSI-ResourceId-r16.c +NR_RSSI-ResourceListConfigCLI-r16.c +NR_RxTxPeriodical-r17.c +NR_RxTxReportInterval-r17.c +NR_RxTxTimeDiff-r17.c +NR_SBAS-ID-r16.c +NR_SBCCH-SL-BCH-Message.c +NR_SBCCH-SL-BCH-MessageType.c +NR_ScalingFactorSidelink-r16.c +NR_SCCH-Message.c +NR_SCCH-MessageType.c +NR_SCellActivationRS-ConfigId-r17.c +NR_SCellActivationRS-Config-r17.c +NR_SCellConfig.c +NR_SCellIndex.c +NR_SCellSIB20-r17.c +NR_SCG-DeactivationPreferenceConfig-r17.c +NR_SCGFailureInformation.c +NR_SCGFailureInformationEUTRA.c +NR_SCGFailureInformationEUTRA-IEs.c +NR_SCGFailureInformationEUTRA-v1590-IEs.c +NR_SCGFailureInformation-IEs.c +NR_SCGFailureInformation-v1590-IEs.c +NR_SchedulingInfo2-r17.c +NR_SchedulingInfo.c +NR_SchedulingRequestConfig.c +NR_SchedulingRequestConfig-v1700.c +NR_SchedulingRequestId.c +NR_SchedulingRequestResourceConfig.c +NR_SchedulingRequestResourceConfigExt-v1610.c +NR_SchedulingRequestResourceConfigExt-v1700.c +NR_SchedulingRequestResourceId.c +NR_SchedulingRequestToAddMod.c +NR_SchedulingRequestToAddModExt-v1700.c +NR_ScramblingId.c +NR_SCS-SpecificCarrier.c +NR_SCS-SpecificDuration-r17.c +NR_SDAP-Config.c +NR_SDAP-Parameters.c +NR_SDT-CG-Config-r17.c +NR_SDT-ConfigCommonSIB-r17.c +NR_SDT-Config-r17.c +NR_SDT-MAC-PHY-CG-Config-r17.c +NR_SearchSpace.c +NR_SearchSpaceExt-r16.c +NR_SearchSpaceExt-v1700.c +NR_SearchSpaceId.c +NR_SearchSpaceSwitchConfig-r16.c +NR_SearchSpaceSwitchConfig-r17.c +NR_SearchSpaceSwitchTrigger-r16.c +NR_SearchSpaceZero.c +NR_SecurityAlgorithmConfig.c +NR_SecurityConfig.c +NR_SecurityConfigSMC.c +NR_SecurityModeCommand.c +NR_SecurityModeCommand-IEs.c +NR_SecurityModeComplete.c +NR_SecurityModeComplete-IEs.c +NR_SecurityModeFailure.c +NR_SecurityModeFailure-IEs.c +NR_SelectedBandEntriesMN.c +NR_SemiStaticChannelAccessConfig-r16.c +NR_SemiStaticChannelAccessConfigUE-r17.c +NR_Sensor-LocationInfo-r16.c +NR_Sensor-NameList-r16.c +NR_ServCellIndex.c +NR_ServCellInfoListMCG-EUTRA-r16.c +NR_ServCellInfoListMCG-NR-r16.c +NR_ServCellInfoListSCG-EUTRA-r16.c +NR_ServCellInfoListSCG-NR-r16.c +NR_ServCellInfoXCG-EUTRA-r16.c +NR_ServCellInfoXCG-NR-r16.c +NR_ServingAdditionalPCIIndex-r17.c +NR_ServingCellAndBWP-Id-r17.c +NR_ServingCellConfig.c +NR_ServingCellConfigCommon.c +NR_ServingCellConfigCommonSIB.c +NR_SetupRelease.c +NR_SFTD-FrequencyList-EUTRA.c +NR_SFTD-FrequencyList-NR.c +NR_SharedSpectrumChAccessParamsPerBand-r16.c +NR_SharedSpectrumChAccessParamsPerBand-v1630.c +NR_SharedSpectrumChAccessParamsPerBand-v1640.c +NR_SharedSpectrumChAccessParamsPerBand-v1650.c +NR_SharedSpectrumChAccessParamsPerBand-v1710.c +NR_ShortI-RNTI-Value.c +NR_ShortMAC-I.c +NR_SHR-Cause-r17.c +NR_SIB10-r16.c +NR_SIB11-r16.c +NR_SIB12-IEs-r16.c +NR_SIB12-r16.c +NR_SIB13-r16.c +NR_SIB14-r16.c +NR_SIB15-r17.c +NR_SIB16-r17.c +NR_SIB17-IEs-r17.c +NR_SIB17-r17.c +NR_SIB18-r17.c +NR_SIB19-r17.c +NR_SIB1.c +NR_SIB1-v1610-IEs.c +NR_SIB1-v1630-IEs.c +NR_SIB1-v1700-IEs.c +NR_SIB20-r17.c +NR_SIB21-r17.c +NR_SIB2.c +NR_SIB3.c +NR_SIB4.c +NR_SIB5.c +NR_SIB6.c +NR_SIB7.c +NR_SIB8.c +NR_SIB9.c +NR_SIB-Mapping.c +NR_SIB-Mapping-v1700.c +NR_SIBpos-r16.c +NR_SIB-ReqInfo-r16.c +NR_SIB-TypeInfo.c +NR_SIB-TypeInfo-v1700.c +NR_SIB-Type-r17.c +NR_SidelinkParametersEUTRA-r16.c +NR_SidelinkParametersNR-r16.c +NR_SidelinkParameters-r16.c +NR_SidelinkPreconfigNR-r16.c +NR_SidelinkUEInformationNR-r16.c +NR_SidelinkUEInformationNR-r16-IEs.c +NR_SidelinkUEInformationNR-v1700-IEs.c +NR_SimulSRS-ForAntennaSwitching-r16.c +NR_SimultaneousRxTxPerBandPair.c +NR_SINR-Range.c +NR_SINR-RangeEUTRA.c +NR_SI-RequestConfig.c +NR_SI-RequestResources.c +NR_SI-SchedulingInfo.c +NR_SI-SchedulingInfo-v1700.c +NR_SK-Counter.c +NR_SL-AccessInfo-L2U2N-r17.c +NR_SL-BetaOffsets-r16.c +NR_SL-BWP-ConfigCommon-r16.c +NR_SL-BWP-Config-r16.c +NR_SL-BWP-DiscPoolConfigCommon-r17.c +NR_SL-BWP-DiscPoolConfig-r17.c +NR_SL-BWP-Generic-r16.c +NR_SL-BWP-PoolConfigCommon-r16.c +NR_SL-BWP-PoolConfig-r16.c +NR_SL-CBR-CommonTxConfigList-r16.c +NR_SL-CBR-LevelsConfig-r16.c +NR_SL-CBR-PriorityTxConfigList-r16.c +NR_SL-CBR-PriorityTxConfigList-v1650.c +NR_SL-CBR-PSSCH-TxConfig-r16.c +NR_SL-CBR-r16.c +NR_SL-CG-MaxTransNumList-r16.c +NR_SL-CG-MaxTransNum-r16.c +NR_SL-ConfigCommonNR-r16.c +NR_SL-ConfigDedicatedEUTRA-Info-r16.c +NR_SL-ConfigDedicatedNR-r16.c +NR_SL-ConfigIndexCG-r16.c +NR_SL-ConfiguredGrantConfigList-r16.c +NR_SL-ConfiguredGrantConfig-r16.c +NR_SL-CSI-RS-Config-r16.c +NR_SL-DestinationIdentity-r16.c +NR_SL-DestinationIndex-r16.c +NR_SL-DiscConfigCommon-r17.c +NR_SL-DiscConfig-r17.c +NR_SL-DRX-ConfigGC-BC-r17.c +NR_SL-DRX-Config-r17.c +NR_SL-DRX-ConfigUC-Info-r17.c +NR_SL-DRX-ConfigUC-r17.c +NR_SL-DRX-ConfigUC-SemiStatic-r17.c +NR_SL-DRX-GC-BC-QoS-r17.c +NR_SL-DRX-GC-Generic-r17.c +NR_SL-EUTRA-AnchorCarrierFreqList-r16.c +NR_SL-EventTriggerConfig-r16.c +NR_SL-FailureList-r16.c +NR_SL-Failure-r16.c +NR_SL-FreqConfigCommon-r16.c +NR_SL-FreqConfig-r16.c +NR_SL-Freq-Id-r16.c +NR_SliceCellListNR-r17.c +NR_SliceInfoDedicated-r17.c +NR_SliceInfoListDedicated-r17.c +NR_SliceInfoList-r17.c +NR_SliceInfo-r17.c +NR_SL-InterestedFreqList-r16.c +NR_SL-InterUE-CoordinationConfig-r17.c +NR_SL-InterUE-CoordinationScheme1-r17.c +NR_SL-InterUE-CoordinationScheme2-r17.c +NR_SL-L2RelayUE-Config-r17.c +NR_SL-L2RemoteUE-Config-r17.c +NR_SL-LatencyBoundIUC-Report-r17.c +NR_SL-LogicalChannelConfigPC5-r16.c +NR_SL-LogicalChannelConfig-r16.c +NR_SL-MappedQoS-FlowsListDedicated-r16.c +NR_SL-MappingToAddMod-r17.c +NR_SL-MeasConfigCommon-r16.c +NR_SL-MeasConfigInfo-r16.c +NR_SL-MeasConfig-r16.c +NR_SL-MeasIdInfo-r16.c +NR_SL-MeasIdList-r16.c +NR_SL-MeasId-r16.c +NR_SL-MeasIdToRemoveList-r16.c +NR_SL-MeasObjectId-r16.c +NR_SL-MeasObjectInfo-r16.c +NR_SL-MeasObjectList-r16.c +NR_SL-MeasObject-r16.c +NR_SL-MeasObjectToRemoveList-r16.c +NR_SL-MeasQuantityResult-r16.c +NR_SL-MeasReportQuantity-r16.c +NR_SL-MeasResultListRelay-r17.c +NR_SL-MeasResult-r16.c +NR_SL-MeasResultRelay-r17.c +NR_SL-MeasResults-r16.c +NR_SL-MeasTriggerQuantity-r16.c +NR_SL-MinMaxMCS-Config-r16.c +NR_SL-MinMaxMCS-List-r16.c +NR_SL-NR-AnchorCarrierFreqList-r16.c +NR_SlotBased-r16.c +NR_SlotBased-v1630.c +NR_SlotFormatCombination.c +NR_SlotFormatCombinationId.c +NR_SlotFormatCombinationsPerCell.c +NR_SlotFormatIndicator.c +NR_SL-PagingIdentityRemoteUE-r17.c +NR_SL-PagingInfo-RemoteUE-r17.c +NR_SL-PathSwitchConfig-r17.c +NR_SL-PBPS-CPS-Config-r17.c +NR_SL-PDCP-ConfigPC5-r16.c +NR_SL-PDCP-Config-r16.c +NR_SL-PeriodCG-r16.c +NR_SL-PeriodicalReportConfig-r16.c +NR_SL-PHY-MAC-RLC-Config-r16.c +NR_SL-PHY-MAC-RLC-Config-v1700.c +NR_SL-PowerControl-r16.c +NR_SL-PQFI-r16.c +NR_SL-PQI-r16.c +NR_SL-PreconfigGeneral-r16.c +NR_SL-PreconfigurationNR-r16.c +NR_SL-PriorityTxConfigIndex-r16.c +NR_SL-PriorityTxConfigIndex-v1650.c +NR_SL-PSBCH-Config-r16.c +NR_SL-PSCCH-Config-r16.c +NR_SL-PSFCH-Config-r16.c +NR_SL-PSSCH-Config-r16.c +NR_SL-PSSCH-TxConfigList-r16.c +NR_SL-PSSCH-TxConfig-r16.c +NR_SL-PSSCH-TxParameters-r16.c +NR_SL-PTRS-Config-r16.c +NR_SL-QoS-FlowIdentity-r16.c +NR_SL-QoS-Info-r16.c +NR_SL-QoS-Profile-r16.c +NR_SL-QuantityConfig-r16.c +NR_SL-RadioBearerConfig-r16.c +NR_SLRB-Config-r16.c +NR_SLRB-PC5-ConfigIndex-r16.c +NR_SLRB-Uu-ConfigIndex-r16.c +NR_SL-RelayUE-Config-r17.c +NR_SL-RemoteUE-Config-r17.c +NR_SL-RemoteUE-RB-Identity-r17.c +NR_SL-RemoteUE-ToAddMod-r17.c +NR_SL-ReportConfigId-r16.c +NR_SL-ReportConfigInfo-r16.c +NR_SL-ReportConfigList-r16.c +NR_SL-ReportConfig-r16.c +NR_SL-ReportConfigToRemoveList-r16.c +NR_SL-RequestedSIB-List-r17.c +NR_SL-ReselectionConfig-r17.c +NR_SL-ResourcePoolConfig-r16.c +NR_SL-ResourcePoolID-r16.c +NR_SL-ResourcePool-r16.c +NR_SL-ResourceReservePeriod-r16.c +NR_SL-RLC-BearerConfigIndex-r16.c +NR_SL-RLC-BearerConfig-r16.c +NR_SL-RLC-ChannelConfigPC5-r17.c +NR_SL-RLC-ChannelConfig-r17.c +NR_SL-RLC-ChannelID-r17.c +NR_SL-RLC-ConfigPC5-r16.c +NR_SL-RLC-Config-r16.c +NR_SL-RLC-ModeIndication-r16.c +NR_SL-RoHC-Profiles-r16.c +NR_SL-RSRP-Range-r16.c +NR_SL-RS-Type-r16.c +NR_SL-RxDRX-ReportList-v1700.c +NR_SL-RxDRX-Report-v1700.c +NR_SL-RxInterestedGC-BC-DestList-r17.c +NR_SL-RxInterestedGC-BC-Dest-r17.c +NR_SL-ScheduledConfig-r16.c +NR_SL-SDAP-ConfigPC5-r16.c +NR_SL-SDAP-Config-r16.c +NR_SL-SelectionWindowConfig-r16.c +NR_SL-SelectionWindowList-r16.c +NR_SL-ServingCellInfo-r17.c +NR_SL-SIB-ReqInfo-r17.c +NR_SL-SourceIdentity-r17.c +NR_SL-SRAP-Config-r17.c +NR_SL-SSB-TimeAllocation-r16.c +NR_SL-SyncAllowed-r16.c +NR_SL-SyncConfigList-r16.c +NR_SL-SyncConfig-r16.c +NR_SL-ThresholdRSRP-Condition1-B-1-r17.c +NR_SL-Thres-RSRP-List-r16.c +NR_SL-Thres-RSRP-r16.c +NR_SL-TimeOffsetEUTRA-r16.c +NR_SL-TrafficPatternInfo-r16.c +NR_SL-TxConfigIndex-r16.c +NR_SL-TxInterestedFreqList-r16.c +NR_SL-TxPercentageConfig-r16.c +NR_SL-TxPercentageList-r16.c +NR_SL-TxPoolDedicated-r16.c +NR_SL-TxPower-r16.c +NR_SL-TxProfileList-r17.c +NR_SL-TxProfile-r17.c +NR_SL-TxResourceReqCommRelayInfo-r17.c +NR_SL-TxResourceReqCommRelay-r17.c +NR_SL-TxResourceReqDisc-r17.c +NR_SL-TxResourceReqL2U2N-Relay-r17.c +NR_SL-TxResourceReqListCommRelay-r17.c +NR_SL-TxResourceReqListDisc-r17.c +NR_SL-TxResourceReqList-r16.c +NR_SL-TxResourceReqList-v1700.c +NR_SL-TxResourceReq-r16.c +NR_SL-TxResourceReq-v1700.c +NR_SL-TypeTxSync-r16.c +NR_SL-UE-AssistanceInformationNR-r16.c +NR_SL-UE-SelectedConfig-r16.c +NR_SL-UE-SelectedConfigRP-r16.c +NR_SL-ZoneConfigMCR-r16.c +NR_SL-ZoneConfig-r16.c +NR_SN-FieldLengthAM.c +NR_SN-FieldLengthUM.c +NR_SNPN-AccessInfo-r17.c +NR_S-NSSAI.c +NR_SON-Parameters-r16.c +NR_SpatialRelationInfo-PDC-r17.c +NR_SpatialRelations.c +NR_SpatialRelationsSRS-Pos-r16.c +NR_SpCellConfig.c +NR_SpeedStateScaleFactors.c +NR_SPS-Config.c +NR_SPS-ConfigDeactivationStateList-r16.c +NR_SPS-ConfigDeactivationState-r16.c +NR_SPS-ConfigIndex-r16.c +NR_SPS-ConfigMulticastToAddModList-r17.c +NR_SPS-ConfigMulticastToReleaseList-r17.c +NR_SPS-ConfigToAddModList-r16.c +NR_SPS-ConfigToReleaseList-r16.c +NR_SPS-PUCCH-AN-List-r16.c +NR_SPS-PUCCH-AN-r16.c +NR_SRB-Identity.c +NR_SRB-Identity-v1700.c +NR_SRB-ToAddMod.c +NR_SRB-ToAddModList.c +NR_SRI-PUSCH-PowerControl.c +NR_SRI-PUSCH-PowerControlId.c +NR_SRS-AllPosResources-r16.c +NR_SRS-AllPosResourcesRRC-Inactive-r17.c +NR_SRS-CarrierSwitching.c +NR_SRS-CC-SetIndex.c +NR_SRS-Config.c +NR_SRS-PathlossReferenceRS-Id-r16.c +NR_SRS-PeriodicityAndOffset.c +NR_SRS-PeriodicityAndOffsetExt-r16.c +NR_SRS-PeriodicityAndOffset-r16.c +NR_SRS-PosConfig-r17.c +NR_SRS-PosResourceAP-r16.c +NR_SRS-PosResourceId-r16.c +NR_SRS-PosResource-r16.c +NR_SRS-PosResourceSetId-r16.c +NR_SRS-PosResourceSet-r16.c +NR_SRS-PosResourceSP-r16.c +NR_SRS-PosResources-r16.c +NR_SRS-PosRRC-InactiveConfig-r17.c +NR_SRS-PosRRC-Inactive-r17.c +NR_SRS-Resource.c +NR_SRS-ResourceConfigCLI-r16.c +NR_SRS-ResourceId.c +NR_SRS-ResourceListConfigCLI-r16.c +NR_SRS-Resources.c +NR_SRS-ResourceSet.c +NR_SRS-ResourceSetId.c +NR_SRS-RSRP-Range-r16.c +NR_SRS-RSRP-TriggeredList-r16.c +NR_SRS-SpatialRelationInfo.c +NR_SRS-SpatialRelationInfoPos-r16.c +NR_SRS-SwitchingAffectedBandsNR-r17.c +NR_SRS-SwitchingTimeEUTRA.c +NR_SRS-SwitchingTimeNR.c +NR_SRS-TPC-CommandConfig.c +NR_SRS-TPC-PDCCH-Config.c +NR_SSB-ConfigMobility.c +NR_SSB-Configuration-r16.c +NR_SSB-Index.c +NR_SSB-InfoNcell-r16.c +NR_SSB-MTC2.c +NR_SSB-MTC2-LP-r16.c +NR_SSB-MTC3List-r16.c +NR_SSB-MTC3-r16.c +NR_SSB-MTC4List-r17.c +NR_SSB-MTC4-r17.c +NR_SSB-MTC-AdditionalPCI-r17.c +NR_SSB-MTC.c +NR_SSB-PositionQCL-CellList-r17.c +NR_SSB-PositionQCL-Cell-r17.c +NR_SSB-PositionQCL-CellsToAddModList-r16.c +NR_SSB-PositionQCL-CellsToAddMod-r16.c +NR_SSB-PositionQCL-Relation-r16.c +NR_SSB-PositionQCL-Relation-r17.c +NR_SSB-ToMeasure.c +NR_SS-RSSI-Measurement.c +NR_SubcarrierSpacing.c +NR_SubgroupConfig-r17.c +NR_SubSlot-Config-r16.c +NR_SuccessHO-Config-r17.c +NR_SuccessHO-Report-r17.c +NR_SupportedBandUTRA-FDD-r16.c +NR_SupportedBandwidth.c +NR_SupportedBandwidth-v1700.c +NR_SupportedCSI-RS-Resource.c +NR_SuspendConfig.c +NR_SystemInformation.c +NR_SystemInformation-IEs.c +NR_T312-r16.c +NR_T316-r16.c +NR_TAG.c +NR_TAG-Config.c +NR_TAG-Id.c +NR_TA-Info-r17.c +NR_TAR-Config-r17.c +NR_TCI-ActivatedConfig-r17.c +NR_TCI-State.c +NR_TCI-StateId.c +NR_TCI-UL-State-Id-r17.c +NR_TCI-UL-State-r17.c +NR_TDD-UL-DL-ConfigCommon.c +NR_TDD-UL-DL-ConfigDedicated.c +NR_TDD-UL-DL-ConfigDedicated-IAB-MT-r16.c +NR_TDD-UL-DL-Pattern.c +NR_TDD-UL-DL-SlotConfig.c +NR_TDD-UL-DL-SlotConfig-IAB-MT-r16.c +NR_TDD-UL-DL-SlotIndex.c +NR_ThresholdNR.c +NR_TimeAlignmentTimer.c +NR_TimeBetweenEvent-r17.c +NR_TimeConnSourceDAPS-Failure-r17.c +NR_TimeSinceCHO-Reconfig-r17.c +NR_TimeSinceFailure-r16.c +NR_TimeToTrigger.c +NR_TimeUntilReconnection-r16.c +NR_TMGI-r17.c +NR_T-Offset-r16.c +NR_T-PollRetransmit.c +NR_TraceReference-r16.c +NR_TrackingAreaCode.c +NR_TrackingAreaCodeList-r16.c +NR_TrackingAreaIdentityList-r16.c +NR_TrackingAreaIdentity-r16.c +NR_TransmissionBandwidth-EUTRA-r16.c +NR_T-Reassembly.c +NR_T-ReassemblyExt-r17.c +NR_T-Reselection.c +NR_TRS-ResourceSet-r17.c +NR_T-StatusProhibit.c +NR_T-StatusProhibit-v1610.c +NR_TwoPUCCH-Grp-ConfigParams-r16.c +NR_TwoPUCCH-Grp-Configurations-r16.c +NR_TwoPUCCH-Grp-Configurations-r17.c +NR_Tx-PoolMeasList-r16.c +NR_UAC-AC1-SelectAssistInfo-r16.c +NR_UAC-AccessCategory1-SelectionAssistanceInfo.c +NR_UAC-BarringInfoSet.c +NR_UAC-BarringInfoSetIndex.c +NR_UAC-BarringInfoSetList.c +NR_UAC-BarringInfoSetList-v1700.c +NR_UAC-BarringInfoSet-v1700.c +NR_UAC-BarringPerCat.c +NR_UAC-BarringPerCatList.c +NR_UAC-BarringPerPLMN.c +NR_UAC-BarringPerPLMN-List.c +NR_UCI-OnPUSCH.c +NR_UCI-OnPUSCH-DCI-0-2-r16.c +NR_UCI-OnPUSCH-ListDCI-0-1-r16.c +NR_UCI-OnPUSCH-ListDCI-0-2-r16.c +NR_UEAssistanceInformation.c +NR_UEAssistanceInformation-IEs.c +NR_UEAssistanceInformationSidelink-r17.c +NR_UEAssistanceInformationSidelink-r17-IEs.c +NR_UEAssistanceInformation-v1540-IEs.c +NR_UEAssistanceInformation-v1610-IEs.c +NR_UEAssistanceInformation-v1700-IEs.c +NR_UE-BasedPerfMeas-Parameters-r16.c +NR_UECapabilityEnquiry.c +NR_UECapabilityEnquiry-IEs.c +NR_UECapabilityEnquirySidelink.c +NR_UECapabilityEnquirySidelink-r16-IEs.c +NR_UECapabilityEnquiry-v1560-IEs.c +NR_UECapabilityEnquiry-v1610-IEs.c +NR_UECapabilityInformation.c +NR_UECapabilityInformation-IEs.c +NR_UECapabilityInformationSidelink.c +NR_UECapabilityInformationSidelink-r16-IEs.c +NR_UECapabilityInformationSidelink-v1700-IEs.c +NR_UE-CapabilityRAT-Container.c +NR_UE-CapabilityRAT-ContainerList.c +NR_UE-CapabilityRAT-Request.c +NR_UE-CapabilityRAT-RequestList.c +NR_UE-CapabilityRequestFilterCommon.c +NR_UE-CapabilityRequestFilterNR.c +NR_UE-CapabilityRequestFilterNR-v1540.c +NR_UE-CapabilityRequestFilterNR-v1710.c +NR_UEInformationRequest-r16.c +NR_UEInformationRequest-r16-IEs.c +NR_UEInformationRequest-v1700-IEs.c +NR_UEInformationResponse-r16.c +NR_UEInformationResponse-r16-IEs.c +NR_UEInformationResponse-v1700-IEs.c +NR_UE-MeasurementsAvailable-r16.c +NR_UE-MRDC-CapabilityAddFRX-Mode.c +NR_UE-MRDC-CapabilityAddXDD-Mode.c +NR_UE-MRDC-CapabilityAddXDD-Mode-v1560.c +NR_UE-MRDC-Capability.c +NR_UE-MRDC-Capability-v1560.c +NR_UE-MRDC-Capability-v15g0.c +NR_UE-MRDC-Capability-v1610.c +NR_UE-MRDC-Capability-v1700.c +NR_UE-MRDC-Capability-v1730.c +NR_UE-NR-CapabilityAddFRX-Mode.c +NR_UE-NR-CapabilityAddFRX-Mode-v1540.c +NR_UE-NR-CapabilityAddFRX-Mode-v1610.c +NR_UE-NR-CapabilityAddXDD-Mode.c +NR_UE-NR-CapabilityAddXDD-Mode-v1530.c +NR_UE-NR-Capability.c +NR_UE-NR-Capability-v1530.c +NR_UE-NR-Capability-v1540.c +NR_UE-NR-Capability-v1550.c +NR_UE-NR-Capability-v1560.c +NR_UE-NR-Capability-v1570.c +NR_UE-NR-Capability-v15c0.c +NR_UE-NR-Capability-v15g0.c +NR_UE-NR-Capability-v15j0.c +NR_UE-NR-Capability-v1610.c +NR_UE-NR-Capability-v1640.c +NR_UE-NR-Capability-v1650.c +NR_UE-NR-Capability-v1690.c +NR_UE-NR-Capability-v16a0.c +NR_UE-NR-Capability-v1700.c +NR_UEPositioningAssistanceInfo-r17.c +NR_UEPositioningAssistanceInfo-r17-IEs.c +NR_UEPositioningAssistanceInfo-v1720-IEs.c +NR_UERadioAccessCapabilityInformation.c +NR_UERadioAccessCapabilityInformation-IEs.c +NR_UE-RadioPagingInfo-r17.c +NR_UERadioPagingInformation.c +NR_UERadioPagingInformation-IEs.c +NR_UERadioPagingInformation-v15e0-IEs.c +NR_UERadioPagingInformation-v1700-IEs.c +NR_UE-SidelinkCapabilityAddXDD-Mode-r16.c +NR_UE-TimersAndConstants.c +NR_UE-TimersAndConstantsRemoteUE-r17.c +NR_UE-TxTEG-AssociationList-r17.c +NR_UE-TxTEG-Association-r17.c +NR_UE-TxTEG-RequestUL-TDOA-Config-r17.c +NR_UL-AccessConfigListDCI-0-1-r16.c +NR_UL-AccessConfigListDCI-0-1-r17.c +NR_UL-AccessConfigListDCI-0-2-r17.c +NR_UL-AccessConfigListDCI-1-1-r16.c +NR_UL-AccessConfigListDCI-1-1-r17.c +NR_UL-AccessConfigListDCI-1-2-r17.c +NR_UL-AM-RLC.c +NR_UL-CCCH1-Message.c +NR_UL-CCCH1-MessageType.c +NR_UL-CCCH-Message.c +NR_UL-CCCH-MessageType.c +NR_UL-DataSplitThreshold.c +NR_UL-DCCH-Message.c +NR_UL-DCCH-MessageType.c +NR_ULDedicatedMessageSegment-r16.c +NR_ULDedicatedMessageSegment-r16-IEs.c +NR_UL-DelayValueConfig-r16.c +NR_UL-ExcessDelayConfig-r17.c +NR_UL-GapFR2-Config-r17.c +NR_UL-GapFR2-Preference-r17.c +NR_ULInformationTransfer.c +NR_ULInformationTransfer-IEs.c +NR_ULInformationTransferIRAT-r16.c +NR_ULInformationTransferIRAT-r16-IEs.c +NR_ULInformationTransferMRDC.c +NR_ULInformationTransferMRDC-IEs.c +NR_ULInformationTransfer-v1700-IEs.c +NR_UL-PDCP-DelayValueResultList-r16.c +NR_UL-PDCP-DelayValueResult-r16.c +NR_UL-PDCP-ExcessDelayResultList-r17.c +NR_UL-PDCP-ExcessDelayResult-r17.c +NR_ULTxSwitchingBandPair-r16.c +NR_ULTxSwitchingBandPair-v1700.c +NR_UL-UM-RLC.c +NR_UPInterruptionTimeAtHO-r17.c +NR_UplinkCancellation-r16.c +NR_UplinkConfig.c +NR_UplinkConfigCommon.c +NR_UplinkConfigCommonSIB.c +NR_UplinkConfigCommonSIB-v1700.c +NR_UplinkConfigCommon-v1700.c +NR_UplinkDataCompression-r17.c +NR_UplinkHARQ-mode-r17.c +NR_Uplink-powerControlId-r17.c +NR_Uplink-powerControl-r17.c +NR_UplinkTxDirectCurrentBWP.c +NR_UplinkTxDirectCurrentCarrierInfo-r16.c +NR_UplinkTxDirectCurrentCell.c +NR_UplinkTxDirectCurrentList.c +NR_UplinkTxDirectCurrentMoreCarrierList-r17.c +NR_UplinkTxDirectCurrentTwoCarrierInfo-r16.c +NR_UplinkTxDirectCurrentTwoCarrierList-r16.c +NR_UplinkTxDirectCurrentTwoCarrier-r16.c +NR_UplinkTxSwitchingBandParameters-v1700.c +NR_UplinkTxSwitching-r16.c +NR_UTRA-FDD-CellIndexList-r16.c +NR_UTRA-FDD-CellIndex-r16.c +NR_UTRA-FDD-Parameters-r16.c +NR_UTRA-FDD-Q-OffsetRange-r16.c +NR_UuMessageTransferSidelink-r17.c +NR_UuMessageTransferSidelink-r17-IEs.c +NR_Uu-RelayRLC-ChannelConfig-r17.c +NR_Uu-RelayRLC-ChannelID-r17.c +NR_ValidityAreaList-r16.c +NR_ValidityArea-r16.c +NR_ValidityCellList.c +NR_VarConditionalReconfig.c +NR_VarConnEstFailReportList-r17.c +NR_VarConnEstFailReport-r16.c +NR_VarLogMeasConfig-r16-IEs.c +NR_VarLogMeasReport-r16.c +NR_VarMeasConfig.c +NR_VarMeasConfigSL-r16.c +NR_VarMeasIdleConfig-r16.c +NR_VarMeasIdleReport-r16.c +NR_VarMeasReport.c +NR_VarMeasReportList.c +NR_VarMeasReportListSL-r16.c +NR_VarMeasReportSL-r16.c +NR_VarMobilityHistoryReport-r16.c +NR_VarMobilityHistoryReport-r17.c +NR_VarPendingRNA-Update.c +NR_VarRA-Report-r16.c +NR_VarResumeMAC-Input.c +NR_VarRLF-Report-r16.c +NR_VarShortMAC-Input.c +NR_VarSuccessHO-Report-r17-IEs.c +NR_VelocityStateVector-r17.c +NR_VictimSystemType.c +NR_VictimSystemType-r16.c +NR_VisitedCellInfoList-r16.c +NR_VisitedCellInfo-r16.c +NR_VisitedPSCellInfoList-r17.c +NR_VisitedPSCellInfo-r17.c +NR_WithinActiveTimeConfig-r16.c +NR_WLAN-Identifiers-r16.c +NR_WLAN-NameList-r16.c +NR_WLAN-Name-r16.c +NR_WLAN-RSSI-Range-r16.c +NR_WLAN-RTT-r16.c +NR_ZP-CSI-RS-Resource.c +NR_ZP-CSI-RS-ResourceId.c +NR_ZP-CSI-RS-ResourceSet.c +NR_ZP-CSI-RS-ResourceSetId.c +NULL.c +OCTET_STRING.c +OPEN_TYPE.c +per_decoder.c +per_encoder.c +per_opentype.c +per_support.c +xer_decoder.c +xer_encoder.c +xer_support.c +) + +set(nr_rrc_headers +asn_application.h +asn_bit_data.h +asn_codecs.h +asn_codecs_prim.h +asn_internal.h +asn_ioc.h +asn_random_fill.h +asn_SEQUENCE_OF.h +asn_SET_OF.h +asn_system.h +ber_decoder.h +ber_tlv_length.h +ber_tlv_tag.h +BIT_STRING.h +BOOLEAN.h +constraints.h +constr_CHOICE.h +constr_SEQUENCE.h +constr_SEQUENCE_OF.h +constr_SET_OF.h +constr_TYPE.h +der_encoder.h +INTEGER.h +NativeEnumerated.h +NativeInteger.h +NR_AbsoluteTimeInfo-r16.h +NR_AccessStratumRelease.h +NR_AccessStratumReleaseSidelink-r16.h +NR_AdditionalPCIIndex-r17.h +NR_AdditionalRACH-ConfigList-r17.h +NR_AdditionalRACH-Config-r17.h +NR_AdditionalSpectrumEmission.h +NR_AffectedCarrierFreqCombEUTRA.h +NR_AffectedCarrierFreqCombInfoMRDC.h +NR_AffectedCarrierFreqCombList-r16.h +NR_AffectedCarrierFreqCombNR.h +NR_AffectedCarrierFreqComb-r16.h +NR_AffectedCarrierFreqList-r16.h +NR_AffectedCarrierFreq-r16.h +NR_AggregatedBandwidth.h +NR_AI-RNTI-r16.h +NR_Alpha.h +NR_AMF-Identifier.h +NR_AppLayerBufferLevel-r17.h +NR_AppLayerMeasConfig-r17.h +NR_AppLayerMeasParameters-r17.h +NR_ApplicableDisasterInfo-r17.h +NR_AreaConfig-r16.h +NR_AreaConfiguration-r16.h +NR_AreaConfiguration-v1700.h +NR_ARFCN-ValueEUTRA.h +NR_ARFCN-ValueNR.h +NR_ARFCN-ValueUTRA-FDD-r16.h +NR_AS-Config.h +NR_AS-Context.h +NR_asn_constant.h +NR_AvailabilityCombinationId-r16.h +NR_AvailabilityCombination-r16.h +NR_AvailabilityCombinationRB-Groups-r17.h +NR_AvailabilityCombinationsPerCellIndex-r16.h +NR_AvailabilityCombinationsPerCell-r16.h +NR_AvailabilityIndicator-r16.h +NR_AvailableRB-SetsPerCell-r16.h +NR_AvailableSlotOffset-r17.h +NR_BandCombination.h +NR_BandCombinationIndex.h +NR_BandCombinationInfo.h +NR_BandCombinationInfoList.h +NR_BandCombinationInfoSN.h +NR_BandCombinationList.h +NR_BandCombinationListSidelinkEUTRA-NR-r16.h +NR_BandCombinationListSidelinkEUTRA-NR-v1630.h +NR_BandCombinationListSidelinkEUTRA-NR-v1710.h +NR_BandCombinationListSidelinkNR-r16.h +NR_BandCombinationListSidelinkNR-v1710.h +NR_BandCombinationListSL-Discovery-r17.h +NR_BandCombinationList-UplinkTxSwitch-r16.h +NR_BandCombinationList-UplinkTxSwitch-v1630.h +NR_BandCombinationList-UplinkTxSwitch-v1640.h +NR_BandCombinationList-UplinkTxSwitch-v1650.h +NR_BandCombinationList-UplinkTxSwitch-v1670.h +NR_BandCombinationList-UplinkTxSwitch-v1690.h +NR_BandCombinationList-UplinkTxSwitch-v16a0.h +NR_BandCombinationList-UplinkTxSwitch-v1700.h +NR_BandCombinationList-UplinkTxSwitch-v1720.h +NR_BandCombinationList-UplinkTxSwitch-v1730.h +NR_BandCombinationList-v1540.h +NR_BandCombinationList-v1550.h +NR_BandCombinationList-v1560.h +NR_BandCombinationList-v1570.h +NR_BandCombinationList-v1580.h +NR_BandCombinationList-v1590.h +NR_BandCombinationList-v15g0.h +NR_BandCombinationList-v1610.h +NR_BandCombinationList-v1630.h +NR_BandCombinationList-v1640.h +NR_BandCombinationList-v1650.h +NR_BandCombinationList-v1680.h +NR_BandCombinationList-v1690.h +NR_BandCombinationList-v16a0.h +NR_BandCombinationList-v1700.h +NR_BandCombinationList-v1720.h +NR_BandCombinationList-v1730.h +NR_BandCombinationParametersSidelinkEUTRA-NR-r16.h +NR_BandCombinationParametersSidelinkEUTRA-NR-v1630.h +NR_BandCombinationParametersSidelinkEUTRA-NR-v1710.h +NR_BandCombinationParametersSidelinkNR-r16.h +NR_BandCombinationParametersSidelinkNR-v1710.h +NR_BandCombination-UplinkTxSwitch-r16.h +NR_BandCombination-UplinkTxSwitch-v1630.h +NR_BandCombination-UplinkTxSwitch-v1640.h +NR_BandCombination-UplinkTxSwitch-v1650.h +NR_BandCombination-UplinkTxSwitch-v1670.h +NR_BandCombination-UplinkTxSwitch-v1690.h +NR_BandCombination-UplinkTxSwitch-v16a0.h +NR_BandCombination-UplinkTxSwitch-v1700.h +NR_BandCombination-UplinkTxSwitch-v1720.h +NR_BandCombination-UplinkTxSwitch-v1730.h +NR_BandCombination-v1540.h +NR_BandCombination-v1550.h +NR_BandCombination-v1560.h +NR_BandCombination-v1570.h +NR_BandCombination-v1580.h +NR_BandCombination-v1590.h +NR_BandCombination-v15g0.h +NR_BandCombination-v1610.h +NR_BandCombination-v1630.h +NR_BandCombination-v1640.h +NR_BandCombination-v1650.h +NR_BandCombination-v1680.h +NR_BandCombination-v1690.h +NR_BandCombination-v16a0.h +NR_BandCombination-v1700.h +NR_BandCombination-v1720.h +NR_BandCombination-v1730.h +NR_BandEntryIndex.h +NR_BandNR.h +NR_BandParameters.h +NR_BandParametersSidelinkDiscovery-r17.h +NR_BandParametersSidelinkEUTRA-NR-r16.h +NR_BandParametersSidelinkEUTRA-NR-v1630.h +NR_BandParametersSidelinkEUTRA-NR-v1710.h +NR_BandParametersSidelink-r16.h +NR_BandParametersSidelink-v1710.h +NR_BandParameters-v1540.h +NR_BandParameters-v1610.h +NR_BandParameters-v1710.h +NR_BandParameters-v1730.h +NR_BandSidelinkEUTRA-r16.h +NR_BandSidelinkPC5-r16.h +NR_BandSidelink-r16.h +NR_BAP-Config-r16.h +NR_BAP-Parameters-r16.h +NR_BAP-Parameters-v1700.h +NR_BAP-RoutingID-r16.h +NR_BCCH-BCH-Message.h +NR_BCCH-BCH-MessageType.h +NR_BCCH-Config.h +NR_BCCH-DL-SCH-Message.h +NR_BCCH-DL-SCH-MessageType.h +NR_BeamFailureDetection-r17.h +NR_BeamFailureDetectionSet-r17.h +NR_BeamFailureRecoveryConfig.h +NR_BeamFailureRecoveryRSConfig-r16.h +NR_BeamLinkMonitoringRS-Id-r17.h +NR_BeamLinkMonitoringRS-r17.h +NR_BeamManagementSSB-CSI-RS.h +NR_BeamMeasConfigIdle-NR-r16.h +NR_BetaOffsetsCrossPri-r17.h +NR_BetaOffsetsCrossPriSelCG-r17.h +NR_BetaOffsetsCrossPriSelDCI-0-2-r17.h +NR_BetaOffsetsCrossPriSel-r17.h +NR_BetaOffsets.h +NR_BFD-RelaxationReportingConfig-r17.h +NR_BFR-CSIRS-Resource.h +NR_BFR-SSB-Resource.h +NR_BH-LogicalChannelIdentity-Ext-r16.h +NR_BH-LogicalChannelIdentity-r16.h +NR_BH-RLC-ChannelConfig-r16.h +NR_BH-RLC-ChannelID-r16.h +NR_BSR-Config.h +NR_BT-NameList-r16.h +NR_BT-Name-r16.h +NR_BWP-DownlinkCommon.h +NR_BWP-DownlinkDedicated.h +NR_BWP-DownlinkDedicatedSDT-r17.h +NR_BWP-Downlink.h +NR_BWP.h +NR_BWP-Id.h +NR_BWP-UplinkCommon.h +NR_BWP-UplinkDedicated.h +NR_BWP-UplinkDedicatedSDT-r17.h +NR_BWP-Uplink.h +NR_CA-BandwidthClassEUTRA.h +NR_CA-BandwidthClassNR.h +NR_CAG-IdentityInfo-r16.h +NR_CandidateBeamRSListExt-r16.h +NR_CandidateBeamRS-r16.h +NR_CandidateCellCPC-r17.h +NR_CandidateCellInfoListCPC-r17.h +NR_CandidateCellInfo-r17.h +NR_CandidateCellListCPC-r17.h +NR_CandidateCell-r17.h +NR_CandidateServingFreqListEUTRA.h +NR_CandidateServingFreqListNR.h +NR_CandidateServingFreqListNR-r16.h +NR_CA-ParametersEUTRA.h +NR_CA-ParametersEUTRA-v1560.h +NR_CA-ParametersEUTRA-v1570.h +NR_CA-ParametersNRDC.h +NR_CA-ParametersNRDC-v15g0.h +NR_CA-ParametersNRDC-v1610.h +NR_CA-ParametersNRDC-v1630.h +NR_CA-ParametersNRDC-v1640.h +NR_CA-ParametersNRDC-v1650.h +NR_CA-ParametersNRDC-v16a0.h +NR_CA-ParametersNRDC-v1700.h +NR_CA-ParametersNRDC-v1720.h +NR_CA-ParametersNRDC-v1730.h +NR_CA-ParametersNR.h +NR_CA-ParametersNR-v1540.h +NR_CA-ParametersNR-v1550.h +NR_CA-ParametersNR-v1560.h +NR_CA-ParametersNR-v15g0.h +NR_CA-ParametersNR-v1610.h +NR_CA-ParametersNR-v1630.h +NR_CA-ParametersNR-v1640.h +NR_CA-ParametersNR-v1690.h +NR_CA-ParametersNR-v16a0.h +NR_CA-ParametersNR-v1700.h +NR_CA-ParametersNR-v1720.h +NR_CA-ParametersNR-v1730.h +NR_CarrierAggregationVariant.h +NR_CarrierFreqEUTRA.h +NR_CarrierFreqEUTRA-v1610.h +NR_CarrierFreqEUTRA-v1700.h +NR_CarrierFreqListEUTRA.h +NR_CarrierFreqListEUTRA-v1610.h +NR_CarrierFreqListEUTRA-v1700.h +NR_CarrierFreqListMBS-r17.h +NR_CarrierInfoNR.h +NR_CarrierState-r17.h +NR_CarrierTypePair-r16.h +NR_CC-Group-r17.h +NR_CC-State-r17.h +NR_CellAccessRelatedInfo-EUTRA-5GC.h +NR_CellAccessRelatedInfo-EUTRA-EPC.h +NR_CellAccessRelatedInfo.h +NR_CellGlobalIdList-r16.h +NR_CellGroupConfig.h +NR_CellGroupForSwitch-r16.h +NR_CellGroupId.h +NR_CellGrouping-r16.h +NR_CellIdentity-EUTRA-5GC.h +NR_CellIdentity.h +NR_CellListEUTRA-r16.h +NR_CellListNR-r16.h +NR_CellReselectionPriorities.h +NR_CellReselectionPriority.h +NR_CellReselectionSubPriority.h +NR_CellsToAddModExt-v1710.h +NR_CellsToAddMod.h +NR_CellsToAddModListExt-v1710.h +NR_CellsToAddModList.h +NR_CellsToAddModListUTRA-FDD-r16.h +NR_CellsToAddModUTRA-FDD-r16.h +NR_CellsTriggeredList.h +NR_CFRA-CSIRS-Resource.h +NR_CFRA.h +NR_CFRA-SSB-Resource.h +NR_CFRA-TwoStep-r16.h +NR_CFR-ConfigMCCH-MTCH-r17.h +NR_CFR-ConfigMulticast-r17.h +NR_CG-CandidateInfoId-r17.h +NR_CG-CandidateInfo-r17.h +NR_CG-CandidateList.h +NR_CG-CandidateList-r17-IEs.h +NR_CG-Config.h +NR_CG-Config-IEs.h +NR_CG-ConfigInfo.h +NR_CG-ConfigInfo-IEs.h +NR_CG-ConfigInfo-v1540-IEs.h +NR_CG-ConfigInfo-v1560-IEs.h +NR_CG-ConfigInfo-v1570-IEs.h +NR_CG-ConfigInfo-v1590-IEs.h +NR_CG-ConfigInfo-v1610-IEs.h +NR_CG-ConfigInfo-v1620-IEs.h +NR_CG-ConfigInfo-v1640-IEs.h +NR_CG-ConfigInfo-v1700-IEs.h +NR_CG-ConfigInfo-v1730-IEs.h +NR_CG-Config-v1540-IEs.h +NR_CG-Config-v1560-IEs.h +NR_CG-Config-v1590-IEs.h +NR_CG-Config-v1610-IEs.h +NR_CG-Config-v1620-IEs.h +NR_CG-Config-v1630-IEs.h +NR_CG-Config-v1640-IEs.h +NR_CG-Config-v1700-IEs.h +NR_CG-Config-v1730-IEs.h +NR_CG-COT-Sharing-r16.h +NR_CG-COT-Sharing-r17.h +NR_CGI-InfoEUTRA.h +NR_CGI-InfoEUTRALogging.h +NR_CGI-Info-Logging-r16.h +NR_CGI-InfoNR.h +NR_CG-SDT-ConfigLCH-Restriction-r17.h +NR_CG-SDT-Configuration-r17.h +NR_CG-SDT-TA-ValidationConfig-r17.h +NR_CG-StartingOffsets-r16.h +NR_CG-UCI-OnPUSCH.h +NR_ChannelAccessConfig-r16.h +NR_ChoCandidateCellList-r17.h +NR_ChoCandidateCell-r17.h +NR_CI-ConfigurationPerServingCell-r16.h +NR_CipheringAlgorithm.h +NR_CLI-EventTriggerConfig-r16.h +NR_CLI-PeriodicalReportConfig-r16.h +NR_CLI-ResourceConfig-r16.h +NR_CLI-RSSI-Range-r16.h +NR_CLI-RSSI-TriggeredList-r16.h +NR_CLI-TriggeredList-r16.h +NR_CMRGroupingAndPairing-r17.h +NR_CodebookComboParameterMixedTypePerBC-r17.h +NR_CodebookComboParameterMixedType-r17.h +NR_CodebookComboParameterMultiTRP-PerBC-r17.h +NR_CodebookComboParameterMultiTRP-r17.h +NR_CodebookComboParametersAdditionPerBC-r16.h +NR_CodebookComboParametersAddition-r16.h +NR_CodebookConfig.h +NR_CodebookConfig-r16.h +NR_CodebookConfig-r17.h +NR_CodebookConfig-v1730.h +NR_CodebookParametersAdditionPerBC-r16.h +NR_CodebookParametersAddition-r16.h +NR_CodebookParametersfetype2PerBC-r17.h +NR_CodebookParametersfetype2-r17.h +NR_CodebookParameters.h +NR_CodebookParameters-v1610.h +NR_CodebookVariantsList-r16.h +NR_CO-Duration-r16.h +NR_CO-Duration-r17.h +NR_CO-DurationsPerCell-r16.h +NR_CO-DurationsPerCell-r17.h +NR_CommonLocationInfo-r16.h +NR_ConditionalReconfiguration-r16.h +NR_CondReconfigExecCondSCG-r17.h +NR_CondReconfigId-r16.h +NR_CondReconfigToAddModList-r16.h +NR_CondReconfigToAddMod-r16.h +NR_CondReconfigToRemoveList-r16.h +NR_CondTriggerConfig-r16.h +NR_ConfigRestrictInfoDAPS-r16.h +NR_ConfigRestrictInfoDAPS-v1640.h +NR_ConfigRestrictInfoSCG.h +NR_ConfigRestrictModReqSCG.h +NR_ConfiguredGrantConfig.h +NR_ConfiguredGrantConfigIndexMAC-r16.h +NR_ConfiguredGrantConfigIndex-r16.h +NR_ConfiguredGrantConfigToAddModList-r16.h +NR_ConfiguredGrantConfigToReleaseList-r16.h +NR_ConfiguredGrantConfigType2DeactivationStateList-r16.h +NR_ConfiguredGrantConfigType2DeactivationState-r16.h +NR_ConnEstFailReportList-r17.h +NR_ConnEstFailReport-r16.h +NR_ConnEstFailureControl.h +NR_ControlResourceSet.h +NR_ControlResourceSetId.h +NR_ControlResourceSetId-r16.h +NR_ControlResourceSetId-v1610.h +NR_ControlResourceSetZero.h +NR_CounterCheck.h +NR_CounterCheck-IEs.h +NR_CounterCheckResponse.h +NR_CounterCheckResponse-IEs.h +NR_CrossCarrierSchedulingConfig.h +NR_CrossCarrierSchedulingSCell-SpCell-r17.h +NR_CRS-InterfMitigation-r17.h +NR_CSI-AperiodicTriggerState.h +NR_CSI-AperiodicTriggerStateList.h +NR_CSI-AssociatedReportConfigInfo.h +NR_CSI-FrequencyOccupation.h +NR_CSI-IM-Resource.h +NR_CSI-IM-ResourceId.h +NR_CSI-IM-ResourceSet.h +NR_CSI-IM-ResourceSetId.h +NR_CSI-MeasConfig.h +NR_CSI-MultiTRP-SupportedCombinations-r17.h +NR_CSI-ReportConfig.h +NR_CSI-ReportConfigId.h +NR_CSI-ReportFrameworkExt-r16.h +NR_CSI-ReportFramework.h +NR_CSI-ReportPeriodicityAndOffset.h +NR_CSI-ResourceConfig.h +NR_CSI-ResourceConfigId.h +NR_CSI-ResourcePeriodicityAndOffset.h +NR_CSI-RS-CellMobility.h +NR_CSI-RS-ForTracking.h +NR_CSI-RS-IM-ReceptionForFeedback.h +NR_CSI-RS-Index.h +NR_CSI-RS-ProcFrameworkForSRS.h +NR_CSI-RS-ResourceConfigMobility.h +NR_CSI-RS-ResourceMapping.h +NR_CSI-RS-Resource-Mobility.h +NR_CSI-SemiPersistentOnPUSCH-TriggerState.h +NR_CSI-SemiPersistentOnPUSCH-TriggerStateList.h +NR_CSI-SSB-ResourceSet.h +NR_CSI-SSB-ResourceSetId.h +NR_DAPS-UplinkPowerConfig-r16.h +NR_DataInactivityTimer.h +NR_DCP-Config-r16.h +NR_DeactivatedSCG-Config-r17.h +NR_DedicatedInfoF1c-r17.h +NR_DedicatedNAS-Message.h +NR_DedicatedSIBRequest-r16.h +NR_DedicatedSIBRequest-r16-IEs.h +NR_DefaultDC-Location-r17.h +NR_DelayBudgetReport.h +NR_DiscardTimerExt2-r17.h +NR_DiscardTimerExt-r16.h +NR_DL-AM-RLC.h +NR_DL-AM-RLC-v1610.h +NR_DL-AM-RLC-v1700.h +NR_DL-CCCH-Message.h +NR_DL-CCCH-MessageType.h +NR_DL-DataToUL-ACK-DCI-1-2-r16.h +NR_DL-DataToUL-ACK-DCI-1-2-r17.h +NR_DL-DataToUL-ACK-MulticastDCI-Format4-1-r17.h +NR_DL-DataToUL-ACK-r16.h +NR_DL-DataToUL-ACK-r17.h +NR_DL-DataToUL-ACK-v1700.h +NR_DL-DCCH-Message.h +NR_DL-DCCH-MessageType.h +NR_DLDedicatedMessageSegment-r16.h +NR_DLDedicatedMessageSegment-r16-IEs.h +NR_DLInformationTransfer.h +NR_DLInformationTransfer-IEs.h +NR_DLInformationTransferMRDC-r16.h +NR_DLInformationTransferMRDC-r16-IEs.h +NR_DLInformationTransfer-v1610-IEs.h +NR_DLInformationTransfer-v1700-IEs.h +NR_DL-PPW-ID-r17.h +NR_DL-PPW-PeriodicityAndStartSlot-r17.h +NR_DL-PPW-PreConfig-r17.h +NR_DL-PPW-PreConfigToAddModList-r17.h +NR_DL-PPW-PreConfigToReleaseList-r17.h +NR_DL-PRS-Info-r16.h +NR_DL-PRS-QCL-Info-r17.h +NR_DL-UM-RLC.h +NR_DL-UM-RLC-v1700.h +NR_DMRS-BundlingPUCCH-Config-r17.h +NR_DMRS-BundlingPUSCH-Config-r17.h +NR_DMRS-DownlinkConfig.h +NR_DMRS-UplinkConfig.h +NR_DMRS-UplinkTransformPrecoding-r16.h +NR_DormancyGroupID-r16.h +NR_DormantBWP-Config-r16.h +NR_DownlinkConfigCommon.h +NR_DownlinkConfigCommonSIB.h +NR_DownlinkHARQ-FeedbackDisabled-r17.h +NR_DownlinkPreemption.h +NR_DRB-CountInfo.h +NR_DRB-CountInfoList.h +NR_DRB-CountMSB-Info.h +NR_DRB-CountMSB-InfoList.h +NR_DRB-Identity.h +NR_DRB-ToAddMod.h +NR_DRB-ToAddModList.h +NR_DRB-ToReleaseList.h +NR_DRX-ConfigExt-v1700.h +NR_DRX-Config.h +NR_DRX-ConfigPTM-Index-r17.h +NR_DRX-ConfigPTM-r17.h +NR_DRX-ConfigSecondaryGroup-r16.h +NR_DRX-ConfigSL-r17.h +NR_DRX-Info2.h +NR_DRX-Info.h +NR_DRX-PreferenceConfig-r16.h +NR_DRX-Preference-r16.h +NR_DummyA.h +NR_DummyB.h +NR_DummyC.h +NR_DummyD.h +NR_DummyE.h +NR_DummyF.h +NR_DummyG.h +NR_DummyH.h +NR_DummyI.h +NR_DummyJ.h +NR_DummyPathlossReferenceRS-v1710.h +NR_Dummy-TDRA-List.h +NR_EphemerisInfo-r17.h +NR_EpochTime-r17.h +NR_EstablishmentCause.h +NR_EthernetHeaderCompression-r16.h +NR_EUTRA-AllowedMeasBandwidth.h +NR_EUTRA-Cell.h +NR_EUTRA-CellIndex.h +NR_EUTRA-CellIndexList.h +NR_EUTRA-ExcludedCell.h +NR_EUTRA-FreqExcludedCellList.h +NR_EUTRA-FreqNeighCellInfo.h +NR_EUTRA-FreqNeighCellList.h +NR_EUTRA-FreqNeighHSDN-CellList-r17.h +NR_EUTRA-MBSFN-SubframeConfig.h +NR_EUTRA-MBSFN-SubframeConfigList.h +NR_EUTRA-MultiBandInfo.h +NR_EUTRA-MultiBandInfoList.h +NR_EUTRA-NS-PmaxList.h +NR_EUTRA-NS-PmaxValue.h +NR_EUTRA-ParametersCommon.h +NR_EUTRA-Parameters.h +NR_EUTRA-ParametersXDD-Diff.h +NR_EUTRA-PhysCellId.h +NR_EUTRA-PhysCellIdRange.h +NR_EUTRA-PresenceAntennaPort1.h +NR_EUTRA-Q-OffsetRange.h +NR_EUTRA-RSTD-Info.h +NR_EUTRA-RSTD-InfoList.h +NR_EventTriggerConfig.h +NR_EventTriggerConfigInterRAT.h +NR_EventTriggerConfigNR-SL-r16.h +NR_EventType-r16.h +NR_ExcessDelay-DRB-IdentityInfo-r17.h +NR_ExtendedPagingCycle-r17.h +NR_FailureInfoDAPS-r16.h +NR_FailureInfoRLC-Bearer.h +NR_FailureInformation.h +NR_FailureInformation-IEs.h +NR_FailureInformation-v1610-IEs.h +NR_FailureReportMCG-r16.h +NR_FailureReportSCG-EUTRA.h +NR_FailureReportSCG.h +NR_FDM-TDM-r16.h +NR_FeatureCombinationPreambles-r17.h +NR_FeatureCombination-r17.h +NR_FeaturePriority-r17.h +NR_FeatureSetCombination.h +NR_FeatureSetCombinationId.h +NR_FeatureSetDownlink.h +NR_FeatureSetDownlinkId.h +NR_FeatureSetDownlinkPerCC.h +NR_FeatureSetDownlinkPerCC-Id.h +NR_FeatureSetDownlinkPerCC-v1620.h +NR_FeatureSetDownlinkPerCC-v1700.h +NR_FeatureSetDownlinkPerCC-v1720.h +NR_FeatureSetDownlinkPerCC-v1730.h +NR_FeatureSetDownlink-v1540.h +NR_FeatureSetDownlink-v15a0.h +NR_FeatureSetDownlink-v1610.h +NR_FeatureSetDownlink-v1700.h +NR_FeatureSetDownlink-v1720.h +NR_FeatureSetDownlink-v1730.h +NR_FeatureSetEntryIndex.h +NR_FeatureSetEUTRA-DownlinkId.h +NR_FeatureSetEUTRA-UplinkId.h +NR_FeatureSet.h +NR_FeatureSets.h +NR_FeatureSetsPerBand.h +NR_FeatureSetUplink.h +NR_FeatureSetUplinkId.h +NR_FeatureSetUplinkPerCC.h +NR_FeatureSetUplinkPerCC-Id.h +NR_FeatureSetUplinkPerCC-v1540.h +NR_FeatureSetUplinkPerCC-v1700.h +NR_FeatureSetUplink-v1540.h +NR_FeatureSetUplink-v1610.h +NR_FeatureSetUplink-v1630.h +NR_FeatureSetUplink-v1640.h +NR_FeatureSetUplink-v1710.h +NR_FeatureSetUplink-v1720.h +NR_FilterCoefficient.h +NR_FilterConfigCLI-r16.h +NR_FilterConfig.h +NR_FR2-2-AccessParamsPerBand-r17.h +NR_FreqBandIndicatorEUTRA.h +NR_FreqBandIndicatorNR.h +NR_FreqBandInformationEUTRA.h +NR_FreqBandInformation.h +NR_FreqBandInformationNR.h +NR_FreqBandList.h +NR_FreqPriorityDedicatedSlicing-r17.h +NR_FreqPriorityEUTRA.h +NR_FreqPriorityListDedicatedSlicing-r17.h +NR_FreqPriorityListEUTRA.h +NR_FreqPriorityListNR.h +NR_FreqPriorityListSlicing-r17.h +NR_FreqPriorityNR.h +NR_FreqPrioritySlicing-r17.h +NR_FreqSeparationClassDL-Only-r16.h +NR_FreqSeparationClassDL-v1620.h +NR_FreqSeparationClass.h +NR_FreqSeparationClassUL-v1620.h +NR_FrequencyComponent-r17.h +NR_FrequencyConfig-NR-r16.h +NR_FrequencyHoppingOffsetListsDCI-0-2-r16.h +NR_FrequencyInfoDL.h +NR_FrequencyInfoDL-SIB.h +NR_FrequencyInfoUL.h +NR_FrequencyInfoUL-SIB.h +NR_FR-Info.h +NR_FR-InfoList.h +NR_GapConfig.h +NR_GapConfig-r17.h +NR_GapPriority-r17.h +NR_GeneralParametersMRDC-v1610.h +NR_GeneralParametersMRDC-XDD-Diff.h +NR_GIN-Element-r17.h +NR_GINs-PerSNPN-r17.h +NR_GNSS-ID-r16.h +NR_GoodServingCellEvaluation-r17.h +NR_GroupB-ConfiguredTwoStepRA-r16.h +NR_GuardBand-r16.h +NR_HandoverCommand.h +NR_HandoverCommand-IEs.h +NR_HandoverPreparationInformation.h +NR_HandoverPreparationInformation-IEs.h +NR_HighSpeedConfigFR2-r17.h +NR_HighSpeedConfig-r16.h +NR_HighSpeedConfig-v1700.h +NR_HighSpeedParameters-r16.h +NR_HighSpeedParameters-v1650.h +NR_HighSpeedParameters-v1700.h +NR_HRNN-List-r16.h +NR_HRNN-r16.h +NR_Hysteresis.h +NR_HysteresisLocation-r17.h +NR_IAB-IP-AddressAndTraffic-r16.h +NR_IAB-IP-AddressConfigurationList-r16.h +NR_IAB-IP-AddressConfiguration-r16.h +NR_IAB-IP-AddressIndex-r16.h +NR_IAB-IP-AddressNumReq-r16.h +NR_IAB-IP-AddressPrefixReq-r16.h +NR_IAB-IP-Address-r16.h +NR_IAB-IP-PrefixAndTraffic-r16.h +NR_IAB-IP-Usage-r16.h +NR_IABOtherInformation-r16.h +NR_IABOtherInformation-r16-IEs.h +NR_IAB-ResourceConfigID-r17.h +NR_IAB-ResourceConfig-r17.h +NR_IDC-AssistanceConfig-r16.h +NR_IDC-Assistance-r16.h +NR_IMS-ParametersCommon.h +NR_IMS-ParametersFR2-2-r17.h +NR_IMS-ParametersFRX-Diff.h +NR_IMS-Parameters.h +NR_IMS-Parameters-v1700.h +NR_InitialUE-Identity.h +NR_INT-ConfigurationPerServingCell.h +NR_IntegrityProtAlgorithm.h +NR_InterFreqAllowedCellList-r16.h +NR_InterFreqCAG-CellListPerPLMN-r16.h +NR_InterFreqCarrierFreqInfo.h +NR_InterFreqCarrierFreqInfo-v1610.h +NR_InterFreqCarrierFreqInfo-v1700.h +NR_InterFreqCarrierFreqInfo-v1720.h +NR_InterFreqCarrierFreqInfo-v1730.h +NR_InterFreqCarrierFreqList.h +NR_InterFreqCarrierFreqList-v1610.h +NR_InterFreqCarrierFreqList-v1700.h +NR_InterFreqCarrierFreqList-v1720.h +NR_InterFreqCarrierFreqList-v1730.h +NR_InterFreqExcludedCellList.h +NR_InterFreqNeighCellInfo.h +NR_InterFreqNeighCellInfo-v1610.h +NR_InterFreqNeighCellInfo-v1710.h +NR_InterFreqNeighCellList.h +NR_InterFreqNeighCellList-v1610.h +NR_InterFreqNeighCellList-v1710.h +NR_InterFreqNeighHSDN-CellList-r17.h +NR_InterFreqTargetInfo-r16.h +NR_InterRAT-Parameters.h +NR_IntraBandCC-Combination-r17.h +NR_IntraBandCC-CombinationReqList-r17.h +NR_IntraBandPowerClass-r16.h +NR_IntraCellGuardBandsPerSCS-r16.h +NR_IntraFreqAllowedCellList-r16.h +NR_IntraFreqCAG-CellListPerPLMN-r16.h +NR_IntraFreqExcludedCellList.h +NR_IntraFreqNeighCellInfo.h +NR_IntraFreqNeighCellInfo-v1610.h +NR_IntraFreqNeighCellInfo-v1710.h +NR_IntraFreqNeighCellList.h +NR_IntraFreqNeighCellList-v1610.h +NR_IntraFreqNeighCellList-v1710.h +NR_IntraFreqNeighHSDN-CellList-r17.h +NR_InvalidSymbolPattern-r16.h +NR_I-RNTI-Value.h +NR_LBT-FailureRecoveryConfig-r16.h +NR_LocationAndBandwidthBroadcast-r17.h +NR_LocationInfo-r16.h +NR_LocationMeasurementIndication.h +NR_LocationMeasurementIndication-IEs.h +NR_LocationMeasurementInfo.h +NR_LoggedEventTriggerConfig-r16.h +NR_LoggedMeasurementConfiguration-r16.h +NR_LoggedMeasurementConfiguration-r16-IEs.h +NR_LoggedMeasurementConfiguration-v1700-IEs.h +NR_LoggedPeriodicalReportConfig-r16.h +NR_LoggingDuration-r16.h +NR_LoggingInterval-r16.h +NR_LogicalChannelConfig.h +NR_LogicalChannelIdentityExt-r17.h +NR_LogicalChannelIdentity.h +NR_LogMeasInfoList-r16.h +NR_LogMeasInfo-r16.h +NR_LogMeasReport-r16.h +NR_LogMeasResultBT-r16.h +NR_LogMeasResultListBT-r16.h +NR_LogMeasResultListWLAN-r16.h +NR_LogMeasResultWLAN-r16.h +NR_LTE-CRS-PatternList-r16.h +NR_LTE-NeighCellsCRS-AssistInfoList-r17.h +NR_LTE-NeighCellsCRS-AssistInfo-r17.h +NR_MAC-CellGroupConfig.h +NR_MAC-MainConfigSL-r16.h +NR_MAC-ParametersCommon.h +NR_MAC-ParametersFR2-2-r17.h +NR_MAC-ParametersFRX-Diff-r16.h +NR_MAC-Parameters.h +NR_MAC-ParametersSidelinkCommon-r16.h +NR_MAC-ParametersSidelink-r16.h +NR_MAC-ParametersSidelink-r17.h +NR_MAC-ParametersSidelinkXDD-Diff-r16.h +NR_MAC-Parameters-v1610.h +NR_MAC-Parameters-v1700.h +NR_MAC-ParametersXDD-Diff.h +NR_MasterInformationBlockSidelink.h +NR_MasterKeyUpdate.h +NR_MaxBW-PreferenceConfig-r16.h +NR_MaxBW-PreferenceFR2-2-r17.h +NR_MaxBW-Preference-r16.h +NR_MaxCC-PreferenceConfig-r16.h +NR_MaxCC-Preference-r16.h +NR_MaxMIMO-LayerPreferenceConfig-r16.h +NR_MaxMIMO-LayerPreferenceFR2-2-r17.h +NR_MaxMIMO-LayerPreference-r16.h +NR_MaxMIMO-LayersDCI-0-2-r16.h +NR_MaxMIMO-LayersDL-r16.h +NR_MBSBroadcastConfiguration-r17.h +NR_MBSBroadcastConfiguration-r17-IEs.h +NR_MBS-FSAI-InterFreqList-r17.h +NR_MBS-FSAI-InterFreq-r17.h +NR_MBS-FSAI-List-r17.h +NR_MBS-FSAI-r17.h +NR_MBSInterestIndication-r17.h +NR_MBSInterestIndication-r17-IEs.h +NR_MBS-NeighbourCellList-r17.h +NR_MBS-NeighbourCell-r17.h +NR_MBS-Parameters-r17.h +NR_MBS-RNTI-SpecificConfigId-r17.h +NR_MBS-RNTI-SpecificConfig-r17.h +NR_MBS-ServiceInfo-r17.h +NR_MBS-ServiceList-r17.h +NR_MBS-SessionInfoList-r17.h +NR_MBS-SessionInfo-r17.h +NR_MCC.h +NR_MCCH-Config-r17.h +NR_MCCH-Message-r17.h +NR_MCCH-MessageType-r17.h +NR_MCCH-RepetitionPeriodAndOffset-r17.h +NR_MCC-MNC-Digit.h +NR_MCGFailureInformation-r16.h +NR_MCGFailureInformation-r16-IEs.h +NR_MeasAndMobParametersCommon.h +NR_MeasAndMobParametersFR2-2-r17.h +NR_MeasAndMobParametersFRX-Diff.h +NR_MeasAndMobParameters.h +NR_MeasAndMobParametersMRDC-Common.h +NR_MeasAndMobParametersMRDC-Common-v1610.h +NR_MeasAndMobParametersMRDC-Common-v1700.h +NR_MeasAndMobParametersMRDC-Common-v1730.h +NR_MeasAndMobParametersMRDC-FRX-Diff.h +NR_MeasAndMobParametersMRDC.h +NR_MeasAndMobParametersMRDC-v1560.h +NR_MeasAndMobParametersMRDC-v1610.h +NR_MeasAndMobParametersMRDC-v1700.h +NR_MeasAndMobParametersMRDC-v1730.h +NR_MeasAndMobParametersMRDC-XDD-Diff.h +NR_MeasAndMobParametersMRDC-XDD-Diff-v1560.h +NR_MeasAndMobParameters-v1700.h +NR_MeasAndMobParametersXDD-Diff.h +NR_MeasConfigAppLayerId-r17.h +NR_MeasConfigAppLayer-r17.h +NR_MeasConfig.h +NR_MeasConfigMN.h +NR_MeasConfigSN.h +NR_MeasGapConfig.h +NR_MeasGapId-r17.h +NR_MeasGapSharingConfig.h +NR_MeasGapSharingScheme.h +NR_MeasId.h +NR_MeasIdleCarrierEUTRA-r16.h +NR_MeasIdleCarrierNR-r16.h +NR_MeasIdleConfigDedicated-r16.h +NR_MeasIdleConfigSIB-r16.h +NR_MeasIdToAddMod.h +NR_MeasIdToAddModList.h +NR_MeasIdToRemoveList.h +NR_MeasObjectCLI-r16.h +NR_MeasObjectEUTRA.h +NR_MeasObjectId.h +NR_MeasObjectNR.h +NR_MeasObjectNR-SL-r16.h +NR_MeasObjectRxTxDiff-r17.h +NR_MeasObjectToAddMod.h +NR_MeasObjectToAddModList.h +NR_MeasObjectToRemoveList.h +NR_MeasObjectUTRA-FDD-r16.h +NR_MeasPosPreConfigGapId-r17.h +NR_MeasQuantityResultsEUTRA.h +NR_MeasQuantityResults.h +NR_MeasReportAppLayer-r17.h +NR_MeasReportQuantityCLI-r16.h +NR_MeasReportQuantity.h +NR_MeasReportQuantity-r16.h +NR_MeasReportQuantityUTRA-FDD-r16.h +NR_MeasResult2EUTRA.h +NR_MeasResult2EUTRA-r16.h +NR_MeasResult2NR.h +NR_MeasResult2NR-r16.h +NR_MeasResult2UTRA-FDD-r16.h +NR_MeasResultCBR-NR-r16.h +NR_MeasResultCellListSFTD-EUTRA.h +NR_MeasResultCellListSFTD-NR.h +NR_MeasResultCellSFTD-NR.h +NR_MeasResultCLI-r16.h +NR_MeasResultCLI-RSSI-r16.h +NR_MeasResultEUTRA.h +NR_MeasResultFailedCell-r16.h +NR_MeasResultForRSSI-r16.h +NR_MeasResultFreqListFailMRDC.h +NR_MeasResultFreqList.h +NR_MeasResultIdleEUTRA-r16.h +NR_MeasResultIdleNR-r16.h +NR_MeasResultList2EUTRA.h +NR_MeasResultList2EUTRA-r16.h +NR_MeasResultList2NR.h +NR_MeasResultList2NR-r16.h +NR_MeasResultList2UTRA.h +NR_MeasResultListCLI-RSSI-r16.h +NR_MeasResultListEUTRA.h +NR_MeasResultListLogging2NR-r16.h +NR_MeasResultListLoggingNR-r16.h +NR_MeasResultListNR.h +NR_MeasResultListSRS-RSRP-r16.h +NR_MeasResultListUTRA-FDD-r16.h +NR_MeasResultLogging2NR-r16.h +NR_MeasResultLoggingNR-r16.h +NR_MeasResultNR.h +NR_MeasResultNR-SL-r16.h +NR_MeasResultRLFNR-r16.h +NR_MeasResultRxTxTimeDiff-r17.h +NR_MeasResultSCG-Failure.h +NR_MeasResultServFreqListEUTRA-SCG.h +NR_MeasResultServFreqListNR-SCG.h +NR_MeasResultServingCell-r16.h +NR_MeasResultServMO.h +NR_MeasResultServMOList.h +NR_MeasResultSFTD-EUTRA.h +NR_MeasResults.h +NR_MeasResultsPerCarrierIdleEUTRA-r16.h +NR_MeasResultsPerCarrierIdleNR-r16.h +NR_MeasResultsPerCellIdleEUTRA-r16.h +NR_MeasResultsPerCellIdleNR-r16.h +NR_MeasResultSRS-RSRP-r16.h +NR_MeasResultsSL-r16.h +NR_MeasResultSuccessHONR-r17.h +NR_MeasResultUTRA-FDD-r16.h +NR_MeasRSSI-ReportConfig-r16.h +NR_MeasTiming.h +NR_MeasTimingList.h +NR_MeasTriggerQuantityCLI-r16.h +NR_MeasTriggerQuantityEUTRA.h +NR_MeasTriggerQuantity.h +NR_MeasTriggerQuantityOffset.h +NR_MeasTriggerQuantityUTRA-FDD-r16.h +NR_MeasurementReportAppLayerList-r17.h +NR_MeasurementReportAppLayer-r17.h +NR_MeasurementReportAppLayer-r17-IEs.h +NR_MeasurementReport.h +NR_MeasurementReport-IEs.h +NR_MeasurementReportSidelink.h +NR_MeasurementReportSidelink-r16-IEs.h +NR_MeasurementTimingConfiguration.h +NR_MeasurementTimingConfiguration-IEs.h +NR_MeasurementTimingConfiguration-v1550-IEs.h +NR_MeasurementTimingConfiguration-v1610-IEs.h +NR_MIB.h +NR_MIMO-LayersDL.h +NR_MIMO-LayersUL.h +NR_MIMO-ParametersPerBand.h +NR_MIMOParam-r17.h +NR_MinSchedulingOffsetK0-Values-r16.h +NR_MinSchedulingOffsetK0-Values-r17.h +NR_MinSchedulingOffsetK2-Values-r16.h +NR_MinSchedulingOffsetK2-Values-r17.h +NR_MinSchedulingOffsetPreferenceConfig-r16.h +NR_MinSchedulingOffsetPreferenceExt-r17.h +NR_MinSchedulingOffsetPreference-r16.h +NR_MinTimeGapFR2-2-r17.h +NR_MinTimeGap-r16.h +NR_MNC.h +NR_MobilityFromNRCommand.h +NR_MobilityFromNRCommand-IEs.h +NR_MobilityFromNRCommand-v1610-IEs.h +NR_MobilityHistoryReport-r16.h +NR_MobilityStateParameters.h +NR_ModulationOrder.h +NR_MPE-Config-FR2-r16.h +NR_MPE-Config-FR2-r17.h +NR_MPE-ResourceId-r17.h +NR_MPE-Resource-r17.h +NR_MRB-Identity-r17.h +NR_MRB-InfoBroadcast-r17.h +NR_MRB-ListBroadcast-r17.h +NR_MRB-PDCP-ConfigBroadcast-r17.h +NR_MRB-RLC-ConfigBroadcast-r17.h +NR_MRB-ToAddModList-r17.h +NR_MRB-ToAddMod-r17.h +NR_MRB-ToReleaseList-r17.h +NR_MRDC-AssistanceInfo.h +NR_MRDC-Parameters.h +NR_MRDC-Parameters-v1580.h +NR_MRDC-Parameters-v1590.h +NR_MRDC-Parameters-v15g0.h +NR_MRDC-Parameters-v1620.h +NR_MRDC-Parameters-v1630.h +NR_MRDC-Parameters-v1700.h +NR_MRDC-SecondaryCellGroupConfig.h +NR_MsgA-ConfigCommon-r16.h +NR_MsgA-DMRS-Config-r16.h +NR_MsgA-PUSCH-Config-r16.h +NR_MsgA-PUSCH-Resource-r16.h +NR_MTCH-SSB-MappingWindowCycleOffset-r17.h +NR_MTCH-SSB-MappingWindowIndex-r17.h +NR_MTCH-SSB-MappingWindowList-r17.h +NR_MultiBandInfoListEUTRA.h +NR_MulticastConfig-r17.h +NR_MulticastRLC-BearerConfig-r17.h +NR_MultiDCI-MultiTRP-r16.h +NR_MultiFrequencyBandListNR.h +NR_MultiFrequencyBandListNR-SIB.h +NR_MultiPDSCH-TDRA-List-r17.h +NR_MultiPDSCH-TDRA-r17.h +NR_MUSIM-Assistance-r17.h +NR_MUSIM-GapAssistanceConfig-r17.h +NR_MUSIM-GapConfig-r17.h +NR_MUSIM-GapId-r17.h +NR_MUSIM-GapInfo-r17.h +NR_MUSIM-GapPreferenceList-r17.h +NR_MUSIM-Gap-r17.h +NR_MUSIM-LeaveAssistanceConfig-r17.h +NR_MUSIM-Starting-SFN-AndSubframe-r17.h +NR_NAICS-Capability-Entry.h +NR_NeedForGapNCSG-ConfigEUTRA-r17.h +NR_NeedForGapNCSG-ConfigNR-r17.h +NR_NeedForGapNCSG-InfoEUTRA-r17.h +NR_NeedForGapNCSG-InfoNR-r17.h +NR_NeedForGapsBandListNR-r16.h +NR_NeedForGapsConfigNR-r16.h +NR_NeedForGapsInfoNR-r16.h +NR_NeedForGapsIntraFreqList-r16.h +NR_NeedForGapsIntraFreq-r16.h +NR_NeedForGapsNR-r16.h +NR_NeedForNCSG-BandListNR-r17.h +NR_NeedForNCSG-EUTRA-r17.h +NR_NeedForNCSG-IntraFreqList-r17.h +NR_NeedForNCSG-IntraFreq-r17.h +NR_NeedForNCSG-NR-r17.h +NR_NeighbourCellInfo-r17.h +NR_NextHopChainingCount.h +NR_NG-5G-S-TMSI.h +NR_NID-r16.h +NR_NonCellDefiningSSB-r17.h +NR_NotificationMessageSidelink-r17.h +NR_NotificationMessageSidelink-r17-IEs.h +NR_NPN-IdentityInfoList-r16.h +NR_NPN-IdentityInfo-r16.h +NR_NPN-Identity-r16.h +NR_NRDC-Parameters.h +NR_NRDC-Parameters-v1570.h +NR_NRDC-Parameters-v15c0.h +NR_NRDC-Parameters-v1610.h +NR_NRDC-Parameters-v1700.h +NR_NR-DL-PRS-PDC-Info-r17.h +NR_NR-DL-PRS-PDC-ResourceSet-r17.h +NR_NR-DL-PRS-Periodicity-and-ResourceSetSlotOffset-r17.h +NR_NR-DL-PRS-ResourceID-r17.h +NR_NR-DL-PRS-Resource-r17.h +NR_NR-FreqInfo.h +NR_NR-MultiBandInfo.h +NR_NR-NS-PmaxList.h +NR_NR-NS-PmaxValue.h +NR_NR-PRS-MeasurementInfoList-r16.h +NR_NR-PRS-MeasurementInfo-r16.h +NR_NR-RS-Type.h +NR_NR-TimeStamp-r17.h +NR_NSAG-IdentityInfo-r17.h +NR_NSAG-ID-r17.h +NR_NSAG-List-r17.h +NR_NTN-Config-r17.h +NR_NTN-NeighCellConfigList-r17.h +NR_NTN-NeighCellConfig-r17.h +NR_NTN-Parameters-r17.h +NR_NumberOfCarriers.h +NR_NumberOfMsg3-Repetitions-r17.h +NR_NZP-CSI-RS-Pairing-r17.h +NR_NZP-CSI-RS-Resource.h +NR_NZP-CSI-RS-ResourceId.h +NR_NZP-CSI-RS-ResourceSet.h +NR_NZP-CSI-RS-ResourceSetId.h +NR_OffsetValue-r17.h +NR_OLPC-SRS-Pos-r16.h +NR_OnDemandSIB-Request-r16.h +NR_Orbital-r17.h +NR_OtherConfig.h +NR_OtherConfig-v1540.h +NR_OtherConfig-v1610.h +NR_OtherConfig-v1700.h +NR_OutsideActiveTimeConfig-r16.h +NR_OverheatingAssistanceConfig.h +NR_OverheatingAssistance.h +NR_OverheatingAssistance-r17.h +NR_P0AlphaSet-r17.h +NR_P0-PUCCH.h +NR_P0-PUCCH-Id.h +NR_P0-PUSCH-AlphaSet.h +NR_P0-PUSCH-AlphaSetId.h +NR_P0-PUSCH-r16.h +NR_P0-PUSCH-SetId-r16.h +NR_P0-PUSCH-Set-r16.h +NR_PagingCycle.h +NR_PagingGroupList-r17.h +NR_Paging.h +NR_PagingRecord.h +NR_PagingRecordList.h +NR_PagingRecordList-v1700.h +NR_PagingRecord-v1700.h +NR_PagingUE-Identity.h +NR_Paging-v1700-IEs.h +NR_PathlossReferenceRS-Config.h +NR_PathlossReferenceRS-Id-r17.h +NR_PathlossReferenceRSList-r16.h +NR_PathlossReferenceRS-r16.h +NR_PathlossReferenceRS-r17.h +NR_PathlossReferenceRSs-v1610.h +NR_PCCH-Config.h +NR_PCCH-Message.h +NR_PCCH-MessageType.h +NR_PCI-ARFCN-EUTRA-r16.h +NR_PCI-ARFCN-NR-r16.h +NR_PCI-List.h +NR_PCI-RangeElement.h +NR_PCI-Range.h +NR_PCI-RangeIndex.h +NR_PCI-RangeIndexList.h +NR_PDCCH-BlindDetection2-r16.h +NR_PDCCH-BlindDetection3-r16.h +NR_PDCCH-BlindDetectionCA-CombIndicator-r16.h +NR_PDCCH-BlindDetectionCA-CombIndicator-r17.h +NR_PDCCH-BlindDetectionCA-Mixed1-r17.h +NR_PDCCH-BlindDetectionCA-MixedExt-r16.h +NR_PDCCH-BlindDetectionCA-Mixed-r17.h +NR_PDCCH-BlindDetectionCG-UE-Mixed1-r17.h +NR_PDCCH-BlindDetectionCG-UE-MixedExt-r16.h +NR_PDCCH-BlindDetectionCG-UE-Mixed-r17.h +NR_PDCCH-BlindDetection.h +NR_PDCCH-BlindDetectionMCG-SCG-r17.h +NR_PDCCH-BlindDetectionMixed1-r17.h +NR_PDCCH-BlindDetectionMixedList-r16.h +NR_PDCCH-BlindDetectionMixed-r17.h +NR_PDCCH-ConfigCommon.h +NR_PDCCH-Config.h +NR_PDCCH-ConfigSIB1.h +NR_PDCCH-MonitoringOccasions-r16.h +NR_PDCCH-RepetitionParameters-r17.h +NR_PDCCH-ServingCellConfig.h +NR_PDCP-Config.h +NR_PDCP-Parameters.h +NR_PDCP-ParametersMRDC.h +NR_PDCP-ParametersMRDC-v1610.h +NR_PDCP-ParametersSidelink-r16.h +NR_PDSCH-CodeBlockGroupTransmission.h +NR_PDSCH-CodeBlockGroupTransmissionList-r16.h +NR_PDSCH-ConfigBroadcast-r17.h +NR_PDSCH-ConfigCommon.h +NR_PDSCH-Config.h +NR_PDSCH-ConfigIndex-r17.h +NR_PDSCH-ConfigPTM-r17.h +NR_PDSCH-HARQ-ACK-CodebookList-r16.h +NR_PDSCH-HARQ-ACK-EnhType3Index-r17.h +NR_PDSCH-HARQ-ACK-EnhType3-r17.h +NR_PDSCH-ServingCellConfig.h +NR_PDSCH-TimeDomainResourceAllocation.h +NR_PDSCH-TimeDomainResourceAllocationList.h +NR_PDSCH-TimeDomainResourceAllocationList-r16.h +NR_PDSCH-TimeDomainResourceAllocation-r16.h +NR_PDU-SessionID.h +NR_PEI-Config-r17.h +NR_PeriodicalReportConfig.h +NR_PeriodicalReportConfigInterRAT.h +NR_PeriodicalReportConfigNR-SL-r16.h +NR_PeriodicRNAU-TimerValue.h +NR_PerRAAttemptInfoList-r16.h +NR_PerRAAttemptInfo-r16.h +NR_PerRACSI-RSInfo-r16.h +NR_PerRACSI-RSInfo-v1660.h +NR_PerRAInfoList-r16.h +NR_PerRAInfoList-v1660.h +NR_PerRAInfo-r16.h +NR_PerRASSBInfo-r16.h +NR_PH-InfoMCG.h +NR_PH-InfoSCG.h +NR_PHR-Config.h +NR_PH-TypeListMCG.h +NR_PH-TypeListSCG.h +NR_PH-UplinkCarrierMCG.h +NR_PH-UplinkCarrierSCG.h +NR_Phy-ParametersCommon.h +NR_Phy-ParametersCommon-v16a0.h +NR_Phy-ParametersFR1.h +NR_Phy-ParametersFR2.h +NR_Phy-ParametersFRX-Diff.h +NR_Phy-Parameters.h +NR_Phy-ParametersMRDC.h +NR_Phy-ParametersSharedSpectrumChAccess-r16.h +NR_Phy-Parameters-v16a0.h +NR_Phy-ParametersXDD-Diff.h +NR_PhysCellId.h +NR_PhysCellIdUTRA-FDD-r16.h +NR_PhysicalCellGroupConfig.h +NR_PLMN-Identity-EUTRA-5GC.h +NR_PLMN-Identity.h +NR_PLMN-IdentityInfo.h +NR_PLMN-IdentityInfoList.h +NR_PLMN-IdentityList2-r16.h +NR_PLMN-IdentityList-EUTRA-5GC.h +NR_PLMN-IdentityList-EUTRA-EPC.h +NR_PLMN-IdentityList-r16.h +NR_PLMN-RAN-AreaCell.h +NR_PLMN-RAN-AreaCellList.h +NR_PLMN-RAN-AreaConfig.h +NR_PLMN-RAN-AreaConfigList.h +NR_P-Max.h +NR_PollByte.h +NR_PollPDU.h +NR_PortIndex2.h +NR_PortIndex4.h +NR_PortIndex8.h +NR_PortIndexFor8Ranks.h +NR_PosGapConfig-r17.h +NR_PositionStateVector-r17.h +NR_PositionVelocity-r17.h +NR_PosMeasGapPreConfigToAddModList-r17.h +NR_PosMeasGapPreConfigToReleaseList-r17.h +NR_PosSchedulingInfo-r16.h +NR_PosSIB-MappingInfo-r16.h +NR_PosSIB-ReqInfo-r16.h +NR_PosSIB-Type-r16.h +NR_PosSI-SchedulingInfo-r16.h +NR_PosSRS-RRC-Inactive-OutsideInitialUL-BWP-r17.h +NR_PosSystemInformation-r16-IEs.h +NR_PowSav-ParametersCommon-r16.h +NR_PowSav-ParametersFR2-2-r17.h +NR_PowSav-ParametersFRX-Diff-r16.h +NR_PowSav-Parameters-r16.h +NR_PowSav-Parameters-v1700.h +NR_PRACH-ResourceDedicatedBFR.h +NR_PRB-Id.h +NR_ProcessingParameters.h +NR_PropagationDelayDifference-r17.h +NR_PropDelayDiffReportConfig-r17.h +NR_PRS-ProcessingCapabilityOutsideMGinPPWperType-r17.h +NR_PTRS-DensityRecommendationDL.h +NR_PTRS-DensityRecommendationUL.h +NR_PTRS-DownlinkConfig.h +NR_PTRS-UplinkConfig.h +NR_PUCCH-ConfigCommon.h +NR_PUCCH-Config.h +NR_PUCCH-ConfigurationList-r16.h +NR_PUCCH-CSI-Resource.h +NR_PUCCH-format0.h +NR_PUCCH-format1.h +NR_PUCCH-format2.h +NR_PUCCH-format3.h +NR_PUCCH-format4.h +NR_PUCCH-FormatConfigExt-r17.h +NR_PUCCH-FormatConfig.h +NR_PUCCH-Group-Config-r17.h +NR_PUCCH-Grp-CarrierTypes-r16.h +NR_PUCCH-MaxCodeRate.h +NR_PUCCH-PathlossReferenceRS.h +NR_PUCCH-PathlossReferenceRS-Id.h +NR_PUCCH-PathlossReferenceRS-Id-r17.h +NR_PUCCH-PathlossReferenceRS-Id-v1610.h +NR_PUCCH-PathlossReferenceRS-r16.h +NR_PUCCH-PowerControl.h +NR_PUCCH-PowerControlSetInfoId-r17.h +NR_PUCCH-PowerControlSetInfo-r17.h +NR_PUCCH-ResourceExt-v1610.h +NR_PUCCH-ResourceGroupId-r16.h +NR_PUCCH-ResourceGroup-r16.h +NR_PUCCH-Resource.h +NR_PUCCH-ResourceId.h +NR_PUCCH-ResourceSet.h +NR_PUCCH-ResourceSetId.h +NR_PUCCH-SpatialRelationInfoExt-r16.h +NR_PUCCH-SpatialRelationInfo.h +NR_PUCCH-SpatialRelationInfoId.h +NR_PUCCH-SpatialRelationInfoId-r16.h +NR_PUCCH-SpatialRelationInfoId-v1610.h +NR_PUCCH-SRS.h +NR_PUCCH-TPC-CommandConfig.h +NR_PUSCH-Allocation-r16.h +NR_PUSCH-CodeBlockGroupTransmission.h +NR_PUSCH-ConfigCommon.h +NR_PUSCH-Config.h +NR_PUSCH-PathlossReferenceRS.h +NR_PUSCH-PathlossReferenceRS-Id.h +NR_PUSCH-PathlossReferenceRS-Id-r17.h +NR_PUSCH-PathlossReferenceRS-Id-v1610.h +NR_PUSCH-PathlossReferenceRS-r16.h +NR_PUSCH-PowerControl.h +NR_PUSCH-PowerControl-v1610.h +NR_PUSCH-ServingCellConfig.h +NR_PUSCH-TimeDomainResourceAllocation.h +NR_PUSCH-TimeDomainResourceAllocationList.h +NR_PUSCH-TimeDomainResourceAllocationList-r16.h +NR_PUSCH-TimeDomainResourceAllocation-r16.h +NR_PUSCH-TPC-CommandConfig.h +NR_QCL-Info.h +NR_QFI.h +NR_Q-OffsetRange.h +NR_Q-OffsetRangeList.h +NR_Q-QualMin.h +NR_Q-RxLevMin.h +NR_QuantityConfig.h +NR_QuantityConfigNR.h +NR_QuantityConfigRS.h +NR_QuantityConfigUTRA-FDD-r16.h +NR_RACH-ConfigCommon.h +NR_RACH-ConfigCommonTwoStepRA-r16.h +NR_RACH-ConfigDedicated.h +NR_RACH-ConfigGeneric.h +NR_RACH-ConfigGenericTwoStepRA-r16.h +NR_RadioBearerConfig.h +NR_RadioLinkMonitoringConfig.h +NR_RadioLinkMonitoringRS.h +NR_RadioLinkMonitoringRS-Id.h +NR_RA-InformationCommon-r16.h +NR_RAN-AreaCode.h +NR_RAN-AreaConfig.h +NR_RangeToBestCell.h +NR_RAN-NotificationAreaInfo.h +NR_RAN-VisibleMeasurements-r17.h +NR_RAN-VisibleParameters-r17.h +NR_RA-PrioritizationForSlicing-r17.h +NR_RA-Prioritization.h +NR_RA-PrioritizationSliceInfoList-r17.h +NR_RA-PrioritizationSliceInfo-r17.h +NR_RA-ReportList-r16.h +NR_RA-Report-r16.h +NR_RateMatchPatternGroup.h +NR_RateMatchPattern.h +NR_RateMatchPatternId.h +NR_RateMatchPatternLTE-CRS.h +NR_RAT-Type.h +NR_RB-SetGroup-r17.h +NR_ReconfigurationWithSync.h +NR_RedCap-ConfigCommonSIB-r17.h +NR_RedCapParameters-r17.h +NR_RedirectedCarrierInfo-EUTRA.h +NR_RedirectedCarrierInfo.h +NR_ReducedAggregatedBandwidth.h +NR_ReducedAggregatedBandwidth-r17.h +NR_ReducedMaxBW-FRx-r16.h +NR_ReducedMaxCCs-r16.h +NR_ReestablishmentCause.h +NR_ReestablishmentInfo.h +NR_ReestabNCellInfo.h +NR_ReestabNCellInfoList.h +NR_ReestabUE-Identity.h +NR_ReferenceLocation-r17.h +NR_ReferenceSignalConfig.h +NR_ReferenceTimeInfo-r16.h +NR_ReferenceTime-r16.h +NR_RegisteredAMF.h +NR_RejectWaitTime.h +NR_RelayParameters-r17.h +NR_RelaysTriggeredList-r17.h +NR_ReleasePreferenceConfig-r16.h +NR_ReleasePreference-r16.h +NR_RemoteUEInformationSidelink-r17.h +NR_RemoteUEInformationSidelink-r17-IEs.h +NR_RepetitionSchemeConfig-r16.h +NR_RepetitionSchemeConfig-v1630.h +NR_RepFactorAndTimeGap-r17.h +NR_ReportCGI-EUTRA.h +NR_ReportCGI.h +NR_ReportConfigId.h +NR_ReportConfigInterRAT.h +NR_ReportConfigNR.h +NR_ReportConfigNR-SL-r16.h +NR_ReportConfigToAddMod.h +NR_ReportConfigToAddModList.h +NR_ReportConfigToRemoveList.h +NR_ReportInterval.h +NR_ReportSFTD-EUTRA.h +NR_ReportSFTD-NR.h +NR_ReportUplinkTxDirectCurrentMoreCarrier-r17.h +NR_ReselectionThreshold.h +NR_ReselectionThresholdQ.h +NR_ResultsPerCSI-RS-Index.h +NR_ResultsPerCSI-RS-IndexList.h +NR_ResultsPerSSB-Index.h +NR_ResultsPerSSB-IndexIdle-r16.h +NR_ResultsPerSSB-IndexList.h +NR_ResultsPerSSB-IndexList-r16.h +NR_ResumeCause.h +NR_RF-Parameters.h +NR_RF-ParametersMRDC.h +NR_RF-ParametersMRDC-v15g0.h +NR_RF-Parameters-v15g0.h +NR_RF-Parameters-v16a0.h +NR_RLC-BearerConfig.h +NR_RLC-Config.h +NR_RLC-Config-v1610.h +NR_RLC-Config-v1700.h +NR_RLC-Parameters.h +NR_RLC-ParametersSidelink-r16.h +NR_RLF-Report-r16.h +NR_RLF-TimersAndConstants.h +NR_RLM-RelaxationReportingConfig-r17.h +NR_RMTC-Config-r16.h +NR_RNTI-Value.h +NR_RRC-PosSystemInfoRequest-r16-IEs.h +NR_RRCReconfigurationComplete.h +NR_RRCReconfigurationComplete-IEs.h +NR_RRCReconfigurationCompleteSidelink.h +NR_RRCReconfigurationCompleteSidelink-r16-IEs.h +NR_RRCReconfigurationCompleteSidelink-v1710-IEs.h +NR_RRCReconfigurationCompleteSidelink-v1720-IEs.h +NR_RRCReconfigurationComplete-v1530-IEs.h +NR_RRCReconfigurationComplete-v1560-IEs.h +NR_RRCReconfigurationComplete-v1610-IEs.h +NR_RRCReconfigurationComplete-v1640-IEs.h +NR_RRCReconfigurationComplete-v1700-IEs.h +NR_RRCReconfigurationComplete-v1720-IEs.h +NR_RRCReconfigurationFailureSidelink.h +NR_RRCReconfigurationFailureSidelink-r16-IEs.h +NR_RRCReconfiguration.h +NR_RRCReconfiguration-IEs.h +NR_RRCReconfigurationSidelink.h +NR_RRCReconfigurationSidelink-r16-IEs.h +NR_RRCReconfigurationSidelink-v1700-IEs.h +NR_RRCReconfiguration-v1530-IEs.h +NR_RRCReconfiguration-v1540-IEs.h +NR_RRCReconfiguration-v1560-IEs.h +NR_RRCReconfiguration-v1610-IEs.h +NR_RRCReconfiguration-v1700-IEs.h +NR_RRCReestablishmentComplete.h +NR_RRCReestablishmentComplete-IEs.h +NR_RRCReestablishmentComplete-v1610-IEs.h +NR_RRCReestablishment.h +NR_RRCReestablishment-IEs.h +NR_RRCReestablishmentRequest.h +NR_RRCReestablishmentRequest-IEs.h +NR_RRCReestablishment-v1700-IEs.h +NR_RRCReject.h +NR_RRCReject-IEs.h +NR_RRCRelease.h +NR_RRCRelease-IEs.h +NR_RRCRelease-v1540-IEs.h +NR_RRCRelease-v1610-IEs.h +NR_RRCRelease-v1650-IEs.h +NR_RRCRelease-v1710-IEs.h +NR_RRCResumeComplete.h +NR_RRCResumeComplete-IEs.h +NR_RRCResumeComplete-v1610-IEs.h +NR_RRCResumeComplete-v1640-IEs.h +NR_RRCResumeComplete-v1700-IEs.h +NR_RRCResumeComplete-v1720-IEs.h +NR_RRCResume.h +NR_RRCResume-IEs.h +NR_RRCResumeRequest1.h +NR_RRCResumeRequest1-IEs.h +NR_RRCResumeRequest.h +NR_RRCResumeRequest-IEs.h +NR_RRCResume-v1560-IEs.h +NR_RRCResume-v1610-IEs.h +NR_RRCResume-v1700-IEs.h +NR_RRCSetupComplete.h +NR_RRCSetupComplete-IEs.h +NR_RRCSetupComplete-v1610-IEs.h +NR_RRCSetupComplete-v1690-IEs.h +NR_RRCSetupComplete-v1700-IEs.h +NR_RRCSetup.h +NR_RRCSetup-IEs.h +NR_RRCSetupRequest.h +NR_RRCSetupRequest-IEs.h +NR_RRCSetup-v1700-IEs.h +NR_RRCSystemInfoRequest.h +NR_RRCSystemInfoRequest-IEs.h +NR_RRC-TransactionIdentifier.h +NR_RRM-Config.h +NR_RRM-MeasRelaxationReportingConfig-r17.h +NR_RSRP-ChangeThreshold-r17.h +NR_RSRP-RangeEUTRA.h +NR_RSRP-Range.h +NR_RSRQ-RangeEUTRA.h +NR_RSRQ-RangeEUTRA-r16.h +NR_RSRQ-Range.h +NR_RSSI-PeriodicityAndOffset-r16.h +NR_RSSI-Range-r16.h +NR_RSSI-ResourceConfigCLI-r16.h +NR_RSSI-ResourceId-r16.h +NR_RSSI-ResourceListConfigCLI-r16.h +NR_RxTxPeriodical-r17.h +NR_RxTxReportInterval-r17.h +NR_RxTxTimeDiff-r17.h +NR_SBAS-ID-r16.h +NR_SBCCH-SL-BCH-Message.h +NR_SBCCH-SL-BCH-MessageType.h +NR_ScalingFactorSidelink-r16.h +NR_SCCH-Message.h +NR_SCCH-MessageType.h +NR_SCellActivationRS-ConfigId-r17.h +NR_SCellActivationRS-Config-r17.h +NR_SCellConfig.h +NR_SCellIndex.h +NR_SCellSIB20-r17.h +NR_SCG-DeactivationPreferenceConfig-r17.h +NR_SCGFailureInformationEUTRA.h +NR_SCGFailureInformationEUTRA-IEs.h +NR_SCGFailureInformationEUTRA-v1590-IEs.h +NR_SCGFailureInformation.h +NR_SCGFailureInformation-IEs.h +NR_SCGFailureInformation-v1590-IEs.h +NR_SchedulingInfo2-r17.h +NR_SchedulingInfo.h +NR_SchedulingRequestConfig.h +NR_SchedulingRequestConfig-v1700.h +NR_SchedulingRequestId.h +NR_SchedulingRequestResourceConfigExt-v1610.h +NR_SchedulingRequestResourceConfigExt-v1700.h +NR_SchedulingRequestResourceConfig.h +NR_SchedulingRequestResourceId.h +NR_SchedulingRequestToAddModExt-v1700.h +NR_SchedulingRequestToAddMod.h +NR_ScramblingId.h +NR_SCS-SpecificCarrier.h +NR_SCS-SpecificDuration-r17.h +NR_SDAP-Config.h +NR_SDAP-Parameters.h +NR_SDT-CG-Config-r17.h +NR_SDT-ConfigCommonSIB-r17.h +NR_SDT-Config-r17.h +NR_SDT-MAC-PHY-CG-Config-r17.h +NR_SearchSpaceExt-r16.h +NR_SearchSpaceExt-v1700.h +NR_SearchSpace.h +NR_SearchSpaceId.h +NR_SearchSpaceSwitchConfig-r16.h +NR_SearchSpaceSwitchConfig-r17.h +NR_SearchSpaceSwitchTrigger-r16.h +NR_SearchSpaceZero.h +NR_SecurityAlgorithmConfig.h +NR_SecurityConfig.h +NR_SecurityConfigSMC.h +NR_SecurityModeCommand.h +NR_SecurityModeCommand-IEs.h +NR_SecurityModeComplete.h +NR_SecurityModeComplete-IEs.h +NR_SecurityModeFailure.h +NR_SecurityModeFailure-IEs.h +NR_SelectedBandEntriesMN.h +NR_SemiStaticChannelAccessConfig-r16.h +NR_SemiStaticChannelAccessConfigUE-r17.h +NR_Sensor-LocationInfo-r16.h +NR_Sensor-NameList-r16.h +NR_ServCellIndex.h +NR_ServCellInfoListMCG-EUTRA-r16.h +NR_ServCellInfoListMCG-NR-r16.h +NR_ServCellInfoListSCG-EUTRA-r16.h +NR_ServCellInfoListSCG-NR-r16.h +NR_ServCellInfoXCG-EUTRA-r16.h +NR_ServCellInfoXCG-NR-r16.h +NR_ServingAdditionalPCIIndex-r17.h +NR_ServingCellAndBWP-Id-r17.h +NR_ServingCellConfigCommon.h +NR_ServingCellConfigCommonSIB.h +NR_ServingCellConfig.h +NR_SetupRelease.h +NR_SFTD-FrequencyList-EUTRA.h +NR_SFTD-FrequencyList-NR.h +NR_SharedSpectrumChAccessParamsPerBand-r16.h +NR_SharedSpectrumChAccessParamsPerBand-v1630.h +NR_SharedSpectrumChAccessParamsPerBand-v1640.h +NR_SharedSpectrumChAccessParamsPerBand-v1650.h +NR_SharedSpectrumChAccessParamsPerBand-v1710.h +NR_ShortI-RNTI-Value.h +NR_ShortMAC-I.h +NR_SHR-Cause-r17.h +NR_SIB10-r16.h +NR_SIB11-r16.h +NR_SIB12-IEs-r16.h +NR_SIB12-r16.h +NR_SIB13-r16.h +NR_SIB14-r16.h +NR_SIB15-r17.h +NR_SIB16-r17.h +NR_SIB17-IEs-r17.h +NR_SIB17-r17.h +NR_SIB18-r17.h +NR_SIB19-r17.h +NR_SIB1.h +NR_SIB1-v1610-IEs.h +NR_SIB1-v1630-IEs.h +NR_SIB1-v1700-IEs.h +NR_SIB20-r17.h +NR_SIB21-r17.h +NR_SIB2.h +NR_SIB3.h +NR_SIB4.h +NR_SIB5.h +NR_SIB6.h +NR_SIB7.h +NR_SIB8.h +NR_SIB9.h +NR_SIB-Mapping.h +NR_SIB-Mapping-v1700.h +NR_SIBpos-r16.h +NR_SIB-ReqInfo-r16.h +NR_SIB-TypeInfo.h +NR_SIB-TypeInfo-v1700.h +NR_SIB-Type-r17.h +NR_SidelinkParametersEUTRA-r16.h +NR_SidelinkParametersNR-r16.h +NR_SidelinkParameters-r16.h +NR_SidelinkPreconfigNR-r16.h +NR_SidelinkUEInformationNR-r16.h +NR_SidelinkUEInformationNR-r16-IEs.h +NR_SidelinkUEInformationNR-v1700-IEs.h +NR_SimulSRS-ForAntennaSwitching-r16.h +NR_SimultaneousRxTxPerBandPair.h +NR_SINR-RangeEUTRA.h +NR_SINR-Range.h +NR_SI-RequestConfig.h +NR_SI-RequestResources.h +NR_SI-SchedulingInfo.h +NR_SI-SchedulingInfo-v1700.h +NR_SK-Counter.h +NR_SL-AccessInfo-L2U2N-r17.h +NR_SL-BetaOffsets-r16.h +NR_SL-BWP-ConfigCommon-r16.h +NR_SL-BWP-Config-r16.h +NR_SL-BWP-DiscPoolConfigCommon-r17.h +NR_SL-BWP-DiscPoolConfig-r17.h +NR_SL-BWP-Generic-r16.h +NR_SL-BWP-PoolConfigCommon-r16.h +NR_SL-BWP-PoolConfig-r16.h +NR_SL-CBR-CommonTxConfigList-r16.h +NR_SL-CBR-LevelsConfig-r16.h +NR_SL-CBR-PriorityTxConfigList-r16.h +NR_SL-CBR-PriorityTxConfigList-v1650.h +NR_SL-CBR-PSSCH-TxConfig-r16.h +NR_SL-CBR-r16.h +NR_SL-CG-MaxTransNumList-r16.h +NR_SL-CG-MaxTransNum-r16.h +NR_SL-ConfigCommonNR-r16.h +NR_SL-ConfigDedicatedEUTRA-Info-r16.h +NR_SL-ConfigDedicatedNR-r16.h +NR_SL-ConfigIndexCG-r16.h +NR_SL-ConfiguredGrantConfigList-r16.h +NR_SL-ConfiguredGrantConfig-r16.h +NR_SL-CSI-RS-Config-r16.h +NR_SL-DestinationIdentity-r16.h +NR_SL-DestinationIndex-r16.h +NR_SL-DiscConfigCommon-r17.h +NR_SL-DiscConfig-r17.h +NR_SL-DRX-ConfigGC-BC-r17.h +NR_SL-DRX-Config-r17.h +NR_SL-DRX-ConfigUC-Info-r17.h +NR_SL-DRX-ConfigUC-r17.h +NR_SL-DRX-ConfigUC-SemiStatic-r17.h +NR_SL-DRX-GC-BC-QoS-r17.h +NR_SL-DRX-GC-Generic-r17.h +NR_SL-EUTRA-AnchorCarrierFreqList-r16.h +NR_SL-EventTriggerConfig-r16.h +NR_SL-FailureList-r16.h +NR_SL-Failure-r16.h +NR_SL-FreqConfigCommon-r16.h +NR_SL-FreqConfig-r16.h +NR_SL-Freq-Id-r16.h +NR_SliceCellListNR-r17.h +NR_SliceInfoDedicated-r17.h +NR_SliceInfoListDedicated-r17.h +NR_SliceInfoList-r17.h +NR_SliceInfo-r17.h +NR_SL-InterestedFreqList-r16.h +NR_SL-InterUE-CoordinationConfig-r17.h +NR_SL-InterUE-CoordinationScheme1-r17.h +NR_SL-InterUE-CoordinationScheme2-r17.h +NR_SL-L2RelayUE-Config-r17.h +NR_SL-L2RemoteUE-Config-r17.h +NR_SL-LatencyBoundIUC-Report-r17.h +NR_SL-LogicalChannelConfigPC5-r16.h +NR_SL-LogicalChannelConfig-r16.h +NR_SL-MappedQoS-FlowsListDedicated-r16.h +NR_SL-MappingToAddMod-r17.h +NR_SL-MeasConfigCommon-r16.h +NR_SL-MeasConfigInfo-r16.h +NR_SL-MeasConfig-r16.h +NR_SL-MeasIdInfo-r16.h +NR_SL-MeasIdList-r16.h +NR_SL-MeasId-r16.h +NR_SL-MeasIdToRemoveList-r16.h +NR_SL-MeasObjectId-r16.h +NR_SL-MeasObjectInfo-r16.h +NR_SL-MeasObjectList-r16.h +NR_SL-MeasObject-r16.h +NR_SL-MeasObjectToRemoveList-r16.h +NR_SL-MeasQuantityResult-r16.h +NR_SL-MeasReportQuantity-r16.h +NR_SL-MeasResultListRelay-r17.h +NR_SL-MeasResult-r16.h +NR_SL-MeasResultRelay-r17.h +NR_SL-MeasResults-r16.h +NR_SL-MeasTriggerQuantity-r16.h +NR_SL-MinMaxMCS-Config-r16.h +NR_SL-MinMaxMCS-List-r16.h +NR_SL-NR-AnchorCarrierFreqList-r16.h +NR_SlotBased-r16.h +NR_SlotBased-v1630.h +NR_SlotFormatCombination.h +NR_SlotFormatCombinationId.h +NR_SlotFormatCombinationsPerCell.h +NR_SlotFormatIndicator.h +NR_SL-PagingIdentityRemoteUE-r17.h +NR_SL-PagingInfo-RemoteUE-r17.h +NR_SL-PathSwitchConfig-r17.h +NR_SL-PBPS-CPS-Config-r17.h +NR_SL-PDCP-ConfigPC5-r16.h +NR_SL-PDCP-Config-r16.h +NR_SL-PeriodCG-r16.h +NR_SL-PeriodicalReportConfig-r16.h +NR_SL-PHY-MAC-RLC-Config-r16.h +NR_SL-PHY-MAC-RLC-Config-v1700.h +NR_SL-PowerControl-r16.h +NR_SL-PQFI-r16.h +NR_SL-PQI-r16.h +NR_SL-PreconfigGeneral-r16.h +NR_SL-PreconfigurationNR-r16.h +NR_SL-PriorityTxConfigIndex-r16.h +NR_SL-PriorityTxConfigIndex-v1650.h +NR_SL-PSBCH-Config-r16.h +NR_SL-PSCCH-Config-r16.h +NR_SL-PSFCH-Config-r16.h +NR_SL-PSSCH-Config-r16.h +NR_SL-PSSCH-TxConfigList-r16.h +NR_SL-PSSCH-TxConfig-r16.h +NR_SL-PSSCH-TxParameters-r16.h +NR_SL-PTRS-Config-r16.h +NR_SL-QoS-FlowIdentity-r16.h +NR_SL-QoS-Info-r16.h +NR_SL-QoS-Profile-r16.h +NR_SL-QuantityConfig-r16.h +NR_SL-RadioBearerConfig-r16.h +NR_SLRB-Config-r16.h +NR_SLRB-PC5-ConfigIndex-r16.h +NR_SLRB-Uu-ConfigIndex-r16.h +NR_SL-RelayUE-Config-r17.h +NR_SL-RemoteUE-Config-r17.h +NR_SL-RemoteUE-RB-Identity-r17.h +NR_SL-RemoteUE-ToAddMod-r17.h +NR_SL-ReportConfigId-r16.h +NR_SL-ReportConfigInfo-r16.h +NR_SL-ReportConfigList-r16.h +NR_SL-ReportConfig-r16.h +NR_SL-ReportConfigToRemoveList-r16.h +NR_SL-RequestedSIB-List-r17.h +NR_SL-ReselectionConfig-r17.h +NR_SL-ResourcePoolConfig-r16.h +NR_SL-ResourcePoolID-r16.h +NR_SL-ResourcePool-r16.h +NR_SL-ResourceReservePeriod-r16.h +NR_SL-RLC-BearerConfigIndex-r16.h +NR_SL-RLC-BearerConfig-r16.h +NR_SL-RLC-ChannelConfigPC5-r17.h +NR_SL-RLC-ChannelConfig-r17.h +NR_SL-RLC-ChannelID-r17.h +NR_SL-RLC-ConfigPC5-r16.h +NR_SL-RLC-Config-r16.h +NR_SL-RLC-ModeIndication-r16.h +NR_SL-RoHC-Profiles-r16.h +NR_SL-RSRP-Range-r16.h +NR_SL-RS-Type-r16.h +NR_SL-RxDRX-ReportList-v1700.h +NR_SL-RxDRX-Report-v1700.h +NR_SL-RxInterestedGC-BC-DestList-r17.h +NR_SL-RxInterestedGC-BC-Dest-r17.h +NR_SL-ScheduledConfig-r16.h +NR_SL-SDAP-ConfigPC5-r16.h +NR_SL-SDAP-Config-r16.h +NR_SL-SelectionWindowConfig-r16.h +NR_SL-SelectionWindowList-r16.h +NR_SL-ServingCellInfo-r17.h +NR_SL-SIB-ReqInfo-r17.h +NR_SL-SourceIdentity-r17.h +NR_SL-SRAP-Config-r17.h +NR_SL-SSB-TimeAllocation-r16.h +NR_SL-SyncAllowed-r16.h +NR_SL-SyncConfigList-r16.h +NR_SL-SyncConfig-r16.h +NR_SL-ThresholdRSRP-Condition1-B-1-r17.h +NR_SL-Thres-RSRP-List-r16.h +NR_SL-Thres-RSRP-r16.h +NR_SL-TimeOffsetEUTRA-r16.h +NR_SL-TrafficPatternInfo-r16.h +NR_SL-TxConfigIndex-r16.h +NR_SL-TxInterestedFreqList-r16.h +NR_SL-TxPercentageConfig-r16.h +NR_SL-TxPercentageList-r16.h +NR_SL-TxPoolDedicated-r16.h +NR_SL-TxPower-r16.h +NR_SL-TxProfileList-r17.h +NR_SL-TxProfile-r17.h +NR_SL-TxResourceReqCommRelayInfo-r17.h +NR_SL-TxResourceReqCommRelay-r17.h +NR_SL-TxResourceReqDisc-r17.h +NR_SL-TxResourceReqL2U2N-Relay-r17.h +NR_SL-TxResourceReqListCommRelay-r17.h +NR_SL-TxResourceReqListDisc-r17.h +NR_SL-TxResourceReqList-r16.h +NR_SL-TxResourceReqList-v1700.h +NR_SL-TxResourceReq-r16.h +NR_SL-TxResourceReq-v1700.h +NR_SL-TypeTxSync-r16.h +NR_SL-UE-AssistanceInformationNR-r16.h +NR_SL-UE-SelectedConfig-r16.h +NR_SL-UE-SelectedConfigRP-r16.h +NR_SL-ZoneConfigMCR-r16.h +NR_SL-ZoneConfig-r16.h +NR_SN-FieldLengthAM.h +NR_SN-FieldLengthUM.h +NR_SNPN-AccessInfo-r17.h +NR_S-NSSAI.h +NR_SON-Parameters-r16.h +NR_SpatialRelationInfo-PDC-r17.h +NR_SpatialRelations.h +NR_SpatialRelationsSRS-Pos-r16.h +NR_SpCellConfig.h +NR_SpeedStateScaleFactors.h +NR_SPS-ConfigDeactivationStateList-r16.h +NR_SPS-ConfigDeactivationState-r16.h +NR_SPS-Config.h +NR_SPS-ConfigIndex-r16.h +NR_SPS-ConfigMulticastToAddModList-r17.h +NR_SPS-ConfigMulticastToReleaseList-r17.h +NR_SPS-ConfigToAddModList-r16.h +NR_SPS-ConfigToReleaseList-r16.h +NR_SPS-PUCCH-AN-List-r16.h +NR_SPS-PUCCH-AN-r16.h +NR_SRB-Identity.h +NR_SRB-Identity-v1700.h +NR_SRB-ToAddMod.h +NR_SRB-ToAddModList.h +NR_SRI-PUSCH-PowerControl.h +NR_SRI-PUSCH-PowerControlId.h +NR_SRS-AllPosResources-r16.h +NR_SRS-AllPosResourcesRRC-Inactive-r17.h +NR_SRS-CarrierSwitching.h +NR_SRS-CC-SetIndex.h +NR_SRS-Config.h +NR_SRS-PathlossReferenceRS-Id-r16.h +NR_SRS-PeriodicityAndOffsetExt-r16.h +NR_SRS-PeriodicityAndOffset.h +NR_SRS-PeriodicityAndOffset-r16.h +NR_SRS-PosConfig-r17.h +NR_SRS-PosResourceAP-r16.h +NR_SRS-PosResourceId-r16.h +NR_SRS-PosResource-r16.h +NR_SRS-PosResourceSetId-r16.h +NR_SRS-PosResourceSet-r16.h +NR_SRS-PosResourceSP-r16.h +NR_SRS-PosResources-r16.h +NR_SRS-PosRRC-InactiveConfig-r17.h +NR_SRS-PosRRC-Inactive-r17.h +NR_SRS-ResourceConfigCLI-r16.h +NR_SRS-Resource.h +NR_SRS-ResourceId.h +NR_SRS-ResourceListConfigCLI-r16.h +NR_SRS-ResourceSet.h +NR_SRS-ResourceSetId.h +NR_SRS-Resources.h +NR_SRS-RSRP-Range-r16.h +NR_SRS-RSRP-TriggeredList-r16.h +NR_SRS-SpatialRelationInfo.h +NR_SRS-SpatialRelationInfoPos-r16.h +NR_SRS-SwitchingAffectedBandsNR-r17.h +NR_SRS-SwitchingTimeEUTRA.h +NR_SRS-SwitchingTimeNR.h +NR_SRS-TPC-CommandConfig.h +NR_SRS-TPC-PDCCH-Config.h +NR_SSB-ConfigMobility.h +NR_SSB-Configuration-r16.h +NR_SSB-Index.h +NR_SSB-InfoNcell-r16.h +NR_SSB-MTC2.h +NR_SSB-MTC2-LP-r16.h +NR_SSB-MTC3List-r16.h +NR_SSB-MTC3-r16.h +NR_SSB-MTC4List-r17.h +NR_SSB-MTC4-r17.h +NR_SSB-MTC-AdditionalPCI-r17.h +NR_SSB-MTC.h +NR_SSB-PositionQCL-CellList-r17.h +NR_SSB-PositionQCL-Cell-r17.h +NR_SSB-PositionQCL-CellsToAddModList-r16.h +NR_SSB-PositionQCL-CellsToAddMod-r16.h +NR_SSB-PositionQCL-Relation-r16.h +NR_SSB-PositionQCL-Relation-r17.h +NR_SSB-ToMeasure.h +NR_SS-RSSI-Measurement.h +NR_SubcarrierSpacing.h +NR_SubgroupConfig-r17.h +NR_SubSlot-Config-r16.h +NR_SuccessHO-Config-r17.h +NR_SuccessHO-Report-r17.h +NR_SupportedBandUTRA-FDD-r16.h +NR_SupportedBandwidth.h +NR_SupportedBandwidth-v1700.h +NR_SupportedCSI-RS-Resource.h +NR_SuspendConfig.h +NR_SystemInformation.h +NR_SystemInformation-IEs.h +NR_T312-r16.h +NR_T316-r16.h +NR_TAG-Config.h +NR_TAG.h +NR_TAG-Id.h +NR_TA-Info-r17.h +NR_TAR-Config-r17.h +NR_TCI-ActivatedConfig-r17.h +NR_TCI-State.h +NR_TCI-StateId.h +NR_TCI-UL-State-Id-r17.h +NR_TCI-UL-State-r17.h +NR_TDD-UL-DL-ConfigCommon.h +NR_TDD-UL-DL-ConfigDedicated.h +NR_TDD-UL-DL-ConfigDedicated-IAB-MT-r16.h +NR_TDD-UL-DL-Pattern.h +NR_TDD-UL-DL-SlotConfig.h +NR_TDD-UL-DL-SlotConfig-IAB-MT-r16.h +NR_TDD-UL-DL-SlotIndex.h +NR_ThresholdNR.h +NR_TimeAlignmentTimer.h +NR_TimeBetweenEvent-r17.h +NR_TimeConnSourceDAPS-Failure-r17.h +NR_TimeSinceCHO-Reconfig-r17.h +NR_TimeSinceFailure-r16.h +NR_TimeToTrigger.h +NR_TimeUntilReconnection-r16.h +NR_TMGI-r17.h +NR_T-Offset-r16.h +NR_T-PollRetransmit.h +NR_TraceReference-r16.h +NR_TrackingAreaCode.h +NR_TrackingAreaCodeList-r16.h +NR_TrackingAreaIdentityList-r16.h +NR_TrackingAreaIdentity-r16.h +NR_TransmissionBandwidth-EUTRA-r16.h +NR_T-ReassemblyExt-r17.h +NR_T-Reassembly.h +NR_T-Reselection.h +NR_TRS-ResourceSet-r17.h +NR_T-StatusProhibit.h +NR_T-StatusProhibit-v1610.h +NR_TwoPUCCH-Grp-ConfigParams-r16.h +NR_TwoPUCCH-Grp-Configurations-r16.h +NR_TwoPUCCH-Grp-Configurations-r17.h +NR_Tx-PoolMeasList-r16.h +NR_UAC-AC1-SelectAssistInfo-r16.h +NR_UAC-AccessCategory1-SelectionAssistanceInfo.h +NR_UAC-BarringInfoSet.h +NR_UAC-BarringInfoSetIndex.h +NR_UAC-BarringInfoSetList.h +NR_UAC-BarringInfoSetList-v1700.h +NR_UAC-BarringInfoSet-v1700.h +NR_UAC-BarringPerCat.h +NR_UAC-BarringPerCatList.h +NR_UAC-BarringPerPLMN.h +NR_UAC-BarringPerPLMN-List.h +NR_UCI-OnPUSCH-DCI-0-2-r16.h +NR_UCI-OnPUSCH.h +NR_UCI-OnPUSCH-ListDCI-0-1-r16.h +NR_UCI-OnPUSCH-ListDCI-0-2-r16.h +NR_UEAssistanceInformation.h +NR_UEAssistanceInformation-IEs.h +NR_UEAssistanceInformationSidelink-r17.h +NR_UEAssistanceInformationSidelink-r17-IEs.h +NR_UEAssistanceInformation-v1540-IEs.h +NR_UEAssistanceInformation-v1610-IEs.h +NR_UEAssistanceInformation-v1700-IEs.h +NR_UE-BasedPerfMeas-Parameters-r16.h +NR_UECapabilityEnquiry.h +NR_UECapabilityEnquiry-IEs.h +NR_UECapabilityEnquirySidelink.h +NR_UECapabilityEnquirySidelink-r16-IEs.h +NR_UECapabilityEnquiry-v1560-IEs.h +NR_UECapabilityEnquiry-v1610-IEs.h +NR_UECapabilityInformation.h +NR_UECapabilityInformation-IEs.h +NR_UECapabilityInformationSidelink.h +NR_UECapabilityInformationSidelink-r16-IEs.h +NR_UECapabilityInformationSidelink-v1700-IEs.h +NR_UE-CapabilityRAT-Container.h +NR_UE-CapabilityRAT-ContainerList.h +NR_UE-CapabilityRAT-Request.h +NR_UE-CapabilityRAT-RequestList.h +NR_UE-CapabilityRequestFilterCommon.h +NR_UE-CapabilityRequestFilterNR.h +NR_UE-CapabilityRequestFilterNR-v1540.h +NR_UE-CapabilityRequestFilterNR-v1710.h +NR_UEInformationRequest-r16.h +NR_UEInformationRequest-r16-IEs.h +NR_UEInformationRequest-v1700-IEs.h +NR_UEInformationResponse-r16.h +NR_UEInformationResponse-r16-IEs.h +NR_UEInformationResponse-v1700-IEs.h +NR_UE-MeasurementsAvailable-r16.h +NR_UE-MRDC-CapabilityAddFRX-Mode.h +NR_UE-MRDC-CapabilityAddXDD-Mode.h +NR_UE-MRDC-CapabilityAddXDD-Mode-v1560.h +NR_UE-MRDC-Capability.h +NR_UE-MRDC-Capability-v1560.h +NR_UE-MRDC-Capability-v15g0.h +NR_UE-MRDC-Capability-v1610.h +NR_UE-MRDC-Capability-v1700.h +NR_UE-MRDC-Capability-v1730.h +NR_UE-NR-CapabilityAddFRX-Mode.h +NR_UE-NR-CapabilityAddFRX-Mode-v1540.h +NR_UE-NR-CapabilityAddFRX-Mode-v1610.h +NR_UE-NR-CapabilityAddXDD-Mode.h +NR_UE-NR-CapabilityAddXDD-Mode-v1530.h +NR_UE-NR-Capability.h +NR_UE-NR-Capability-v1530.h +NR_UE-NR-Capability-v1540.h +NR_UE-NR-Capability-v1550.h +NR_UE-NR-Capability-v1560.h +NR_UE-NR-Capability-v1570.h +NR_UE-NR-Capability-v15c0.h +NR_UE-NR-Capability-v15g0.h +NR_UE-NR-Capability-v15j0.h +NR_UE-NR-Capability-v1610.h +NR_UE-NR-Capability-v1640.h +NR_UE-NR-Capability-v1650.h +NR_UE-NR-Capability-v1690.h +NR_UE-NR-Capability-v16a0.h +NR_UE-NR-Capability-v1700.h +NR_UEPositioningAssistanceInfo-r17.h +NR_UEPositioningAssistanceInfo-r17-IEs.h +NR_UEPositioningAssistanceInfo-v1720-IEs.h +NR_UERadioAccessCapabilityInformation.h +NR_UERadioAccessCapabilityInformation-IEs.h +NR_UE-RadioPagingInfo-r17.h +NR_UERadioPagingInformation.h +NR_UERadioPagingInformation-IEs.h +NR_UERadioPagingInformation-v15e0-IEs.h +NR_UERadioPagingInformation-v1700-IEs.h +NR_UE-SidelinkCapabilityAddXDD-Mode-r16.h +NR_UE-TimersAndConstants.h +NR_UE-TimersAndConstantsRemoteUE-r17.h +NR_UE-TxTEG-AssociationList-r17.h +NR_UE-TxTEG-Association-r17.h +NR_UE-TxTEG-RequestUL-TDOA-Config-r17.h +NR_UL-AccessConfigListDCI-0-1-r16.h +NR_UL-AccessConfigListDCI-0-1-r17.h +NR_UL-AccessConfigListDCI-0-2-r17.h +NR_UL-AccessConfigListDCI-1-1-r16.h +NR_UL-AccessConfigListDCI-1-1-r17.h +NR_UL-AccessConfigListDCI-1-2-r17.h +NR_UL-AM-RLC.h +NR_UL-CCCH1-Message.h +NR_UL-CCCH1-MessageType.h +NR_UL-CCCH-Message.h +NR_UL-CCCH-MessageType.h +NR_UL-DataSplitThreshold.h +NR_UL-DCCH-Message.h +NR_UL-DCCH-MessageType.h +NR_ULDedicatedMessageSegment-r16.h +NR_ULDedicatedMessageSegment-r16-IEs.h +NR_UL-DelayValueConfig-r16.h +NR_UL-ExcessDelayConfig-r17.h +NR_UL-GapFR2-Config-r17.h +NR_UL-GapFR2-Preference-r17.h +NR_ULInformationTransfer.h +NR_ULInformationTransfer-IEs.h +NR_ULInformationTransferIRAT-r16.h +NR_ULInformationTransferIRAT-r16-IEs.h +NR_ULInformationTransferMRDC.h +NR_ULInformationTransferMRDC-IEs.h +NR_ULInformationTransfer-v1700-IEs.h +NR_UL-PDCP-DelayValueResultList-r16.h +NR_UL-PDCP-DelayValueResult-r16.h +NR_UL-PDCP-ExcessDelayResultList-r17.h +NR_UL-PDCP-ExcessDelayResult-r17.h +NR_ULTxSwitchingBandPair-r16.h +NR_ULTxSwitchingBandPair-v1700.h +NR_UL-UM-RLC.h +NR_UPInterruptionTimeAtHO-r17.h +NR_UplinkCancellation-r16.h +NR_UplinkConfigCommon.h +NR_UplinkConfigCommonSIB.h +NR_UplinkConfigCommonSIB-v1700.h +NR_UplinkConfigCommon-v1700.h +NR_UplinkConfig.h +NR_UplinkDataCompression-r17.h +NR_UplinkHARQ-mode-r17.h +NR_Uplink-powerControlId-r17.h +NR_Uplink-powerControl-r17.h +NR_UplinkTxDirectCurrentBWP.h +NR_UplinkTxDirectCurrentCarrierInfo-r16.h +NR_UplinkTxDirectCurrentCell.h +NR_UplinkTxDirectCurrentList.h +NR_UplinkTxDirectCurrentMoreCarrierList-r17.h +NR_UplinkTxDirectCurrentTwoCarrierInfo-r16.h +NR_UplinkTxDirectCurrentTwoCarrierList-r16.h +NR_UplinkTxDirectCurrentTwoCarrier-r16.h +NR_UplinkTxSwitchingBandParameters-v1700.h +NR_UplinkTxSwitching-r16.h +NR_UTRA-FDD-CellIndexList-r16.h +NR_UTRA-FDD-CellIndex-r16.h +NR_UTRA-FDD-Parameters-r16.h +NR_UTRA-FDD-Q-OffsetRange-r16.h +NR_UuMessageTransferSidelink-r17.h +NR_UuMessageTransferSidelink-r17-IEs.h +NR_Uu-RelayRLC-ChannelConfig-r17.h +NR_Uu-RelayRLC-ChannelID-r17.h +NR_ValidityAreaList-r16.h +NR_ValidityArea-r16.h +NR_ValidityCellList.h +NR_VarConditionalReconfig.h +NR_VarConnEstFailReportList-r17.h +NR_VarConnEstFailReport-r16.h +NR_VarLogMeasConfig-r16-IEs.h +NR_VarLogMeasReport-r16.h +NR_VarMeasConfig.h +NR_VarMeasConfigSL-r16.h +NR_VarMeasIdleConfig-r16.h +NR_VarMeasIdleReport-r16.h +NR_VarMeasReport.h +NR_VarMeasReportList.h +NR_VarMeasReportListSL-r16.h +NR_VarMeasReportSL-r16.h +NR_VarMobilityHistoryReport-r16.h +NR_VarMobilityHistoryReport-r17.h +NR_VarPendingRNA-Update.h +NR_VarRA-Report-r16.h +NR_VarResumeMAC-Input.h +NR_VarRLF-Report-r16.h +NR_VarShortMAC-Input.h +NR_VarSuccessHO-Report-r17-IEs.h +NR_VelocityStateVector-r17.h +NR_VictimSystemType.h +NR_VictimSystemType-r16.h +NR_VisitedCellInfoList-r16.h +NR_VisitedCellInfo-r16.h +NR_VisitedPSCellInfoList-r17.h +NR_VisitedPSCellInfo-r17.h +NR_WithinActiveTimeConfig-r16.h +NR_WLAN-Identifiers-r16.h +NR_WLAN-NameList-r16.h +NR_WLAN-Name-r16.h +NR_WLAN-RSSI-Range-r16.h +NR_WLAN-RTT-r16.h +NR_ZP-CSI-RS-Resource.h +NR_ZP-CSI-RS-ResourceId.h +NR_ZP-CSI-RS-ResourceSet.h +NR_ZP-CSI-RS-ResourceSetId.h +NULL.h +OCTET_STRING.h +OPEN_TYPE.h +per_decoder.h +per_encoder.h +per_opentype.h +per_support.h +xer_decoder.h +xer_encoder.h +xer_support.h +) diff --git a/openair2/RRC/NR/MESSAGES/CMakeLists.txt b/openair2/RRC/NR/MESSAGES/CMakeLists.txt index c43b846c82..dcf7ecf3f1 100644 --- a/openair2/RRC/NR/MESSAGES/CMakeLists.txt +++ b/openair2/RRC/NR/MESSAGES/CMakeLists.txt @@ -1,9 +1,11 @@ -set(NR_RRC_VERSION 16 4 1) +set(NR_RRC_VERSION 17 3 0) make_version(NR_RRC_cc ${NR_RRC_VERSION}) string(REPLACE ";" "." NR_RRC_RELEASE "${NR_RRC_VERSION}") if(NR_RRC_RELEASE VERSION_EQUAL "16.4.1") include(ASN.1/nr-rrc-16.4.1.cmake) +elseif(NR_RRC_RELEASE VERSION_EQUAL "17.3.0") + include(ASN.1/nr-rrc-17.3.0.cmake) else() message(FATAL_ERROR "unknown NR_RRC_RELEASE ${NR_RRC_RELEASE}") endif() @@ -14,8 +16,23 @@ add_custom_command(OUTPUT ${nr_rrc_source} ${nr_rrc_headers} COMMENT "Generating NR RRC source file from ${CMAKE_CURRENT_SOURCE_DIR}/${NR_RRC_GRAMMAR}" ) +# Many other targets include NR RRC ASN.1 headers, without actually needing the +# actual library (asn1_nr_rrc). Therefore, below we create the INTERFACE +# library asn1_nr_rrc_hdrs that only contains these headers. To actually wait +# that the headers are created in add_custom_command, we use an intermediary +# add_custom_target which create a target that waits for the headers, and make +# a dependency from asn1_nr_rrc_hdrs to gen_nr_rrc_hdrs, which is the +# recommended way, see https://gitlab.kitware.com/cmake/cmake/-/issues/17366. +# In newer cmake version (e.g., 3.20), it is also possible to have +# ${nr_rrc_headers} directly in the add_library(asn1_nr_rrc_hdrs) statement, +# without the need for asn1_lte_rrc_hdrs +add_custom_target(gen_nr_rrc_hdrs DEPENDS ${nr_rrc_headers}) +add_library(asn1_nr_rrc_hdrs INTERFACE) +add_dependencies(asn1_nr_rrc_hdrs gen_nr_rrc_hdrs) +target_include_directories(asn1_nr_rrc_hdrs INTERFACE "${CMAKE_CURRENT_BINARY_DIR}") + add_library(asn1_nr_rrc ${nr_rrc_source}) -target_include_directories(asn1_nr_rrc PUBLIC "${CMAKE_CURRENT_BINARY_DIR}") +target_link_libraries(asn1_nr_rrc PUBLIC asn1_nr_rrc_hdrs) target_compile_options(asn1_nr_rrc PRIVATE -DASN_DISABLE_OER_SUPPORT -w PUBLIC -DNR_RRC_VERSION=${NR_RRC_RELEASE}) diff --git a/openair2/RRC/NR/MESSAGES/asn1_msg.c b/openair2/RRC/NR/MESSAGES/asn1_msg.c index e7a690b7c1..283b1b9b79 100644 --- a/openair2/RRC/NR/MESSAGES/asn1_msg.c +++ b/openair2/RRC/NR/MESSAGES/asn1_msg.c @@ -321,7 +321,7 @@ uint16_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier, // cellAccessRelatedInfo // TODO : Add support for more than one PLMN int num_plmn = 1; // int num_plmn = configuration->num_plmn; - asn1cSequenceAdd(sib1->cellAccessRelatedInfo.plmn_IdentityList.list, struct NR_PLMN_IdentityInfo, nr_plmn_info); + asn1cSequenceAdd(sib1->cellAccessRelatedInfo.plmn_IdentityInfoList.list, struct NR_PLMN_IdentityInfo, nr_plmn_info); for (int i = 0; i < num_plmn; ++i) { asn1cSequenceAdd(nr_plmn_info->plmn_IdentityList.list, struct NR_PLMN_Identity, nr_plmn); asn1cCalloc(nr_plmn->mcc, mcc); @@ -478,7 +478,7 @@ uint16_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier, UL->initialUplinkBWP.genericParameters = configuration->scc->uplinkConfigCommon->initialUplinkBWP->genericParameters; UL->initialUplinkBWP.rach_ConfigCommon = configuration->scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon; UL->initialUplinkBWP.pusch_ConfigCommon = configuration->scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon; - UL->initialUplinkBWP.pusch_ConfigCommon->choice.setup->groupHoppingEnabledTransformPrecoding = null; + UL->initialUplinkBWP.pusch_ConfigCommon->choice.setup->groupHoppingEnabledTransformPrecoding = NULL; UL->initialUplinkBWP.pucch_ConfigCommon = configuration->scc->uplinkConfigCommon->initialUplinkBWP->pucch_ConfigCommon; @@ -658,7 +658,7 @@ int do_RRCReject(uint8_t Mod_id, memset((void *)&dl_ccch_msg, 0, sizeof(NR_DL_CCCH_Message_t)); dl_ccch_msg.message.present = NR_DL_CCCH_MessageType_PR_c1; dl_ccch_msg.message.choice.c1 = CALLOC(1, sizeof(struct NR_DL_CCCH_MessageType__c1)); - dl_ccch_msg.message.choice.c1->present = NR_RRCReject__criticalExtensions_PR_rrcReject; + dl_ccch_msg.message.choice.c1->present = NR_DL_CCCH_MessageType__c1_PR_rrcReject; dl_ccch_msg.message.choice.c1->choice.rrcReject = CALLOC(1,sizeof(NR_RRCReject_t)); rrcReject = dl_ccch_msg.message.choice.c1->choice.rrcReject; @@ -723,7 +723,7 @@ void fill_initial_SpCellConfig(int uid, config_pucch_resset1(pucch_Config, NULL); set_pucch_power_config(pucch_Config, configuration->do_CSIRS); - initialUplinkBWP->pusch_Config = config_pusch(NULL, scc); + initialUplinkBWP->pusch_Config = config_pusch(NULL); long maxMIMO_Layers = uplinkConfig && uplinkConfig->pusch_ServingCellConfig && @@ -735,7 +735,7 @@ void fill_initial_SpCellConfig(int uid, initialUplinkBWP->srs_Config = calloc(1,sizeof(*initialUplinkBWP->srs_Config)); config_srs(scc, initialUplinkBWP->srs_Config, NULL, curr_bwp, uid, 0, maxMIMO_Layers, 0); - scheduling_request_config(scc, pucch_Config); + scheduling_request_config(scc, pucch_Config, scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing); set_dl_DataToUL_ACK(pucch_Config, configuration->minRXTXTIME, scc->uplinkConfigCommon->initialUplinkBWP->genericParameters.subcarrierSpacing); @@ -1152,43 +1152,21 @@ void fill_initial_cellGroupConfig(int uid, const NR_ServingCellConfig_t *servingcellconfigdedicated, const gNB_RrcConfigurationReq *configuration) { - NR_MAC_CellGroupConfig_t *mac_CellGroupConfig = NULL; - NR_PhysicalCellGroupConfig_t *physicalCellGroupConfig = NULL; - + + NR_PhysicalCellGroupConfig_t *physicalCellGroupConfig = NULL; + cellGroupConfig->cellGroupId = 0; - + /* Rlc Bearer Config */ /* TS38.331 9.2.1 Default SRB configurations */ cellGroupConfig->rlc_BearerToAddModList = calloc(1, sizeof(*cellGroupConfig->rlc_BearerToAddModList)); NR_RLC_BearerConfig_t *rlc_BearerConfig = get_SRB_RLC_BearerConfig(1, 1, NR_LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms1000); asn1cSeqAdd(&cellGroupConfig->rlc_BearerToAddModList->list, rlc_BearerConfig); - + cellGroupConfig->rlc_BearerToReleaseList = NULL; - + /* mac CellGroup Config */ - mac_CellGroupConfig = calloc(1, sizeof(*mac_CellGroupConfig)); - - mac_CellGroupConfig->bsr_Config = calloc(1, sizeof(*mac_CellGroupConfig->bsr_Config)); - mac_CellGroupConfig->bsr_Config->periodicBSR_Timer = NR_BSR_Config__periodicBSR_Timer_sf10; - mac_CellGroupConfig->bsr_Config->retxBSR_Timer = NR_BSR_Config__retxBSR_Timer_sf80; - mac_CellGroupConfig->tag_Config = calloc(1, sizeof(*mac_CellGroupConfig->tag_Config)); - mac_CellGroupConfig->tag_Config->tag_ToReleaseList = NULL; - mac_CellGroupConfig->tag_Config->tag_ToAddModList = calloc(1,sizeof(*mac_CellGroupConfig->tag_Config->tag_ToAddModList)); - struct NR_TAG *tag=calloc(1,sizeof(*tag)); - tag->tag_Id = 0; - tag->timeAlignmentTimer = NR_TimeAlignmentTimer_infinity; - asn1cSeqAdd(&mac_CellGroupConfig->tag_Config->tag_ToAddModList->list,tag); - set_phr_config(mac_CellGroupConfig); - - mac_CellGroupConfig->schedulingRequestConfig = calloc(1, sizeof(*mac_CellGroupConfig->schedulingRequestConfig)); - mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList = CALLOC(1,sizeof(*mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList)); - struct NR_SchedulingRequestToAddMod *schedulingrequestlist = CALLOC(1,sizeof(*schedulingrequestlist)); - schedulingrequestlist->schedulingRequestId = 0; - schedulingrequestlist->sr_ProhibitTimer = NULL; - schedulingrequestlist->sr_TransMax = NR_SchedulingRequestToAddMod__sr_TransMax_n64; - asn1cSeqAdd(&(mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList->list),schedulingrequestlist); - - cellGroupConfig->mac_CellGroupConfig = mac_CellGroupConfig; + cellGroupConfig->mac_CellGroupConfig = configure_mac_cellgroup(); physicalCellGroupConfig = calloc(1,sizeof(*physicalCellGroupConfig)); physicalCellGroupConfig->p_NR_FR1 = NULL; @@ -1298,27 +1276,24 @@ uint8_t do_NR_SecurityModeCommand( uint8_t *const buffer, const uint8_t Transaction_id, const uint8_t cipheringAlgorithm, - NR_IntegrityProtAlgorithm_t *integrityProtAlgorithm + NR_IntegrityProtAlgorithm_t integrityProtAlgorithm ) //------------------------------------------------------------------------------ { - NR_DL_DCCH_Message_t dl_dcch_msg; + NR_DL_DCCH_Message_t dl_dcch_msg={0}; asn_enc_rval_t enc_rval; - memset(&dl_dcch_msg,0,sizeof(NR_DL_DCCH_Message_t)); dl_dcch_msg.message.present = NR_DL_DCCH_MessageType_PR_c1; - dl_dcch_msg.message.choice.c1=CALLOC(1,sizeof(struct NR_DL_DCCH_MessageType__c1)); - dl_dcch_msg.message.choice.c1->present = NR_DL_DCCH_MessageType__c1_PR_securityModeCommand; - dl_dcch_msg.message.choice.c1->choice.securityModeCommand = CALLOC(1, sizeof(struct NR_SecurityModeCommand)); - dl_dcch_msg.message.choice.c1->choice.securityModeCommand->rrc_TransactionIdentifier = Transaction_id; - dl_dcch_msg.message.choice.c1->choice.securityModeCommand->criticalExtensions.present = NR_SecurityModeCommand__criticalExtensions_PR_securityModeCommand; + asn1cCalloc(dl_dcch_msg.message.choice.c1, c1); + c1->present = NR_DL_DCCH_MessageType__c1_PR_securityModeCommand; + asn1cCalloc(c1->choice.securityModeCommand,scm); + scm->rrc_TransactionIdentifier = Transaction_id; + scm->criticalExtensions.present = NR_SecurityModeCommand__criticalExtensions_PR_securityModeCommand; - dl_dcch_msg.message.choice.c1->choice.securityModeCommand->criticalExtensions.choice.securityModeCommand = - CALLOC(1, sizeof(struct NR_SecurityModeCommand_IEs)); + asn1cCalloc(scm->criticalExtensions.choice.securityModeCommand,scmIE); // the two following information could be based on the mod_id - dl_dcch_msg.message.choice.c1->choice.securityModeCommand->criticalExtensions.choice.securityModeCommand->securityConfigSMC.securityAlgorithmConfig.cipheringAlgorithm + scmIE->securityConfigSMC.securityAlgorithmConfig.cipheringAlgorithm = (NR_CipheringAlgorithm_t)cipheringAlgorithm; - dl_dcch_msg.message.choice.c1->choice.securityModeCommand->criticalExtensions.choice.securityModeCommand->securityConfigSMC.securityAlgorithmConfig.integrityProtAlgorithm - = integrityProtAlgorithm; + asn1cCallocOne(scmIE->securityConfigSMC.securityAlgorithmConfig.integrityProtAlgorithm, integrityProtAlgorithm); if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) { xer_fprint(stdout, &asn_DEF_NR_DL_DCCH_Message, (void *)&dl_dcch_msg); @@ -1332,7 +1307,7 @@ uint8_t do_NR_SecurityModeCommand( AssertFatal(enc_rval.encoded >0 , "ASN1 message encoding failed (%s, %lu)!\n", enc_rval.failed_type->name, enc_rval.encoded); - + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NR_DL_DCCH_Message,&dl_dcch_msg); LOG_D(NR_RRC, "[gNB %d] securityModeCommand for UE %lx Encoded %zd bits (%zd bytes)\n", ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid, enc_rval.encoded, (enc_rval.encoded + 7) / 8); // rrc_ue_process_ueCapabilityEnquiry(0,1000,&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry,0); @@ -1521,10 +1496,7 @@ int16_t do_RRCReconfiguration( } if(cellGroupConfig!=NULL){ - update_cellGroupConfig(cellGroupConfig, - ue_context_pP->local_uid, - ue_context_pP ? ue_context_pP->ue_context.UE_Capability_nr : NULL, - configuration); + update_cellGroupConfig(cellGroupConfig, ue_context_pP->ue_context.gNB_ue_ngap_id, ue_context_pP ? ue_context_pP->ue_context.UE_Capability_nr : NULL, configuration); enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig, NULL, @@ -1754,29 +1726,27 @@ do_NR_DLInformationTransfer( //------------------------------------------------------------------------------ { ssize_t encoded; - NR_DL_DCCH_Message_t dl_dcch_msg; - memset(&dl_dcch_msg, 0, sizeof(NR_DL_DCCH_Message_t)); + NR_DL_DCCH_Message_t dl_dcch_msg={0}; dl_dcch_msg.message.present = NR_DL_DCCH_MessageType_PR_c1; - dl_dcch_msg.message.choice.c1 = CALLOC(1, sizeof(struct NR_DL_DCCH_MessageType__c1)); - dl_dcch_msg.message.choice.c1->present = NR_DL_DCCH_MessageType__c1_PR_dlInformationTransfer; + asn1cCalloc(dl_dcch_msg.message.choice.c1, c1); + c1->present = NR_DL_DCCH_MessageType__c1_PR_dlInformationTransfer; - dl_dcch_msg.message.choice.c1->choice.dlInformationTransfer = CALLOC(1, sizeof(NR_DLInformationTransfer_t)); - dl_dcch_msg.message.choice.c1->choice.dlInformationTransfer->rrc_TransactionIdentifier = transaction_id; - dl_dcch_msg.message.choice.c1->choice.dlInformationTransfer->criticalExtensions.present = + asn1cCalloc(c1->choice.dlInformationTransfer, infoTransfer); + infoTransfer->rrc_TransactionIdentifier = transaction_id; + infoTransfer->criticalExtensions.present = NR_DLInformationTransfer__criticalExtensions_PR_dlInformationTransfer; - dl_dcch_msg.message.choice.c1->choice.dlInformationTransfer-> - criticalExtensions.choice.dlInformationTransfer = CALLOC(1, sizeof(NR_DLInformationTransfer_IEs_t)); - dl_dcch_msg.message.choice.c1->choice.dlInformationTransfer-> - criticalExtensions.choice.dlInformationTransfer->dedicatedNAS_Message = CALLOC(1, sizeof(NR_DedicatedNAS_Message_t)); - dl_dcch_msg.message.choice.c1->choice.dlInformationTransfer-> - criticalExtensions.choice.dlInformationTransfer->dedicatedNAS_Message->buf = pdu_buffer; - dl_dcch_msg.message.choice.c1->choice.dlInformationTransfer-> - criticalExtensions.choice.dlInformationTransfer->dedicatedNAS_Message->size = pdu_length; + asn1cCalloc(infoTransfer->criticalExtensions.choice.dlInformationTransfer, dlInfoTransfer); + asn1cCalloc(dlInfoTransfer->dedicatedNAS_Message,msg); + // we will free the caller buffer, that is ok in the present code logic (else it will leak memory) but not natural, + // comprehensive code design + msg->buf = pdu_buffer; + msg->size = pdu_length; encoded = uper_encode_to_new_buffer (&asn_DEF_NR_DL_DCCH_Message, NULL, (void *) &dl_dcch_msg, (void **)buffer); AssertFatal(encoded > 0,"ASN1 message encoding failed (%s, %ld)!\n", "DLInformationTransfer", encoded); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NR_DL_DCCH_Message,&dl_dcch_msg ); LOG_D(NR_RRC,"DLInformationTransfer Encoded %zd bytes\n", encoded); //for (int i=0;iue_context.nb_of_pdusessions - 1; - pdu_session_param_t *pdu = ue_context_p->ue_context.pduSession + i; - create_tunnel_req.pdusession_id[0] = pdu->param.pdusession_id; - create_tunnel_req.incoming_rb_id[0] = i + 1; - create_tunnel_req.outgoing_qfi[0] = req->pduSession[i].DRBnGRanList[0].qosFlows[0].id; - memcpy(&create_tunnel_req.dst_addr[0].buffer, &pdu->param.upf_addr.buffer, sizeof(create_tunnel_req.dst_addr[0].buffer)); - create_tunnel_req.dst_addr[0].length = pdu->param.upf_addr.length; - create_tunnel_req.outgoing_teid[0] = pdu->param.gtp_teid; - - create_tunnel_req.num_tunnels = 1; - create_tunnel_req.ue_id = ue_context_p->ue_context.rnti; + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; + LOG_W(NR_RRC, "recreate existing tunnels, while adding new ones\n"); + for (int i = 0; i < UE->nb_of_pdusessions; i++) { + rrc_pdu_session_param_t *pdu = UE->pduSession + i; + create_tunnel_req.pdusession_id[i] = pdu->param.pdusession_id; + create_tunnel_req.incoming_rb_id[i] = i + 1; + create_tunnel_req.outgoing_qfi[i] = req->pduSession[i].DRBnGRanList[0].qosFlows[0].id; + memcpy(&create_tunnel_req.dst_addr[i].buffer, &pdu->param.upf_addr.buffer, sizeof(create_tunnel_req.dst_addr[0].buffer)); + create_tunnel_req.dst_addr[i].length = pdu->param.upf_addr.length; + create_tunnel_req.outgoing_teid[i] = pdu->param.gtp_teid; + } + create_tunnel_req.num_tunnels = UE->nb_of_pdusessions; + create_tunnel_req.ue_id = UE->rnti; int ret = gtpv1u_create_ngu_tunnel(getCxtE1(instance)->gtpInstN3, &create_tunnel_req, &create_tunnel_resp); if (ret != 0) { @@ -127,7 +128,7 @@ static int drb_config_gtpu_create(const protocol_ctxt_t *const ctxt_p, return ret; } - nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(ctxt_p, &create_tunnel_resp, i); + nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(ctxt_p, &create_tunnel_resp, 0); uint8_t *kRRCenc = NULL; uint8_t *kRRCint = NULL; @@ -135,39 +136,27 @@ static int drb_config_gtpu_create(const protocol_ctxt_t *const ctxt_p, uint8_t *kUPint = NULL; /* Derive the keys from kgnb */ if (DRB_configList != NULL) { - nr_derive_key_up_enc(ue_context_p->ue_context.ciphering_algorithm, - ue_context_p->ue_context.kgnb, - &kUPenc); - nr_derive_key_up_int(ue_context_p->ue_context.integrity_algorithm, - ue_context_p->ue_context.kgnb, - &kUPint); + nr_derive_key_up_enc(UE->ciphering_algorithm, UE->kgnb, &kUPenc); + nr_derive_key_up_int(UE->integrity_algorithm, UE->kgnb, &kUPint); } - nr_derive_key_rrc_enc(ue_context_p->ue_context.ciphering_algorithm, - ue_context_p->ue_context.kgnb, - &kRRCenc); - nr_derive_key_rrc_int(ue_context_p->ue_context.integrity_algorithm, - ue_context_p->ue_context.kgnb, - &kRRCint); + nr_derive_key_rrc_enc(UE->ciphering_algorithm, UE->kgnb, &kRRCenc); + nr_derive_key_rrc_int(UE->integrity_algorithm, UE->kgnb, &kRRCint); /* Refresh SRBs/DRBs */ - LOG_D(NR_RRC,"Configuring PDCP DRBs/SRBs for UE %x\n",ue_context_p->ue_context.rnti); + LOG_D(NR_RRC, "Configuring PDCP DRBs/SRBs for UE %x\n", UE->rnti); - nr_pdcp_add_srbs(ctxt_p->enb_flag, ctxt_p->rntiMaybeUEid, - SRB_configList, - (ue_context_p->ue_context.integrity_algorithm << 4) - | ue_context_p->ue_context.ciphering_algorithm, - kRRCenc, - kRRCint); - - nr_pdcp_add_drbs(ctxt_p->enb_flag, ctxt_p->rntiMaybeUEid, 0, + nr_pdcp_add_srbs(ctxt_p->enb_flag, ctxt_p->rntiMaybeUEid, SRB_configList, (UE->integrity_algorithm << 4) | UE->ciphering_algorithm, kRRCenc, kRRCint); + + nr_pdcp_add_drbs(ctxt_p->enb_flag, + ctxt_p->rntiMaybeUEid, + 0, DRB_configList, - (ue_context_p->ue_context.integrity_algorithm << 4) - | ue_context_p->ue_context.ciphering_algorithm, + (UE->integrity_algorithm << 4) | UE->ciphering_algorithm, kUPenc, kUPint, - get_softmodem_params()->sa ? ue_context_p->ue_context.masterCellGroup->rlc_BearerToAddModList : NULL); - + get_softmodem_params()->sa ? UE->masterCellGroup->rlc_BearerToAddModList : NULL); + return ret; } @@ -187,17 +176,18 @@ static NR_SRB_ToAddModList_t **generateSRB2_confList(gNB_RRC_UE_t *ue, NR_SRB_To return SRB_configList2; } static void cucp_cuup_bearer_context_setup_direct(e1ap_bearer_setup_req_t *const req, instance_t instance) { - rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)], req->rnti); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(RC.nrrrc[instance], req->rnti); + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; protocol_ctxt_t ctxt = {0}; - PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, GNB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0, 0); + PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, GNB_FLAG_YES, UE->rnti, 0, 0, 0); fill_DRB_configList(&ctxt, ue_context_p); gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id]; // Fixme: xid not random, but almost! - NR_SRB_ToAddModList_t **SRB_configList2 = generateSRB2_confList(&ue_context_p->ue_context, ue_context_p->ue_context.SRB_configList, ue_context_p->ue_context.pduSession[0].xid); + NR_SRB_ToAddModList_t **SRB_configList2 = generateSRB2_confList(UE, UE->SRB_configList, UE->pduSession[0].xid); // GTP tunnel for UL - int ret = drb_config_gtpu_create(&ctxt, ue_context_p, req, ue_context_p->ue_context.DRB_configList, *SRB_configList2, rrc->e1_inst); + int ret = drb_config_gtpu_create(&ctxt, ue_context_p, req, UE->DRB_configList, *SRB_configList2, rrc->e1_inst); if (ret < 0) AssertFatal(false, "Unable to configure DRB or to create GTP Tunnel\n"); if(!NODE_IS_CU(RC.nrrrc[ctxt.module_id]->node_type)) { @@ -208,7 +198,7 @@ static void cucp_cuup_bearer_context_setup_direct(e1ap_bearer_setup_req_t *const in_addr_t my_addr = inet_addr(RC.nrrrc[ctxt.module_id]->eth_params_s.my_addr); instance_t gtpInst = getCxt(CUtype, instance)->gtpInst; // GTP tunnel for DL - fill_e1ap_bearer_setup_resp(&resp, req, gtpInst, ue_context_p->ue_context.rnti, remote_port, my_addr); + fill_e1ap_bearer_setup_resp(&resp, req, gtpInst, UE->rnti, remote_port, my_addr); prepare_and_send_ue_context_modification_f1(ue_context_p, &resp); } diff --git a/openair2/RRC/NR/cucp_cuup_e1ap.c b/openair2/RRC/NR/cucp_cuup_e1ap.c index 069629db0b..a3311b2ee1 100644 --- a/openair2/RRC/NR/cucp_cuup_e1ap.c +++ b/openair2/RRC/NR/cucp_cuup_e1ap.c @@ -36,7 +36,7 @@ extern RAN_CONTEXT_t RC; static void cucp_cuup_bearer_context_setup_e1ap(e1ap_bearer_setup_req_t *const req, instance_t instance) { - rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)], req->rnti); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(RC.nrrrc[instance], req->rnti); protocol_ctxt_t ctxt = {0}; PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, GNB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0, 0); diff --git a/openair2/RRC/NR/nr_rrc_common.c b/openair2/RRC/NR/nr_rrc_common.c index d67d15acc1..1d231f20bf 100644 --- a/openair2/RRC/NR/nr_rrc_common.c +++ b/openair2/RRC/NR/nr_rrc_common.c @@ -50,8 +50,6 @@ extern mui_t rrc_gNB_mui; //----------------------------------------------------------------------------- void rrc_init_nr_srb_param(NR_LCHAN_DESC *chan) { - rrc_rlc_register_rrc (rrc_data_ind, NULL); //register with rlc - chan->transport_block_size = 4; chan->max_transport_blocks = 16; chan->Delay_class = 1; diff --git a/openair2/RRC/NR/nr_rrc_config.c b/openair2/RRC/NR/nr_rrc_config.c index a38f9c3972..3e506b964c 100644 --- a/openair2/RRC/NR/nr_rrc_config.c +++ b/openair2/RRC/NR/nr_rrc_config.c @@ -35,6 +35,35 @@ const uint8_t slotsperframe[5] = {10, 20, 40, 80, 160}; +NR_MAC_CellGroupConfig_t *configure_mac_cellgroup(void) +{ + NR_MAC_CellGroupConfig_t * mac_CellGroupConfig = calloc(1, sizeof(*mac_CellGroupConfig)); + + mac_CellGroupConfig->bsr_Config = calloc(1, sizeof(*mac_CellGroupConfig->bsr_Config)); + mac_CellGroupConfig->bsr_Config->periodicBSR_Timer = NR_BSR_Config__periodicBSR_Timer_sf10; + mac_CellGroupConfig->bsr_Config->retxBSR_Timer = NR_BSR_Config__retxBSR_Timer_sf80; + mac_CellGroupConfig->tag_Config = calloc(1, sizeof(*mac_CellGroupConfig->tag_Config)); + mac_CellGroupConfig->tag_Config->tag_ToReleaseList = NULL; + mac_CellGroupConfig->tag_Config->tag_ToAddModList = calloc(1,sizeof(*mac_CellGroupConfig->tag_Config->tag_ToAddModList)); + struct NR_TAG *tag=calloc(1,sizeof(*tag)); + tag->tag_Id = 0; + tag->timeAlignmentTimer = NR_TimeAlignmentTimer_infinity; + asn1cSeqAdd(&mac_CellGroupConfig->tag_Config->tag_ToAddModList->list,tag); + + set_phr_config(mac_CellGroupConfig); + + mac_CellGroupConfig->schedulingRequestConfig = calloc(1, sizeof(*mac_CellGroupConfig->schedulingRequestConfig)); + mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList = CALLOC(1,sizeof(*mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList)); + struct NR_SchedulingRequestToAddMod *schedulingrequestlist = CALLOC(1,sizeof(*schedulingrequestlist)); + schedulingrequestlist->schedulingRequestId = 0; + schedulingrequestlist->sr_ProhibitTimer = NULL; + schedulingrequestlist->sr_TransMax = NR_SchedulingRequestToAddMod__sr_TransMax_n64; + asn1cSeqAdd(&(mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList->list),schedulingrequestlist); + + mac_CellGroupConfig->skipUplinkTxDynamic=false; + mac_CellGroupConfig->ext1 = NULL; + return mac_CellGroupConfig; +} NR_SearchSpace_t *rrc_searchspace_config(bool is_common, int searchspaceid, @@ -883,7 +912,7 @@ void set_pucch_power_config(NR_PUCCH_Config_t *pucch_Config, int do_csirs) { asn1cSeqAdd(&pucch_Config->spatialRelationInfoToAddModList->list,pucchspatial); } -static void set_SR_periodandoffset(NR_SchedulingRequestResourceConfig_t *schedulingRequestResourceConfig, const NR_ServingCellConfigCommon_t *scc) +static void set_SR_periodandoffset(NR_SchedulingRequestResourceConfig_t *schedulingRequestResourceConfig, const NR_ServingCellConfigCommon_t *scc, int scs) { const NR_TDD_UL_DL_Pattern_t *tdd = scc->tdd_UL_DL_ConfigurationCommon ? &scc->tdd_UL_DL_ConfigurationCommon->pattern1 : NULL; int sr_slot = 1; // in FDD SR in slot 1 @@ -892,43 +921,46 @@ static void set_SR_periodandoffset(NR_SchedulingRequestResourceConfig_t *schedul schedulingRequestResourceConfig->periodicityAndOffset = calloc(1,sizeof(*schedulingRequestResourceConfig->periodicityAndOffset)); - if(sr_slot<10){ + if(sr_slot < 10 && scs < NR_SubcarrierSpacing_kHz60){ schedulingRequestResourceConfig->periodicityAndOffset->present = NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl10; schedulingRequestResourceConfig->periodicityAndOffset->choice.sl10 = sr_slot; return; } - if(sr_slot<20){ + else if(sr_slot < 20 && scs < NR_SubcarrierSpacing_kHz120){ schedulingRequestResourceConfig->periodicityAndOffset->present = NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl20; schedulingRequestResourceConfig->periodicityAndOffset->choice.sl20 = sr_slot; return; } - if(sr_slot<40){ + else if(sr_slot < 40){ schedulingRequestResourceConfig->periodicityAndOffset->present = NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl40; schedulingRequestResourceConfig->periodicityAndOffset->choice.sl40 = sr_slot; return; } - if(sr_slot<80){ + else if(sr_slot < 80 || scs == NR_SubcarrierSpacing_kHz15){ schedulingRequestResourceConfig->periodicityAndOffset->present = NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl80; schedulingRequestResourceConfig->periodicityAndOffset->choice.sl80 = sr_slot; return; } - if(sr_slot<160){ + else if(sr_slot < 160 || scs == NR_SubcarrierSpacing_kHz30){ schedulingRequestResourceConfig->periodicityAndOffset->present = NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl160; schedulingRequestResourceConfig->periodicityAndOffset->choice.sl160 = sr_slot; return; } - if(sr_slot<320){ + else if(sr_slot < 320 || NR_SubcarrierSpacing_kHz60){ schedulingRequestResourceConfig->periodicityAndOffset->present = NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl320; schedulingRequestResourceConfig->periodicityAndOffset->choice.sl320 = sr_slot; return; } - schedulingRequestResourceConfig->periodicityAndOffset->present = NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl640; - schedulingRequestResourceConfig->periodicityAndOffset->choice.sl640 = sr_slot; + else { + schedulingRequestResourceConfig->periodicityAndOffset->present = NR_SchedulingRequestResourceConfig__periodicityAndOffset_PR_sl640; + schedulingRequestResourceConfig->periodicityAndOffset->choice.sl640 = sr_slot; + } } void scheduling_request_config(const NR_ServingCellConfigCommon_t *scc, - NR_PUCCH_Config_t *pucch_Config) { - + NR_PUCCH_Config_t *pucch_Config, + int scs) +{ // format with <=2 bits in pucch resource set 0 NR_PUCCH_ResourceSet_t *pucchresset = pucch_Config->resourceSetToAddModList->list.array[0]; // assigning the 1st pucch resource in the set to scheduling request @@ -939,7 +971,7 @@ void scheduling_request_config(const NR_ServingCellConfigCommon_t *scc, schedulingRequestResourceConfig->schedulingRequestResourceId = 1; schedulingRequestResourceConfig->schedulingRequestID = 0; - set_SR_periodandoffset(schedulingRequestResourceConfig, scc); + set_SR_periodandoffset(schedulingRequestResourceConfig, scc, scs); schedulingRequestResourceConfig->resource = calloc(1,sizeof(*schedulingRequestResourceConfig->resource)); *schedulingRequestResourceConfig->resource = *pucchressetid; @@ -991,7 +1023,7 @@ void set_dl_mcs_table(int scs, bwp_Dedicated->pdsch_Config->choice.setup->mcs_Table = NULL; } -struct NR_SetupRelease_PUSCH_Config *config_pusch(NR_PUSCH_Config_t *pusch_Config, const NR_ServingCellConfigCommon_t *scc) +struct NR_SetupRelease_PUSCH_Config *config_pusch(NR_PUSCH_Config_t *pusch_Config) { struct NR_SetupRelease_PUSCH_Config *setup_puschconfig = calloc(1, sizeof(*setup_puschconfig)); setup_puschconfig->present = NR_SetupRelease_PUSCH_Config_PR_setup; @@ -1000,24 +1032,34 @@ struct NR_SetupRelease_PUSCH_Config *config_pusch(NR_PUSCH_Config_t *pusch_Confi setup_puschconfig->choice.setup = pusch_Config; pusch_Config->dataScramblingIdentityPUSCH = NULL; - pusch_Config->txConfig = calloc(1, sizeof(*pusch_Config->txConfig)); + if (!pusch_Config->txConfig) + pusch_Config->txConfig = calloc(1, sizeof(*pusch_Config->txConfig)); *pusch_Config->txConfig = NR_PUSCH_Config__txConfig_codebook; pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA = NULL; - pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB = calloc(1, sizeof(*pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB)); + if (!pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB) + pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB = calloc(1, sizeof(*pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB)); pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->present = NR_SetupRelease_DMRS_UplinkConfig_PR_setup; - pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup = calloc(1, sizeof(*pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup)); + if (!pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup) + pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup = calloc(1, sizeof(*pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup)); NR_DMRS_UplinkConfig_t *NR_DMRS_UplinkConfig = pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup; NR_DMRS_UplinkConfig->dmrs_Type = NULL; NR_DMRS_UplinkConfig->dmrs_AdditionalPosition = NULL; NR_DMRS_UplinkConfig->phaseTrackingRS = NULL; NR_DMRS_UplinkConfig->maxLength = NULL; - NR_DMRS_UplinkConfig->transformPrecodingDisabled = calloc(1, sizeof(*NR_DMRS_UplinkConfig->transformPrecodingDisabled)); + if (!NR_DMRS_UplinkConfig->transformPrecodingDisabled) + NR_DMRS_UplinkConfig->transformPrecodingDisabled = calloc(1, sizeof(*NR_DMRS_UplinkConfig->transformPrecodingDisabled)); NR_DMRS_UplinkConfig->transformPrecodingDisabled->scramblingID0 = NULL; NR_DMRS_UplinkConfig->transformPrecodingDisabled->scramblingID1 = NULL; - NR_DMRS_UplinkConfig->transformPrecodingEnabled = NULL; - pusch_Config->pusch_PowerControl = calloc(1, sizeof(*pusch_Config->pusch_PowerControl)); + if (!NR_DMRS_UplinkConfig->transformPrecodingEnabled) + NR_DMRS_UplinkConfig->transformPrecodingEnabled = calloc(1, sizeof(*NR_DMRS_UplinkConfig->transformPrecodingEnabled)); + NR_DMRS_UplinkConfig->transformPrecodingEnabled->nPUSCH_Identity = NULL; + NR_DMRS_UplinkConfig->transformPrecodingEnabled->sequenceHopping = NULL; + NR_DMRS_UplinkConfig->transformPrecodingEnabled->sequenceGroupHopping = NULL; + if (!pusch_Config->pusch_PowerControl) + pusch_Config->pusch_PowerControl = calloc(1, sizeof(*pusch_Config->pusch_PowerControl)); pusch_Config->pusch_PowerControl->tpc_Accumulation = NULL; - pusch_Config->pusch_PowerControl->msg3_Alpha = calloc(1, sizeof(*pusch_Config->pusch_PowerControl->msg3_Alpha)); + if (!pusch_Config->pusch_PowerControl->msg3_Alpha) + pusch_Config->pusch_PowerControl->msg3_Alpha = calloc(1, sizeof(*pusch_Config->pusch_PowerControl->msg3_Alpha)); *pusch_Config->pusch_PowerControl->msg3_Alpha = NR_Alpha_alpha1; pusch_Config->pusch_PowerControl->p0_NominalWithoutGrant = NULL; pusch_Config->pusch_PowerControl->p0_AlphaSets = calloc(1, sizeof(*pusch_Config->pusch_PowerControl->p0_AlphaSets)); @@ -1036,7 +1078,8 @@ struct NR_SetupRelease_PUSCH_Config *config_pusch(NR_PUSCH_Config_t *pusch_Confi asn1cSeqAdd(&pusch_Config->pusch_PowerControl->pathlossReferenceRSToAddModList->list, plrefRS); pusch_Config->pusch_PowerControl->pathlossReferenceRSToReleaseList = NULL; pusch_Config->pusch_PowerControl->twoPUSCH_PC_AdjustmentStates = NULL; - pusch_Config->pusch_PowerControl->deltaMCS = calloc(1, sizeof(*pusch_Config->pusch_PowerControl->deltaMCS)); + if (!pusch_Config->pusch_PowerControl->deltaMCS) + pusch_Config->pusch_PowerControl->deltaMCS = calloc(1, sizeof(*pusch_Config->pusch_PowerControl->deltaMCS)); *pusch_Config->pusch_PowerControl->deltaMCS = NR_PUSCH_PowerControl__deltaMCS_enabled; pusch_Config->pusch_PowerControl->sri_PUSCH_MappingToAddModList = NULL; pusch_Config->pusch_PowerControl->sri_PUSCH_MappingToReleaseList = NULL; @@ -1048,13 +1091,12 @@ struct NR_SetupRelease_PUSCH_Config *config_pusch(NR_PUSCH_Config_t *pusch_Confi pusch_Config->mcs_Table = NULL; pusch_Config->mcs_TableTransformPrecoder = NULL; pusch_Config->transformPrecoder = NULL; - if (scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg3_transformPrecoder == NULL) { - pusch_Config->transformPrecoder = calloc(1, sizeof(*pusch_Config->transformPrecoder)); - *pusch_Config->transformPrecoder = NR_PUSCH_Config__transformPrecoder_disabled; - } - pusch_Config->codebookSubset = calloc(1, sizeof(*pusch_Config->codebookSubset)); + if (!pusch_Config->codebookSubset) + pusch_Config->codebookSubset = calloc(1, sizeof(*pusch_Config->codebookSubset)); *pusch_Config->codebookSubset = NR_PUSCH_Config__codebookSubset_nonCoherent; - asn1cCallocOne(pusch_Config->maxRank, 1); + if (!pusch_Config->maxRank) + pusch_Config->maxRank = calloc(1, sizeof(*pusch_Config->maxRank)); + *pusch_Config->maxRank = 1; pusch_Config->rbg_Size = NULL; pusch_Config->uci_OnPUSCH = NULL; pusch_Config->tp_pi2BPSK = NULL; @@ -1240,7 +1282,7 @@ void config_uplinkBWP(NR_BWP_Uplink_t *ubwp, config_pucch_resset0(pucch_Config, uid, curr_bwp, uecap); config_pucch_resset1(pucch_Config, uecap); set_pucch_power_config(pucch_Config, configuration->do_CSIRS); - scheduling_request_config(scc, pucch_Config); + scheduling_request_config(scc, pucch_Config, ubwp->bwp_Common->genericParameters.subcarrierSpacing); set_dl_DataToUL_ACK(pucch_Config, configuration->minRXTXTIME, ubwp->bwp_Common->genericParameters.subcarrierSpacing); NR_PUSCH_Config_t *pusch_Config = NULL; @@ -1248,7 +1290,7 @@ void config_uplinkBWP(NR_BWP_Uplink_t *ubwp, bwp_loop < servingcellconfigdedicated->uplinkConfig->uplinkBWP_ToAddModList->list.count) { pusch_Config = servingcellconfigdedicated->uplinkConfig->uplinkBWP_ToAddModList->list.array[bwp_loop]->bwp_Dedicated->pusch_Config->choice.setup; } - ubwp->bwp_Dedicated->pusch_Config = config_pusch(pusch_Config, scc); + ubwp->bwp_Dedicated->pusch_Config = config_pusch(pusch_Config); long maxMIMO_Layers = servingcellconfigdedicated && servingcellconfigdedicated->uplinkConfig diff --git a/openair2/RRC/NR/nr_rrc_config.h b/openair2/RRC/NR/nr_rrc_config.h index 85eccc5e53..b64f953814 100644 --- a/openair2/RRC/NR/nr_rrc_config.h +++ b/openair2/RRC/NR/nr_rrc_config.h @@ -53,7 +53,8 @@ void config_pucch_resset1(NR_PUCCH_Config_t *pucch_Config, NR_UE_NR_Capability_t void set_dl_DataToUL_ACK(NR_PUCCH_Config_t *pucch_Config, int min_feedback_time, NR_SubcarrierSpacing_t subcarrierSpacing); void set_pucch_power_config(NR_PUCCH_Config_t *pucch_Config, int do_csirs); void scheduling_request_config(const NR_ServingCellConfigCommon_t *scc, - NR_PUCCH_Config_t *pucch_Config); + NR_PUCCH_Config_t *pucch_Config, + int scs); void config_rsrp_meas_report(NR_CSI_MeasConfig_t *csi_MeasConfig, const NR_ServingCellConfigCommon_t *servingcellconfigcommon, NR_PUCCH_CSI_Resource_t *pucchcsires, int do_csi, int rep_id, int uid); void config_csi_meas_report(NR_CSI_MeasConfig_t *csi_MeasConfig, const NR_ServingCellConfigCommon_t *servingcellconfigcommon, @@ -90,7 +91,7 @@ void prepare_sim_uecap(NR_UE_NR_Capability_t *cap, int numerology, int rbsize, int mcs_table); -struct NR_SetupRelease_PUSCH_Config *config_pusch(NR_PUSCH_Config_t *pusch_Config, const NR_ServingCellConfigCommon_t *scc); +struct NR_SetupRelease_PUSCH_Config *config_pusch(NR_PUSCH_Config_t *pusch_Config); void config_downlinkBWP(NR_BWP_Downlink_t *bwp, const NR_ServingCellConfigCommon_t *scc, const NR_ServingCellConfig_t *servingcellconfigdedicated, @@ -104,5 +105,6 @@ void config_uplinkBWP(NR_BWP_Uplink_t *ubwp, const NR_ServingCellConfig_t *servingcellconfigdedicated, const NR_ServingCellConfigCommon_t *scc, NR_UE_NR_Capability_t *uecap); +NR_MAC_CellGroupConfig_t *configure_mac_cellgroup(void); #endif diff --git a/openair2/RRC/NR/nr_rrc_defs.h b/openair2/RRC/NR/nr_rrc_defs.h index bbc0ad07c7..e53ad60685 100644 --- a/openair2/RRC/NR/nr_rrc_defs.h +++ b/openair2/RRC/NR/nr_rrc_defs.h @@ -269,7 +269,7 @@ typedef struct pdu_session_param_s { uint8_t xid; // transaction_id ngap_Cause_t cause; uint8_t cause_value; -} __attribute__ ((__packed__)) pdu_session_param_t; +} rrc_pdu_session_param_t; typedef struct gNB_RRC_UE_s { uint8_t primaryCC_id; @@ -280,9 +280,7 @@ typedef struct gNB_RRC_UE_s { NR_DRB_ToReleaseList_t *DRB_Release_configList2[NR_RRC_TRANSACTION_IDENTIFIER_NUMBER]; uint8_t DRB_active[NGAP_MAX_DRBS_PER_UE]; - NR_SRB_INFO SI; - NR_SRB_INFO_TABLE_ENTRY Srb1; - NR_SRB_INFO_TABLE_ENTRY Srb2; + NR_SRB_INFO_TABLE_ENTRY Srb[maxSRBs]; // 3gpp max is 3 SRBs, number 1..3, we waste the entry 0 for code simplicity NR_MeasConfig_t *measConfig; NR_HANDOVER_INFO *handover_info; NR_MeasResults_t *measResults; @@ -332,7 +330,7 @@ typedef struct gNB_RRC_UE_s { /* Information from S1AP initial_context_setup_req */ uint32_t gNB_ue_s1ap_id :24; uint32_t gNB_ue_ngap_id; - uint64_t amf_ue_ngap_id:40; + uint64_t amf_ue_ngap_id; nr_rrc_guami_t ue_guami; ngap_security_capabilities_t security_capabilities; @@ -350,11 +348,11 @@ typedef struct gNB_RRC_UE_s { /* Number of e_rab to be modified in the list */ uint8_t nb_of_modify_pdusessions; uint8_t nb_of_failed_pdusessions; - pdu_session_param_t modify_pdusession[NR_NB_RB_MAX]; + rrc_pdu_session_param_t modify_pdusession[NR_NB_RB_MAX]; /* list of e_rab to be setup by RRC layers */ /* list of pdu session to be setup by RRC layers */ nr_e_rab_param_t e_rab[NB_RB_MAX];//[S1AP_MAX_E_RAB]; - pdu_session_param_t pduSession[NGAP_MAX_PDU_SESSION]; + rrc_pdu_session_param_t pduSession[NGAP_MAX_PDU_SESSION]; //release e_rabs uint8_t nb_release_of_e_rabs; e_rab_failed_t e_rabs_release_failed[S1AP_MAX_E_RAB]; @@ -384,7 +382,8 @@ typedef struct gNB_RRC_UE_s { uint8_t established_pdu_sessions_flag; uint32_t ue_rrc_inactivity_timer; int8_t reestablishment_xid; - //------------------------------------------------------------------------------// + uint32_t ue_reestablishment_counter; + uint32_t ue_reconfiguration_after_reestablishment_counter; NR_CellGroupId_t cellGroupId; struct NR_SpCellConfig *spCellConfig; struct NR_CellGroupConfig__sCellToAddModList *sCellconfig; @@ -395,23 +394,13 @@ typedef struct gNB_RRC_UE_s { struct NR_PhysicalCellGroupConfig *physicalCellGroupConfig; /* Nas Pdu */ - uint8_t nas_pdu_flag; - ngap_nas_pdu_t nas_pdu; + ngap_pdu_t nas_pdu; } gNB_RRC_UE_t; typedef struct rrc_gNB_ue_context_s { /* Tree related data */ RB_ENTRY(rrc_gNB_ue_context_s) entries; - - /* Uniquely identifies the UE between MME and eNB within the eNB. - * This id is encoded on 24bits. - */ - ue_id_t ue_id_rnti; - - // another key for protocol layers but should not be used as a key for RB tree - uid_t local_uid; - /* UE id for initial connection to NGAP */ struct gNB_RRC_UE_s ue_context; } rrc_gNB_ue_context_t; @@ -445,7 +434,6 @@ typedef struct { NR_ServingCellConfigCommon_t *servingcellconfigcommon; NR_ServingCellConfig_t *servingcellconfig; NR_CellGroupConfig_t *secondaryCellGroup[MAX_NR_RRC_UE_CONTEXTS]; - NR_SRB_INFO SI; int p_gNB; } rrc_gNB_carrier_data_t; @@ -491,13 +479,7 @@ typedef struct gNB_RRC_INST_s { eth_params_t eth_params_s; rrc_gNB_carrier_data_t carrier; uid_allocator_t uid_allocator; - RB_HEAD(rrc_nr_ue_tree_s, rrc_gNB_ue_context_s) rrc_ue_head; // ue_context tree key search by rnti - int Nb_ue; - hash_table_t *initial_id2_s1ap_ids; // key is content is rrc_ue_s1ap_ids_t - hash_table_t *s1ap_id2_s1ap_ids ; // key is content is rrc_ue_s1ap_ids_t - hash_table_t *initial_id2_ngap_ids; - hash_table_t *ngap_id2_ngap_ids ; - + RB_HEAD(rrc_nr_ue_tree_s, rrc_gNB_ue_context_s) rrc_ue_head; // ue_context tree key search by rnti /// NR cell id uint64_t nr_cellid; diff --git a/openair2/RRC/NR/nr_rrc_proto.h b/openair2/RRC/NR/nr_rrc_proto.h index cac95239e5..5ad9a71e39 100644 --- a/openair2/RRC/NR/nr_rrc_proto.h +++ b/openair2/RRC/NR/nr_rrc_proto.h @@ -64,11 +64,11 @@ void rrc_gNB_generate_SgNBAdditionRequestAcknowledge( rrc_gNB_ue_context_t *const ue_context_pP ); -struct rrc_gNB_ue_context_s *rrc_gNB_allocate_new_UE_context(gNB_RRC_INST *rrc_instance_pP); +rrc_gNB_ue_context_t *rrc_gNB_allocate_new_UE_context(gNB_RRC_INST *rrc_instance_pP); void rrc_parse_ue_capabilities(gNB_RRC_INST *rrc,NR_UE_CapabilityRAT_ContainerList_t *UE_CapabilityRAT_ContainerList, x2ap_ENDC_sgnb_addition_req_t *m, NR_CG_ConfigInfo_IEs_t * cg_config_info); -void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_p, x2ap_ENDC_sgnb_addition_req_t *m); +void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2ap_ENDC_sgnb_addition_req_t *m); void rrc_remove_nsa_user(gNB_RRC_INST *rrc, int rnti); @@ -163,12 +163,6 @@ int nr_rrc_reconfiguration_req(rrc_gNB_ue_context_t *const ue_context_pP const int dl_bwp_id, const int ul_bwp_id); -int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP, - const uint8_t *buffer, - int buffer_length, - const uint8_t *du_to_cu_rrc_container, - int du_to_cu_rrc_container_length); - void rrc_gNB_generate_dedicatedRRCReconfiguration_release( const protocol_ctxt_t *const ctxt_pP, @@ -183,12 +177,6 @@ rrc_gNB_generate_dedicatedRRCReconfiguration( rrc_gNB_ue_context_t *ue_context_pP, NR_CellGroupConfig_t *cell_groupConfig_from_DU); -rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * const ctxt_pP, - const NR_SRB_ToAddModList_t * const srb2add_listP, - const NR_DRB_ToAddModList_t * const drb2add_listP, - const NR_DRB_ToReleaseList_t * const drb2release_listP, - struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list); - void bearer_context_setup_direct(e1ap_bearer_setup_req_t *req, instance_t instance); @@ -217,9 +205,5 @@ void nr_pdcp_add_drbs(eNB_flag_t enb_flag, uint8_t *const kUPint, struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_bearer2add_list); -int rrc_gNB_generate_pcch_msg(uint32_t tmsi, - uint8_t paging_drx, - instance_t instance, - uint8_t CC_id); - +int rrc_gNB_generate_pcch_msg(uint32_t tmsi, uint8_t paging_drx, instance_t instance, uint8_t CC_id); #endif diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index c686bdb81b..a4f57b0fae 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -74,8 +74,6 @@ #include "RRC/NAS/nas_config.h" #include "RRC/NAS/rb_config.h" -#include "OCG.h" -#include "OCG_extern.h" #include "UTIL/OSA/osa_defs.h" @@ -141,14 +139,47 @@ bool DURecvCb(protocol_ctxt_t *ctxt_pP, return true; } -static void openair_nr_rrc_on(gNB_RRC_INST *rrc) +static void nr_rrc_addmod_srbs(int rnti, + const NR_SRB_ToAddModList_t *srb_list, + const struct NR_CellGroupConfig__rlc_BearerToAddModList *bearer_list) { - NR_SRB_INFO *si = &rrc->carrier.SI; - si->Rx_buffer.payload_size = 0; - si->Tx_buffer.payload_size = 0; - si->Active = 1; + if (srb_list == NULL || bearer_list == NULL) + return; + + for (int i = 0; i < srb_list->list.count; i++) { + const NR_SRB_ToAddMod_t *srb = srb_list->list.array[i]; + for (int j = 0; j < bearer_list->list.count; j++) { + const NR_RLC_BearerConfig_t *bearer = bearer_list->list.array[j]; + if (bearer->servedRadioBearer != NULL + && bearer->servedRadioBearer->present == NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity + && srb->srb_Identity == bearer->servedRadioBearer->choice.srb_Identity) { + nr_rlc_add_srb(rnti, srb->srb_Identity, bearer); + } + } + } } +static void nr_rrc_addmod_drbs(int rnti, + const NR_DRB_ToAddModList_t *drb_list, + const struct NR_CellGroupConfig__rlc_BearerToAddModList *bearer_list) +{ + if (drb_list == NULL || bearer_list == NULL) + return; + + for (int i = 0; i < drb_list->list.count; i++) { + const NR_DRB_ToAddMod_t *drb = drb_list->list.array[i]; + for (int j = 0; j < bearer_list->list.count; j++) { + const NR_RLC_BearerConfig_t *bearer = bearer_list->list.array[j]; + if (bearer->servedRadioBearer != NULL + && bearer->servedRadioBearer->present == NR_RLC_BearerConfig__servedRadioBearer_PR_drb_Identity + && drb->drb_Identity == bearer->servedRadioBearer->choice.drb_Identity) { + nr_rlc_add_drb(rnti, drb->drb_Identity, bearer); + } + } + } +} + + ///---------------------------------------------------------------------------------------------------------------/// ///---------------------------------------------------------------------------------------------------------------/// @@ -176,17 +207,16 @@ static void init_NR_SI(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration LOG_I(NR_RRC,"Done init_NR_SI\n"); if (NODE_IS_MONOLITHIC(rrc->node_type) || NODE_IS_DU(rrc->node_type)){ - rrc_mac_config_req_gNB(rrc->module_id, - rrc->configuration.pdsch_AntennaPorts, - rrc->configuration.pusch_AntennaPorts, - rrc->configuration.sib1_tda, - rrc->configuration.minRXTXTIME, - rrc->carrier.servingcellconfigcommon, - &rrc->carrier.mib, - rrc->carrier.siblock1, - 0, - 0, // WIP hardcoded rnti - NULL); + // update SI info + nr_mac_config_scc(RC.nrmac[rrc->module_id], + rrc->configuration.pdsch_AntennaPorts, + rrc->configuration.pusch_AntennaPorts, + rrc->configuration.sib1_tda, + rrc->configuration.minRXTXTIME, + rrc->carrier.servingcellconfigcommon); + nr_mac_config_mib(RC.nrmac[rrc->module_id], &rrc->carrier.mib); + if (get_softmodem_params()->sa) + nr_mac_config_sib1(RC.nrmac[rrc->module_id], rrc->carrier.siblock1); } /* set flag to indicate that cell information is configured. This is required @@ -196,9 +226,10 @@ static void init_NR_SI(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration pthread_mutex_unlock(&rrc->cell_info_mutex); if (get_softmodem_params()->phy_test > 0 || get_softmodem_params()->do_ra > 0) { - struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_allocate_new_UE_context(rrc); - ue_context_p->ue_context.spCellConfig = calloc(1, sizeof(struct NR_SpCellConfig)); - ue_context_p->ue_context.spCellConfig->spCellConfigDedicated = configuration->scd; + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_allocate_new_ue_context(rrc); + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; + UE->spCellConfig = calloc(1, sizeof(struct NR_SpCellConfig)); + UE->spCellConfig->spCellConfigDedicated = configuration->scd; LOG_I(NR_RRC,"Adding new user (%p)\n",ue_context_p); if (!NODE_IS_CU(RC.nrrrc[0]->node_type)) { rrc_add_nsa_user(rrc,ue_context_p,NULL); @@ -244,14 +275,9 @@ static void openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_Rrc AssertFatal(NUMBER_OF_UE_MAX < (module_id_t)0xFFFFFFFFFFFFFFFF, " variable overflow"); AssertFatal(configuration!=NULL,"configuration input is null\n"); rrc->module_id = gnb_mod_idP; - rrc->Nb_ue = 0; rrc_gNB_CU_DU_init(rrc); uid_linear_allocator_init(&rrc->uid_allocator); RB_INIT(&rrc->rrc_ue_head); - rrc->initial_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL); - rrc->s1ap_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL); - rrc->initial_id2_ngap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL); - rrc->ngap_id2_ngap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL); rrc->configuration = *configuration; rrc->carrier.servingcellconfigcommon = configuration->scc; rrc->carrier.servingcellconfig = configuration->scd; @@ -261,7 +287,6 @@ static void openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_Rrc rrc->cell_info_configured = 0; LOG_I(NR_RRC, PROTOCOL_NR_RRC_CTXT_FMT" Checking release \n",PROTOCOL_NR_RRC_CTXT_ARGS(&ctxt)); init_NR_SI(rrc, configuration); - openair_nr_rrc_on(rrc); return; } // END openair_rrc_gNB_configuration @@ -306,68 +331,37 @@ unsigned int rrc_gNB_get_next_transaction_identifier(module_id_t gnb_mod_idP) static void apply_macrlc_config(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *const ue_context_pP, const protocol_ctxt_t *const ctxt_pP) { NR_CellGroupConfig_t *cgc = get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup : NULL; - rrc_mac_config_req_gNB(rrc->module_id, - rrc->configuration.pdsch_AntennaPorts, - rrc->configuration.pusch_AntennaPorts, - rrc->configuration.sib1_tda, - rrc->configuration.minRXTXTIME, - NULL, - NULL, - NULL, - 0, - ue_context_pP->ue_context.rnti, - cgc); + nr_mac_update_cellgroup(RC.nrmac[rrc->module_id], ue_context_pP->ue_context.rnti, cgc); - nr_rrc_rlc_config_asn1_req(ctxt_pP, - ue_context_pP->ue_context.SRB_configList, - ue_context_pP->ue_context.DRB_configList, - NULL, - get_softmodem_params()->sa ? cgc->rlc_BearerToAddModList : NULL); + nr_rrc_addmod_srbs(ctxt_pP->rntiMaybeUEid, ue_context_pP->ue_context.SRB_configList, cgc->rlc_BearerToAddModList); + nr_rrc_addmod_drbs(ctxt_pP->rntiMaybeUEid, ue_context_pP->ue_context.DRB_configList, cgc->rlc_BearerToAddModList); } void apply_macrlc_config_reest(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *const ue_context_pP, const protocol_ctxt_t *const ctxt_pP, ue_id_t ue_id) { - rrc_mac_config_req_gNB(rrc->module_id, - rrc->configuration.pdsch_AntennaPorts, - rrc->configuration.pusch_AntennaPorts, - rrc->configuration.sib1_tda, - rrc->configuration.minRXTXTIME, - NULL, - NULL, - NULL, - 0, - ue_id, - get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup : NULL); + nr_mac_update_cellgroup(RC.nrmac[rrc->module_id], ue_id, ue_context_pP->ue_context.masterCellGroup); - nr_rrc_rlc_config_asn1_req(ctxt_pP, - ue_context_pP->ue_context.SRB_configList, - NULL, - NULL, - get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList : NULL); + nr_rrc_addmod_srbs(ctxt_pP->rntiMaybeUEid, + ue_context_pP->ue_context.SRB_configList, + ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList); } //----------------------------------------------------------------------------- -static void rrc_gNB_generate_RRCSetup(const protocol_ctxt_t *const ctxt_pP, +static void rrc_gNB_generate_RRCSetup(instance_t instance, + rnti_t rnti, rrc_gNB_ue_context_t *const ue_context_pP, const uint8_t *masterCellGroup, int masterCellGroup_len, NR_ServingCellConfigCommon_t *scc) //----------------------------------------------------------------------------- { - LOG_I(NR_RRC, "rrc_gNB_generate_RRCSetup for RNTI %04lx\n", ctxt_pP->rntiMaybeUEid); + LOG_I(NR_RRC, "rrc_gNB_generate_RRCSetup for RNTI %04x\n", rnti); gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; - gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id]; + gNB_RRC_INST *rrc = RC.nrrrc[instance]; unsigned char buf[1024]; const NR_ServingCellConfig_t *sccd = rrc->configuration.scd; - int size = do_RRCSetup(ue_context_pP, - buf, - rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id), - masterCellGroup, - masterCellGroup_len, - scc, - sccd, - &rrc->configuration); + int size = do_RRCSetup(ue_context_pP, buf, rrc_gNB_get_next_transaction_identifier(instance), masterCellGroup, masterCellGroup_len, scc, sccd, &rrc->configuration); AssertFatal(size > 0, "do_RRCSetup failed\n"); AssertFatal(size <= 1024, "memory corruption\n"); @@ -382,7 +376,7 @@ static void rrc_gNB_generate_RRCSetup(const protocol_ctxt_t *const ctxt_pP, ue_context_pP->ue_context.ue_release_timer_thres = 1000; /* TODO: this should go through the E1 interface */ - nr_pdcp_add_srbs(ctxt_pP->enb_flag, ctxt_pP->rntiMaybeUEid, ue_context_pP->ue_context.SRB_configList, 0, NULL, NULL); + nr_pdcp_add_srbs(true, rnti, ue_context_pP->ue_context.SRB_configList, 0, NULL, NULL); f1ap_dl_rrc_message_t dl_rrc = { .old_gNB_DU_ue_id = 0xFFFFFF, @@ -391,31 +385,24 @@ static void rrc_gNB_generate_RRCSetup(const protocol_ctxt_t *const ctxt_pP, .rnti = ue_p->rnti, .srb_id = CCCH }; - rrc->mac_rrc.dl_rrc_message_transfer(ctxt_pP->module_id, &dl_rrc); + rrc->mac_rrc.dl_rrc_message_transfer(instance, &dl_rrc); } //----------------------------------------------------------------------------- -static void rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(const protocol_ctxt_t *const ctxt_pP, const int CC_id) +static void rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(module_id_t module_id, rnti_t rnti, const int CC_id) //----------------------------------------------------------------------------- { LOG_I(NR_RRC, "generate RRCSetup for RRCReestablishmentRequest \n"); rrc_gNB_ue_context_t *ue_context_pP = NULL; - gNB_RRC_INST *rrc_instance_p = RC.nrrrc[ctxt_pP->module_id]; + gNB_RRC_INST *rrc_instance_p = RC.nrrrc[module_id]; const NR_ServingCellConfigCommon_t *scc=rrc_instance_p->carrier.servingcellconfigcommon; const NR_ServingCellConfig_t *sccd = rrc_instance_p->configuration.scd; - ue_context_pP = rrc_gNB_get_next_free_ue_context(ctxt_pP, rrc_instance_p, 0); + ue_context_pP = rrc_gNB_create_ue_context(rnti, rrc_instance_p, 0); gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; unsigned char buf[1024]; - int size = do_RRCSetup(ue_context_pP, - buf, - rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id), - NULL, - 0, - scc, - sccd, - &rrc_instance_p->configuration); + int size = do_RRCSetup(ue_context_pP, buf, rrc_gNB_get_next_transaction_identifier(module_id), NULL, 0, scc, sccd, &rrc_instance_p->configuration); AssertFatal(size > 0, "do_RRCSetup failed\n"); AssertFatal(size <= 1024, "memory corruption\n"); @@ -426,32 +413,27 @@ static void rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(const protoc size, "[MSG] RRC Setup\n"); - LOG_D(NR_RRC, - PROTOCOL_NR_RRC_CTXT_UE_FMT" RRC_gNB --- MAC_CONFIG_REQ (SRB1) ---> MAC_gNB\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); + LOG_D(NR_RRC, "RRC_gNB --- MAC_CONFIG_REQ (SRB1) ---> MAC_gNB for rnti %04x\n", rnti); - rrc_mac_config_req_gNB(rrc_instance_p->module_id, - rrc_instance_p->configuration.pdsch_AntennaPorts, - rrc_instance_p->configuration.pusch_AntennaPorts, - rrc_instance_p->configuration.sib1_tda, - rrc_instance_p->configuration.minRXTXTIME, - rrc_instance_p->carrier.servingcellconfigcommon, - &rrc_instance_p->carrier.mib, - rrc_instance_p->carrier.siblock1, - 0, - ue_context_pP->ue_context.rnti, - NULL); + // update SCC and MIB/SIB (two calls) + nr_mac_config_scc(RC.nrmac[rrc_instance_p->module_id], + rrc_instance_p->configuration.pdsch_AntennaPorts, + rrc_instance_p->configuration.pusch_AntennaPorts, + rrc_instance_p->configuration.sib1_tda, + rrc_instance_p->configuration.minRXTXTIME, + rrc_instance_p->carrier.servingcellconfigcommon); + nr_mac_config_mib(RC.nrmac[rrc_instance_p->module_id], &rrc_instance_p->carrier.mib); + nr_mac_config_sib1(RC.nrmac[rrc_instance_p->module_id], rrc_instance_p->carrier.siblock1); - LOG_I(NR_RRC, - PROTOCOL_NR_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating RRCSetup (bytes %d)\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), - size); + LOG_I(NR_RRC, " [RAPROC] rnti: %04x Logical Channel DL-CCCH, Generating RRCSetup (bytes %d)\n", rnti, size); // activate release timer, if RRCSetupComplete not received after 100 frames, remove UE ue_context_pP->ue_context.ue_release_timer = 1; // remove UE after 10 frames after RRCConnectionRelease is triggered ue_context_pP->ue_context.ue_release_timer_thres = 1000; // configure MAC - apply_macrlc_config(rrc_instance_p,ue_context_pP,ctxt_pP); + protocol_ctxt_t ctxt = {0}; + PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, 0, GNB_FLAG_YES, rnti, 0, 0); + apply_macrlc_config(rrc_instance_p, ue_context_pP, &ctxt); //nr_pdcp_add_srbs(ctxt_pP->enb_flag, ctxt_pP->rntiMaybeUEid, ue_context_pP->ue_context.SRB_configList, 0, NULL, NULL); //apply_pdcp_config(ue_context_pP,ctxt_pP); @@ -465,18 +447,18 @@ static void rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(const protoc .rnti = ue_p->rnti, .srb_id = CCCH }; - rrc_instance_p->mac_rrc.dl_rrc_message_transfer(ctxt_pP->module_id, &dl_rrc); + rrc_instance_p->mac_rrc.dl_rrc_message_transfer(module_id, &dl_rrc); } -static void rrc_gNB_generate_RRCReject(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_context_t *const ue_context_pP) +static void rrc_gNB_generate_RRCReject(module_id_t module_id, rrc_gNB_ue_context_t *const ue_context_pP) //----------------------------------------------------------------------------- { LOG_I(NR_RRC, "rrc_gNB_generate_RRCReject \n"); - gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id]; + gNB_RRC_INST *rrc = RC.nrrrc[module_id]; gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; unsigned char buf[1024]; - int size = do_RRCReject(ctxt_pP->module_id, buf); + int size = do_RRCReject(module_id, buf); AssertFatal(size > 0, "do_RRCReject failed\n"); AssertFatal(size <= 1024, "memory corruption\n"); @@ -484,10 +466,7 @@ static void rrc_gNB_generate_RRCReject(const protocol_ctxt_t *const ctxt_pP, rrc (char *)buf, size, "[MSG] RRCReject \n"); - LOG_I(NR_RRC, - PROTOCOL_NR_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating NR_RRCReject (bytes %d)\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), - size); + LOG_I(NR_RRC, " [RAPROC] ue %04x Logical Channel DL-CCCH, Generating NR_RRCReject (bytes %d)\n", ue_p->rnti, size); f1ap_dl_rrc_message_t dl_rrc = { .gNB_CU_ue_id = 0, @@ -500,7 +479,7 @@ static void rrc_gNB_generate_RRCReject(const protocol_ctxt_t *const ctxt_pP, rrc .execute_duplication = 1, .RAT_frequency_priority_information.en_dc = 0 }; - rrc->mac_rrc.dl_rrc_message_transfer(ctxt_pP->module_id, &dl_rrc); + rrc->mac_rrc.dl_rrc_message_transfer(module_id, &dl_rrc); } //----------------------------------------------------------------------------- @@ -512,9 +491,8 @@ static void rrc_gNB_process_RRCSetupComplete(const protocol_ctxt_t *const ctxt_p { LOG_A(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel UL-DCCH, " "processing NR_RRCSetupComplete from UE (SRB1 Active)\n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); - ue_context_pP->ue_context.Srb1.Active = 1; - ue_context_pP->ue_context.Srb1.Srb_info.Srb_id = 1; - ue_context_pP->ue_context.Srb2.Active = 0; + ue_context_pP->ue_context.Srb[1].Active = 1; + ue_context_pP->ue_context.Srb[2].Active = 0; ue_context_pP->ue_context.StatusRrc = NR_RRC_CONNECTED; if (get_softmodem_params()->sa) { @@ -528,37 +506,28 @@ static void rrc_gNB_process_RRCSetupComplete(const protocol_ctxt_t *const ctxt_p static void rrc_gNB_generate_defaultRRCReconfiguration(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_context_t *ue_context_pP) //----------------------------------------------------------------------------- { - struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList - *dedicatedNAS_MessageList = NULL; - NR_DedicatedNAS_Message_t *dedicatedNAS_Message = NULL; - + gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id]; uint8_t xid = rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id); /******************** Radio Bearer Config ********************/ + gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; - dedicatedNAS_MessageList = CALLOC(1, sizeof(struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList)); + struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList = CALLOC(1, sizeof(*dedicatedNAS_MessageList)); /* Add all NAS PDUs to the list */ - for (int i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) { - if (ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer != NULL) { - dedicatedNAS_Message = CALLOC(1, sizeof(NR_DedicatedNAS_Message_t)); - OCTET_STRING_fromBuf(dedicatedNAS_Message, - (char *)ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer, - ue_context_pP->ue_context.pduSession[i].param.nas_pdu.length); - asn1cSeqAdd(&dedicatedNAS_MessageList->list, dedicatedNAS_Message); + for (int i = 0; i < ue_p->nb_of_pdusessions; i++) { + if (ue_p->pduSession[i].param.nas_pdu.buffer != NULL) { + asn1cSequenceAdd(dedicatedNAS_MessageList->list, NR_DedicatedNAS_Message_t, msg); + OCTET_STRING_fromBuf(msg, (char *)ue_p->pduSession[i].param.nas_pdu.buffer, ue_p->pduSession[i].param.nas_pdu.length); } - ue_context_pP->ue_context.pduSession[i].status = PDU_SESSION_STATUS_DONE; - LOG_D(NR_RRC, "setting the status for the default DRB (index %d) to (%d,%s)\n", - i, ue_context_pP->ue_context.pduSession[i].status, "PDU_SESSION_STATUS_DONE"); + ue_p->pduSession[i].status = PDU_SESSION_STATUS_DONE; + LOG_D(NR_RRC, "setting the status for the default DRB (index %d) to (%d,%s)\n", i, ue_p->pduSession[i].status, "PDU_SESSION_STATUS_DONE"); } - if (ue_context_pP->ue_context.nas_pdu_flag == 1) { - dedicatedNAS_Message = CALLOC(1, sizeof(NR_DedicatedNAS_Message_t)); - OCTET_STRING_fromBuf(dedicatedNAS_Message, - (char *)ue_context_pP->ue_context.nas_pdu.buffer, - ue_context_pP->ue_context.nas_pdu.length); - asn1cSeqAdd(&dedicatedNAS_MessageList->list, dedicatedNAS_Message); + if (ue_p->nas_pdu.length) { + asn1cSequenceAdd(dedicatedNAS_MessageList->list, NR_DedicatedNAS_Message_t, msg); + OCTET_STRING_fromBuf(msg, (char *)ue_p->nas_pdu.buffer, ue_p->nas_pdu.length); } /* If list is empty free the list and reset the address */ @@ -567,10 +536,8 @@ static void rrc_gNB_generate_defaultRRCReconfiguration(const protocol_ctxt_t *co dedicatedNAS_MessageList = NULL; } - gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id]; NR_MeasConfig_t *measconfig = get_defaultMeasConfig(&rrc->configuration); - gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; uint8_t buffer[RRC_BUF_SIZE] = {0}; int size = do_RRCReconfiguration(ctxt_pP, buffer, @@ -589,22 +556,22 @@ static void rrc_gNB_generate_defaultRRCReconfiguration(const protocol_ctxt_t *co NULL, ue_p->masterCellGroup); AssertFatal(size > 0, "cannot encode RRCReconfiguration in %s()\n", __func__); - LOG_W(RRC, "do_RRCReconfiguration(): size %d\n", size); + LOG_W(NR_RRC, "do_RRCReconfiguration(): size %d\n", size); if (LOG_DEBUGFLAG(DEBUG_ASN1)) { xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, ue_p->masterCellGroup); } // suspicious if it is always malloced before ? - free(ue_context_pP->ue_context.nas_pdu.buffer); + free(ue_p->nas_pdu.buffer); LOG_DUMPMSG(NR_RRC, DEBUG_RRC,(char *)buffer, size, "[MSG] RRC Reconfiguration\n"); /* Free all NAS PDUs */ - for (int i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) { - if (ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer != NULL) { - free(ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer); - ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer = NULL; + for (int i = 0; i < ue_p->nb_of_pdusessions; i++) { + if (ue_p->pduSession[i].param.nas_pdu.buffer != NULL) { + free(ue_p->pduSession[i].param.nas_pdu.buffer); + ue_p->pduSession[i].param.nas_pdu.buffer = NULL; } } @@ -613,54 +580,20 @@ static void rrc_gNB_generate_defaultRRCReconfiguration(const protocol_ctxt_t *co ctxt_pP->frame, size, ue_context_pP->ue_context.rnti); - switch (RC.nrrrc[ctxt_pP->module_id]->node_type) { - case ngran_gNB_CU: - case ngran_gNB_CUCP: - case ngran_gNB: - nr_rrc_data_req(ctxt_pP, - DCCH, - rrc_gNB_mui++, - SDU_CONFIRM_NO, - size, - buffer, - PDCP_TRANSMISSION_MODE_CONTROL); - // rrc_pdcp_config_asn1_req + AssertFatal(!NODE_IS_DU(rrc->node_type), "illegal node type DU!\n"); - break; - - case ngran_gNB_DU: - // nothing to do for DU - AssertFatal(1==0,"nothing to do for DU\n"); - break; - - default : - LOG_W(NR_RRC, "Unknown node type %d\n", RC.nrrrc[ctxt_pP->module_id]->node_type); - } + nr_rrc_data_req(ctxt_pP, DCCH, rrc_gNB_mui++, SDU_CONFIRM_NO, size, buffer, PDCP_TRANSMISSION_MODE_CONTROL); if (NODE_IS_DU(rrc->node_type) || NODE_IS_MONOLITHIC(rrc->node_type)) { gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; - rrc_mac_config_req_gNB(rrc->module_id, - rrc->configuration.pdsch_AntennaPorts, - rrc->configuration.pusch_AntennaPorts, - rrc->configuration.sib1_tda, - rrc->configuration.minRXTXTIME, - NULL, - NULL, - NULL, - 0, - ue_p->rnti, - ue_p->masterCellGroup); + nr_mac_update_cellgroup(RC.nrmac[rrc->module_id], ue_p->rnti, ue_p->masterCellGroup); - uint32_t delay_ms = ue_context_pP->ue_context.masterCellGroup && - ue_context_pP->ue_context.masterCellGroup->spCellConfig && - ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated && - ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList ? - NR_RRC_RECONFIGURATION_DELAY_MS + NR_RRC_BWP_SWITCHING_DELAY_MS : NR_RRC_RECONFIGURATION_DELAY_MS; + uint32_t delay_ms = ue_p->masterCellGroup && ue_p->masterCellGroup->spCellConfig && ue_p->masterCellGroup->spCellConfig->spCellConfigDedicated + && ue_p->masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList + ? NR_RRC_RECONFIGURATION_DELAY_MS + NR_RRC_BWP_SWITCHING_DELAY_MS + : NR_RRC_RECONFIGURATION_DELAY_MS; - nr_mac_enable_ue_rrc_processing_timer(ctxt_pP->module_id, - ue_context_pP->ue_context.rnti, - *rrc->carrier.servingcellconfigcommon->ssbSubcarrierSpacing, - delay_ms); + nr_mac_enable_ue_rrc_processing_timer(ctxt_pP->module_id, ue_p->rnti, *rrc->carrier.servingcellconfigcommon->ssbSubcarrierSpacing, delay_ms); } } @@ -668,135 +601,69 @@ void fill_DRB_configList(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_context_t *ue_context_pP) { gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id]; - gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; - NR_DRB_ToAddModList_t **DRB_configList = NULL; - NR_DRB_ToAddModList_t **DRB_configList2 = NULL; - int qos_flow_index = 0; - int pdu_sessions_done = 0; + gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; + int qos_flow_index = 0; int i; uint8_t drb_id_to_setup_start = 0; uint8_t nb_drb_to_setup = rrc->configuration.drbs; long drb_priority[NGAP_MAX_DRBS_PER_UE]; - uint8_t xid = rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id); + int xid = rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id); - DRB_configList = &ue_context_pP->ue_context.DRB_configList; - if (*DRB_configList) { - free(*DRB_configList); - } - *DRB_configList = CALLOC(1, sizeof(**DRB_configList)); - memset(*DRB_configList, 0, sizeof(**DRB_configList)); - - DRB_configList2 = &ue_context_pP->ue_context.DRB_configList2[xid]; - if (*DRB_configList2) { - free(*DRB_configList2); - } - *DRB_configList2 = CALLOC(1, sizeof(**DRB_configList2)); - memset(*DRB_configList2, 0, sizeof(**DRB_configList2)); - for (i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) { - if (pdu_sessions_done >= ue_context_pP->ue_context.nb_of_pdusessions) { - break; - } - - if (ue_context_pP->ue_context.pduSession[i].status >= PDU_SESSION_STATUS_DONE) { + if (!ue_p->DRB_configList) + ue_p->DRB_configList = CALLOC(1, sizeof(*ue_p->DRB_configList)); + else + memset(ue_p->DRB_configList, 0, sizeof(*ue_p->DRB_configList)); + if (!ue_p->DRB_configList2[xid]) + ue_p->DRB_configList2[xid] = CALLOC(1, sizeof(**ue_p->DRB_configList2)); + else + memset(ue_p->DRB_configList2[xid], 0, sizeof(**ue_p->DRB_configList2)); + for (i = 0; i < ue_p->nb_of_pdusessions; i++) { + if (ue_p->pduSession[i].status >= PDU_SESSION_STATUS_DONE) { continue; } - ue_context_pP->ue_context.pduSession[i].xid = xid; - + LOG_I(NR_RRC, "adding rnti %x pdusession %d, nb drb %d, xid %d\n", ue_p->rnti, ue_p->pduSession[i].param.pdusession_id, nb_drb_to_setup, xid); for(long drb_id_add = 1; drb_id_add <= nb_drb_to_setup; drb_id_add++){ uint8_t drb_id; - // Reference TS23501 Table 5.7.4-1: Standardized 5QI to QoS characteristics mapping - for (qos_flow_index = 0; qos_flow_index < ue_context_pP->ue_context.pduSession[i].param.nb_qos; qos_flow_index++) { - switch (ue_context_pP->ue_context.pduSession[i].param.qos[qos_flow_index].fiveQI) { + for (qos_flow_index = 0; qos_flow_index < ue_p->pduSession[i].param.nb_qos; qos_flow_index++) { + switch (ue_p->pduSession[i].param.qos[qos_flow_index].fiveQI) { case 1 ... 4: /* GBR */ - drb_id = next_available_drb(ue_p, &ue_context_pP->ue_context.pduSession[i], GBR_FLOW); + drb_id = next_available_drb(ue_p, &ue_p->pduSession[i], GBR_FLOW); break; case 5 ... 9: /* Non-GBR */ if(rrc->configuration.drbs > 1) /* Force the creation from gNB Conf file - Should be used only in noS1 mode and rfsim for testing purposes. */ - drb_id = next_available_drb(ue_p, &ue_context_pP->ue_context.pduSession[i], GBR_FLOW); + drb_id = next_available_drb(ue_p, &ue_p->pduSession[i], GBR_FLOW); else - drb_id = next_available_drb(ue_p, &ue_context_pP->ue_context.pduSession[i], NONGBR_FLOW); + drb_id = next_available_drb(ue_p, &ue_p->pduSession[i], NONGBR_FLOW); break; default: - LOG_E(NR_RRC,"not supported 5qi %lu\n", ue_context_pP->ue_context.pduSession[i].param.qos[qos_flow_index].fiveQI); - ue_context_pP->ue_context.pduSession[i].status = PDU_SESSION_STATUS_FAILED; - pdu_sessions_done++; + LOG_E(NR_RRC, "not supported 5qi %lu\n", ue_p->pduSession[i].param.qos[qos_flow_index].fiveQI); + ue_p->pduSession[i].status = PDU_SESSION_STATUS_FAILED; continue; } - - switch(ue_context_pP->ue_context.pduSession[i].param.qos[qos_flow_index].allocation_retention_priority.priority_level) { - case NGAP_PRIORITY_LEVEL_HIGHEST: - drb_priority[drb_id-1] = 1; - break; - case NGAP_PRIORITY_LEVEL_2: - drb_priority[drb_id-1] = 2; - break; - case NGAP_PRIORITY_LEVEL_3: - drb_priority[drb_id-1] = 3; - break; - case NGAP_PRIORITY_LEVEL_4: - drb_priority[drb_id-1] = 4; - break; - case NGAP_PRIORITY_LEVEL_5: - drb_priority[drb_id-1] = 5; - break; - case NGAP_PRIORITY_LEVEL_6: - drb_priority[drb_id-1] = 6; - break; - case NGAP_PRIORITY_LEVEL_7: - drb_priority[drb_id-1] = 7; - break; - case NGAP_PRIORITY_LEVEL_8: - drb_priority[drb_id-1] = 8; - break; - case NGAP_PRIORITY_LEVEL_9: - drb_priority[drb_id-1] = 9; - break; - case NGAP_PRIORITY_LEVEL_10: - drb_priority[drb_id-1] = 10; - break; - case NGAP_PRIORITY_LEVEL_11: - drb_priority[drb_id-1] = 11; - break; - case NGAP_PRIORITY_LEVEL_12: - drb_priority[drb_id-1] = 12; - break; - case NGAP_PRIORITY_LEVEL_13: - drb_priority[drb_id-1] = 13; - break; - case NGAP_PRIORITY_LEVEL_LOWEST: - drb_priority[drb_id-1] = 14; - break; - case NGAP_PRIORITY_LEVEL_NO_PRIORITY: - drb_priority[drb_id-1] = 15; - break; - - default: - LOG_E(NR_RRC,"Not supported priority level\n"); - break; + drb_priority[drb_id - 1] = ue_p->pduSession[i].param.qos[qos_flow_index].allocation_retention_priority.priority_level; + if (drb_priority[drb_id - 1] < 0 || drb_priority[drb_id - 1] > NGAP_PRIORITY_LEVEL_NO_PRIORITY) { + LOG_E(NR_RRC, "invalid allocation_retention_priority.priority_level %ld set to _NO_PRIORITY\n", drb_priority[drb_id - 1]); + drb_priority[drb_id - 1] = NGAP_PRIORITY_LEVEL_NO_PRIORITY; } if(drb_is_active(ue_p, drb_id)){ /* Non-GBR flow using the same DRB or a GBR flow with no available DRBs*/ nb_drb_to_setup--; } else { - NR_DRB_ToAddMod_t *DRB_config = generateDRB(ue_p, - drb_id, - &ue_context_pP->ue_context.pduSession[i], - rrc->configuration.enable_sdap, - rrc->security.do_drb_integrity, - rrc->security.do_drb_ciphering); - if (drb_id_to_setup_start == 0) drb_id_to_setup_start = DRB_config->drb_Identity; - asn1cSeqAdd(&(*DRB_configList)->list, DRB_config); - asn1cSeqAdd(&(*DRB_configList2)->list, DRB_config); + NR_DRB_ToAddMod_t *DRB_config = generateDRB(ue_p, drb_id, &ue_p->pduSession[i], rrc->configuration.enable_sdap, rrc->security.do_drb_integrity, rrc->security.do_drb_ciphering); + if (drb_id_to_setup_start == 0) + drb_id_to_setup_start = DRB_config->drb_Identity; + asn1cSeqAdd(&ue_p->DRB_configList->list, DRB_config); + asn1cSeqAdd(&ue_p->DRB_configList2[xid]->list, DRB_config); } LOG_D(RRC, "DRB Priority %ld\n", drb_priority[drb_id]); // To supress warning for now } } - ue_context_pP->ue_context.pduSession[i].status = PDU_SESSION_STATUS_DONE; - ue_context_pP->ue_context.pduSession[i].xid = xid; + ue_p->pduSession[i].status = PDU_SESSION_STATUS_DONE; + ue_p->pduSession[i].xid = xid; } } @@ -815,7 +682,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration( int xid = -1; int drb_id_to_setup_start = 1; - NR_DRB_ToAddModList_t *DRB_configList = ue_context_pP->ue_context.DRB_configList; + gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; + NR_DRB_ToAddModList_t *DRB_configList = ue_p->DRB_configList; int nb_drb_to_setup = DRB_configList->list.count; struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList = NULL; @@ -826,21 +694,21 @@ rrc_gNB_generate_dedicatedRRCReconfiguration( NR_DRB_ToAddMod_t *DRB_config = DRB_configList->list.array[i]; if (drb_id_to_setup_start == 1) drb_id_to_setup_start = DRB_config->drb_Identity; - int j = ue_context_pP->ue_context.nb_of_pdusessions - 1; + int j = ue_p->nb_of_pdusessions - 1; AssertFatal(j >= 0, ""); - if (ue_context_pP->ue_context.pduSession[j].param.nas_pdu.buffer != NULL) { + if (ue_p->pduSession[j].param.nas_pdu.buffer != NULL) { dedicatedNAS_Message = CALLOC(1, sizeof(NR_DedicatedNAS_Message_t)); memset(dedicatedNAS_Message, 0, sizeof(OCTET_STRING_t)); - OCTET_STRING_fromBuf(dedicatedNAS_Message, (char *)ue_context_pP->ue_context.pduSession[j].param.nas_pdu.buffer, ue_context_pP->ue_context.pduSession[j].param.nas_pdu.length); + OCTET_STRING_fromBuf(dedicatedNAS_Message, (char *)ue_p->pduSession[j].param.nas_pdu.buffer, ue_p->pduSession[j].param.nas_pdu.length); asn1cSeqAdd(&dedicatedNAS_MessageList->list, dedicatedNAS_Message); - LOG_I(NR_RRC, "add NAS info with size %d (pdusession idx %d)\n", ue_context_pP->ue_context.pduSession[j].param.nas_pdu.length, j); + LOG_I(NR_RRC, "add NAS info with size %d (pdusession idx %d)\n", ue_p->pduSession[j].param.nas_pdu.length, j); } else { // TODO LOG_E(NR_RRC, "no NAS info (pdusession idx %d)\n", j); } - xid = ue_context_pP->ue_context.pduSession[j].xid; + xid = ue_p->pduSession[j].xid; } /* If list is empty free the list and reset the address */ @@ -853,7 +721,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration( cellGroupConfig = calloc(1, sizeof(NR_CellGroupConfig_t)); // FIXME: fill_mastercellGroupConfig() won't fill the right priorities or // bearer IDs for the DRBs - fill_mastercellGroupConfig(cellGroupConfig, ue_context_pP->ue_context.masterCellGroup, rrc->um_on_default_drb, (drb_id_to_setup_start < 2) ? 1 : 0, drb_id_to_setup_start, nb_drb_to_setup, drb_priority); + fill_mastercellGroupConfig(cellGroupConfig, ue_p->masterCellGroup, rrc->um_on_default_drb, (drb_id_to_setup_start < 2) ? 1 : 0, drb_id_to_setup_start, nb_drb_to_setup, drb_priority); } else{ LOG_I(NR_RRC, "Master cell group originating from the DU \n"); @@ -862,7 +730,7 @@ rrc_gNB_generate_dedicatedRRCReconfiguration( AssertFatal(xid > -1, "Invalid xid %d. No PDU sessions setup to configure.\n", xid); NR_SRB_ToAddModList_t *SRB_configList2 = NULL; - SRB_configList2 = ue_context_pP->ue_context.SRB_configList2[xid]; + SRB_configList2 = ue_p->SRB_configList2[xid]; uint8_t buffer[RRC_BUF_SIZE] = {0}; int size = do_RRCReconfiguration(ctxt_pP, @@ -884,20 +752,24 @@ rrc_gNB_generate_dedicatedRRCReconfiguration( LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size,"[MSG] RRC Reconfiguration\n"); /* Free all NAS PDUs */ - for (int i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) { - if (ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer != NULL) { + for (int i = 0; i < ue_p->nb_of_pdusessions; i++) { + if (ue_p->pduSession[i].param.nas_pdu.buffer != NULL) { /* Free the NAS PDU buffer and invalidate it */ - free(ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer); - ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer = NULL; + free(ue_p->pduSession[i].param.nas_pdu.buffer); + ue_p->pduSession[i].param.nas_pdu.buffer = NULL; } } - LOG_I(NR_RRC, - "[gNB %d] Frame %d, Logical Channel DL-DCCH, Generate RRCReconfiguration (bytes %d, UE RNTI %x)\n", - ctxt_pP->module_id, ctxt_pP->frame, size, ue_context_pP->ue_context.rnti); + LOG_I(NR_RRC, "[gNB %d] Frame %d, Logical Channel DL-DCCH, Generate RRCReconfiguration (bytes %d, UE RNTI %x)\n", ctxt_pP->module_id, ctxt_pP->frame, size, ue_p->rnti); LOG_D(NR_RRC, "[FRAME %05d][RRC_gNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n", - ctxt_pP->frame, ctxt_pP->module_id, size, ue_context_pP->ue_context.rnti, rrc_gNB_mui, ctxt_pP->module_id, DCCH); + ctxt_pP->frame, + ctxt_pP->module_id, + size, + ue_p->rnti, + rrc_gNB_mui, + ctxt_pP->module_id, + DCCH); nr_rrc_data_req( ctxt_pP, @@ -909,28 +781,14 @@ rrc_gNB_generate_dedicatedRRCReconfiguration( PDCP_TRANSMISSION_MODE_CONTROL); if (NODE_IS_DU(rrc->node_type) || NODE_IS_MONOLITHIC(rrc->node_type)) { - rrc_mac_config_req_gNB(rrc->module_id, - rrc->configuration.pdsch_AntennaPorts, - rrc->configuration.pusch_AntennaPorts, - rrc->configuration.sib1_tda, - rrc->configuration.minRXTXTIME, - NULL, - NULL, - NULL, - 0, - ue_context_pP->ue_context.rnti, - ue_context_pP->ue_context.masterCellGroup); + nr_mac_update_cellgroup(RC.nrmac[rrc->module_id], ue_context_pP->ue_context.rnti, ue_context_pP->ue_context.masterCellGroup); - uint32_t delay_ms = ue_context_pP->ue_context.masterCellGroup && - ue_context_pP->ue_context.masterCellGroup->spCellConfig && - ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated && - ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList ? - NR_RRC_RECONFIGURATION_DELAY_MS + NR_RRC_BWP_SWITCHING_DELAY_MS : NR_RRC_RECONFIGURATION_DELAY_MS; + uint32_t delay_ms = ue_p->masterCellGroup && ue_p->masterCellGroup->spCellConfig && ue_p->masterCellGroup->spCellConfig->spCellConfigDedicated + && ue_p->masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList + ? NR_RRC_RECONFIGURATION_DELAY_MS + NR_RRC_BWP_SWITCHING_DELAY_MS + : NR_RRC_RECONFIGURATION_DELAY_MS; - nr_mac_enable_ue_rrc_processing_timer(ctxt_pP->module_id, - ue_context_pP->ue_context.rnti, - *rrc->carrier.servingcellconfigcommon->ssbSubcarrierSpacing, - delay_ms); + nr_mac_enable_ue_rrc_processing_timer(ctxt_pP->module_id, ue_p->rnti, *rrc->carrier.servingcellconfigcommon->ssbSubcarrierSpacing, delay_ms); } } @@ -951,48 +809,48 @@ rrc_gNB_modify_dedicatedRRCReconfiguration( int i, j; uint8_t xid = rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id); - DRB_configList = &ue_context_pP->ue_context.DRB_configList; + gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; + DRB_configList = &ue_p->DRB_configList; DRB_configList2 = CALLOC(1, sizeof(NR_DRB_ToAddModList_t)); memset(DRB_configList2, 0, sizeof(NR_DRB_ToAddModList_t)); dedicatedNAS_MessageList = CALLOC(1, sizeof(struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList)); - for (i = 0; i < ue_context_pP->ue_context.nb_of_modify_pdusessions; i++) { + for (i = 0; i < ue_p->nb_of_modify_pdusessions; i++) { // bypass the new and already configured pdu sessions - if (ue_context_pP->ue_context.modify_pdusession[i].status >= PDU_SESSION_STATUS_DONE) { - ue_context_pP->ue_context.modify_pdusession[i].xid = xid; + if (ue_p->modify_pdusession[i].status >= PDU_SESSION_STATUS_DONE) { + ue_p->modify_pdusession[i].xid = xid; continue; } - if (ue_context_pP->ue_context.modify_pdusession[i].cause != NGAP_CAUSE_NOTHING) { + if (ue_p->modify_pdusession[i].cause != NGAP_CAUSE_NOTHING) { // set xid of failure pdu session - ue_context_pP->ue_context.modify_pdusession[i].xid = xid; - ue_context_pP->ue_context.modify_pdusession[i].status = PDU_SESSION_STATUS_FAILED; + ue_p->modify_pdusession[i].xid = xid; + ue_p->modify_pdusession[i].status = PDU_SESSION_STATUS_FAILED; continue; } // search exist DRB_config for (j = 0; j < (*DRB_configList)->list.count; j++) { - if ((*DRB_configList)->list.array[j]->cnAssociation->choice.sdap_Config->pdu_Session == - ue_context_pP->ue_context.modify_pdusession[i].param.pdusession_id) { + if ((*DRB_configList)->list.array[j]->cnAssociation->choice.sdap_Config->pdu_Session == ue_p->modify_pdusession[i].param.pdusession_id) { DRB_config = (*DRB_configList)->list.array[j]; break; } } if (DRB_config == NULL) { - ue_context_pP->ue_context.modify_pdusession[i].xid = xid; - ue_context_pP->ue_context.modify_pdusession[i].status = PDU_SESSION_STATUS_FAILED; - ue_context_pP->ue_context.modify_pdusession[i].cause = NGAP_CAUSE_RADIO_NETWORK; - ue_context_pP->ue_context.modify_pdusession[i].cause_value = NGAP_CauseRadioNetwork_unspecified; - ue_context_pP->ue_context.nb_of_failed_pdusessions++; + ue_p->modify_pdusession[i].xid = xid; + ue_p->modify_pdusession[i].status = PDU_SESSION_STATUS_FAILED; + ue_p->modify_pdusession[i].cause = NGAP_CAUSE_RADIO_NETWORK; + ue_p->modify_pdusession[i].cause_value = NGAP_CauseRadioNetwork_unspecified; + ue_p->nb_of_failed_pdusessions++; continue; } // Reference TS23501 Table 5.7.4-1: Standardized 5QI to QoS characteristics mapping - for (qos_flow_index = 0; qos_flow_index < ue_context_pP->ue_context.modify_pdusession[i].param.nb_qos; qos_flow_index++) { - switch (ue_context_pP->ue_context.modify_pdusession[i].param.qos[qos_flow_index].fiveQI) { + for (qos_flow_index = 0; qos_flow_index < ue_p->modify_pdusession[i].param.nb_qos; qos_flow_index++) { + switch (ue_p->modify_pdusession[i].param.qos[qos_flow_index].fiveQI) { case 1: //100ms case 2: //150ms case 3: //50ms @@ -1006,41 +864,39 @@ rrc_gNB_modify_dedicatedRRCReconfiguration( break; default: - LOG_E(NR_RRC,"not supported 5qi %lu\n", ue_context_pP->ue_context.modify_pdusession[i].param.qos[qos_flow_index].fiveQI); - ue_context_pP->ue_context.modify_pdusession[i].status = PDU_SESSION_STATUS_FAILED; - ue_context_pP->ue_context.modify_pdusession[i].xid = xid; - ue_context_pP->ue_context.modify_pdusession[i].cause = NGAP_CAUSE_RADIO_NETWORK; - ue_context_pP->ue_context.modify_pdusession[i].cause_value = NGAP_CauseRadioNetwork_not_supported_5QI_value; - ue_context_pP->ue_context.nb_of_failed_pdusessions++; + LOG_E(NR_RRC, "not supported 5qi %lu\n", ue_p->modify_pdusession[i].param.qos[qos_flow_index].fiveQI); + ue_p->modify_pdusession[i].status = PDU_SESSION_STATUS_FAILED; + ue_p->modify_pdusession[i].xid = xid; + ue_p->modify_pdusession[i].cause = NGAP_CAUSE_RADIO_NETWORK; + ue_p->modify_pdusession[i].cause_value = NGAP_CauseRadioNetwork_not_supported_5QI_value; + ue_p->nb_of_failed_pdusessions++; continue; } - LOG_I(NR_RRC, "PDU SESSION ID %ld, DRB ID %ld (index %d), QOS flow %d, 5QI %ld \n", - DRB_config->cnAssociation->choice.sdap_Config->pdu_Session, - DRB_config->drb_Identity, i, - qos_flow_index, - ue_context_pP->ue_context.modify_pdusession[i].param.qos[qos_flow_index].fiveQI - ); + LOG_I(NR_RRC, + "PDU SESSION ID %ld, DRB ID %ld (index %d), QOS flow %d, 5QI %ld \n", + DRB_config->cnAssociation->choice.sdap_Config->pdu_Session, + DRB_config->drb_Identity, + i, + qos_flow_index, + ue_p->modify_pdusession[i].param.qos[qos_flow_index].fiveQI); } asn1cSeqAdd(&DRB_configList2->list, DRB_config); - ue_context_pP->ue_context.modify_pdusession[i].status = PDU_SESSION_STATUS_DONE; - ue_context_pP->ue_context.modify_pdusession[i].xid = xid; + ue_p->modify_pdusession[i].status = PDU_SESSION_STATUS_DONE; + ue_p->modify_pdusession[i].xid = xid; - if (ue_context_pP->ue_context.modify_pdusession[i].param.nas_pdu.buffer != NULL) { + if (ue_p->modify_pdusession[i].param.nas_pdu.buffer != NULL) { dedicatedNAS_Message = CALLOC(1, sizeof(NR_DedicatedNAS_Message_t)); memset(dedicatedNAS_Message, 0, sizeof(OCTET_STRING_t)); - OCTET_STRING_fromBuf(dedicatedNAS_Message, - (char *)ue_context_pP->ue_context.modify_pdusession[i].param.nas_pdu.buffer, - ue_context_pP->ue_context.modify_pdusession[i].param.nas_pdu.length); + OCTET_STRING_fromBuf(dedicatedNAS_Message, (char *)ue_p->modify_pdusession[i].param.nas_pdu.buffer, ue_p->modify_pdusession[i].param.nas_pdu.length); asn1cSeqAdd(&dedicatedNAS_MessageList->list, dedicatedNAS_Message); - LOG_I(NR_RRC,"add NAS info with size %d (pdusession id %d)\n",ue_context_pP->ue_context.pduSession[i].param.nas_pdu.length, - ue_context_pP->ue_context.modify_pdusession[i].param.pdusession_id); + LOG_I(NR_RRC, "add NAS info with size %d (pdusession id %d)\n", ue_p->pduSession[i].param.nas_pdu.length, ue_p->modify_pdusession[i].param.pdusession_id); } else { // TODO - LOG_E(NR_RRC,"no NAS info (pdusession id %d)\n", ue_context_pP->ue_context.modify_pdusession[i].param.pdusession_id); + LOG_E(NR_RRC, "no NAS info (pdusession id %d)\n", ue_p->modify_pdusession[i].param.pdusession_id); } } @@ -1070,20 +926,24 @@ rrc_gNB_modify_dedicatedRRCReconfiguration( LOG_DUMPMSG(NR_RRC, DEBUG_RRC, (char *)buffer, size, "[MSG] RRC Reconfiguration\n"); /* Free all NAS PDUs */ - for (i = 0; i < ue_context_pP->ue_context.nb_of_modify_pdusessions; i++) { - if (ue_context_pP->ue_context.modify_pdusession[i].param.nas_pdu.buffer != NULL) { + for (i = 0; i < ue_p->nb_of_modify_pdusessions; i++) { + if (ue_p->modify_pdusession[i].param.nas_pdu.buffer != NULL) { /* Free the NAS PDU buffer and invalidate it */ - free(ue_context_pP->ue_context.modify_pdusession[i].param.nas_pdu.buffer); - ue_context_pP->ue_context.modify_pdusession[i].param.nas_pdu.buffer = NULL; + free(ue_p->modify_pdusession[i].param.nas_pdu.buffer); + ue_p->modify_pdusession[i].param.nas_pdu.buffer = NULL; } } - LOG_I(NR_RRC, - "[gNB %d] Frame %d, Logical Channel DL-DCCH, Generate RRCReconfiguration (bytes %d, UE RNTI %x)\n", - ctxt_pP->module_id, ctxt_pP->frame, size, ue_context_pP->ue_context.rnti); + LOG_I(NR_RRC, "[gNB %d] Frame %d, Logical Channel DL-DCCH, Generate RRCReconfiguration (bytes %d, UE RNTI %x)\n", ctxt_pP->module_id, ctxt_pP->frame, size, ue_p->rnti); LOG_D(NR_RRC, "[FRAME %05d][RRC_gNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n", - ctxt_pP->frame, ctxt_pP->module_id, size, ue_context_pP->ue_context.rnti, rrc_gNB_mui, ctxt_pP->module_id, DCCH); + ctxt_pP->frame, + ctxt_pP->module_id, + size, + ue_p->rnti, + rrc_gNB_mui, + ctxt_pP->module_id, + DCCH); nr_rrc_data_req( ctxt_pP, @@ -1095,16 +955,12 @@ rrc_gNB_modify_dedicatedRRCReconfiguration( PDCP_TRANSMISSION_MODE_CONTROL); if (NODE_IS_DU(RC.nrrrc[ctxt_pP->module_id]->node_type) || NODE_IS_MONOLITHIC(RC.nrrrc[ctxt_pP->module_id]->node_type)) { - uint32_t delay_ms = ue_context_pP->ue_context.masterCellGroup && - ue_context_pP->ue_context.masterCellGroup->spCellConfig && - ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated && - ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList ? - NR_RRC_RECONFIGURATION_DELAY_MS + NR_RRC_BWP_SWITCHING_DELAY_MS : NR_RRC_RECONFIGURATION_DELAY_MS; + uint32_t delay_ms = ue_p->masterCellGroup && ue_p->masterCellGroup->spCellConfig && ue_p->masterCellGroup->spCellConfig->spCellConfigDedicated + && ue_p->masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList + ? NR_RRC_RECONFIGURATION_DELAY_MS + NR_RRC_BWP_SWITCHING_DELAY_MS + : NR_RRC_RECONFIGURATION_DELAY_MS; - nr_mac_enable_ue_rrc_processing_timer(ctxt_pP->module_id, - ue_context_pP->ue_context.rnti, - *RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->ssbSubcarrierSpacing, - delay_ms); + nr_mac_enable_ue_rrc_processing_timer(ctxt_pP->module_id, ue_p->rnti, *RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->ssbSubcarrierSpacing, delay_ms); } } @@ -1124,15 +980,16 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release( struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList = NULL; NR_DedicatedNAS_Message_t *dedicatedNAS_Message = NULL; + gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; - DRB_Release_configList2 = &ue_context_pP->ue_context.DRB_Release_configList2[xid]; + DRB_Release_configList2 = &ue_p->DRB_Release_configList2[xid]; if (*DRB_Release_configList2) { free(*DRB_Release_configList2); } *DRB_Release_configList2 = CALLOC(1, sizeof(**DRB_Release_configList2)); for(i = 0; i < NB_RB_MAX; i++) { - if((ue_context_pP->ue_context.pduSession[i].status == PDU_SESSION_STATUS_TORELEASE) && ue_context_pP->ue_context.pduSession[i].xid == xid) { + if ((ue_p->pduSession[i].status == PDU_SESSION_STATUS_TORELEASE) && ue_p->pduSession[i].xid == xid) { DRB_release = CALLOC(1, sizeof(NR_DRB_Identity_t)); *DRB_release = i+1; asn1cSeqAdd(&(*DRB_Release_configList2)->list, DRB_release); @@ -1156,11 +1013,11 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release( uint8_t buffer[RRC_BUF_SIZE] = {0}; int size = do_RRCReconfiguration(ctxt_pP, buffer, RRC_BUF_SIZE, xid, NULL, NULL, *DRB_Release_configList2, NULL, NULL, NULL, dedicatedNAS_MessageList, NULL, NULL, NULL, NULL, NULL); - ue_context_pP->ue_context.pdu_session_release_command_flag = 1; + ue_p->pdu_session_release_command_flag = 1; LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size, "[MSG] RRC Reconfiguration\n"); - ue_context_pP->ue_context.pdu_session_release_command_flag = 1; + ue_p->pdu_session_release_command_flag = 1; /* Free all NAS PDUs */ if (nas_length > 0) { @@ -1168,12 +1025,16 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release( free(nas_buffer); } - LOG_I(NR_RRC, - "[gNB %d] Frame %d, Logical Channel DL-DCCH, Generate NR_RRCReconfiguration (bytes %d, UE RNTI %x)\n", - ctxt_pP->module_id, ctxt_pP->frame, size, ue_context_pP->ue_context.rnti); + LOG_I(NR_RRC, "[gNB %d] Frame %d, Logical Channel DL-DCCH, Generate NR_RRCReconfiguration (bytes %d, UE RNTI %x)\n", ctxt_pP->module_id, ctxt_pP->frame, size, ue_p->rnti); LOG_D(NR_RRC, "[FRAME %05d][RRC_gNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (rrcReconfiguration to UE %x MUI %d) --->][PDCP][MOD %u][RB %u]\n", - ctxt_pP->frame, ctxt_pP->module_id, size, ue_context_pP->ue_context.rnti, rrc_gNB_mui, ctxt_pP->module_id, DCCH); + ctxt_pP->frame, + ctxt_pP->module_id, + size, + ue_p->rnti, + rrc_gNB_mui, + ctxt_pP->module_id, + DCCH); nr_rrc_data_req( ctxt_pP, DCCH, @@ -1184,16 +1045,12 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release( PDCP_TRANSMISSION_MODE_CONTROL); if (NODE_IS_DU(RC.nrrrc[ctxt_pP->module_id]->node_type) || NODE_IS_MONOLITHIC(RC.nrrrc[ctxt_pP->module_id]->node_type)) { - uint32_t delay_ms = ue_context_pP->ue_context.masterCellGroup && - ue_context_pP->ue_context.masterCellGroup->spCellConfig && - ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated && - ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList ? - NR_RRC_RECONFIGURATION_DELAY_MS + NR_RRC_BWP_SWITCHING_DELAY_MS : NR_RRC_RECONFIGURATION_DELAY_MS; + uint32_t delay_ms = ue_p->masterCellGroup && ue_p->masterCellGroup->spCellConfig && ue_p->masterCellGroup->spCellConfig->spCellConfigDedicated + && ue_p->masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList + ? NR_RRC_RECONFIGURATION_DELAY_MS + NR_RRC_BWP_SWITCHING_DELAY_MS + : NR_RRC_RECONFIGURATION_DELAY_MS; - nr_mac_enable_ue_rrc_processing_timer(ctxt_pP->module_id, - ue_context_pP->ue_context.rnti, - *RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->ssbSubcarrierSpacing, - delay_ms); + nr_mac_enable_ue_rrc_processing_timer(ctxt_pP->module_id, ue_p->rnti, *RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->ssbSubcarrierSpacing, delay_ms); } } @@ -1201,51 +1058,40 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release( /* * Process the RRC Reconfiguration Complete from the UE */ -void -rrc_gNB_process_RRCReconfigurationComplete( - const protocol_ctxt_t *const ctxt_pP, - rrc_gNB_ue_context_t *ue_context_pP, - const uint8_t xid -) +static void rrc_gNB_process_RRCReconfigurationComplete(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_context_t *ue_context_pP, const uint8_t xid) { int drb_id; uint8_t *kRRCenc = NULL; uint8_t *kRRCint = NULL; uint8_t *kUPenc = NULL; uint8_t *kUPint = NULL; - NR_DRB_ToAddModList_t *DRB_configList = ue_context_pP->ue_context.DRB_configList2[xid]; - NR_SRB_ToAddModList_t *SRB_configList = ue_context_pP->ue_context.SRB_configList2[xid]; - NR_DRB_ToReleaseList_t *DRB_Release_configList2 = ue_context_pP->ue_context.DRB_Release_configList2[xid]; + gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; + NR_DRB_ToAddModList_t *DRB_configList = ue_p->DRB_configList2[xid]; + NR_SRB_ToAddModList_t *SRB_configList = ue_p->SRB_configList2[xid]; + NR_DRB_ToReleaseList_t *DRB_Release_configList2 = ue_p->DRB_Release_configList2[xid]; NR_DRB_Identity_t *drb_id_p = NULL; // uint8_t nr_DRB2LCHAN[8]; - ue_context_pP->ue_context.ue_reestablishment_timer = 0; + ue_p->ue_reestablishment_timer = 0; /* Derive the keys from kgnb */ if (DRB_configList != NULL) { - nr_derive_key_up_enc(ue_context_pP->ue_context.ciphering_algorithm, - ue_context_pP->ue_context.kgnb, - &kUPenc); - nr_derive_key_up_int(ue_context_pP->ue_context.integrity_algorithm, - ue_context_pP->ue_context.kgnb, - &kUPint); + nr_derive_key_up_enc(ue_p->ciphering_algorithm, ue_p->kgnb, &kUPenc); + nr_derive_key_up_int(ue_p->integrity_algorithm, ue_p->kgnb, &kUPint); } - nr_derive_key_rrc_enc(ue_context_pP->ue_context.ciphering_algorithm, - ue_context_pP->ue_context.kgnb, - &kRRCenc); - nr_derive_key_rrc_int(ue_context_pP->ue_context.integrity_algorithm, - ue_context_pP->ue_context.kgnb, - &kRRCint); + nr_derive_key_rrc_enc(ue_p->ciphering_algorithm, ue_p->kgnb, &kRRCenc); + nr_derive_key_rrc_int(ue_p->integrity_algorithm, ue_p->kgnb, &kRRCint); /* Refresh SRBs/DRBs */ - LOG_D(NR_RRC, "Configuring PDCP DRBs/SRBs for UE %04x\n", ue_context_pP->ue_context.rnti); + LOG_D(NR_RRC, "Configuring PDCP DRBs/SRBs for UE %04x\n", ue_p->rnti); ue_id_t reestablish_ue_id = 0; if (DRB_configList && DRB_configList->list.array[0]->reestablishPDCP && *DRB_configList->list.array[0]->reestablishPDCP == NR_DRB_ToAddMod__reestablishPDCP_true) { for (int i = 0; i < MAX_MOBILES_PER_GNB; i++) { nr_reestablish_rnti_map_t *nr_reestablish_rnti_map = &(RC.nrrrc[ctxt_pP->module_id])->nr_reestablish_rnti_map[i]; if (nr_reestablish_rnti_map->ue_id == ctxt_pP->rntiMaybeUEid) { + ue_context_pP->ue_context.ue_reconfiguration_after_reestablishment_counter++; reestablish_ue_id = nr_reestablish_rnti_map[i].c_rnti; LOG_D(NR_RRC, "Removing reestablish_rnti_map[%d] UEid %lx, RNTI %04x\n", i, nr_reestablish_rnti_map->ue_id, nr_reestablish_rnti_map->c_rnti); // clear current C-RNTI from map @@ -1256,51 +1102,41 @@ rrc_gNB_process_RRCReconfigurationComplete( } } - nr_pdcp_add_srbs(ctxt_pP->enb_flag, ctxt_pP->rntiMaybeUEid, SRB_configList, (ue_context_pP->ue_context.integrity_algorithm << 4) | ue_context_pP->ue_context.ciphering_algorithm, kRRCenc, kRRCint); + nr_pdcp_add_srbs(ctxt_pP->enb_flag, ctxt_pP->rntiMaybeUEid, SRB_configList, (ue_p->integrity_algorithm << 4) | ue_p->ciphering_algorithm, kRRCenc, kRRCint); nr_pdcp_add_drbs(ctxt_pP->enb_flag, ctxt_pP->rntiMaybeUEid, reestablish_ue_id, DRB_configList, - (ue_context_pP->ue_context.integrity_algorithm << 4) | ue_context_pP->ue_context.ciphering_algorithm, + (ue_p->integrity_algorithm << 4) | ue_p->ciphering_algorithm, kUPenc, kUPint, - get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList : NULL); + get_softmodem_params()->sa ? ue_p->masterCellGroup->rlc_BearerToAddModList : NULL); /* Refresh SRBs/DRBs */ if (!NODE_IS_CU(RC.nrrrc[ctxt_pP->module_id]->node_type)) { LOG_D(NR_RRC,"Configuring RLC DRBs/SRBs for UE %04x\n",ue_context_pP->ue_context.rnti); - nr_rrc_rlc_config_asn1_req(ctxt_pP, - SRB_configList, // NULL, - DRB_configList, - DRB_Release_configList2, - get_softmodem_params()->sa ? ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList : NULL); + const struct NR_CellGroupConfig__rlc_BearerToAddModList *bearer_list = + ue_context_pP->ue_context.masterCellGroup->rlc_BearerToAddModList; + nr_rrc_addmod_srbs(ctxt_pP->rntiMaybeUEid, SRB_configList, bearer_list); + nr_rrc_addmod_drbs(ctxt_pP->rntiMaybeUEid, DRB_configList, bearer_list); } /* Set the SRB active in UE context */ if (SRB_configList != NULL) { for (int i = 0; (i < SRB_configList->list.count) && (i < 3); i++) { if (SRB_configList->list.array[i]->srb_Identity == 1) { - ue_context_pP->ue_context.Srb1.Active = 1; - ue_context_pP->ue_context.Srb1.Srb_info.Srb_id = 1; + ue_p->Srb[1].Active = 1; } else if (SRB_configList->list.array[i]->srb_Identity == 2) { - ue_context_pP->ue_context.Srb2.Active = 1; - ue_context_pP->ue_context.Srb2.Srb_info.Srb_id = 2; - LOG_I(NR_RRC,"[gNB %d] Frame %d CC %d: SRB2 is now active\n", - ctxt_pP->module_id, - ctxt_pP->frame, - ue_context_pP->ue_context.primaryCC_id); + ue_p->Srb[2].Active = 1; + LOG_I(NR_RRC, "[gNB %d] Frame %d CC %d : SRB2 is now active\n", ctxt_pP->module_id, ctxt_pP->frame, ue_p->primaryCC_id); } else { - LOG_W(NR_RRC,"[gNB %d] Frame %d CC %d: invalid SRB identity %ld\n", - ctxt_pP->module_id, - ctxt_pP->frame, - ue_context_pP->ue_context.primaryCC_id, - SRB_configList->list.array[i]->srb_Identity); + LOG_W(NR_RRC, "[gNB %d] Frame %d CC %d: invalid SRB identity %ld\n", ctxt_pP->module_id, ctxt_pP->frame, ue_p->primaryCC_id, SRB_configList->list.array[i]->srb_Identity); } } free(SRB_configList); - ue_context_pP->ue_context.SRB_configList2[xid] = NULL; + ue_p->SRB_configList2[xid] = NULL; } /* Loop through DRBs and establish if necessary */ @@ -1316,8 +1152,8 @@ rrc_gNB_process_RRCReconfigurationComplete( (int)DRB_configList->list.array[i]->drb_Identity); //(int)*DRB_configList->list.array[i]->pdcp_Config->moreThanOneRLC->primaryPath.logicalChannel); - if (ue_context_pP->ue_context.DRB_active[drb_id - 1] == 0) { - ue_context_pP->ue_context.DRB_active[drb_id - 1] = DRB_ACTIVE; + if (ue_p->DRB_active[drb_id - 1] == 0) { + ue_p->DRB_active[drb_id - 1] = DRB_ACTIVE; LOG_D(NR_RRC, "[gNB %d] Frame %d: Establish RLC UM Bidirectional, DRB %d Active\n", ctxt_pP->module_id, ctxt_pP->frame, (int)DRB_configList->list.array[i]->drb_Identity); @@ -1331,7 +1167,7 @@ rrc_gNB_process_RRCReconfigurationComplete( // rrc_mac_config_req_eNB } else { // remove LCHAN from MAC/PHY - if (ue_context_pP->ue_context.DRB_active[drb_id] == 1) { + if (ue_p->DRB_active[drb_id] == 1) { /* TODO : It may be needed if gNB goes into full stack working. */ // DRB has just been removed so remove RLC + PDCP for DRB /* rrc_pdcp_config_req (ctxt_pP->module_id, frameP, 1, CONFIG_ACTION_REMOVE, @@ -1344,18 +1180,18 @@ rrc_gNB_process_RRCReconfigurationComplete( nr_DRB2LCHAN[i]);*/ } - //ue_context_pP->ue_context.DRB_active[drb_id] = 0; + // ue_p->DRB_active[drb_id] = 0; LOG_D(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (DRB) ---> MAC_eNB\n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); // rrc_mac_config_req_eNB - } // end else of if (ue_context_pP->ue_context.DRB_active[drb_id] == 0) + } // end else of if (ue_p->DRB_active[drb_id] == 0) } // end if (DRB_configList->list.array[i]) } // end for (int i = 0; i < DRB_configList->list.count; i++) free(DRB_configList); - ue_context_pP->ue_context.DRB_configList2[xid] = NULL; + ue_p->DRB_configList2[xid] = NULL; } // end if DRB_configList != NULL if(DRB_Release_configList2 != NULL) { @@ -1364,14 +1200,14 @@ rrc_gNB_process_RRCReconfigurationComplete( drb_id_p = DRB_Release_configList2->list.array[i]; drb_id = *drb_id_p; - if (ue_context_pP->ue_context.DRB_active[drb_id] == 1) { - ue_context_pP->ue_context.DRB_active[drb_id] = 0; + if (ue_p->DRB_active[drb_id] == 1) { + ue_p->DRB_active[drb_id] = 0; } } } free(DRB_Release_configList2); - ue_context_pP->ue_context.DRB_Release_configList2[xid] = NULL; + ue_p->DRB_Release_configList2[xid] = NULL; } } @@ -1391,13 +1227,14 @@ void rrc_gNB_generate_RRCReestablishment(const protocol_ctxt_t *ctxt_pP, module_id_t module_id = ctxt_pP->module_id; gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id]; int enable_ciphering = 0; + gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; // Need to drop spCellConfig when there is a RRCReestablishment // Save spCellConfig in spCellConfigReestablishment to recover after Reestablishment is completed - ue_context_pP->ue_context.spCellConfigReestablishment = ue_context_pP->ue_context.masterCellGroup->spCellConfig; - ue_context_pP->ue_context.masterCellGroup->spCellConfig = NULL; + ue_p->spCellConfigReestablishment = ue_p->masterCellGroup->spCellConfig; + ue_p->masterCellGroup->spCellConfig = NULL; - SRB_configList = &(ue_context_pP->ue_context.SRB_configList); + SRB_configList = &(ue_p->SRB_configList); uint8_t buffer[RRC_BUF_SIZE] = {0}; int size = do_RRCReestablishment(ctxt_pP, @@ -1411,7 +1248,7 @@ void rrc_gNB_generate_RRCReestablishment(const protocol_ctxt_t *ctxt_pP, scc, &rrc->carrier); - LOG_I(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT " [RAPROC] Logical Channel DL-DCCH, Generating NR_RRCReestablishment (bytes %d)\n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), size); + LOG_I(NR_RRC, "[RAPROC] UE %04x Logical Channel DL-DCCH, Generating NR_RRCReestablishment (bytes %d)\n", ue_p->rnti, size); #if (0) /* TODO : It may be needed if gNB goes into full stack working. */ UE = find_nr_UE(module_id, rnti); @@ -1421,7 +1258,7 @@ void rrc_gNB_generate_RRCReestablishment(const protocol_ctxt_t *ctxt_pP, /* Reject UE after 10 frames, NR_RRCReestablishmentReject is triggered */ RC.nrmac[module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres = 100; } else { - LOG_E(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT " Generating NR_RRCReestablishment without UE_id(MAC) rnti %x\n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), rnti); + LOG_E(NR_RRC, " Generating NR_RRCReestablishment without UE_id(MAC) rnti %x\n", rnti); } #endif @@ -1430,11 +1267,11 @@ void rrc_gNB_generate_RRCReestablishment(const protocol_ctxt_t *ctxt_pP, uint8_t *kUPenc = NULL; /* Derive the keys from kgnb */ if (SRB_configList != NULL) { - nr_derive_key_up_enc(ue_context_pP->ue_context.ciphering_algorithm, ue_context_pP->ue_context.kgnb, &kUPenc); + nr_derive_key_up_enc(ue_p->ciphering_algorithm, ue_p->kgnb, &kUPenc); } - nr_derive_key_rrc_enc(ue_context_pP->ue_context.ciphering_algorithm, ue_context_pP->ue_context.kgnb, &kRRCenc); - nr_derive_key_rrc_int(ue_context_pP->ue_context.integrity_algorithm, ue_context_pP->ue_context.kgnb, &kRRCint); + nr_derive_key_rrc_enc(ue_p->ciphering_algorithm, ue_p->kgnb, &kRRCenc); + nr_derive_key_rrc_int(ue_p->integrity_algorithm, ue_p->kgnb, &kRRCint); /* Configure SRB1 for UE */ if (*SRB_configList != NULL) { @@ -1447,20 +1284,19 @@ void rrc_gNB_generate_RRCReestablishment(const protocol_ctxt_t *ctxt_pP, NULL, NULL); } - LOG_D(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT " RRC_gNB --- MAC_CONFIG_REQ (SRB1) ---> MAC_gNB\n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); + LOG_D(NR_RRC, "UE %04x --- MAC_CONFIG_REQ (SRB1) ---> MAC_gNB\n", ue_p->rnti); } } // if (*SRB_configList != NULL) - LOG_I(NR_RRC, "Set PDCP security RNTI %04lx nca %ld nia %d in RRCReestablishment\n", ctxt_pP->rntiMaybeUEid, ue_context_pP->ue_context.ciphering_algorithm, ue_context_pP->ue_context.integrity_algorithm); - pdcp_config_set_security( - ctxt_pP, - NULL, /* pdcp_pP not used anymore in NR */ - DCCH, - DCCH + 2, - enable_ciphering ? ue_context_pP->ue_context.ciphering_algorithm | (ue_context_pP->ue_context.integrity_algorithm << 4) : 0 | (ue_context_pP->ue_context.integrity_algorithm << 4), - kRRCenc, - kRRCint, - kUPenc); + LOG_I(NR_RRC, "Set PDCP security RNTI %04lx nca %ld nia %d in RRCReestablishment\n", ctxt_pP->rntiMaybeUEid, ue_p->ciphering_algorithm, ue_p->integrity_algorithm); + pdcp_config_set_security(ctxt_pP, + NULL, /* pdcp_pP not used anymore in NR */ + DCCH, + DCCH + 2, + enable_ciphering ? ue_p->ciphering_algorithm | (ue_p->integrity_algorithm << 4) : 0 | (ue_p->integrity_algorithm << 4), + kRRCenc, + kRRCint, + kUPenc); if (!NODE_IS_CU(rrc->node_type)) { apply_macrlc_config_reest(rrc, ue_context_pP, ctxt_pP, ctxt_pP->rntiMaybeUEid); @@ -1473,12 +1309,11 @@ void rrc_gNB_generate_RRCReestablishment(const protocol_ctxt_t *ctxt_pP, void rrc_gNB_process_RRCReestablishmentComplete(const protocol_ctxt_t *const ctxt_pP, const rnti_t reestablish_rnti, rrc_gNB_ue_context_t *ue_context_pP, const uint8_t xid) //----------------------------------------------------------------------------- { - LOG_I(NR_RRC, - PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel UL-DCCH, processing NR_RRCReestablishmentComplete from UE (SRB1 Active)\n", - PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP)); + gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; + LOG_I(NR_RRC, "[RAPROC] UE %04x Logical Channel UL-DCCH, processing NR_RRCReestablishmentComplete from UE (SRB1 Active)\n", ue_p->rnti); - NR_DRB_ToAddModList_t *DRB_configList = ue_context_pP->ue_context.DRB_configList; - NR_SRB_ToAddModList_t *SRB_configList = ue_context_pP->ue_context.SRB_configList; + NR_DRB_ToAddModList_t *DRB_configList = ue_p->DRB_configList; + NR_SRB_ToAddModList_t *SRB_configList = ue_p->SRB_configList; NR_SRB_ToAddModList_t **SRB_configList2 = NULL; NR_DRB_ToAddModList_t **DRB_configList2 = NULL; NR_SRB_ToAddMod_t *SRB2_config = NULL; @@ -1488,10 +1323,10 @@ void rrc_gNB_process_RRCReestablishmentComplete(const protocol_ctxt_t *const ctx uint8_t new_xid = rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id); int ret = 0; - ue_context_pP->ue_context.StatusRrc = NR_RRC_CONNECTED; - ue_context_pP->ue_context.ue_rrc_inactivity_timer = 1; // set rrc inactivity when UE goes into RRC_CONNECTED - ue_context_pP->ue_context.reestablishment_xid = new_xid; - SRB_configList2 = &ue_context_pP->ue_context.SRB_configList2[xid]; + ue_p->StatusRrc = NR_RRC_CONNECTED; + ue_p->ue_rrc_inactivity_timer = 1; // set rrc inactivity when UE goes into RRC_CONNECTED + ue_p->reestablishment_xid = new_xid; + SRB_configList2 = &ue_p->SRB_configList2[xid]; // get old configuration of SRB2 if (*SRB_configList2 != NULL) { @@ -1502,7 +1337,7 @@ void rrc_gNB_process_RRCReestablishmentComplete(const protocol_ctxt_t *const ctx for (i = 0; (i < (*SRB_configList2)->list.count) && (i < 3); i++) { if ((*SRB_configList2)->list.array[i]->srb_Identity == 2 ) { - LOG_D(NR_RRC, "get SRB2_config from (ue_context_pP->ue_context.SRB_configList2[%d])\n", xid); + LOG_D(NR_RRC, "get SRB2_config from (ue_p->SRB_configList2[%d])\n", xid); SRB2_config = (*SRB_configList2)->list.array[i]; SRB2_config->reestablishPDCP = CALLOC(1, sizeof(*SRB2_config->reestablishPDCP)); *SRB2_config->reestablishPDCP = NR_SRB_ToAddMod__reestablishPDCP_true; @@ -1514,12 +1349,12 @@ void rrc_gNB_process_RRCReestablishmentComplete(const protocol_ctxt_t *const ctx // SRB2_config = CALLOC(1, sizeof(*SRB2_config)); // SRB2_config->srb_Identity = 2; - SRB_configList2 = &(ue_context_pP->ue_context.SRB_configList2[new_xid]); - DRB_configList2 = &(ue_context_pP->ue_context.DRB_configList2[new_xid]); + SRB_configList2 = &(ue_p->SRB_configList2[new_xid]); + DRB_configList2 = &(ue_p->DRB_configList2[new_xid]); if (*SRB_configList2) { free(*SRB_configList2); - LOG_D(NR_RRC, "free(ue_context_pP->ue_context.SRB_configList2[%d])\n", new_xid); + LOG_D(NR_RRC, "free(ue_p->SRB_configList2[%d])\n", new_xid); } *SRB_configList2 = CALLOC(1, sizeof(**SRB_configList2)); @@ -1528,9 +1363,8 @@ void rrc_gNB_process_RRCReestablishmentComplete(const protocol_ctxt_t *const ctx // Add SRB2 to SRB configuration list asn1cSeqAdd(&SRB_configList->list, SRB2_config); asn1cSeqAdd(&(*SRB_configList2)->list, SRB2_config); - LOG_D(NR_RRC, "Add SRB2_config (srb_Identity:%ld) to ue_context_pP->ue_context.SRB_configList\n", - SRB2_config->srb_Identity); - LOG_D(NR_RRC, "Add SRB2_config (srb_Identity:%ld) to ue_context_pP->ue_context.SRB_configList2[%d]\n", SRB2_config->srb_Identity, new_xid); + LOG_D(NR_RRC, "Add SRB2_config (srb_Identity:%ld) to ue_p->SRB_configList\n", SRB2_config->srb_Identity); + LOG_D(NR_RRC, "Add SRB2_config (srb_Identity:%ld) to ue_p->SRB_configList2[%d]\n", SRB2_config->srb_Identity, new_xid); } else { // SRB configuration list only contains SRB1. LOG_W(NR_RRC,"SRB2 configuration does not exist in SRB configuration list\n"); @@ -1538,13 +1372,13 @@ void rrc_gNB_process_RRCReestablishmentComplete(const protocol_ctxt_t *const ctx if (*DRB_configList2) { free(*DRB_configList2); - LOG_D(NR_RRC, "free(ue_context_pP->ue_context.DRB_configList2[%d])\n", new_xid); + LOG_D(NR_RRC, "free(ue_p->DRB_configList2[%d])\n", new_xid); } *DRB_configList2 = CALLOC(1, sizeof(**DRB_configList2)); if (DRB_configList != NULL) { - LOG_D(NR_RRC, "get DRB_config from (ue_context_pP->ue_context.DRB_configList)\n"); + LOG_D(NR_RRC, "get DRB_config from (ue_p->DRB_configList)\n"); for (i = 0; (i < DRB_configList->list.count) && (i < 3); i++) { DRB_config = DRB_configList->list.array[i]; @@ -1554,47 +1388,22 @@ void rrc_gNB_process_RRCReestablishmentComplete(const protocol_ctxt_t *const ctx } } - ue_context_pP->ue_context.Srb1.Active = 1; - //ue_context_pP->ue_context.Srb2.Srb_info.Srb_id = 2; + ue_p->Srb[1].Active = 1; if (get_softmodem_params()->sa) { - hashtable_rc_t h_rc; - int j; - rrc_ue_ngap_ids_t *rrc_ue_ngap_ids_p = NULL; - uint16_t ue_initial_id = ue_context_pP->ue_context.ue_initial_id; - uint32_t gNB_ue_ngap_id = ue_context_pP->ue_context.gNB_ue_ngap_id; - gNB_RRC_INST *rrc_instance_p = RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)]; - - if (gNB_ue_ngap_id > 0) { - h_rc = hashtable_get(rrc_instance_p->ngap_id2_ngap_ids, (hash_key_t)gNB_ue_ngap_id, (void **)&rrc_ue_ngap_ids_p); - - if (h_rc == HASH_TABLE_OK) { - rrc_ue_ngap_ids_p->ue_rnti = ctxt_pP->rntiMaybeUEid; - } - } - - if (ue_initial_id != 0) { - h_rc = hashtable_get(rrc_instance_p->initial_id2_ngap_ids, (hash_key_t)ue_initial_id, (void **)&rrc_ue_ngap_ids_p); - - if (h_rc == HASH_TABLE_OK) { - rrc_ue_ngap_ids_p->ue_rnti = ctxt_pP->rntiMaybeUEid; - } - } - + LOG_W(NR_RRC, "Rework identity mapping need to be done properly!\n"); gtpv1u_gnb_create_tunnel_req_t create_tunnel_req={0}; /* Save e RAB information for later */ - - for ( j = 0, i = 0; i < NB_RB_MAX; i++) { - if (ue_context_pP->ue_context.pduSession[i].status == PDU_SESSION_STATUS_ESTABLISHED || ue_context_pP->ue_context.pduSession[i].status == PDU_SESSION_STATUS_DONE) { - create_tunnel_req.pdusession_id[j] = ue_context_pP->ue_context.pduSession[i].param.pdusession_id; + int j; + for (j = 0, i = 0; i < NB_RB_MAX; i++) { + if (ue_p->pduSession[i].status == PDU_SESSION_STATUS_ESTABLISHED || ue_p->pduSession[i].status == PDU_SESSION_STATUS_DONE) { + create_tunnel_req.pdusession_id[j] = ue_p->pduSession[i].param.pdusession_id; create_tunnel_req.incoming_rb_id[j] = i+1; - create_tunnel_req.outgoing_teid[j] = ue_context_pP->ue_context.pduSession[i].param.gtp_teid; + create_tunnel_req.outgoing_teid[j] = ue_p->pduSession[i].param.gtp_teid; // to be developped, use the first QFI only - create_tunnel_req.outgoing_qfi[j] = ue_context_pP->ue_context.pduSession[i].param.qos[0].qfi; - memcpy(create_tunnel_req.dst_addr[j].buffer, - ue_context_pP->ue_context.pduSession[i].param.upf_addr.buffer, - sizeof(uint8_t)*20); - create_tunnel_req.dst_addr[j].length = ue_context_pP->ue_context.pduSession[i].param.upf_addr.length; + create_tunnel_req.outgoing_qfi[j] = ue_p->pduSession[i].param.qos[0].qfi; + memcpy(create_tunnel_req.dst_addr[j].buffer, ue_p->pduSession[i].param.upf_addr.buffer, sizeof(uint8_t) * 20); + create_tunnel_req.dst_addr[j].length = ue_p->pduSession[i].param.upf_addr.length; j++; } } @@ -1607,39 +1416,20 @@ void rrc_gNB_process_RRCReestablishmentComplete(const protocol_ctxt_t *const ctx reestablish_rnti); if ( ret != 0 ) { - LOG_E(NR_RRC,"gtpv1u_update_ngu_tunnel failed,start to release UE %x\n",reestablish_rnti); - - // update s1u tunnel failed,reset rnti? - if (gNB_ue_ngap_id > 0) { - h_rc = hashtable_get(rrc_instance_p->ngap_id2_ngap_ids, (hash_key_t)gNB_ue_ngap_id, (void **)&rrc_ue_ngap_ids_p); - - if (h_rc == HASH_TABLE_OK ) { - rrc_ue_ngap_ids_p->ue_rnti = reestablish_rnti; - } - } - - if (ue_initial_id != 0) { - h_rc = hashtable_get(rrc_instance_p->initial_id2_ngap_ids, (hash_key_t)ue_initial_id, (void **)&rrc_ue_ngap_ids_p); - - if (h_rc == HASH_TABLE_OK ) { - rrc_ue_ngap_ids_p->ue_rnti = reestablish_rnti; - } - } - - ue_context_pP->ue_context.ue_release_timer_s1 = 1; - ue_context_pP->ue_context.ue_release_timer_thres_s1 = 100; - ue_context_pP->ue_context.ue_release_timer = 0; - ue_context_pP->ue_context.ue_reestablishment_timer = 0; - ue_context_pP->ue_context.ul_failure_timer = 20000; // set ul_failure to 20000 for triggering rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ - ue_context_pP->ue_context.ul_failure_timer = 0; + LOG_E(NR_RRC, "gtpv1u_update_ngu_tunnel failed,start to release UE %x\n", reestablish_rnti); + ue_p->ue_release_timer_s1 = 1; + ue_p->ue_release_timer_thres_s1 = 100; + ue_p->ue_release_timer = 0; + ue_p->ue_reestablishment_timer = 0; + ue_p->ul_failure_timer = 20000; // set ul_failure to 20000 for triggering rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ + ue_p->ul_failure_timer = 0; return; } } /* Update RNTI in ue_context */ - LOG_I(NR_RRC, "Updating UEid from %04x to %lx\n", ue_context_pP->ue_context.rnti, ctxt_pP->rntiMaybeUEid); - ue_context_pP->ue_id_rnti = ctxt_pP->rntiMaybeUEid; // here ue_id_rnti is just a key, may be something else - ue_context_pP->ue_context.rnti = ctxt_pP->rntiMaybeUEid; + LOG_I(NR_RRC, "Updating UEid from %04x to %lx\n", ue_p->rnti, ctxt_pP->rntiMaybeUEid); + rrc_gNB_update_ue_context_rnti(ctxt_pP->rntiMaybeUEid, RC.nrrrc[ctxt_pP->module_id], ue_p->gNB_ue_ngap_id); if (get_softmodem_params()->sa) { uint8_t send_security_mode_command = false; @@ -1651,31 +1441,29 @@ void rrc_gNB_process_RRCReestablishmentComplete(const protocol_ctxt_t *const ctx } uint8_t drb_id_to_setup_start = DRB_configList ? DRB_configList->list.array[0]->drb_Identity : 1; - uint8_t nb_drb_to_setup = DRB_configList ? DRB_configList->list.count : ue_context_pP->ue_context.nb_of_pdusessions; + uint8_t nb_drb_to_setup = DRB_configList ? DRB_configList->list.count : ue_p->nb_of_pdusessions; /* TODO: hardcoded to 13 for the time being, to be changed? */ long drb_priority[NGAP_MAX_DRBS_PER_UE] = {13}; /* Add all NAS PDUs to the list */ - for (i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) { - + for (i = 0; i < ue_p->nb_of_pdusessions; i++) { /* TODO parameters yet to process ... */ /* TODO should test if pdu session are Ok before! */ - ue_context_pP->ue_context.pduSession[i].status = PDU_SESSION_STATUS_DONE; - ue_context_pP->ue_context.pduSession[i].xid = xid; - LOG_D(NR_RRC, "setting the status for the default DRB (index %d) to (%d,%s)\n", - i, ue_context_pP->ue_context.pduSession[i].status, "PDU_SESSION_STATUS_DONE"); + ue_p->pduSession[i].status = PDU_SESSION_STATUS_DONE; + ue_p->pduSession[i].xid = xid; + LOG_D(NR_RRC, "setting the status for the default DRB (index %d) to (%d,%s)\n", i, ue_p->pduSession[i].status, "PDU_SESSION_STATUS_DONE"); } gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id]; NR_CellGroupConfig_t *cellGroupConfig = calloc(1, sizeof(NR_CellGroupConfig_t)); // Revert spCellConfig stored in spCellConfigReestablishment before had been dropped during RRC Reestablishment - ue_context_pP->ue_context.masterCellGroup->spCellConfig = ue_context_pP->ue_context.spCellConfigReestablishment; - ue_context_pP->ue_context.spCellConfigReestablishment = NULL; - cellGroupConfig->spCellConfig = ue_context_pP->ue_context.masterCellGroup->spCellConfig; - cellGroupConfig->physicalCellGroupConfig = ue_context_pP->ue_context.masterCellGroup->physicalCellGroupConfig; + ue_p->masterCellGroup->spCellConfig = ue_p->spCellConfigReestablishment; + ue_p->spCellConfigReestablishment = NULL; + cellGroupConfig->spCellConfig = ue_p->masterCellGroup->spCellConfig; +cellGroupConfig->physicalCellGroupConfig = ue_p->masterCellGroup->physicalCellGroupConfig; - fill_mastercellGroupConfig(cellGroupConfig, ue_context_pP->ue_context.masterCellGroup, rrc->um_on_default_drb, (drb_id_to_setup_start < 2) ? 1 : 0, drb_id_to_setup_start, nb_drb_to_setup, drb_priority); + fill_mastercellGroupConfig(cellGroupConfig, ue_p->masterCellGroup, rrc->um_on_default_drb, (drb_id_to_setup_start < 2) ? 1 : 0, drb_id_to_setup_start, nb_drb_to_setup, drb_priority); for(i = 0; i < cellGroupConfig->rlc_BearerToAddModList->list.count; i++) { cellGroupConfig->rlc_BearerToAddModList->list.array[i]->reestablishRLC = CALLOC(1, sizeof(*cellGroupConfig->rlc_BearerToAddModList->list.array[i]->reestablishRLC)); @@ -1703,11 +1491,11 @@ void rrc_gNB_process_RRCReestablishmentComplete(const protocol_ctxt_t *const ctx LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size, "[MSG] RRC Reconfiguration\n"); /* Free all NAS PDUs */ - for (i = 0; i < ue_context_pP->ue_context.nb_of_pdusessions; i++) { - if (ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer != NULL) { + for (i = 0; i < ue_p->nb_of_pdusessions; i++) { + if (ue_p->pduSession[i].param.nas_pdu.buffer != NULL) { /* Free the NAS PDU buffer and invalidate it */ - free(ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer); - ue_context_pP->ue_context.pduSession[i].param.nas_pdu.buffer = NULL; + free(ue_p->pduSession[i].param.nas_pdu.buffer); + ue_p->pduSession[i].param.nas_pdu.buffer = NULL; } } @@ -1715,44 +1503,28 @@ void rrc_gNB_process_RRCReestablishmentComplete(const protocol_ctxt_t *const ctx LOG_E(NR_RRC, "RRC decode err!!! do_RRCReconfiguration\n"); return; } else { - LOG_I(NR_RRC, "[gNB %d] Frame %d, Logical Channel DL-DCCH, Generate NR_RRCReconfiguration (bytes %d, UE id %04x)\n", ctxt_pP->module_id, ctxt_pP->frame, size, ue_context_pP->ue_context.rnti); + LOG_I(NR_RRC, "[gNB %d] Frame %d, Logical Channel DL-DCCH, Generate NR_RRCReconfiguration (bytes %d, UE id %04x)\n", ctxt_pP->module_id, ctxt_pP->frame, size, ue_p->rnti); LOG_D(NR_RRC, "[FRAME %05d][RRC_gNB][MOD %u][][--- PDCP_DATA_REQ/%d Bytes (RRCReconfiguration to UE %04x MUI %d) --->][PDCP][MOD %u][RB %u]\n", ctxt_pP->frame, ctxt_pP->module_id, size, - ue_context_pP->ue_context.rnti, + ue_p->rnti, rrc_gNB_mui, ctxt_pP->module_id, DCCH); - gNB_RrcConfigurationReq *configuration = &RC.nrrrc[ctxt_pP->module_id]->configuration; - rrc_mac_config_req_gNB(ctxt_pP->module_id, - configuration->pdsch_AntennaPorts, - configuration->pusch_AntennaPorts, - configuration->sib1_tda, - configuration->minRXTXTIME, - NULL, - NULL, - NULL, - 0, - ue_context_pP->ue_context.rnti, - cellGroupConfig); - + nr_mac_update_cellgroup(RC.nrmac[rrc->module_id], ue_context_pP->ue_context.rnti, cellGroupConfig); nr_rrc_data_req(ctxt_pP, DCCH, rrc_gNB_mui++, SDU_CONFIRM_NO, size, buffer, PDCP_TRANSMISSION_MODE_CONTROL); } if (NODE_IS_DU(RC.nrrrc[ctxt_pP->module_id]->node_type) || NODE_IS_MONOLITHIC(RC.nrrrc[ctxt_pP->module_id]->node_type)) { - uint32_t delay_ms = ue_context_pP->ue_context.masterCellGroup && - ue_context_pP->ue_context.masterCellGroup->spCellConfig && - ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated && - ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList ? - NR_RRC_RECONFIGURATION_DELAY_MS + NR_RRC_BWP_SWITCHING_DELAY_MS : NR_RRC_RECONFIGURATION_DELAY_MS; + uint32_t delay_ms = ue_p->masterCellGroup && ue_p->masterCellGroup->spCellConfig && ue_p->masterCellGroup->spCellConfig->spCellConfigDedicated + && ue_p->masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList + ? NR_RRC_RECONFIGURATION_DELAY_MS + NR_RRC_BWP_SWITCHING_DELAY_MS + : NR_RRC_RECONFIGURATION_DELAY_MS; - nr_mac_enable_ue_rrc_processing_timer(ctxt_pP->module_id, - ue_context_pP->ue_context.rnti, - *RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->ssbSubcarrierSpacing, - delay_ms); + nr_mac_enable_ue_rrc_processing_timer(ctxt_pP->module_id, ue_p->rnti, *RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->ssbSubcarrierSpacing, delay_ms); } } //----------------------------------------------------------------------------- @@ -1763,8 +1535,9 @@ int nr_rrc_reconfiguration_req(rrc_gNB_ue_context_t *const ue_context_pP const int ul_bwp_id) { uint8_t xid = rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id); + gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; - NR_CellGroupConfig_t *masterCellGroup = ue_context_pP->ue_context.masterCellGroup; + NR_CellGroupConfig_t *masterCellGroup = ue_p->masterCellGroup; if (dl_bwp_id > 0) { *masterCellGroup->spCellConfig->spCellConfigDedicated->firstActiveDownlinkBWP_Id = dl_bwp_id; *masterCellGroup->spCellConfig->spCellConfigDedicated->defaultDownlinkBWP_Id = dl_bwp_id; @@ -1791,18 +1564,7 @@ int nr_rrc_reconfiguration_req(rrc_gNB_ue_context_t *const ue_context_pP NULL, masterCellGroup); - gNB_RrcConfigurationReq *configuration = &RC.nrrrc[ctxt_pP->module_id]->configuration; - rrc_mac_config_req_gNB(ctxt_pP->module_id, - configuration->pdsch_AntennaPorts, - configuration->pusch_AntennaPorts, - configuration->sib1_tda, - configuration->minRXTXTIME, - NULL, - NULL, - NULL, - 0, - ue_context_pP->ue_context.rnti, - masterCellGroup); + nr_mac_update_cellgroup(RC.nrmac[ctxt_pP->module_id], ue_context_pP->ue_context.rnti, masterCellGroup); nr_rrc_data_req(ctxt_pP, DCCH, @@ -1813,95 +1575,75 @@ int nr_rrc_reconfiguration_req(rrc_gNB_ue_context_t *const ue_context_pP PDCP_TRANSMISSION_MODE_CONTROL); if (NODE_IS_DU(RC.nrrrc[ctxt_pP->module_id]->node_type) || NODE_IS_MONOLITHIC(RC.nrrrc[ctxt_pP->module_id]->node_type)) { - uint32_t delay_ms = ue_context_pP->ue_context.masterCellGroup && - ue_context_pP->ue_context.masterCellGroup->spCellConfig && - ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated && - ue_context_pP->ue_context.masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList ? - NR_RRC_RECONFIGURATION_DELAY_MS + NR_RRC_BWP_SWITCHING_DELAY_MS : NR_RRC_RECONFIGURATION_DELAY_MS; + uint32_t delay_ms = ue_p->masterCellGroup && ue_p->masterCellGroup->spCellConfig && ue_p->masterCellGroup->spCellConfig->spCellConfigDedicated + && ue_p->masterCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList + ? NR_RRC_RECONFIGURATION_DELAY_MS + NR_RRC_BWP_SWITCHING_DELAY_MS + : NR_RRC_RECONFIGURATION_DELAY_MS; - nr_mac_enable_ue_rrc_processing_timer(ctxt_pP->module_id, - ue_context_pP->ue_context.rnti, - *RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->ssbSubcarrierSpacing, - delay_ms); + nr_mac_enable_ue_rrc_processing_timer(ctxt_pP->module_id, ue_p->rnti, *RC.nrrrc[ctxt_pP->module_id]->carrier.servingcellconfigcommon->ssbSubcarrierSpacing, delay_ms); } return 0; } /*------------------------------------------------------------------------------*/ -int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP, - const uint8_t *buffer, - int buffer_length, - const uint8_t *du_to_cu_rrc_container, - int du_to_cu_rrc_container_len) +static int nr_rrc_gNB_decode_ccch(module_id_t module_id, rnti_t rnti, const uint8_t *buffer, int buffer_length, const uint8_t *du_to_cu_rrc_container, int du_to_cu_rrc_container_len) { module_id_t Idx; asn_dec_rval_t dec_rval; - NR_UL_CCCH_Message_t *ul_ccch_msg = NULL; - struct rrc_gNB_ue_context_s *ue_context_p = NULL; - gNB_RRC_INST *gnb_rrc_inst = RC.nrrrc[ctxt_pP->module_id]; + NR_UL_CCCH_Message_t *ul_ccch_msg = NULL; + gNB_RRC_INST *gnb_rrc_inst = RC.nrrrc[module_id]; NR_RRCSetupRequest_IEs_t *rrcSetupRequest = NULL; - NR_RRCReestablishmentRequest_IEs_t rrcReestablishmentRequest; - uint64_t random_value = 0; + NR_RRCReestablishmentRequest_IEs_t rrcReestablishmentRequest; - LOG_I(NR_RRC, "Decoding CCCH: RNTI %04lx, inst %ld, payload_size %d\n", ctxt_pP->rntiMaybeUEid, ctxt_pP->instance, buffer_length); + LOG_I(NR_RRC, "Decoding CCCH: RNTI %04x, payload_size %d\n", rnti, buffer_length); dec_rval = uper_decode(NULL, &asn_DEF_NR_UL_CCCH_Message, (void **) &ul_ccch_msg, buffer, buffer_length, 0, 0); if (dec_rval.code != RC_OK || dec_rval.consumed == 0) { - LOG_E(NR_RRC, - PROTOCOL_NR_RRC_CTXT_UE_FMT" FATAL Error in receiving CCCH\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); + LOG_E(NR_RRC, " FATAL Error in receiving CCCH\n"); return -1; } - if (ul_ccch_msg->message.present == NR_UL_CCCH_MessageType_PR_c1) { - switch (ul_ccch_msg->message.choice.c1->present) { + if (ul_ccch_msg->message.present == NR_UL_CCCH_MessageType_PR_c1) { + switch (ul_ccch_msg->message.choice.c1->present) { case NR_UL_CCCH_MessageType__c1_PR_NOTHING: /* TODO */ - LOG_I(NR_RRC, - PROTOCOL_NR_RRC_CTXT_FMT" Received PR_NOTHING on UL-CCCH-Message\n", - PROTOCOL_NR_RRC_CTXT_ARGS(ctxt_pP)); + LOG_I(NR_RRC, "Received PR_NOTHING on UL-CCCH-Message\n"); break; case NR_UL_CCCH_MessageType__c1_PR_rrcSetupRequest: - LOG_D(NR_RRC, "Received RRCSetupRequest on UL-CCCH-Message (UE rnti %lx)\n", ctxt_pP->rntiMaybeUEid); - ue_context_p = rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rntiMaybeUEid); + LOG_D(NR_RRC, "Received RRCSetupRequest on UL-CCCH-Message (UE rnti %04x)\n", rnti); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(gnb_rrc_inst, rnti); if (ue_context_p != NULL) { - rrc_gNB_free_mem_UE_context(ctxt_pP, ue_context_p); + LOG_W(NR_RRC, "Got RRC setup request for a already registered RNTI %x, dropping the old one and give up this rrcSetupRequest\n", ue_context_p->ue_context.rnti); + rrc_gNB_remove_ue_context(gnb_rrc_inst, ue_context_p); } else { rrcSetupRequest = &ul_ccch_msg->message.choice.c1->choice.rrcSetupRequest->rrcSetupRequest; if (NR_InitialUE_Identity_PR_randomValue == rrcSetupRequest->ue_Identity.present) { /* randomValue BIT STRING (SIZE (39)) */ if (rrcSetupRequest->ue_Identity.choice.randomValue.size != 5) { // 39-bit random value - LOG_E(NR_RRC, "wrong InitialUE-Identity randomValue size, expected 5, provided %lu", - (long unsigned int)rrcSetupRequest->ue_Identity.choice.randomValue.size); + LOG_E(NR_RRC, "wrong InitialUE-Identity randomValue size, expected 5, provided %lu", (long unsigned int)rrcSetupRequest->ue_Identity.choice.randomValue.size); return -1; } - - memcpy(((uint8_t *) & random_value) + 3, - rrcSetupRequest->ue_Identity.choice.randomValue.buf, - rrcSetupRequest->ue_Identity.choice.randomValue.size); + uint64_t random_value = 0; + memcpy(((uint8_t *)&random_value) + 3, rrcSetupRequest->ue_Identity.choice.randomValue.buf, rrcSetupRequest->ue_Identity.choice.randomValue.size); /* if there is already a registered UE (with another RNTI) with this random_value, - * the current one must be removed from MAC/PHY (zombie UE) - */ - if ((ue_context_p = rrc_gNB_ue_context_random_exist(RC.nrrrc[ctxt_pP->module_id], random_value))) { - LOG_W(NR_RRC, - "new UE rnti %lx (coming with random value) is already there as UE %x, removing %x from MAC/PHY\n", - ctxt_pP->rntiMaybeUEid, - ue_context_p->ue_context.rnti, - ue_context_p->ue_context.rnti); - ue_context_p->ue_context.ul_failure_timer = 20000; + * the current one must be removed from MAC/PHY (zombie UE) + */ + if ((ue_context_p = rrc_gNB_ue_context_random_exist(gnb_rrc_inst, random_value))) { + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; + LOG_W(NR_RRC, "new UE rnti (coming with random value) is already there, removing UE %x from MAC/PHY\n", rnti); + UE->ul_failure_timer = 20000; } - ue_context_p = rrc_gNB_get_next_free_ue_context(ctxt_pP, RC.nrrrc[ctxt_pP->module_id], random_value); + ue_context_p = rrc_gNB_create_ue_context(rnti, gnb_rrc_inst, random_value); } else if (NR_InitialUE_Identity_PR_ng_5G_S_TMSI_Part1 == rrcSetupRequest->ue_Identity.present) { /* TODO */ /* <5G-S-TMSI> = <5G-TMSI> 48-bit */ /* ng-5G-S-TMSI-Part1 BIT STRING (SIZE (39)) */ if (rrcSetupRequest->ue_Identity.choice.ng_5G_S_TMSI_Part1.size != 5) { - LOG_E(NR_RRC, "wrong ng_5G_S_TMSI_Part1 size, expected 5, provided %lu \n", - (long unsigned int)rrcSetupRequest->ue_Identity.choice.ng_5G_S_TMSI_Part1.size); + LOG_E(NR_RRC, "wrong ng_5G_S_TMSI_Part1 size, expected 5, provided %lu \n", (long unsigned int)rrcSetupRequest->ue_Identity.choice.ng_5G_S_TMSI_Part1.size); return -1; } @@ -1911,91 +1653,82 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP, // rrcSetupRequest->ue_Identity.choice.ng_5G_S_TMSI_Part1.buf, // rrcSetupRequest->ue_Identity.choice.ng_5G_S_TMSI_Part1.size); - if ((ue_context_p = rrc_gNB_ue_context_5g_s_tmsi_exist(RC.nrrrc[ctxt_pP->module_id], s_tmsi_part1))) { - LOG_I(NR_RRC, " 5G-S-TMSI-Part1 exists, ue_context_p %p, old rnti %x => %lx\n", ue_context_p, ue_context_p->ue_context.rnti, ctxt_pP->rntiMaybeUEid); + if ((ue_context_p = rrc_gNB_ue_context_5g_s_tmsi_exist(gnb_rrc_inst, s_tmsi_part1))) { + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; + LOG_I(NR_RRC, " 5G-S-TMSI-Part1 exists, old rnti %04x => %04x\n", UE->rnti, rnti); // TODO: MAC structures should not be accessed directly from the RRC! An implementation using the F1 interface should be developed. - gNB_MAC_INST *nrmac=RC.nrmac[ctxt_pP->module_id]; //WHAT A BEAUTIFULL RACE CONDITION !!! - mac_remove_nr_ue(nrmac, ue_context_p->ue_context.rnti); + if (!NODE_IS_CU(RC.nrrrc[0]->node_type)) { + gNB_MAC_INST *nrmac = RC.nrmac[module_id]; // why MAC instances match RRC instances ? + mac_remove_nr_ue(nrmac, UE->rnti); + } /* replace rnti in the context */ - /* for that, remove the context from the RB tree */ - RB_REMOVE(rrc_nr_ue_tree_s, &RC.nrrrc[ctxt_pP->module_id]->rrc_ue_head, ue_context_p); - /* and insert again, after changing rnti everywhere it has to be changed */ - ue_context_p->ue_id_rnti = ctxt_pP->rntiMaybeUEid; - ue_context_p->ue_context.rnti = ctxt_pP->rntiMaybeUEid; - RB_INSERT(rrc_nr_ue_tree_s, &RC.nrrrc[ctxt_pP->module_id]->rrc_ue_head, ue_context_p); + UE->rnti = rnti; /* reset timers */ - ue_context_p->ue_context.ul_failure_timer = 0; - ue_context_p->ue_context.ue_release_timer = 0; - ue_context_p->ue_context.ue_reestablishment_timer = 0; - ue_context_p->ue_context.ue_release_timer_s1 = 0; - ue_context_p->ue_context.ue_release_timer_rrc = 0; + UE->ul_failure_timer = 0; + UE->ue_release_timer = 0; + UE->ue_reestablishment_timer = 0; + UE->ue_release_timer_s1 = 0; + UE->ue_release_timer_rrc = 0; } else { - LOG_I(NR_RRC, " 5G-S-TMSI-Part1 doesn't exist, setting ng_5G_S_TMSI_Part1 to %p => %ld\n", - ue_context_p, s_tmsi_part1); - - ue_context_p = rrc_gNB_get_next_free_ue_context(ctxt_pP, RC.nrrrc[ctxt_pP->module_id], s_tmsi_part1); + LOG_I(NR_RRC, "UE %04x 5G-S-TMSI-Part1 doesn't exist, setting ng_5G_S_TMSI_Part1 => %ld\n", rnti, s_tmsi_part1); + ue_context_p = rrc_gNB_create_ue_context(rnti, gnb_rrc_inst, s_tmsi_part1); if (ue_context_p == NULL) { - LOG_E(RRC, "%s:%d:%s: rrc_gNB_get_next_free_ue_context returned NULL\n", __FILE__, __LINE__, __FUNCTION__); - } - - if (ue_context_p != NULL) { - ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence = true; - ue_context_p->ue_context.ng_5G_S_TMSI_Part1 = s_tmsi_part1; + LOG_E(NR_RRC, "rrc_gNB_get_next_free_ue_context returned NULL\n"); + return -1; } + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; + UE->Initialue_identity_5g_s_TMSI.presence = true; + UE->ng_5G_S_TMSI_Part1 = s_tmsi_part1; } } else { /* TODO */ - memcpy(((uint8_t *) & random_value) + 3, - rrcSetupRequest->ue_Identity.choice.randomValue.buf, - rrcSetupRequest->ue_Identity.choice.randomValue.size); + uint64_t random_value = 0; + memcpy(((uint8_t *)&random_value) + 3, rrcSetupRequest->ue_Identity.choice.randomValue.buf, rrcSetupRequest->ue_Identity.choice.randomValue.size); - rrc_gNB_get_next_free_ue_context(ctxt_pP, RC.nrrrc[ctxt_pP->module_id], random_value); - LOG_E(NR_RRC, - PROTOCOL_NR_RRC_CTXT_UE_FMT" RRCSetupRequest without random UE identity or S-TMSI not supported, let's reject the UE\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); - rrc_gNB_generate_RRCReject(ctxt_pP, rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rntiMaybeUEid)); + ue_context_p = rrc_gNB_create_ue_context(rnti, gnb_rrc_inst, random_value); + LOG_E(NR_RRC, "RRCSetupRequest without random UE identity or S-TMSI not supported, let's reject the UE %04x\n", rnti); + rrc_gNB_generate_RRCReject(module_id, ue_context_p); break; } - - ue_context_p->ue_context.establishment_cause = rrcSetupRequest->establishmentCause; + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; + UE = &ue_context_p->ue_context; + UE->establishment_cause = rrcSetupRequest->establishmentCause; rrc_gNB_generate_RRCSetup( - ctxt_pP, rrc_gNB_get_ue_context(gnb_rrc_inst, ctxt_pP->rntiMaybeUEid), du_to_cu_rrc_container, du_to_cu_rrc_container_len, gnb_rrc_inst->carrier.servingcellconfigcommon); + module_id, rnti, rrc_gNB_get_ue_context_by_rnti(gnb_rrc_inst, rnti), du_to_cu_rrc_container, du_to_cu_rrc_container_len, gnb_rrc_inst->carrier.servingcellconfigcommon); } break; case NR_UL_CCCH_MessageType__c1_PR_rrcResumeRequest: - LOG_I(NR_RRC, "receive rrcResumeRequest message \n"); + LOG_I(NR_RRC, "receive rrcResumeRequest message \n"); break; case NR_UL_CCCH_MessageType__c1_PR_rrcReestablishmentRequest: { - LOG_I(NR_RRC, "Received rrcReestablishmentRequest message\n"); LOG_DUMPMSG(NR_RRC, DEBUG_RRC, (char *)(buffer), buffer_length, "[MSG] RRC Reestablishment Request\n"); - LOG_D(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT "MAC_gNB--- MAC_DATA_IND (rrcReestablishmentRequest on SRB0) --> RRC_gNB\n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); - rrcReestablishmentRequest = ul_ccch_msg->message.choice.c1->choice.rrcReestablishmentRequest->rrcReestablishmentRequest; + const NR_ReestablishmentCause_t cause = rrcReestablishmentRequest.reestablishmentCause; + const long physCellId = rrcReestablishmentRequest.ue_Identity.physCellId; LOG_I(NR_RRC, - PROTOCOL_NR_RRC_CTXT_UE_FMT " NR_RRCReestablishmentRequest cause %s\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), - ((rrcReestablishmentRequest.reestablishmentCause == NR_ReestablishmentCause_otherFailure) ? "Other Failure" - : (rrcReestablishmentRequest.reestablishmentCause == NR_ReestablishmentCause_handoverFailure) ? "Handover Failure" - : "reconfigurationFailure")); + "UE %04x NR_RRCReestablishmentRequest cause %s\n", + rnti, + ((cause == NR_ReestablishmentCause_otherFailure) ? "Other Failure" + : (cause == NR_ReestablishmentCause_handoverFailure) ? "Handover Failure" + : "reconfigurationFailure")); - if (rrcReestablishmentRequest.ue_Identity.physCellId != RC.nrrrc[ctxt_pP->module_id]->carrier.physCellId) { + if (physCellId != gnb_rrc_inst->carrier.physCellId) { /* UE was moving from previous cell so quickly that RRCReestablishment for previous cell was received in this cell */ LOG_E(NR_RRC, - PROTOCOL_NR_RRC_CTXT_UE_FMT " NR_RRCReestablishmentRequest ue_Identity.physCellId(%ld) is not equal to current physCellId(%d), fallback to RRC establishment\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), - rrcReestablishmentRequest.ue_Identity.physCellId, - RC.nrrrc[ctxt_pP->module_id]->carrier.physCellId); - rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(ctxt_pP, 0); + " NR_RRCReestablishmentRequest ue_Identity.physCellId(%ld) is not equal to current physCellId(%d), fallback to RRC establishment\n", + physCellId, + gnb_rrc_inst->carrier.physCellId); + rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(module_id, rnti, 0); break; } - LOG_I(NR_RRC, "physCellId: %ld\n", rrcReestablishmentRequest.ue_Identity.physCellId); + LOG_I(NR_RRC, "physCellId: %ld\n", physCellId); for (int i = 0; i < rrcReestablishmentRequest.ue_Identity.shortMAC_I.size; i++) { LOG_D(NR_RRC, "rrcReestablishmentRequest.ue_Identity.shortMAC_I.buf[%d] = %x\n", i, rrcReestablishmentRequest.ue_Identity.shortMAC_I.buf[i]); @@ -2005,26 +1738,24 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP, if (rrcReestablishmentRequest.ue_Identity.c_RNTI < 0x1 || rrcReestablishmentRequest.ue_Identity.c_RNTI > 0xffef) { /* c_RNTI range error should not happen */ LOG_E(NR_RRC, "NR_RRCReestablishmentRequest c_RNTI range error, fallback to RRC establishment\n"); - rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(ctxt_pP, 0); + rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(module_id, rnti, 0); break; } rnti_t c_rnti = rrcReestablishmentRequest.ue_Identity.c_RNTI; LOG_I(NR_RRC, "c_RNTI: %04x\n", c_rnti); - ue_context_p = rrc_gNB_get_ue_context(gnb_rrc_inst, c_rnti); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(gnb_rrc_inst, c_rnti); + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; if (ue_context_p == NULL) { LOG_E(NR_RRC, "NR_RRCReestablishmentRequest without UE context, fallback to RRC establishment\n"); - rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(ctxt_pP, 0); + rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(module_id, c_rnti, 0); break; } - -#if (0) - /* TODO : It may be needed if gNB goes into full stack working. */ - int UE_id = find_nr_UE_id(ctxt_pP->module_id, c_rnti); - +#if 0 + int UE_id = find_nr_UE_id(gnb_rrc_inst, c_rnti); if (UE_id == -1) { - LOG_E(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT " NR_RRCReestablishmentRequest without UE_id(MAC) rnti %x, fallback to RRC establishment\n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), c_rnti); - rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(ctxt_pP, 0); + LOG_E(NR_RRC, "NR_RRCReestablishmentRequest without MAC context, rnti %04x, fallback to RRC establishment\n", c_rnti); + rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(module_id, rnti, 0); break; } @@ -2039,91 +1770,81 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP, } if (previous_rnti != 0) { - UE_id = find_nr_UE_id(ctxt_pP->module_id, previous_rnti); - + UE_id = find_nr_UE_id(gnb_rrc_inst, previous_rnti); if (UE_id == -1) { - LOG_E(NR_RRC, - PROTOCOL_NR_RRC_CTXT_UE_FMT " RRCReestablishmentRequest without UE_id(MAC) previous rnti %x, fallback to RRC establishment\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), - previous_rnti); - rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(ctxt_pP, 0); + LOG_E(NR_RRC,"RRCReestablishmentRequest without mac context previous rnti %04x, nex rnti %04x, fallback to RRC establishment\n", + previous_rnti, c_rnti); + rrc_gNB_generate_RRCSetup_for_RRCReestablishmentRequest(module_id, rnti, 0); break; } } #endif // c-plane not end - if ((ue_context_p->ue_context.StatusRrc != NR_RRC_RECONFIGURED) && (ue_context_p->ue_context.reestablishment_cause == NR_ReestablishmentCause_spare1)) { + if ((UE->StatusRrc != NR_RRC_RECONFIGURED) && (UE->reestablishment_cause == NR_ReestablishmentCause_spare1)) { LOG_E(NR_RRC, "NR_RRCReestablishmentRequest (UE %x c-plane is not end), RRC establishment failed\n", c_rnti); /* TODO RRC Release ? */ break; } - if (ue_context_p->ue_context.ue_reestablishment_timer > 0) { - LOG_E(NR_RRC, "RRRCReconfigurationComplete(Previous) don't receive, delete the Previous UE,\nprevious Status %d, new Status NR_RRC_RECONFIGURED\n", ue_context_p->ue_context.StatusRrc); - ue_context_p->ue_context.StatusRrc = NR_RRC_RECONFIGURED; + if (UE->ue_reestablishment_timer > 0) { + LOG_E(NR_RRC, "RRRCReconfigurationComplete(Previous) don't receive, delete the Previous UE,\nprevious Status %d, new Status NR_RRC_RECONFIGURED\n", UE->StatusRrc); + UE->StatusRrc = NR_RRC_RECONFIGURED; protocol_ctxt_t ctxt_old_p; - PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt_old_p, ctxt_pP->instance, GNB_FLAG_YES, c_rnti, ctxt_pP->frame, ctxt_pP->subframe); - rrc_gNB_process_RRCReconfigurationComplete(&ctxt_old_p, ue_context_p, ue_context_p->ue_context.reestablishment_xid); + PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt_old_p, module_id, GNB_FLAG_YES, c_rnti, 0, 0); + rrc_gNB_process_RRCReconfigurationComplete(&ctxt_old_p, ue_context_p, UE->reestablishment_xid); - for (uint8_t pdusessionid = 0; pdusessionid < ue_context_p->ue_context.nb_of_pdusessions; pdusessionid++) { - if (ue_context_p->ue_context.pduSession[pdusessionid].status == PDU_SESSION_STATUS_DONE) { - ue_context_p->ue_context.pduSession[pdusessionid].status = PDU_SESSION_STATUS_ESTABLISHED; + for (uint8_t pdusessionid = 0; pdusessionid < UE->nb_of_pdusessions; pdusessionid++) { + if (UE->pduSession[pdusessionid].status == PDU_SESSION_STATUS_DONE) { + UE->pduSession[pdusessionid].status = PDU_SESSION_STATUS_ESTABLISHED; } else { - ue_context_p->ue_context.pduSession[pdusessionid].status = PDU_SESSION_STATUS_FAILED; + UE->pduSession[pdusessionid].status = PDU_SESSION_STATUS_FAILED; } } } /* reset timers */ - ue_context_p->ue_context.ul_failure_timer = 0; - ue_context_p->ue_context.ue_release_timer = 0; - ue_context_p->ue_context.ue_reestablishment_timer = 0; - // ue_context_p->ue_context.ue_release_timer_s1 = 0; - ue_context_p->ue_context.ue_release_timer_rrc = 0; - ue_context_p->ue_context.reestablishment_xid = -1; + UE->ul_failure_timer = 0; + UE->ue_release_timer = 0; + UE->ue_reestablishment_timer = 0; + // UE->ue_release_timer_s1 = 0; + UE->ue_release_timer_rrc = 0; + UE->reestablishment_xid = -1; // Insert C-RNTI to map for (int i = 0; i < MAX_MOBILES_PER_GNB; i++) { - nr_reestablish_rnti_map_t *nr_reestablish_rnti_map = &(RC.nrrrc[ctxt_pP->module_id])->nr_reestablish_rnti_map[i]; + nr_reestablish_rnti_map_t *nr_reestablish_rnti_map = &gnb_rrc_inst->nr_reestablish_rnti_map[i]; LOG_I(NR_RRC, "Insert nr_reestablish_rnti_map[%d] UEid: %lx, RNTI: %04x\n", i, nr_reestablish_rnti_map->ue_id, nr_reestablish_rnti_map->c_rnti); if (nr_reestablish_rnti_map->ue_id == 0) { - nr_reestablish_rnti_map->ue_id = ctxt_pP->rntiMaybeUEid; + nr_reestablish_rnti_map->ue_id = rnti; nr_reestablish_rnti_map->c_rnti = c_rnti; - LOG_I(NR_RRC, "Insert nr_reestablish_rnti_map[%d] UEid: %lx, RNTI: %04x\n", i, nr_reestablish_rnti_map->ue_id, nr_reestablish_rnti_map->c_rnti); + LOG_W(NR_RRC, "Insert nr_reestablish_rnti_map[%d] UEid: %lx, RNTI: %04x bug in UEid to fix \n", i, nr_reestablish_rnti_map->ue_id, nr_reestablish_rnti_map->c_rnti); break; } } - ue_context_p->ue_context.reestablishment_cause = rrcReestablishmentRequest.reestablishmentCause; - LOG_D(NR_RRC, "Accept RRCReestablishmentRequest from UE physCellId %ld cause %ld\n", rrcReestablishmentRequest.ue_Identity.physCellId, ue_context_p->ue_context.reestablishment_cause); + UE->reestablishment_cause = cause; + LOG_D(NR_RRC, "Accept RRCReestablishmentRequest from UE physCellId %ld cause %ld\n", physCellId, cause); - ue_context_p->ue_context.primaryCC_id = 0; - //LG COMMENT Idx = (ue_mod_idP * NB_RB_MAX) + DCCH; - Idx = DCCH; - // SRB1 - ue_context_p->ue_context.Srb1.Active = 1; - ue_context_p->ue_context.Srb1.Srb_info.Srb_id = Idx; - rrc_init_nr_srb_param(&ue_context_p->ue_context.Srb1.Srb_info.Lchan_desc[0]); - rrc_init_nr_srb_param(&ue_context_p->ue_context.Srb1.Srb_info.Lchan_desc[1]); - // SRB2: set it to go through SRB1 with id 1 (DCCH) - ue_context_p->ue_context.Srb2.Active = 1; - ue_context_p->ue_context.Srb2.Srb_info.Srb_id = Idx; - rrc_init_nr_srb_param(&ue_context_p->ue_context.Srb2.Srb_info.Lchan_desc[0]); - rrc_init_nr_srb_param(&ue_context_p->ue_context.Srb2.Srb_info.Lchan_desc[1]); - - rrc_gNB_generate_RRCReestablishment(ctxt_pP, ue_context_p, du_to_cu_rrc_container, gnb_rrc_inst->carrier.servingcellconfigcommon, 0); + UE->primaryCC_id = 0; + // LG COMMENT Idx = (ue_mod_idP * NB_RB_MAX) + DCCH; + Idx = DCCH; + // SRB1 + UE->Srb[1].Active = 1; + // SRB2: set it to go through SRB1 with id 1 (DCCH) + UE->Srb[2].Active = 1; + protocol_ctxt_t ctxt = {.rntiMaybeUEid = rnti, .module_id = module_id, .instance = module_id, .enb_flag = 1, .eNB_index = module_id}; + rrc_gNB_generate_RRCReestablishment(&ctxt, ue_context_p, du_to_cu_rrc_container, gnb_rrc_inst->carrier.servingcellconfigcommon, 0); LOG_I(NR_RRC, "CALLING RLC CONFIG SRB1 (rbid %d)\n", Idx); } break; case NR_UL_CCCH_MessageType__c1_PR_rrcSystemInfoRequest: - LOG_I(NR_RRC, "receive rrcSystemInfoRequest message \n"); + LOG_I(NR_RRC, "UE %04x receive rrcSystemInfoRequest message \n", rnti); /* TODO */ break; default: - LOG_E(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" Unknown message\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); + LOG_E(NR_RRC, "UE %04x Unknown message\n", rnti); break; } } @@ -2183,24 +1904,18 @@ rrc_gNB_decode_dcch( //----------------------------------------------------------------------------- { asn_dec_rval_t dec_rval; - NR_UL_DCCH_Message_t *ul_dcch_msg = NULL; - struct rrc_gNB_ue_context_s *ue_context_p = NULL; + NR_UL_DCCH_Message_t *ul_dcch_msg = NULL; uint8_t xid; - + gNB_RRC_INST *gnb_rrc_inst = RC.nrrrc[ctxt_pP->module_id]; int i; if ((Srb_id != 1) && (Srb_id != 2)) { - LOG_E(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" Received message on SRB%ld, should not have ...\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), - Srb_id); + LOG_E(NR_RRC, "Received message on SRB%ld, should not have ...\n", Srb_id); } else { - LOG_D(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" Received message on SRB%ld\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), - Srb_id); + LOG_D(NR_RRC, "Received message on SRB%ld\n", Srb_id); } - LOG_D(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" Decoding UL-DCCH Message\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); + LOG_D(NR_RRC, "Decoding UL-DCCH Message\n"); //for (int i=0;imodule_id], ctxt_pP->rntiMaybeUEid); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(gnb_rrc_inst, ctxt_pP->rntiMaybeUEid); + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; if (ul_dcch_msg->message.present == NR_UL_DCCH_MessageType_PR_c1) { switch (ul_dcch_msg->message.choice.c1->present) { case NR_UL_DCCH_MessageType__c1_PR_NOTHING: - LOG_I(NR_RRC, - PROTOCOL_NR_RRC_CTXT_FMT" Received PR_NOTHING on UL-DCCH-Message\n", - PROTOCOL_NR_RRC_CTXT_ARGS(ctxt_pP)); + LOG_I(NR_RRC, "Received PR_NOTHING on UL-DCCH-Message\n"); break; case NR_UL_DCCH_MessageType__c1_PR_rrcReconfigurationComplete: @@ -2269,43 +1981,41 @@ rrc_gNB_decode_dcch( } if (get_softmodem_params()->sa) { - if(ue_context_p->ue_context.pdu_session_release_command_flag == 1) { + if (UE->pdu_session_release_command_flag == 1) { xid = ul_dcch_msg->message.choice.c1->choice.rrcReconfigurationComplete->rrc_TransactionIdentifier; - ue_context_p->ue_context.pdu_session_release_command_flag = 0; + UE->pdu_session_release_command_flag = 0; //gtp tunnel delete gtpv1u_gnb_delete_tunnel_req_t req={0}; for(i = 0; i < NB_RB_MAX; i++) { - if(xid == ue_context_p->ue_context.pduSession[i].xid) { - req.pdusession_id[req.num_pdusession++] = - ue_context_p->ue_context.gnb_gtp_psi[i]; - ue_context_p->ue_context.gnb_gtp_teid[i] = 0; - memset(&ue_context_p->ue_context.gnb_gtp_addrs[i], 0, sizeof(ue_context_p->ue_context.gnb_gtp_addrs[i])); - ue_context_p->ue_context.gnb_gtp_psi[i] = 0; + if (xid == UE->pduSession[i].xid) { + req.pdusession_id[req.num_pdusession++] = UE->gnb_gtp_psi[i]; + UE->gnb_gtp_teid[i] = 0; + memset(&UE->gnb_gtp_addrs[i], 0, sizeof(UE->gnb_gtp_addrs[i])); + UE->gnb_gtp_psi[i] = 0; } } gtpv1u_delete_ngu_tunnel(ctxt_pP->instance, &req); //NGAP_PDUSESSION_RELEASE_RESPONSE rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(ctxt_pP, ue_context_p, xid); - } else if (ue_context_p->ue_context.established_pdu_sessions_flag != 1) { - if (ue_context_p->ue_context.reestablishment_xid < 0) { - if (ue_context_p->ue_context.nb_of_pdusessions > 0) { + } else if (UE->established_pdu_sessions_flag != 1) { + if (UE->reestablishment_xid < 0) { + if (UE->nb_of_pdusessions > 0) { rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP(ctxt_pP, ue_context_p, ul_dcch_msg->message.choice.c1->choice.rrcReconfigurationComplete->rrc_TransactionIdentifier); - ue_context_p->ue_context.nb_of_pdusessions = 0; } } else { - ue_context_p->ue_context.reestablishment_xid = -1; + UE->reestablishment_xid = -1; } } - if (ue_context_p->ue_context.nb_of_modify_pdusessions > 0) { + if (UE->nb_of_modify_pdusessions > 0) { rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP(ctxt_pP, ue_context_p, ul_dcch_msg->message.choice.c1->choice.rrcReconfigurationComplete->rrc_TransactionIdentifier); - ue_context_p->ue_context.nb_of_modify_pdusessions = 0; - ue_context_p->ue_context.nb_of_failed_pdusessions = 0; - memset(ue_context_p->ue_context.modify_pdusession, 0, sizeof(ue_context_p->ue_context.modify_pdusession)); + UE->nb_of_modify_pdusessions = 0; + UE->nb_of_failed_pdusessions = 0; + memset(UE->modify_pdusession, 0, sizeof(UE->modify_pdusession)); for(int i = 0; i < NR_NB_RB_MAX; i++) { - ue_context_p->ue_context.modify_pdusession[i].xid = -1; + UE->modify_pdusession[i].xid = -1; } } } @@ -2347,11 +2057,9 @@ rrc_gNB_decode_dcch( return -1; } - if (ue_context_p->ue_context.ng_5G_S_TMSI_Part1 != 0) { - ue_context_p->ue_context.ng_5G_S_TMSI_Part2 = - BIT_STRING_to_uint16(&ul_dcch_msg->message.choice.c1->choice.rrcSetupComplete-> - criticalExtensions.choice.rrcSetupComplete-> - ng_5G_S_TMSI_Value->choice.ng_5G_S_TMSI_Part2); + if (UE->ng_5G_S_TMSI_Part1 != 0) { + UE->ng_5G_S_TMSI_Part2 = + BIT_STRING_to_uint16(&ul_dcch_msg->message.choice.c1->choice.rrcSetupComplete->criticalExtensions.choice.rrcSetupComplete->ng_5G_S_TMSI_Value->choice.ng_5G_S_TMSI_Part2); } /* TODO */ @@ -2373,10 +2081,10 @@ rrc_gNB_decode_dcch( fiveg_s_TMSI, fiveg_s_TMSI >> 38, fiveg_s_TMSI >> 38, (fiveg_s_TMSI >> 32) & 0x3F, (fiveg_s_TMSI >> 32) & 0x3F, (uint32_t)fiveg_s_TMSI); - if (ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.presence == true) { - ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.amf_set_id = fiveg_s_TMSI >> 38; - ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.amf_pointer = (fiveg_s_TMSI >> 32) & 0x3F; - ue_context_p->ue_context.Initialue_identity_5g_s_TMSI.fiveg_tmsi = (uint32_t)fiveg_s_TMSI; + if (UE->Initialue_identity_5g_s_TMSI.presence == true) { + UE->Initialue_identity_5g_s_TMSI.amf_set_id = fiveg_s_TMSI >> 38; + UE->Initialue_identity_5g_s_TMSI.amf_pointer = (fiveg_s_TMSI >> 32) & 0x3F; + UE->Initialue_identity_5g_s_TMSI.fiveg_tmsi = (uint32_t)fiveg_s_TMSI; } } } @@ -2389,7 +2097,7 @@ rrc_gNB_decode_dcch( PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); } - ue_context_p->ue_context.ue_release_timer = 0; + UE->ue_release_timer = 0; break; case NR_UL_DCCH_MessageType__c1_PR_measurementReport: @@ -2491,30 +2199,33 @@ rrc_gNB_decode_dcch( for(i = 0;i < ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.choice.ueCapabilityInformation->ue_CapabilityRAT_ContainerList->list.count; i++){ if(ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.choice.ueCapabilityInformation->ue_CapabilityRAT_ContainerList->list.array[i]->rat_Type == NR_RAT_Type_nr){ - if(ue_context_p->ue_context.UE_Capability_nr){ - ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability,ue_context_p->ue_context.UE_Capability_nr); - ue_context_p->ue_context.UE_Capability_nr = 0; + if (UE->UE_Capability_nr) { + ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability, UE->UE_Capability_nr); + UE->UE_Capability_nr = 0; } dec_rval = uper_decode(NULL, - &asn_DEF_NR_UE_NR_Capability, - (void**)&ue_context_p->ue_context.UE_Capability_nr, - ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.choice.ueCapabilityInformation->ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.buf, - ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.choice.ueCapabilityInformation->ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.size, - 0,0); + &asn_DEF_NR_UE_NR_Capability, + (void **)&UE->UE_Capability_nr, + ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.choice.ueCapabilityInformation->ue_CapabilityRAT_ContainerList->list.array[i] + ->ue_CapabilityRAT_Container.buf, + ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.choice.ueCapabilityInformation->ue_CapabilityRAT_ContainerList->list.array[i] + ->ue_CapabilityRAT_Container.size, + 0, + 0); if(LOG_DEBUGFLAG(DEBUG_ASN1)){ - xer_fprint(stdout,&asn_DEF_NR_UE_NR_Capability,ue_context_p->ue_context.UE_Capability_nr); + xer_fprint(stdout, &asn_DEF_NR_UE_NR_Capability, UE->UE_Capability_nr); } if((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)){ LOG_E(NR_RRC,PROTOCOL_NR_RRC_CTXT_UE_FMT" Failed to decode nr UE capabilities (%zu bytes)\n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP),dec_rval.consumed); - ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability,ue_context_p->ue_context.UE_Capability_nr); - ue_context_p->ue_context.UE_Capability_nr = 0; + ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability, UE->UE_Capability_nr); + UE->UE_Capability_nr = 0; } - ue_context_p->ue_context.UE_Capability_size = - ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.choice.ueCapabilityInformation->ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.size; + UE->UE_Capability_size = ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.choice.ueCapabilityInformation->ue_CapabilityRAT_ContainerList->list.array[i] + ->ue_CapabilityRAT_Container.size; if(eutra_index != -1){ LOG_E(NR_RRC,"fatal: more than 1 eutra capability\n"); exit(1); @@ -2524,29 +2235,33 @@ rrc_gNB_decode_dcch( if(ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.choice.ueCapabilityInformation->ue_CapabilityRAT_ContainerList->list.array[i]->rat_Type == NR_RAT_Type_eutra_nr){ - if(ue_context_p->ue_context.UE_Capability_MRDC){ - ASN_STRUCT_FREE(asn_DEF_NR_UE_MRDC_Capability,ue_context_p->ue_context.UE_Capability_MRDC); - ue_context_p->ue_context.UE_Capability_MRDC = 0; - } - dec_rval = uper_decode(NULL, - &asn_DEF_NR_UE_MRDC_Capability, - (void**)&ue_context_p->ue_context.UE_Capability_MRDC, - ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.choice.ueCapabilityInformation->ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.buf, - ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.choice.ueCapabilityInformation->ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.size, - 0,0); + if (UE->UE_Capability_MRDC) { + ASN_STRUCT_FREE(asn_DEF_NR_UE_MRDC_Capability, UE->UE_Capability_MRDC); + UE->UE_Capability_MRDC = 0; + } + dec_rval = uper_decode(NULL, + &asn_DEF_NR_UE_MRDC_Capability, + (void **)&UE->UE_Capability_MRDC, + ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.choice.ueCapabilityInformation->ue_CapabilityRAT_ContainerList->list.array[i] + ->ue_CapabilityRAT_Container.buf, + ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.choice.ueCapabilityInformation->ue_CapabilityRAT_ContainerList->list.array[i] + ->ue_CapabilityRAT_Container.size, + 0, + 0); - if(LOG_DEBUGFLAG(DEBUG_ASN1)){ - xer_fprint(stdout,&asn_DEF_NR_UE_MRDC_Capability,ue_context_p->ue_context.UE_Capability_MRDC); - } + if (LOG_DEBUGFLAG(DEBUG_ASN1)) { + xer_fprint(stdout, &asn_DEF_NR_UE_MRDC_Capability, UE->UE_Capability_MRDC); + } if((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)){ LOG_E(NR_RRC,PROTOCOL_NR_RRC_CTXT_FMT" Failed to decode nr UE capabilities (%zu bytes)\n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP),dec_rval.consumed); - ASN_STRUCT_FREE(asn_DEF_NR_UE_MRDC_Capability,ue_context_p->ue_context.UE_Capability_MRDC); - ue_context_p->ue_context.UE_Capability_MRDC = 0; + ASN_STRUCT_FREE(asn_DEF_NR_UE_MRDC_Capability, UE->UE_Capability_MRDC); + UE->UE_Capability_MRDC = 0; } - ue_context_p->ue_context.UE_MRDC_Capability_size = - ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.choice.ueCapabilityInformation->ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.size; + UE->UE_MRDC_Capability_size = + ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.choice.ueCapabilityInformation->ue_CapabilityRAT_ContainerList->list.array[i] + ->ue_CapabilityRAT_Container.size; } if(ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.choice.ueCapabilityInformation->ue_CapabilityRAT_ContainerList->list.array[i]->rat_Type == @@ -2564,14 +2279,13 @@ rrc_gNB_decode_dcch( ul_dcch_msg); } - if(!NODE_IS_CU(RC.nrrrc[ctxt_pP->module_id]->node_type)){ - if (ue_context_p->ue_context.established_pdu_sessions_flag == 1) { + if (!NODE_IS_CU(gnb_rrc_inst->node_type)) { + if (UE->established_pdu_sessions_flag == 1) { rrc_gNB_generate_dedicatedRRCReconfiguration(ctxt_pP, ue_context_p, NULL); } else { rrc_gNB_generate_defaultRRCReconfiguration(ctxt_pP, ue_context_p); } - } - else{ + } else { /*Generate a UE context setup request message towards the DU to provide the UE *capability info and get the updates on master cell group config from the DU*/ MessageDef *message_p; @@ -2580,13 +2294,13 @@ rrc_gNB_decode_dcch( //UE_IDs will be extracted from F1AP layer req->gNB_CU_ue_id = 0; req->gNB_DU_ue_id = 0; - req->rnti = ue_context_p->ue_context.rnti; - req->mcc = RC.nrrrc[ctxt_pP->module_id]->configuration.mcc[0]; - req->mnc = RC.nrrrc[ctxt_pP->module_id]->configuration.mnc[0]; - req->mnc_digit_length = RC.nrrrc[ctxt_pP->module_id]->configuration.mnc_digit_length[0]; - req->nr_cellid = RC.nrrrc[ctxt_pP->module_id]->nr_cellid; + req->rnti = UE->rnti; + req->mcc = gnb_rrc_inst->configuration.mcc[0]; + req->mnc = gnb_rrc_inst->configuration.mnc[0]; + req->mnc_digit_length = gnb_rrc_inst->configuration.mnc_digit_length[0]; + req->nr_cellid = gnb_rrc_inst->nr_cellid; - if (ue_context_p->ue_context.established_pdu_sessions_flag == 1) { + if (UE->established_pdu_sessions_flag == 1) { /*Instruction towards the DU for SRB2 configuration*/ req->srbs_to_be_setup = malloc(1*sizeof(f1ap_srb_to_be_setup_t)); req->srbs_to_be_setup_length = 1; @@ -2601,11 +2315,11 @@ rrc_gNB_decode_dcch( LOG_I(RRC, "Length of DRB list:%d \n", req->drbs_to_be_setup_length); DRBs[0].drb_id = 1; DRBs[0].rlc_mode = RLC_MODE_AM; - DRBs[0].up_ul_tnl[0].tl_address = inet_addr(RC.nrrrc[ctxt_pP->module_id]->eth_params_s.my_addr); - DRBs[0].up_ul_tnl[0].port=RC.nrrrc[ctxt_pP->module_id]->eth_params_s.my_portd; + DRBs[0].up_ul_tnl[0].tl_address = inet_addr(gnb_rrc_inst->eth_params_s.my_addr); + DRBs[0].up_ul_tnl[0].port = gnb_rrc_inst->eth_params_s.my_portd; DRBs[0].up_ul_tnl_length = 1; - DRBs[0].up_dl_tnl[0].tl_address = inet_addr(RC.nrrrc[ctxt_pP->module_id]->eth_params_s.remote_addr); - DRBs[0].up_dl_tnl[0].port=RC.nrrrc[ctxt_pP->module_id]->eth_params_s.remote_portd; + DRBs[0].up_dl_tnl[0].tl_address = inet_addr(gnb_rrc_inst->eth_params_s.remote_addr); + DRBs[0].up_dl_tnl[0].port = gnb_rrc_inst->eth_params_s.remote_portd; DRBs[0].up_dl_tnl_length = 1; } if( ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.present == @@ -2632,49 +2346,43 @@ rrc_gNB_decode_dcch( itti_send_msg_to_task (TASK_CU_F1, ctxt_pP->module_id, message_p); } - break; case NR_UL_DCCH_MessageType__c1_PR_rrcReestablishmentComplete: { LOG_DUMPMSG(NR_RRC, DEBUG_RRC, (char *)Rx_sdu, sdu_sizeP, "[MSG] NR_RRC Connection Reestablishment Complete\n"); - LOG_I(NR_RRC, - PROTOCOL_RRC_CTXT_UE_FMT - " RLC RB %02d --- RLC_DATA_IND %d bytes " - "(rrcReestablishmentComplete) ---> RRC_gNB\n", - PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), - DCCH, - sdu_sizeP); + LOG_I(NR_RRC, "RLC RB %02d --- RLC_DATA_IND %d bytes (rrcReestablishmentComplete) ---> RRC_gNB\n", DCCH, sdu_sizeP); rnti_t reestablish_rnti = 0; // Select C-RNTI from map for (i = 0; i < MAX_MOBILES_PER_GNB; i++) { - nr_reestablish_rnti_map_t *nr_reestablish_rnti_map = &(RC.nrrrc[ctxt_pP->module_id])->nr_reestablish_rnti_map[i]; + nr_reestablish_rnti_map_t *nr_reestablish_rnti_map = &gnb_rrc_inst->nr_reestablish_rnti_map[i]; LOG_I(NR_RRC, "nr_reestablish_rnti_map[%d] UEid %lx, RNTI %04x, ctxt_pP->rntiMaybeUEid: %lx\n", i, nr_reestablish_rnti_map->ue_id, nr_reestablish_rnti_map->c_rnti, ctxt_pP->rntiMaybeUEid); if (nr_reestablish_rnti_map->ue_id == ctxt_pP->rntiMaybeUEid) { LOG_I(NR_RRC, "Removing nr_reestablish_rnti_map[%d] UEid %lx, RNTI %04x\n", i, nr_reestablish_rnti_map->ue_id, nr_reestablish_rnti_map->c_rnti); reestablish_rnti = nr_reestablish_rnti_map->c_rnti; - ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[ctxt_pP->module_id], reestablish_rnti); + ue_context_p = rrc_gNB_get_ue_context_by_rnti(gnb_rrc_inst, reestablish_rnti); + UE = &ue_context_p->ue_context; break; } } if (!ue_context_p) { - LOG_E(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT " NR_RRCReestablishmentComplete without UE context, falt\n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); + LOG_E(NR_RRC, "NR_RRCReestablishmentComplete without UE context, fault\n"); break; } #if (0) /* TODO : It may be needed if gNB goes into full stack working. */ // clear - int UE_id = find_nr_UE_id(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid); + int UE_id = find_nr_UE_id(gnb_rrc_inst, ctxt_pP->rntiMaybeUEid); if (UE_id == -1) { LOG_E(NR_RRC, PROTOCOL_RRC_CTXT_UE_FMT " NR_RRCReestablishmentComplete without UE_id(MAC) rnti %lx, fault\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), ctxt_pP->rntiMaybeUEid); break; } - RC.nrmac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 0; + RC.nrmac[gnb_rrc_inst]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 0; #endif if (ul_dcch_msg->message.choice.c1->choice.rrcReestablishmentComplete->criticalExtensions.present == NR_RRCReestablishmentComplete__criticalExtensions_PR_rrcReestablishmentComplete) { @@ -2682,12 +2390,14 @@ rrc_gNB_decode_dcch( gNB_MAC_INST *nrmac = RC.nrmac[ctxt_pP->module_id]; // WHAT A BEAUTIFULL RACE CONDITION !!! mac_remove_nr_ue(nrmac, reestablish_rnti); + + UE->ue_reestablishment_counter++; } - // ue_context_p->ue_context.ue_release_timer = 0; - ue_context_p->ue_context.ue_reestablishment_timer = 1; + // UE->ue_release_timer = 0; + UE->ue_reestablishment_timer = 1; // remove UE after 100 frames after NR_RRCReestablishmentRelease is triggered - ue_context_p->ue_context.ue_reestablishment_timer_thres = 1000; + UE->ue_reestablishment_timer_thres = 1000; } break; default: @@ -2812,14 +2522,7 @@ void rrc_gNB_process_initial_ul_rrc_message(const f1ap_initial_ul_rrc_message_t i = 0; LOG_W(RRC, "initial UL RRC message nr_cellid %ld does not match RRC's %ld\n", ul_rrc->nr_cellid, RC.nrrrc[0]->nr_cellid); } - protocol_ctxt_t ctxt = { 0 }; - PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, i, GNB_FLAG_YES, ul_rrc->crnti, 0, 0); - - nr_rrc_gNB_decode_ccch(&ctxt, - ul_rrc->rrc_container, - ul_rrc->rrc_container_length, - ul_rrc->du2cu_rrc_container, - ul_rrc->du2cu_rrc_container_length); + nr_rrc_gNB_decode_ccch(i, ul_rrc->crnti, ul_rrc->rrc_container, ul_rrc->rrc_container_length, ul_rrc->du2cu_rrc_container, ul_rrc->du2cu_rrc_container_length); if (ul_rrc->rrc_container) free(ul_rrc->rrc_container); @@ -2839,202 +2542,13 @@ void rrc_gNB_process_dc_overall_timeout(const module_id_t gnb_mod_idP, x2ap_ENDC rrc_remove_nsa_user(rrc, m->rnti); } -static int rrc_process_DU_DL(MessageDef *msg_p, const char *msg_name, instance_t instance) { - NRDuDlReq_t * req=&NRDuDlReq(msg_p); - protocol_ctxt_t ctxt = {.rntiMaybeUEid = req->rnti, .module_id = instance, .instance = instance, .enb_flag = 1, .eNB_index = instance}; - gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id]; - struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(rrc, ctxt.rntiMaybeUEid); - - if (req->srb_id == 0) { - AssertFatal(0 == 1, "should pass through dl_rrc_message()\n"); - } else if (req->srb_id == 1) { - NR_DL_DCCH_Message_t *dl_dcch_msg=NULL; - asn_dec_rval_t dec_rval; - dec_rval = uper_decode(NULL, - &asn_DEF_NR_DL_DCCH_Message, - (void **)&dl_dcch_msg, - &req->buf->data[2], // buf[0] includes the pdcp header - req->buf->size-6,0,0); - - if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)) - LOG_E(F1AP," Failed to decode DL-DCCH (%zu bytes)\n",dec_rval.consumed); - else - LOG_D(F1AP, "Received message: present %d and c1 present %d\n", - dl_dcch_msg->message.present, dl_dcch_msg->message.choice.c1->present); - - if (dl_dcch_msg->message.present == NR_DL_DCCH_MessageType_PR_c1) { - switch (dl_dcch_msg->message.choice.c1->present) { - case NR_DL_DCCH_MessageType__c1_PR_NOTHING: - LOG_I(F1AP, "Received PR_NOTHING on DL-DCCH-Message\n"); - return 0; - - case NR_DL_DCCH_MessageType__c1_PR_rrcReconfiguration: - // handle RRCReconfiguration - LOG_I(F1AP, "Logical Channel DL-DCCH (SRB1), Received RRCReconfiguration RNTI %x\n", - req->rnti); - NR_RRCReconfiguration_t *rrcReconfiguration = dl_dcch_msg->message.choice.c1->choice.rrcReconfiguration; - - if (rrcReconfiguration->criticalExtensions.present == NR_RRCReconfiguration__criticalExtensions_PR_rrcReconfiguration) { - NR_RRCReconfiguration_IEs_t *rrcReconfiguration_ies = - rrcReconfiguration->criticalExtensions.choice.rrcReconfiguration; - - if (rrcReconfiguration_ies->measConfig != NULL) { - LOG_I(F1AP, "Measurement Configuration is present\n"); - } - - if (rrcReconfiguration_ies->radioBearerConfig) { - LOG_I(F1AP, "Radio Resource Configuration is present\n"); - long drb_id; - int i; - NR_DRB_ToAddModList_t *DRB_configList = rrcReconfiguration_ies->radioBearerConfig->drb_ToAddModList; - NR_SRB_ToAddModList_t *SRB_configList = rrcReconfiguration_ies->radioBearerConfig->srb_ToAddModList; - - // NR_DRB_ToReleaseList_t *DRB_ReleaseList = rrcReconfiguration_ies->radioBearerConfig->drb_ToReleaseList; - - // rrc_rlc_config_asn1_req - - if (SRB_configList != NULL) { - for (i = 0; (i < SRB_configList->list.count) && (i < 3); i++) { - if (SRB_configList->list.array[i]->srb_Identity == 1 ) { - ue_context_p->ue_context.Srb1.Active=1; - } else if (SRB_configList->list.array[i]->srb_Identity == 2 ) { - ue_context_p->ue_context.Srb2.Active=1; - ue_context_p->ue_context.Srb2.Srb_info.Srb_id=2; - LOG_I(F1AP, "[DU %d] SRB2 is now active\n",ctxt.module_id); - } else { - LOG_W(F1AP, "[DU %d] invalide SRB identity %ld\n",ctxt.module_id, - SRB_configList->list.array[i]->srb_Identity); - } - } - } - - if (DRB_configList != NULL) { - for (i = 0; i < DRB_configList->list.count; i++) { // num max DRB (11-3-8) - if (DRB_configList->list.array[i]) { - drb_id = (int)DRB_configList->list.array[i]->drb_Identity; - LOG_I(F1AP, - "[DU %d] Logical Channel UL-DCCH, Received RRCConnectionReconfiguration for UE rnti %lx, reconfiguring DRB %d\n", - ctxt.module_id, - ctxt.rntiMaybeUEid, - (int)DRB_configList->list.array[i]->drb_Identity); - - // (int)*DRB_configList->list.array[i]->logicalChannelIdentity); - - if (ue_context_p->ue_context.DRB_active[drb_id] == 0) { - ue_context_p->ue_context.DRB_active[drb_id] = 1; - // logicalChannelIdentity - // rrc_mac_config_req_eNB - } - } else { // remove LCHAN from MAC/PHY - AssertFatal(1==0,"Can't handle this yet in DU\n"); - } - } - } - } - } - - break; - - case NR_DL_DCCH_MessageType__c1_PR_rrcResume: - LOG_I(F1AP,"Received rrcResume\n"); - break; - - case NR_DL_DCCH_MessageType__c1_PR_rrcRelease: - LOG_I(F1AP,"Received rrcRelease\n"); - break; - - case NR_DL_DCCH_MessageType__c1_PR_rrcReestablishment: - LOG_I(F1AP,"Received rrcReestablishment\n"); - break; - - case NR_DL_DCCH_MessageType__c1_PR_securityModeCommand: - LOG_I(F1AP,"Received securityModeCommand\n"); - break; - - case NR_DL_DCCH_MessageType__c1_PR_dlInformationTransfer: - LOG_I(F1AP, "Received dlInformationTransfer\n"); - break; - - case NR_DL_DCCH_MessageType__c1_PR_ueCapabilityEnquiry: - LOG_I(F1AP, "Received ueCapabilityEnquiry\n"); - break; - - case NR_DL_DCCH_MessageType__c1_PR_counterCheck: - LOG_I(F1AP, "Received counterCheck\n"); - break; - - case NR_DL_DCCH_MessageType__c1_PR_mobilityFromNRCommand: - case NR_DL_DCCH_MessageType__c1_PR_dlDedicatedMessageSegment_r16: - case NR_DL_DCCH_MessageType__c1_PR_ueInformationRequest_r16: - case NR_DL_DCCH_MessageType__c1_PR_dlInformationTransferMRDC_r16: - case NR_DL_DCCH_MessageType__c1_PR_loggedMeasurementConfiguration_r16: - case NR_DL_DCCH_MessageType__c1_PR_spare3: - case NR_DL_DCCH_MessageType__c1_PR_spare2: - case NR_DL_DCCH_MessageType__c1_PR_spare1: - break; - } - } - } else if (req->srb_id == 2) { - // TODO - //abort(); - } - - LOG_I(F1AP, "Received DL RRC Transfer on srb_id %ld\n", req->srb_id); - // rlc_op_status_t rlc_status; - - //LOG_I(F1AP, "PRRCContainer size %lu:", ie->value.choice.RRCContainer.size); - //for (int i = 0; i < ie->value.choice.RRCContainer.size; i++) - // printf("%02x ", ie->value.choice.RRCContainer.buf[i]); - - //printf (", PDCP PDU size %d:", rrc_dl_sdu_len); - //for (int i=0;idata[i]); - //printf("\n"); - - du_rlc_data_req(&ctxt, 1, 0, req->srb_id , 1, 0, req->buf->size, req->buf); - // rlc_status = rlc_data_req(&ctxt - // , 1 - // , MBMS_FLAG_NO - // , srb_id - // , 0 - // , 0 - // , rrc_dl_sdu_len - // , pdcp_pdu_p - // ,NULL - // ,NULL - // ); - // switch (rlc_status) { - // case RLC_OP_STATUS_OK: - // //LOG_I(F1AP, "Data sending request over RLC succeeded!\n"); - // ret=true; - // break; - // case RLC_OP_STATUS_BAD_PARAMETER: - // LOG_W(F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n"); - // ret= false; - // break; - // case RLC_OP_STATUS_INTERNAL_ERROR: - // LOG_W(F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n"); - // ret= false; - // break; - // case RLC_OP_STATUS_OUT_OF_RESSOURCES: - // LOG_W(F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n"); - // ret= false; - // break; - // default: - // LOG_W(F1AP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status); - // ret= false; - // break; - // } // switch case - // return ret; -return 0; -} - -static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const char *msg_name, instance_t instance){ - +static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, instance_t instance) +{ f1ap_ue_context_setup_t * req=&F1AP_UE_CONTEXT_SETUP_REQ(msg_p); - protocol_ctxt_t ctxt = {.rntiMaybeUEid = req->rnti, .module_id = instance, .instance = instance, .enb_flag = 1, .eNB_index = instance}; - gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id]; - gNB_MAC_INST *mac = RC.nrmac[ctxt.module_id]; - struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(rrc, ctxt.rntiMaybeUEid); + gNB_RRC_INST *rrc = RC.nrrrc[instance]; + gNB_MAC_INST *mac = RC.nrmac[instance]; + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(rrc, req->rnti); + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; MessageDef *message_p; message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_SETUP_RESP); f1ap_ue_context_setup_t * resp=&F1AP_UE_CONTEXT_SETUP_RESP(message_p); @@ -3062,30 +2576,29 @@ static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const cha if(ue_CapabilityRAT_ContainerList->list.array[i]->rat_Type == NR_RAT_Type_nr){ LOG_I(NR_RRC, "DU received NR_RAT_Type_nr UE capabilities Info through the UE Context Setup Request from the CU \n"); - if(ue_context_p->ue_context.UE_Capability_nr){ - ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability,ue_context_p->ue_context.UE_Capability_nr); - ue_context_p->ue_context.UE_Capability_nr = 0; + if (UE->UE_Capability_nr) { + ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability, UE->UE_Capability_nr); + UE->UE_Capability_nr = 0; } dec_rval = uper_decode(NULL, - &asn_DEF_NR_UE_NR_Capability, - (void**)&ue_context_p->ue_context.UE_Capability_nr, - ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.buf, - ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.size, - 0,0); + &asn_DEF_NR_UE_NR_Capability, + (void **)&UE->UE_Capability_nr, + ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.buf, + ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.size, + 0, + 0); if(LOG_DEBUGFLAG(DEBUG_ASN1)){ - xer_fprint(stdout,&asn_DEF_NR_UE_NR_Capability,ue_context_p->ue_context.UE_Capability_nr); + xer_fprint(stdout, &asn_DEF_NR_UE_NR_Capability, UE->UE_Capability_nr); } if((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)){ - LOG_E(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" Failed to decode nr UE capabilities (%zu bytes)\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(&ctxt),dec_rval.consumed); - ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability,ue_context_p->ue_context.UE_Capability_nr); - ue_context_p->ue_context.UE_Capability_nr = 0; + LOG_E(NR_RRC, "UE %04x Failed to decode nr UE capabilities (%zu bytes)\n", req->rnti, dec_rval.consumed); + ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability, UE->UE_Capability_nr); + UE->UE_Capability_nr = 0; } - ue_context_p->ue_context.UE_Capability_size = - ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.size; + UE->UE_Capability_size = ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.size; if(NR_index != -1){ LOG_E(NR_RRC,"fatal: more than 1 eutra capability\n"); exit(1); @@ -3096,28 +2609,27 @@ static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const cha if(ue_CapabilityRAT_ContainerList->list.array[i]->rat_Type == NR_RAT_Type_eutra_nr){ LOG_I(NR_RRC, "DU received NR_RAT_Type_eutra_nr UE capabilities Info through the UE Context Setup Request from the CU \n"); - if(ue_context_p->ue_context.UE_Capability_MRDC){ - ASN_STRUCT_FREE(asn_DEF_NR_UE_MRDC_Capability,ue_context_p->ue_context.UE_Capability_MRDC); - ue_context_p->ue_context.UE_Capability_MRDC = 0; + if (UE->UE_Capability_MRDC) { + ASN_STRUCT_FREE(asn_DEF_NR_UE_MRDC_Capability, UE->UE_Capability_MRDC); + UE->UE_Capability_MRDC = 0; } dec_rval = uper_decode(NULL, - &asn_DEF_NR_UE_MRDC_Capability, - (void**)&ue_context_p->ue_context.UE_Capability_MRDC, - ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.buf, - ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.size, - 0,0); + &asn_DEF_NR_UE_MRDC_Capability, + (void **)&UE->UE_Capability_MRDC, + ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.buf, + ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.size, + 0, + 0); if(LOG_DEBUGFLAG(DEBUG_ASN1)){ - xer_fprint(stdout,&asn_DEF_NR_UE_MRDC_Capability,ue_context_p->ue_context.UE_Capability_MRDC); + xer_fprint(stdout, &asn_DEF_NR_UE_MRDC_Capability, UE->UE_Capability_MRDC); } if((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)){ - LOG_E(NR_RRC,PROTOCOL_NR_RRC_CTXT_FMT" Failed to decode nr UE capabilities (%zu bytes)\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(&ctxt),dec_rval.consumed); - ASN_STRUCT_FREE(asn_DEF_NR_UE_MRDC_Capability,ue_context_p->ue_context.UE_Capability_MRDC); - ue_context_p->ue_context.UE_Capability_MRDC = 0; + LOG_E(NR_RRC, "UE %04x Failed to decode nr UE capabilities (%zu bytes)\n", req->rnti, dec_rval.consumed); + ASN_STRUCT_FREE(asn_DEF_NR_UE_MRDC_Capability, UE->UE_Capability_MRDC); + UE->UE_Capability_MRDC = 0; } - ue_context_p->ue_context.UE_MRDC_Capability_size = - ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.size; + UE->UE_MRDC_Capability_size = ue_CapabilityRAT_ContainerList->list.array[i]->ue_CapabilityRAT_Container.size; } if(ue_CapabilityRAT_ContainerList->list.array[i]->rat_Type == @@ -3135,11 +2647,11 @@ static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const cha uint8_t SRBs_before_new_addition = 0; if(req->srbs_to_be_setup_length>0){ - if(ue_context_p->ue_context.SRB_configList == NULL){ + if (UE->SRB_configList == NULL) { LOG_W(NR_RRC, "The SRB list of the UE context is empty before the addition of new SRB at the DU \n"); - ue_context_p->ue_context.SRB_configList = CALLOC(1, sizeof(*ue_context_p->ue_context.SRB_configList)); + UE->SRB_configList = CALLOC(1, sizeof(*UE->SRB_configList)); } - SRB_configList = ue_context_p->ue_context.SRB_configList; + SRB_configList = UE->SRB_configList; SRBs_before_new_addition = SRB_configList->list.count; for (int i=0; isrbs_to_be_setup_length; i++){ SRB2_config = CALLOC(1, sizeof(*SRB2_config)); @@ -3155,10 +2667,10 @@ static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const cha uint8_t nb_drb_to_setup = 0; long drb_priority[NGAP_MAX_DRBS_PER_UE]; if(req->drbs_to_be_setup_length>0){ - if(ue_context_p->ue_context.DRB_configList == NULL){ - ue_context_p->ue_context.DRB_configList = CALLOC(1, sizeof(*ue_context_p->ue_context.DRB_configList)); + if (UE->DRB_configList == NULL) { + UE->DRB_configList = CALLOC(1, sizeof(*UE->DRB_configList)); } - DRB_configList = ue_context_p->ue_context.DRB_configList; + DRB_configList = UE->DRB_configList; nb_drb_to_setup = req->drbs_to_be_setup_length; for (int i=0; idrbs_to_be_setup_length; i++){ DRB_config = CALLOC(1, sizeof(*DRB_config)); @@ -3189,8 +2701,8 @@ static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const cha if (req->srbs_to_be_setup_length > 0 || req->drbs_to_be_setup_length>0) // FIXME: fill_mastercellGroupConfig() won't fill the right priorities or // bearer IDs for the DRBs - fill_mastercellGroupConfig(cellGroupConfig, ue_context_p->ue_context.masterCellGroup, rrc->um_on_default_drb, SRB2_config ? 1 : 0, drb_id_to_setup_start, nb_drb_to_setup, drb_priority); - + fill_mastercellGroupConfig(cellGroupConfig, UE->masterCellGroup, rrc->um_on_default_drb, SRB2_config ? 1 : 0, drb_id_to_setup_start, nb_drb_to_setup, drb_priority); + protocol_ctxt_t ctxt = {.rntiMaybeUEid = req->rnti, .module_id = instance, .instance = instance, .enb_flag = 1, .eNB_index = instance}; apply_macrlc_config(rrc, ue_context_p, &ctxt); if(req->rrc_container_length > 0){ @@ -3206,7 +2718,7 @@ static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const cha /* Fill the UE context setup response ITTI message to send to F1AP */ resp->gNB_CU_ue_id = req->gNB_CU_ue_id; - resp->rnti = ctxt.rntiMaybeUEid; + resp->rnti = req->rnti; if(DRB_configList){ if(DRB_configList->list.count > 0){ resp->drbs_to_be_setup = calloc(1,DRB_configList->list.count*sizeof(f1ap_drb_to_be_setup_t)); @@ -3244,26 +2756,27 @@ static void rrc_DU_process_ue_context_setup_request(MessageDef *msg_p, const cha resp->du_to_cu_rrc_information = calloc(1, sizeof(du_to_cu_rrc_information_t)); resp->du_to_cu_rrc_information->cellGroupConfig = calloc(1,1024); asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig, - NULL, - ue_context_p->ue_context.masterCellGroup, //(void *)cellGroupConfig, - resp->du_to_cu_rrc_information->cellGroupConfig, - 1024); + NULL, + UE->masterCellGroup, //(void *)cellGroupConfig, + resp->du_to_cu_rrc_information->cellGroupConfig, + 1024); if (enc_rval.encoded == -1) { LOG_E(F1AP,"Could not encode ue_context.masterCellGroup, failed element %s\n",enc_rval.failed_type->name); exit(-1); } resp->du_to_cu_rrc_information->cellGroupConfig_length = (enc_rval.encoded+7)>>3; free(cellGroupConfig); - itti_send_msg_to_task (TASK_DU_F1, ctxt.module_id, message_p); + itti_send_msg_to_task(TASK_DU_F1, instance, message_p); } -static void rrc_DU_process_ue_context_modification_request(MessageDef *msg_p, const char *msg_name, instance_t instance){ - +static void rrc_DU_process_ue_context_modification_request(MessageDef *msg_p, instance_t instance) +{ f1ap_ue_context_setup_t * req=&F1AP_UE_CONTEXT_MODIFICATION_REQ(msg_p); protocol_ctxt_t ctxt = {.rntiMaybeUEid = req->rnti, .module_id = instance, .instance = instance, .enb_flag = 1, .eNB_index = instance}; gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id]; gNB_MAC_INST *mac = RC.nrmac[ctxt.module_id]; - struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(rrc, ctxt.rntiMaybeUEid); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(rrc, req->rnti); + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; MessageDef *message_p; message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_MODIFICATION_RESP); f1ap_ue_context_setup_t * resp=&F1AP_UE_CONTEXT_MODIFICATION_RESP(message_p); @@ -3276,11 +2789,11 @@ static void rrc_DU_process_ue_context_modification_request(MessageDef *msg_p, co uint8_t SRBs_before_new_addition = 0; if(req->srbs_to_be_setup_length>0){ - if(ue_context_p->ue_context.SRB_configList == NULL){ + if (UE->SRB_configList == NULL) { LOG_W(NR_RRC, "The SRB list of the UE context is empty before the addition of new SRB at the DU \n"); - ue_context_p->ue_context.SRB_configList = CALLOC(1, sizeof(*ue_context_p->ue_context.SRB_configList)); + UE->SRB_configList = CALLOC(1, sizeof(*UE->SRB_configList)); } - SRB_configList = ue_context_p->ue_context.SRB_configList; + SRB_configList = UE->SRB_configList; SRBs_before_new_addition = SRB_configList->list.count; for (int i=0; isrbs_to_be_setup_length; i++){ SRB2_config = CALLOC(1, sizeof(*SRB2_config)); @@ -3295,10 +2808,10 @@ static void rrc_DU_process_ue_context_modification_request(MessageDef *msg_p, co int drb_id_to_setup_start = 0; long drb_priority[NGAP_MAX_DRBS_PER_UE]; if(req->drbs_to_be_setup_length>0){ - if(ue_context_p->ue_context.DRB_configList == NULL){ - ue_context_p->ue_context.DRB_configList = CALLOC(1, sizeof(*ue_context_p->ue_context.DRB_configList)); + if (UE->DRB_configList == NULL) { + UE->DRB_configList = CALLOC(1, sizeof(*UE->DRB_configList)); } - DRB_configList = ue_context_p->ue_context.DRB_configList; + DRB_configList = UE->DRB_configList; for (int i=0; idrbs_to_be_setup_length; i++){ DRB_config = CALLOC(1, sizeof(*DRB_config)); DRB_config->drb_Identity = req->drbs_to_be_setup[i].drb_id; @@ -3327,24 +2840,18 @@ static void rrc_DU_process_ue_context_modification_request(MessageDef *msg_p, co if(req->srbs_to_be_setup_length>0 || req->drbs_to_be_setup_length>0){ cellGroupConfig = calloc(1, sizeof(NR_CellGroupConfig_t)); - fill_mastercellGroupConfig(cellGroupConfig, - ue_context_p->ue_context.masterCellGroup, - rrc->um_on_default_drb, - drb_id_to_setup_start < 2 ? 1 : 0, - drb_id_to_setup_start, - req->drbs_to_be_setup_length, - drb_priority); - apply_macrlc_config(rrc, ue_context_p, &ctxt); + fill_mastercellGroupConfig(cellGroupConfig, UE->masterCellGroup, rrc->um_on_default_drb, drb_id_to_setup_start < 2 ? 1 : 0, drb_id_to_setup_start, req->drbs_to_be_setup_length, drb_priority); + apply_macrlc_config(rrc, ue_context_p, &ctxt); } if(req->ReconfigComplOutcome == RRCreconf_failure){ LOG_W(NR_RRC, "CU reporting RRC Reconfiguration failure \n"); } else if(req->ReconfigComplOutcome == RRCreconf_success){ LOG_I(NR_RRC, "CU reporting RRC Reconfiguration success \n"); - if(ue_context_p->ue_context.DRB_configList!=NULL){ + if (UE->DRB_configList != NULL) { LOG_I(NR_RRC, "Send first DDD buffer status reporting towards the CU through an ITTI message to gtp-u \n"); - uint8_t drb_id = ue_context_p->ue_context.DRB_configList->list.array[0]->drb_Identity; - rnti_t rnti = ue_context_p->ue_context.rnti; + uint8_t drb_id = UE->DRB_configList->list.array[0]->drb_Identity; + rnti_t rnti = UE->rnti; int rlc_tx_buffer_space = nr_rlc_get_available_tx_space(rnti, drb_id + 3); LOG_I(NR_RRC, "Reported in DDD drb_id:%d, rnti:%d\n", drb_id, rnti); MessageDef *msg = itti_alloc_new_message_sized(TASK_RRC_GNB, 0, GTPV1U_DU_BUFFER_REPORT_REQ, @@ -3355,7 +2862,6 @@ static void rrc_DU_process_ue_context_modification_request(MessageDef *msg_p, co req->buffer_availability = rlc_tx_buffer_space; //10000000; //Hardcoding to be removed and read the actual RLC buffer availability instead extern instance_t DUuniqInstance; itti_send_msg_to_task(TASK_GTPV1_U, DUuniqInstance, msg); - } } @@ -3398,21 +2904,22 @@ static void rrc_DU_process_ue_context_modification_request(MessageDef *msg_p, co resp->du_to_cu_rrc_information = calloc(1,sizeof(du_to_cu_rrc_information_t)); resp->du_to_cu_rrc_information->cellGroupConfig = calloc(1,1024); asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig, - NULL, - ue_context_p->ue_context.masterCellGroup, //(void *)cellGroupConfig, - resp->du_to_cu_rrc_information->cellGroupConfig, - 1024); + NULL, + UE->masterCellGroup, //(void *)cellGroupConfig, + resp->du_to_cu_rrc_information->cellGroupConfig, + 1024); resp->du_to_cu_rrc_information->cellGroupConfig_length = (enc_rval.encoded+7)>>3; //} itti_send_msg_to_task (TASK_DU_F1, ctxt.module_id, message_p); } -static void rrc_CU_process_ue_context_setup_response(MessageDef *msg_p, const char *msg_name, instance_t instance){ - +static void rrc_CU_process_ue_context_setup_response(MessageDef *msg_p, instance_t instance) +{ f1ap_ue_context_setup_t * resp=&F1AP_UE_CONTEXT_SETUP_RESP(msg_p); protocol_ctxt_t ctxt = {.rntiMaybeUEid = resp->rnti, .module_id = instance, .instance = instance, .enb_flag = 1, .eNB_index = instance}; gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id]; - struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(rrc, ctxt.rntiMaybeUEid); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(rrc, resp->rnti); + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; NR_CellGroupConfig_t *cellGroupConfig = NULL; asn_dec_rval_t dec_rval = uper_decode_complete( NULL, @@ -3429,29 +2936,26 @@ static void rrc_CU_process_ue_context_setup_response(MessageDef *msg_p, const ch } //xer_fprint(stdout,&asn_DEF_NR_CellGroupConfig, cellGroupConfig); - if(ue_context_p->ue_context.masterCellGroup == NULL){ - ue_context_p->ue_context.masterCellGroup = calloc(1, sizeof(NR_CellGroupConfig_t)); + if (UE->masterCellGroup == NULL) { + UE->masterCellGroup = calloc(1, sizeof(NR_CellGroupConfig_t)); } if(cellGroupConfig->rlc_BearerToAddModList!=NULL){ - if(ue_context_p->ue_context.masterCellGroup->rlc_BearerToAddModList != NULL){ - int ue_ctxt_rlc_Bearers = ue_context_p->ue_context.masterCellGroup->rlc_BearerToAddModList->list.count; + if (UE->masterCellGroup->rlc_BearerToAddModList != NULL) { + int ue_ctxt_rlc_Bearers = UE->masterCellGroup->rlc_BearerToAddModList->list.count; for(int i=ue_ctxt_rlc_Bearers; irlc_BearerToAddModList->list.count; i++){ - asn1cSeqAdd(&ue_context_p->ue_context.masterCellGroup->rlc_BearerToAddModList->list, - cellGroupConfig->rlc_BearerToAddModList->list.array[i-ue_ctxt_rlc_Bearers]); + asn1cSeqAdd(&UE->masterCellGroup->rlc_BearerToAddModList->list, cellGroupConfig->rlc_BearerToAddModList->list.array[i - ue_ctxt_rlc_Bearers]); } - } - else{ + } else { LOG_W(NR_RRC, "Empty rlc_BearerToAddModList at ue_context of the CU before filling the updates from UE context setup response \n"); - ue_context_p->ue_context.masterCellGroup->rlc_BearerToAddModList = calloc(1, sizeof(*cellGroupConfig->rlc_BearerToAddModList)); - memcpy(ue_context_p->ue_context.masterCellGroup->rlc_BearerToAddModList, cellGroupConfig->rlc_BearerToAddModList, - sizeof(*cellGroupConfig->rlc_BearerToAddModList)); + UE->masterCellGroup->rlc_BearerToAddModList = calloc(1, sizeof(*cellGroupConfig->rlc_BearerToAddModList)); + memcpy(UE->masterCellGroup->rlc_BearerToAddModList, cellGroupConfig->rlc_BearerToAddModList, sizeof(*cellGroupConfig->rlc_BearerToAddModList)); } } if (LOG_DEBUGFLAG(DEBUG_ASN1)) { - xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, ue_context_p->ue_context.masterCellGroup); + xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, UE->masterCellGroup); } - if (ue_context_p->ue_context.established_pdu_sessions_flag == 1) { + if (UE->established_pdu_sessions_flag == 1) { fill_DRB_configList(&ctxt, ue_context_p); rrc_gNB_generate_dedicatedRRCReconfiguration(&ctxt, ue_context_p, cellGroupConfig); } else { @@ -3460,20 +2964,20 @@ static void rrc_CU_process_ue_context_setup_response(MessageDef *msg_p, const ch free(cellGroupConfig->rlc_BearerToAddModList); free(cellGroupConfig); - } -static void rrc_CU_process_ue_context_modification_response(MessageDef *msg_p, const char *msg_name, instance_t instance){ - +static void rrc_CU_process_ue_context_modification_response(MessageDef *msg_p, instance_t instance) +{ f1ap_ue_context_setup_t *resp=&F1AP_UE_CONTEXT_SETUP_RESP(msg_p); protocol_ctxt_t ctxt = {.rntiMaybeUEid = resp->rnti, .module_id = instance, .instance = instance, .enb_flag = 1, .eNB_index = instance}; gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id]; - struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(rrc, ctxt.rntiMaybeUEid); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(rrc, resp->rnti); + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; e1ap_bearer_setup_req_t req = {0}; - req.numPDUSessionsMod = ue_context_p->ue_context.nb_of_pdusessions; - req.gNB_cu_cp_ue_id = ue_context_p->ue_context.gNB_ue_ngap_id; - req.rnti = ue_context_p->ue_context.rnti; + req.numPDUSessionsMod = UE->nb_of_pdusessions; + req.gNB_cu_cp_ue_id = UE->gNB_ue_ngap_id; + req.rnti = UE->rnti; for (int i=0; i < req.numPDUSessionsMod; i++) { req.pduSessionMod[i].numDRB2Modify = resp->drbs_to_be_setup_length; for (int j=0; j < resp->drbs_to_be_setup_length; j++) { @@ -3507,28 +3011,25 @@ static void rrc_CU_process_ue_context_modification_response(MessageDef *msg_p, c } //xer_fprint(stdout,&asn_DEF_NR_CellGroupConfig, cellGroupConfig); - if(ue_context_p->ue_context.masterCellGroup == NULL){ - ue_context_p->ue_context.masterCellGroup = calloc(1, sizeof(NR_CellGroupConfig_t)); + if (UE->masterCellGroup == NULL) { + UE->masterCellGroup = calloc(1, sizeof(NR_CellGroupConfig_t)); } if(cellGroupConfig->rlc_BearerToAddModList!=NULL){ - if(ue_context_p->ue_context.masterCellGroup->rlc_BearerToAddModList != NULL){ - int ue_ctxt_rlc_Bearers = ue_context_p->ue_context.masterCellGroup->rlc_BearerToAddModList->list.count; + if (UE->masterCellGroup->rlc_BearerToAddModList != NULL) { + int ue_ctxt_rlc_Bearers = UE->masterCellGroup->rlc_BearerToAddModList->list.count; for(int i=ue_ctxt_rlc_Bearers; irlc_BearerToAddModList->list.count; i++){ - asn1cSeqAdd(&ue_context_p->ue_context.masterCellGroup->rlc_BearerToAddModList->list, - cellGroupConfig->rlc_BearerToAddModList->list.array[i-ue_ctxt_rlc_Bearers]); + asn1cSeqAdd(&UE->masterCellGroup->rlc_BearerToAddModList->list, cellGroupConfig->rlc_BearerToAddModList->list.array[i - ue_ctxt_rlc_Bearers]); } - } - else{ + } else { LOG_W(NR_RRC, "Empty rlc_BearerToAddModList at ue_context of the CU before filling the updates from UE context setup response \n"); - ue_context_p->ue_context.masterCellGroup->rlc_BearerToAddModList = calloc(1, sizeof(*cellGroupConfig->rlc_BearerToAddModList)); - memcpy(ue_context_p->ue_context.masterCellGroup->rlc_BearerToAddModList, cellGroupConfig->rlc_BearerToAddModList, - sizeof(*cellGroupConfig->rlc_BearerToAddModList)); + UE->masterCellGroup->rlc_BearerToAddModList = calloc(1, sizeof(*cellGroupConfig->rlc_BearerToAddModList)); + memcpy(UE->masterCellGroup->rlc_BearerToAddModList, cellGroupConfig->rlc_BearerToAddModList, sizeof(*cellGroupConfig->rlc_BearerToAddModList)); } } LOG_I(NR_RRC, "Updated master cell group configuration stored at the UE context of the CU:\n"); if (LOG_DEBUGFLAG(DEBUG_ASN1)) { - xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, ue_context_p->ue_context.masterCellGroup); + xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, UE->masterCellGroup); } rrc_gNB_generate_dedicatedRRCReconfiguration(&ctxt, ue_context_p, cellGroupConfig); @@ -3697,19 +3198,20 @@ static int get_dl_mimo_layers(const gNB_RRC_INST *rrc, const NR_UE_NR_Capability void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { MessageDef *msg; + gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id]; rrc_gNB_ue_context_t *ue_context_p = NULL; - RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &(RC.nrrrc[ctxt_pP->module_id]->rrc_ue_head)) { - ctxt_pP->rntiMaybeUEid = ue_context_p->ue_id_rnti; - gNB_MAC_INST *nrmac=RC.nrmac[ctxt_pP->module_id]; //WHAT A BEAUTIFULL RACE CONDITION !!! + RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &rrc->rrc_ue_head) + { + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; + ctxt_pP->rntiMaybeUEid = UE->rnti; - if (ue_context_p->ue_context.ul_failure_timer > 0) { - ue_context_p->ue_context.ul_failure_timer++; + if (UE->ul_failure_timer > 0) { + UE->ul_failure_timer++; - if (ue_context_p->ue_context.ul_failure_timer >= 20000) { + if (UE->ul_failure_timer >= 20000) { // remove UE after 20 seconds after MAC (or else) has indicated UL failure - LOG_I(RRC, "Removing UE %x instance, because of uplink failure timer timeout\n", - ue_context_p->ue_context.rnti); - if(ue_context_p->ue_context.StatusRrc >= NR_RRC_CONNECTED){ + LOG_I(RRC, "Removing UE %x instance, because of uplink failure timer timeout\n", UE->rnti); + if (UE->StatusRrc >= NR_RRC_CONNECTED) { rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_REQ( ctxt_pP->module_id, ue_context_p, @@ -3717,26 +3219,28 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { NGAP_CAUSE_RADIO_NETWORK_RADIO_CONNECTION_WITH_UE_LOST); } - // Remove here the MAC and RRC context when RRC is not connected or gNB is not connected to CN5G - if(ue_context_p->ue_context.StatusRrc < NR_RRC_CONNECTED || ue_context_p->ue_context.gNB_ue_ngap_id == 0) { - if(!NODE_IS_CU(RC.nrrrc[ctxt_pP->instance]->node_type)){ - mac_remove_nr_ue(nrmac, ctxt_pP->rntiMaybeUEid); + // Remove here the MAC and RRC context when RRC is not connected + if (UE->StatusRrc < NR_RRC_CONNECTED) { + if (!NODE_IS_CU(rrc->node_type)) { + gNB_MAC_INST *nrmac = RC.nrmac[ctxt_pP->module_id]; // WHAT A BEAUTIFULL RACE CONDITION !!! + mac_remove_nr_ue(nrmac, UE->rnti); rrc_rlc_remove_ue(ctxt_pP); pdcp_remove_UE(ctxt_pP); /* remove RRC UE Context */ - ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[ctxt_pP->module_id], ctxt_pP->rntiMaybeUEid); + ue_context_p = rrc_gNB_get_ue_context_by_rnti(rrc, UE->rnti); if (ue_context_p) { - rrc_gNB_remove_ue_context(ctxt_pP, RC.nrrrc[ctxt_pP->module_id], ue_context_p); - LOG_I(NR_RRC, "remove UE %lx \n", ctxt_pP->rntiMaybeUEid); + LOG_I(NR_RRC, "remove UE %04x \n", UE->rnti); + rrc_gNB_remove_ue_context(rrc, ue_context_p); + break; // We must not access this UE context } } // In case of CU trigger UE context release command towards the DU - else{ + else { MessageDef *message_p; message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_RELEASE_CMD); f1ap_ue_context_release_cmd_t *rel_cmd=&F1AP_UE_CONTEXT_RELEASE_CMD (message_p); - rel_cmd->rnti = ctxt_pP->rntiMaybeUEid; + rel_cmd->rnti = UE->rnti; rel_cmd->cause = F1AP_CAUSE_RADIO_NETWORK; rel_cmd->cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release itti_send_msg_to_task(TASK_CU_F1, ctxt_pP->module_id, message_p); @@ -3747,25 +3251,24 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { } } - if (ue_context_p->ue_context.ue_release_timer_rrc > 0) { - ue_context_p->ue_context.ue_release_timer_rrc++; + if (UE->ue_release_timer_rrc > 0) { + UE->ue_release_timer_rrc++; - if (ue_context_p->ue_context.ue_release_timer_rrc >= ue_context_p->ue_context.ue_release_timer_thres_rrc) { - LOG_I(NR_RRC, "Removing UE %x instance after UE_CONTEXT_RELEASE_Complete (ue_release_timer_rrc timeout)\n", - ue_context_p->ue_context.rnti); - ue_context_p->ue_context.ue_release_timer_rrc = 0; - mac_remove_nr_ue(nrmac, ctxt_pP->rntiMaybeUEid); + if (UE->ue_release_timer_rrc >= UE->ue_release_timer_thres_rrc) { + LOG_I(NR_RRC, "Removing UE %x instance after UE_CONTEXT_RELEASE_Complete (ue_release_timer_rrc timeout)\n", UE->rnti); + UE->ue_release_timer_rrc = 0; + if (!NODE_IS_CU(RC.nrrrc[0]->node_type)) { + gNB_MAC_INST *nrmac = RC.nrmac[ctxt_pP->module_id]; // WHAT A BEAUTIFULL RACE CONDITION !!! + mac_remove_nr_ue(nrmac, UE->rnti); + } rrc_rlc_remove_ue(ctxt_pP); pdcp_remove_UE(ctxt_pP); - newGtpuDeleteAllTunnels(ctxt_pP->instance, ctxt_pP->rntiMaybeUEid); + newGtpuDeleteAllTunnels(ctxt_pP->instance, UE->rnti); /* remove RRC UE Context */ - ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[ctxt_pP->module_id], ctxt_pP->rntiMaybeUEid); - if (ue_context_p) { - rrc_gNB_remove_ue_context(ctxt_pP, RC.nrrrc[ctxt_pP->module_id], ue_context_p); - LOG_I(NR_RRC, "remove UE %lx \n", ctxt_pP->rntiMaybeUEid); - } + LOG_I(NR_RRC, "remove UE %04x \n", UE->rnti); + rrc_gNB_remove_ue_context(rrc, ue_context_p); break; // break RB_FOREACH } } @@ -3806,14 +3309,15 @@ void prepare_and_send_ue_context_modification_f1(rrc_gNB_ue_context_t *ue_contex /*Generate a UE context modification request message towards the DU to instruct the DU *for SRB2 and DRB configuration and get the updates on master cell group config from the DU*/ + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; protocol_ctxt_t ctxt = {0}; - PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, GNB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0, 0); + PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, GNB_FLAG_YES, UE->rnti, 0, 0, 0); // TODO: So many hard codings MessageDef *message_p; message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, F1AP_UE_CONTEXT_MODIFICATION_REQ); f1ap_ue_context_setup_t *req=&F1AP_UE_CONTEXT_MODIFICATION_REQ(message_p); - req->rnti = ue_context_p->ue_context.rnti; + req->rnti = UE->rnti; req->mcc = RC.nrrrc[ctxt.module_id]->configuration.mcc[0]; req->mnc = RC.nrrrc[ctxt.module_id]->configuration.mnc[0]; req->mnc_digit_length = RC.nrrrc[ctxt.module_id]->configuration.mnc_digit_length[0]; @@ -3845,10 +3349,10 @@ void prepare_and_send_ue_context_modification_f1(rrc_gNB_ue_context_t *ue_contex void rrc_gNB_process_e1_bearer_context_setup_resp(e1ap_bearer_setup_resp_t *resp, instance_t instance) { // Find the UE context from UE ID and send ITTI message to F1AP to send UE context modification message to DU - uint16_t ue_initial_id = 0; // Making an invalid UE initial ID - rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_from_ngap_ids(instance, ue_initial_id, resp->gNB_cu_cp_ue_id); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[instance], resp->gNB_cu_cp_ue_id); + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; protocol_ctxt_t ctxt = {0}; - PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, GNB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0, 0); + PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, GNB_FLAG_YES, UE->rnti, 0, 0, 0); gtpv1u_gnb_create_tunnel_resp_t create_tunnel_resp={0}; create_tunnel_resp.num_tunnels = resp->numPDUSessions; @@ -3899,9 +3403,10 @@ static void write_rrc_stats(const gNB_RRC_INST *rrc) rrc_gNB_ue_context_t *ue_context_p = NULL; /* cast is necessary to eliminate warning "discards ‘const’ qualifier" */ - RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &((gNB_RRC_INST *)rrc)->rrc_ue_head) { - const rnti_t rnti = ue_context_p->ue_id_rnti; + RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &((gNB_RRC_INST *)rrc)->rrc_ue_head) + { const gNB_RRC_UE_t *ue_ctxt = &ue_context_p->ue_context; + const rnti_t rnti = ue_ctxt->rnti; fprintf(f, "NR RRC UE rnti %04x:", rnti); @@ -3930,12 +3435,9 @@ static void write_rrc_stats(const gNB_RRC_INST *rrc) ///---------------------------------------------------------------------------------------------------------------/// ///---------------------------------------------------------------------------------------------------------------/// void *rrc_gnb_task(void *args_p) { - MessageDef *msg_p; - const char *msg_name_p; + MessageDef *msg_p; instance_t instance; int result; - //SRB_INFO *srb_info_p; - //int CC_id; protocol_ctxt_t ctxt = {.module_id = 0, .enb_flag = 1, .instance = 0, .rntiMaybeUEid = 0, .frame = -1, .subframe = -1, .eNB_index = 0, .brOption = false}; /* timer to write stats to file */ @@ -3948,9 +3450,9 @@ void *rrc_gnb_task(void *args_p) { while (1) { // Wait for a message itti_receive_msg(TASK_RRC_GNB, &msg_p); - msg_name_p = ITTI_MSG_NAME(msg_p); + const char *msg_name_p = ITTI_MSG_NAME(msg_p); instance = ITTI_MSG_DESTINATION_INSTANCE(msg_p); - + LOG_D(NR_RRC, "Received Msg %s\n", msg_name_p); switch (ITTI_MSG_ID(msg_p)) { case TERMINATE_MESSAGE: LOG_W(NR_RRC, " *** Exiting NR_RRC thread\n"); @@ -4000,53 +3502,46 @@ void *rrc_gnb_task(void *args_p) { break; case NGAP_DOWNLINK_NAS: - rrc_gNB_process_NGAP_DOWNLINK_NAS(msg_p, msg_name_p, instance, &rrc_gNB_mui); + rrc_gNB_process_NGAP_DOWNLINK_NAS(msg_p, instance, &rrc_gNB_mui); break; case NGAP_PDUSESSION_SETUP_REQ: - rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(msg_p, msg_name_p, instance); + rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(msg_p, instance); break; case NGAP_PDUSESSION_MODIFY_REQ: - rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ(msg_p, msg_name_p, instance); + rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ(msg_p, instance); break; case NGAP_PDUSESSION_RELEASE_COMMAND: - rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(msg_p, msg_name_p, instance); + rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(msg_p, instance); break; /* Messages from gNB app */ case NRRRC_CONFIGURATION_REQ: - LOG_I(NR_RRC, "[gNB %ld] Received %s : %p\n", instance, msg_name_p,&NRRRC_CONFIGURATION_REQ(msg_p)); - openair_rrc_gNB_configuration(GNB_INSTANCE_TO_MODULE_ID(instance), &NRRRC_CONFIGURATION_REQ(msg_p)); + openair_rrc_gNB_configuration(instance, &NRRRC_CONFIGURATION_REQ(msg_p)); break; /* Messages from F1AP task */ case F1AP_SETUP_REQ: - AssertFatal(NODE_IS_CU(RC.nrrrc[instance]->node_type), - "should not receive F1AP_SETUP_REQUEST, need call by CU!\n"); - LOG_I(NR_RRC,"[gNB %ld] Received %s : %p\n", instance, msg_name_p, &F1AP_SETUP_REQ(msg_p)); + AssertFatal(NODE_IS_CU(RC.nrrrc[instance]->node_type), "should not receive F1AP_SETUP_REQUEST, need call by CU!\n"); rrc_gNB_process_f1_setup_req(&F1AP_SETUP_REQ(msg_p)); break; - case NR_DU_RRC_DL_INDICATION: - rrc_process_DU_DL(msg_p, msg_name_p, instance); - break; - case F1AP_UE_CONTEXT_SETUP_REQ: - rrc_DU_process_ue_context_setup_request(msg_p, msg_name_p, instance); + rrc_DU_process_ue_context_setup_request(msg_p, instance); break; case F1AP_UE_CONTEXT_SETUP_RESP: - rrc_CU_process_ue_context_setup_response(msg_p, msg_name_p, instance); + rrc_CU_process_ue_context_setup_response(msg_p, instance); break; case F1AP_UE_CONTEXT_MODIFICATION_RESP: - rrc_CU_process_ue_context_modification_response(msg_p, msg_name_p, instance); + rrc_CU_process_ue_context_modification_response(msg_p, instance); break; case F1AP_UE_CONTEXT_MODIFICATION_REQ: - rrc_DU_process_ue_context_modification_request(msg_p, msg_name_p, instance); + rrc_DU_process_ue_context_modification_request(msg_p, instance); break; case F1AP_UE_CONTEXT_RELEASE_CMD: @@ -4057,7 +3552,7 @@ void *rrc_gnb_task(void *args_p) { /* Messages from X2AP */ case X2AP_ENDC_SGNB_ADDITION_REQ: LOG_I(NR_RRC, "Received ENDC sgNB addition request from X2AP \n"); - rrc_gNB_process_AdditionRequestInformation(GNB_INSTANCE_TO_MODULE_ID(instance), &X2AP_ENDC_SGNB_ADDITION_REQ(msg_p)); + rrc_gNB_process_AdditionRequestInformation(instance, &X2AP_ENDC_SGNB_ADDITION_REQ(msg_p)); break; case X2AP_ENDC_SGNB_RECONF_COMPLETE: @@ -4065,37 +3560,35 @@ void *rrc_gnb_task(void *args_p) { break; case NGAP_INITIAL_CONTEXT_SETUP_REQ: - rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(msg_p, msg_name_p, instance); + rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(msg_p, instance); break; case X2AP_ENDC_SGNB_RELEASE_REQUEST: LOG_I(NR_RRC, "Received ENDC sgNB release request from X2AP \n"); - rrc_gNB_process_release_request(GNB_INSTANCE_TO_MODULE_ID(instance), &X2AP_ENDC_SGNB_RELEASE_REQUEST(msg_p)); + rrc_gNB_process_release_request(instance, &X2AP_ENDC_SGNB_RELEASE_REQUEST(msg_p)); break; case X2AP_ENDC_DC_OVERALL_TIMEOUT: - rrc_gNB_process_dc_overall_timeout(GNB_INSTANCE_TO_MODULE_ID(instance), &X2AP_ENDC_DC_OVERALL_TIMEOUT(msg_p)); + rrc_gNB_process_dc_overall_timeout(instance, &X2AP_ENDC_DC_OVERALL_TIMEOUT(msg_p)); break; case NGAP_UE_CONTEXT_RELEASE_REQ: - rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_REQ(msg_p, msg_name_p, instance); + rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_REQ(msg_p, instance); break; case NGAP_UE_CONTEXT_RELEASE_COMMAND: - rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND(msg_p, msg_name_p, instance); + rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND(msg_p, instance); break; case E1AP_SETUP_REQ: - LOG_I(NR_RRC, "Received E1AP_SETUP_REQ for instance %d\n", (int)instance); rrc_gNB_process_e1_setup_req(&E1AP_SETUP_REQ(msg_p), instance); break; case E1AP_BEARER_CONTEXT_SETUP_RESP: - LOG_I(NR_RRC, "Received E1AP_BEARER_CONTEXT_SETUP_RESP for instance %d\n", (int)instance); rrc_gNB_process_e1_bearer_context_setup_resp(&E1AP_BEARER_CONTEXT_SETUP_RESP(msg_p), instance); case NGAP_PAGING_IND: - rrc_gNB_process_PAGING_IND(msg_p, msg_name_p, instance); + rrc_gNB_process_PAGING_IND(msg_p, instance); break; default: @@ -4119,63 +3612,18 @@ rrc_gNB_generate_SecurityModeCommand( { uint8_t buffer[100]; uint8_t size; + gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; T(T_ENB_RRC_SECURITY_MODE_COMMAND, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid)); - NR_IntegrityProtAlgorithm_t integrity_algorithm = (NR_IntegrityProtAlgorithm_t)ue_context_pP->ue_context.integrity_algorithm; - size = do_NR_SecurityModeCommand( - ctxt_pP, - buffer, - rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id), - ue_context_pP->ue_context.ciphering_algorithm, - &integrity_algorithm); + NR_IntegrityProtAlgorithm_t integrity_algorithm = (NR_IntegrityProtAlgorithm_t)ue_p->integrity_algorithm; + size = do_NR_SecurityModeCommand(ctxt_pP, buffer, rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id), ue_p->ciphering_algorithm, integrity_algorithm); LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size,"[MSG] RRC Security Mode Command\n"); - LOG_I(NR_RRC, - PROTOCOL_NR_RRC_CTXT_UE_FMT" Logical Channel DL-DCCH, Generate SecurityModeCommand (bytes %d)\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), - size); + LOG_I(NR_RRC, "UE %04x Logical Channel DL-DCCH, Generate SecurityModeCommand (bytes %d)\n", ue_p->rnti, size); - switch (RC.nrrrc[ctxt_pP->module_id]->node_type) { - case ngran_gNB_CU: - case ngran_gNB_CUCP: - // create an ITTI message - memcpy(ue_context_pP->ue_context.Srb1.Srb_info.Tx_buffer.Payload, buffer, size); - ue_context_pP->ue_context.Srb1.Srb_info.Tx_buffer.payload_size = size; + gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id]; + AssertFatal(!NODE_IS_DU(rrc->node_type), "illegal node type DU!\n"); - LOG_I(NR_RRC,"calling rrc_data_req :securityModeCommand\n"); - nr_rrc_data_req(ctxt_pP, - DCCH, - rrc_gNB_mui++, - SDU_CONFIRM_NO, - size, - buffer, - PDCP_TRANSMISSION_MODE_CONTROL); - break; - - case ngran_gNB_DU: - // nothing to do for DU - AssertFatal(1==0,"nothing to do for DU\n"); - break; - - case ngran_gNB: - LOG_D(NR_RRC, - PROTOCOL_NR_RRC_CTXT_UE_FMT" --- PDCP_DATA_REQ/%d Bytes (securityModeCommand to UE MUI %d) --->[PDCP][RB %02d]\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), - size, - rrc_gNB_mui, - DCCH); - LOG_D(NR_RRC,"calling rrc_data_req :securityModeCommand\n"); - nr_rrc_data_req(ctxt_pP, - DCCH, - rrc_gNB_mui++, - SDU_CONFIRM_NO, - size, - buffer, - PDCP_TRANSMISSION_MODE_CONTROL); - break; - - default : - LOG_W(NR_RRC, "Unknown node type %d\n", RC.nrrrc[ctxt_pP->module_id]->node_type); - } + nr_rrc_data_req(ctxt_pP, DCCH, rrc_gNB_mui++, SDU_CONFIRM_NO, size, buffer, PDCP_TRANSMISSION_MODE_CONTROL); } void @@ -4197,44 +3645,11 @@ rrc_gNB_generate_UECapabilityEnquiry( PROTOCOL_NR_RRC_CTXT_UE_FMT" Logical Channel DL-DCCH, Generate NR UECapabilityEnquiry (bytes %d)\n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), size); - switch (RC.nrrrc[ctxt_pP->module_id]->node_type) { - case ngran_gNB_CU: - case ngran_gNB_CUCP: - nr_rrc_data_req( - ctxt_pP, - DCCH, - rrc_gNB_mui++, - SDU_CONFIRM_NO, - size, - buffer, - PDCP_TRANSMISSION_MODE_CONTROL); - break; - case ngran_gNB_DU: - // nothing to do for DU - AssertFatal(1==0,"nothing to do for DU\n"); - break; + gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id]; + AssertFatal(!NODE_IS_DU(rrc->node_type), "illegal node type DU!\n"); - case ngran_gNB: - // rrc_mac_config_req_gNB - LOG_D(NR_RRC, - PROTOCOL_NR_RRC_CTXT_UE_FMT" --- PDCP_DATA_REQ/%d Bytes (NR UECapabilityEnquiry MUI %d) --->[PDCP][RB %02d]\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), - size, - rrc_gNB_mui, - DCCH); - nr_rrc_data_req(ctxt_pP, - DCCH, - rrc_gNB_mui++, - SDU_CONFIRM_NO, - size, - buffer, - PDCP_TRANSMISSION_MODE_CONTROL); - break; - - default : - LOG_W(NR_RRC, "Unknown node type %d\n", RC.nrrrc[ctxt_pP->module_id]->node_type); - } + nr_rrc_data_req(ctxt_pP, DCCH, rrc_gNB_mui++, SDU_CONFIRM_NO, size, buffer, PDCP_TRANSMISSION_MODE_CONTROL); } //----------------------------------------------------------------------------- @@ -4251,10 +3666,12 @@ rrc_gNB_generate_RRCRelease( { uint8_t buffer[RRC_BUF_SIZE] = {0}; int size = do_NR_RRCRelease(buffer, RRC_BUF_SIZE, rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id)); - ue_context_pP->ue_context.ue_reestablishment_timer = 0; - ue_context_pP->ue_context.ue_release_timer = 0; - ue_context_pP->ue_context.ul_failure_timer = 0; - ue_context_pP->ue_context.ue_release_timer_rrc = 0; + gNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; + + ue_p->ue_reestablishment_timer = 0; + ue_p->ue_release_timer = 0; + ue_p->ul_failure_timer = 0; + ue_p->ue_release_timer_rrc = 0; LOG_I(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" Logical Channel DL-DCCH, Generate RRCRelease (bytes %d)\n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), @@ -4266,6 +3683,11 @@ rrc_gNB_generate_RRCRelease( rrc_gNB_mui, DCCH); + nr_rrc_data_req(ctxt_pP, DCCH, rrc_gNB_mui++, SDU_CONFIRM_NO, size, buffer, PDCP_TRANSMISSION_MODE_CONTROL); + + rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_COMPLETE(ctxt_pP->instance, ue_context_pP->ue_context.gNB_ue_ngap_id); + ue_context_pP->ue_context.ue_release_timer_rrc = 1; + if (NODE_IS_CU(RC.nrrrc[ctxt_pP->module_id]->node_type)) { uint8_t *message_buffer = itti_malloc (TASK_RRC_GNB, TASK_CU_F1, size); memcpy (message_buffer, buffer, size); @@ -4276,17 +3698,6 @@ rrc_gNB_generate_RRCRelease( F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container = message_buffer; F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container_length = size; itti_send_msg_to_task(TASK_CU_F1, ctxt_pP->module_id, m); - } else { - nr_rrc_data_req(ctxt_pP, - DCCH, - rrc_gNB_mui++, - SDU_CONFIRM_NO, - size, - buffer, - PDCP_TRANSMISSION_MODE_CONTROL); - - rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_COMPLETE(ctxt_pP->instance, ue_context_pP->ue_context.gNB_ue_ngap_id); - ue_context_pP->ue_context.ue_release_timer_rrc = 1; } } diff --git a/openair2/RRC/NR/rrc_gNB_GTPV1U.c b/openair2/RRC/NR/rrc_gNB_GTPV1U.c index d2831dcf5b..1322317b3e 100644 --- a/openair2/RRC/NR/rrc_gNB_GTPV1U.c +++ b/openair2/RRC/NR/rrc_gNB_GTPV1U.c @@ -44,68 +44,64 @@ extern RAN_CONTEXT_t RC; -int -rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP( - const protocol_ctxt_t *const ctxt_pP, - const gtpv1u_enb_create_tunnel_resp_t *const create_tunnel_resp_pP, - uint8_t *inde_list -) { - int i; - struct rrc_gNB_ue_context_s *ue_context_p = NULL; - - if (create_tunnel_resp_pP) { - LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" RX CREATE_TUNNEL_RESP num tunnels %u \n", - PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), - create_tunnel_resp_pP->num_tunnels); - ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[ctxt_pP->module_id], ctxt_pP->rntiMaybeUEid); - - for (i = 0; i < create_tunnel_resp_pP->num_tunnels; i++) { - ue_context_p->ue_context.gnb_gtp_teid[inde_list[i]] = create_tunnel_resp_pP->enb_S1u_teid[i]; - ue_context_p->ue_context.gnb_gtp_addrs[inde_list[i]] = create_tunnel_resp_pP->enb_addr; - ue_context_p->ue_context.gnb_gtp_ebi[inde_list[i]] = create_tunnel_resp_pP->eps_bearer_id[i]; - LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP tunnel (%u, %u) bearer UE context index %u, msg index %u, id %u, gtp addr len %d \n", - PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), - create_tunnel_resp_pP->enb_S1u_teid[i], - ue_context_p->ue_context.gnb_gtp_teid[inde_list[i]], - inde_list[i], - i, - create_tunnel_resp_pP->eps_bearer_id[i], - create_tunnel_resp_pP->enb_addr.length); - } - - return 0; - } else { +int rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(const protocol_ctxt_t *const ctxt_pP, const gtpv1u_enb_create_tunnel_resp_t *const create_tunnel_resp_pP, uint8_t *inde_list) +{ + if (!create_tunnel_resp_pP) { + LOG_E(NR_RRC, "create_tunnel_resp_pP error\n"); return -1; } + + LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT " RX CREATE_TUNNEL_RESP num tunnels %u \n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), create_tunnel_resp_pP->num_tunnels); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(RC.nrrrc[ctxt_pP->module_id], ctxt_pP->rntiMaybeUEid); + if (!ue_context_p) { + LOG_E(NR_RRC, "UE table error\n"); + return -1; + } + for (int i = 0; i < create_tunnel_resp_pP->num_tunnels; i++) { + ue_context_p->ue_context.gnb_gtp_teid[inde_list[i]] = create_tunnel_resp_pP->enb_S1u_teid[i]; + ue_context_p->ue_context.gnb_gtp_addrs[inde_list[i]] = create_tunnel_resp_pP->enb_addr; + ue_context_p->ue_context.gnb_gtp_ebi[inde_list[i]] = create_tunnel_resp_pP->eps_bearer_id[i]; + LOG_I(RRC, + PROTOCOL_RRC_CTXT_UE_FMT " rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP tunnel (%u, %u) bearer UE context index %u, msg index %u, id %u, gtp addr len %d \n", + PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), + create_tunnel_resp_pP->enb_S1u_teid[i], + ue_context_p->ue_context.gnb_gtp_teid[inde_list[i]], + inde_list[i], + i, + create_tunnel_resp_pP->eps_bearer_id[i], + create_tunnel_resp_pP->enb_addr.length); + } + + return 0; } int nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(const protocol_ctxt_t *const ctxt_pP, const gtpv1u_gnb_create_tunnel_resp_t *const create_tunnel_resp_pP, int offset) { - int i; - struct rrc_gNB_ue_context_s *ue_context_p = NULL; - - if (create_tunnel_resp_pP) { - LOG_D(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" RX CREATE_TUNNEL_RESP num tunnels %u \n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), - create_tunnel_resp_pP->num_tunnels); - ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[ctxt_pP->module_id], ctxt_pP->rntiMaybeUEid); - - for (i = 0; i < create_tunnel_resp_pP->num_tunnels; i++) { - ue_context_p->ue_context.gnb_gtp_teid[i + offset] = create_tunnel_resp_pP->gnb_NGu_teid[i]; - ue_context_p->ue_context.gnb_gtp_addrs[i + offset] = create_tunnel_resp_pP->gnb_addr; - ue_context_p->ue_context.gnb_gtp_psi[i + offset] = create_tunnel_resp_pP->pdusession_id[i]; - LOG_I(NR_RRC, - PROTOCOL_NR_RRC_CTXT_UE_FMT " nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP tunnel (%u, %u) bearer UE context index %u, id %u, gtp addr len %d \n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), - create_tunnel_resp_pP->gnb_NGu_teid[i], - ue_context_p->ue_context.gnb_gtp_teid[i + offset], - i, - create_tunnel_resp_pP->pdusession_id[i], - create_tunnel_resp_pP->gnb_addr.length); - } - - return 0; - } else { + if (!create_tunnel_resp_pP) { + LOG_E(NR_RRC, "create_tunnel_resp_pP error\n"); return -1; } + + LOG_D(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT " RX CREATE_TUNNEL_RESP num tunnels %u \n", PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), create_tunnel_resp_pP->num_tunnels); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(RC.nrrrc[ctxt_pP->module_id], ctxt_pP->rntiMaybeUEid); + if (!ue_context_p) { + LOG_E(NR_RRC, "UE table error\n"); + return -1; + } + + for (int i = 0; i < create_tunnel_resp_pP->num_tunnels; i++) { + ue_context_p->ue_context.gnb_gtp_teid[i + offset] = create_tunnel_resp_pP->gnb_NGu_teid[i]; + ue_context_p->ue_context.gnb_gtp_addrs[i + offset] = create_tunnel_resp_pP->gnb_addr; + ue_context_p->ue_context.gnb_gtp_psi[i + offset] = create_tunnel_resp_pP->pdusession_id[i]; + LOG_I(NR_RRC, + PROTOCOL_NR_RRC_CTXT_UE_FMT " nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP tunnel (%u, %u) bearer UE context index %u, id %u, gtp addr len %d \n", + PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), + create_tunnel_resp_pP->gnb_NGu_teid[i], + ue_context_p->ue_context.gnb_gtp_teid[i + offset], + i, + create_tunnel_resp_pP->pdusession_id[i], + create_tunnel_resp_pP->gnb_addr.length); + } + + return 0; } diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index 17749d4330..d3efb4b497 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -54,16 +54,21 @@ #include "RRC/NR/MESSAGES/asn1_msg.h" #include "NR_UERadioAccessCapabilityInformation.h" #include "NR_UE-CapabilityRAT-ContainerList.h" -#include "NGAP_Cause.h" #include "NGAP_CauseRadioNetwork.h" #include "f1ap_messages_types.h" #include "openair2/E1AP/e1ap_asnc.h" - +#include "NGAP_asn_constant.h" +#include "NGAP_PDUSessionResourceSetupRequestTransfer.h" +#include "NGAP_PDUSessionResourceModifyRequestTransfer.h" +#include "NGAP_ProtocolIE-Field.h" +#include "NGAP_GTPTunnel.h" +#include "NGAP_QosFlowSetupRequestItem.h" +#include "NGAP_QosFlowAddOrModifyRequestItem.h" +#include "NGAP_NonDynamic5QIDescriptor.h" +#include "conversions.h" +#include "RRC/NR/rrc_gNB_radio_bearers.h" extern RAN_CONTEXT_t RC; -/* Value to indicate an invalid UE initial id */ -static const uint16_t UE_INITIAL_ID_INVALID = 0; - /* Masks for NGAP Encryption algorithms, NEA0 is always supported (not coded) */ static const uint16_t NGAP_ENCRYPTION_NEA1_MASK = 0x8000; static const uint16_t NGAP_ENCRYPTION_NEA2_MASK = 0x4000; @@ -76,190 +81,7 @@ static const uint16_t NGAP_INTEGRITY_NIA3_MASK = 0x2000; #define INTEGRITY_ALGORITHM_NONE NR_IntegrityProtAlgorithm_nia0 -/*! \fn uint16_t get_next_ue_initial_id(uint8_t mod_id) - *\brief provide an UE initial ID for NGAP initial communication. - *\param mod_id Instance ID of gNB. - *\return the UE initial ID. - */ -//------------------------------------------------------------------------------ -static uint16_t -get_next_ue_initial_id( - const module_id_t mod_id -) -//------------------------------------------------------------------------------ -{ - static uint16_t ue_initial_id[NUMBER_OF_gNB_MAX]; - ue_initial_id[mod_id]++; - - /* Never use UE_INITIAL_ID_INVALID this is the invalid id! */ - if (ue_initial_id[mod_id] == UE_INITIAL_ID_INVALID) { - ue_initial_id[mod_id]++; - } - - return ue_initial_id[mod_id]; -} - -//------------------------------------------------------------------------------ -/* -* Get the UE NG struct containing hashtables NG_id/UE_id. -* Is also used to set the NG_id of the UE, depending on inputs. -*/ -struct rrc_ue_ngap_ids_s * -rrc_gNB_NGAP_get_ue_ids( - gNB_RRC_INST *const rrc_instance_pP, - const uint16_t ue_initial_id, - const uint32_t gNB_ue_ngap_idP -) -//------------------------------------------------------------------------------ -{ - rrc_ue_ngap_ids_t *result = NULL; - rrc_ue_ngap_ids_t *result2 = NULL; - /*****************************/ - instance_t instance = 0; - ngap_gNB_instance_t *ngap_gNB_instance_p = NULL; - ngap_gNB_ue_context_t *ue_desc_p = NULL; - rrc_gNB_ue_context_t *ue_context_p = NULL; - /*****************************/ - hashtable_rc_t h_rc; - - if (ue_initial_id != UE_INITIAL_ID_INVALID) { - h_rc = hashtable_get(rrc_instance_pP->initial_id2_ngap_ids, (hash_key_t)ue_initial_id, (void **)&result); - - if (h_rc == HASH_TABLE_OK) { - if (gNB_ue_ngap_idP > 0) { - h_rc = hashtable_get(rrc_instance_pP->ngap_id2_ngap_ids, (hash_key_t)gNB_ue_ngap_idP, (void **)&result2); - - if (h_rc != HASH_TABLE_OK) { // this case is equivalent to associate gNB_ue_ngap_idP and ue_initial_id - result2 = malloc(sizeof(*result2)); - - if (NULL != result2) { - *result2 = *result; - result2->gNB_ue_ngap_id = gNB_ue_ngap_idP; - result->gNB_ue_ngap_id = gNB_ue_ngap_idP; - h_rc = hashtable_insert(rrc_instance_pP->ngap_id2_ngap_ids, (hash_key_t)gNB_ue_ngap_idP, result2); - - if (h_rc != HASH_TABLE_OK) { - LOG_E(NGAP, "[gNB %ld] Error while hashtable_insert in ngap_id2_ngap_ids gNB_ue_ngap_idP %"PRIu32"\n", - rrc_instance_pP - RC.nrrrc[0], - gNB_ue_ngap_idP); - } - } - } else { // here we should check that the association was done correctly - if ((result->ue_initial_id != result2->ue_initial_id) || (result->gNB_ue_ngap_id != result2->gNB_ue_ngap_id)) { - LOG_E(NGAP, "[gNB %ld] Error while hashtable_get, two rrc_ue_ngap_ids_t that should be equal, are not:\n \ - ue_initial_id 1 = %"PRIu16",\n \ - ue_initial_id 2 = %"PRIu16",\n \ - gNB_ue_ngap_idP 1 = %"PRIu32",\n \ - gNB_ue_ngap_idP 2 = %"PRIu32"\n", - rrc_instance_pP - RC.nrrrc[0], - result->ue_initial_id, - result2->ue_initial_id, - result->gNB_ue_ngap_id, - result2->gNB_ue_ngap_id); - // Still return *result - } - } - } // end if if (gNB_ue_ngap_idP > 0) - } else { // end if (h_rc == HASH_TABLE_OK) - LOG_E(NGAP, "[gNB %ld] In hashtable_get, couldn't find in initial_id2_ngap_ids ue_initial_id %"PRIu16"\n", - rrc_instance_pP - RC.nrrrc[0], - ue_initial_id); - return NULL; - /* - * At the moment this is written, this case shouldn't (cannot) happen and is equivalent to an error. - * One could try to find the struct instance based on ngap_id2_ngap_ids and gNB_ue_ngap_idP (if > 0), - * but this behavior is not expected at the moment. - */ - } // end else (h_rc != HASH_TABLE_OK) - } else { // end if (ue_initial_id != UE_INITIAL_ID_INVALID) - if (gNB_ue_ngap_idP > 0) { - h_rc = hashtable_get(rrc_instance_pP->ngap_id2_ngap_ids, (hash_key_t)gNB_ue_ngap_idP, (void **)&result); - - if (h_rc != HASH_TABLE_OK) { - /* - * This case is uncommon, but can happen when: - * -> if the first NAS message was a Detach Request (non exhaustiv), the UE RRC context exist - * but is not associated with gNB_ue_ngap_id - * -> ... (?) - */ - LOG_E(NGAP, "[gNB %ld] In hashtable_get, couldn't find in ngap_id2_ngap_ids gNB_ue_ngap_idP %"PRIu32", trying to find it through NGAP context\n", - rrc_instance_pP - RC.nrrrc[0], - gNB_ue_ngap_idP); - instance = GNB_MODULE_ID_TO_INSTANCE(rrc_instance_pP - RC.nrrrc[0]); // get gNB instance - ngap_gNB_instance_p = ngap_gNB_get_instance(instance); // get ngap_gNB_instance - - if (ngap_gNB_instance_p != NULL) { - ue_desc_p = ngap_gNB_get_ue_context(ngap_gNB_instance_p, gNB_ue_ngap_idP); // get s1ap_eNB_ue_context - } else { - LOG_E(NGAP, "[gNB instance %ld] Couldn't find the gNB NGAP context\n", - instance); - return NULL; - } - - if (ue_desc_p != NULL) { - struct ngap_gNB_ue_context_s *ngap_ue_context_p = NULL; - - if ((ngap_ue_context_p = RB_REMOVE(ngap_ue_map, &ngap_gNB_instance_p->ngap_ue_head, ue_desc_p)) != NULL) { - LOG_E(NR_RRC, "Removed UE context gNB_ue_ngap_id %u\n", ngap_ue_context_p->gNB_ue_ngap_id); - ngap_gNB_free_ue_context(ngap_ue_context_p); - } else { - LOG_E(NR_RRC, "Removing UE context gNB_ue_ngap_id %u: did not find context\n",ue_desc_p->gNB_ue_ngap_id); - } - - return NULL; //skip the operation below to avoid loop - result = rrc_gNB_NGAP_get_ue_ids(rrc_instance_pP, ue_desc_p->ue_initial_id, gNB_ue_ngap_idP); - - if (ue_desc_p->ue_initial_id != UE_INITIAL_ID_INVALID) { - result = rrc_gNB_NGAP_get_ue_ids(rrc_instance_pP, ue_desc_p->ue_initial_id, gNB_ue_ngap_idP); - - if (result != NULL) { - ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)], result->ue_rnti); - - if ((ue_context_p != NULL) && (ue_context_p->ue_context.gNB_ue_ngap_id == 0)) { - ue_context_p->ue_context.gNB_ue_ngap_id = gNB_ue_ngap_idP; - } else { - LOG_E(NR_RRC, "[gNB %ld] Incoherence between RRC context and NGAP context (%d != %d) for UE RNTI %d or UE RRC context doesn't exist\n", - rrc_instance_pP - RC.nrrrc[0], - (ue_context_p==NULL)?99999:ue_context_p->ue_context.gNB_ue_ngap_id, - gNB_ue_ngap_idP, - result->ue_rnti); - } - } - } else { - LOG_E(NGAP, "[gNB %ld] NGAP context found but ue_initial_id is invalid (0)\n", rrc_instance_pP - RC.nrrrc[0]); - return NULL; - } - } else { - LOG_E(NGAP, "[gNB %ld] In hashtable_get, couldn't find in ngap_id2_ngap_ids gNB_ue_ngap_idP %"PRIu32", because ue_initial_id is invalid in NGAP context\n", - rrc_instance_pP - RC.nrrrc[0], - gNB_ue_ngap_idP); - return NULL; - } - } // end if (h_rc != HASH_TABLE_OK) - } // end if (gNB_ue_ngap_idP > 0) - } // end else (ue_initial_id == UE_INITIAL_ID_INVALID) - - return result; -} - -//------------------------------------------------------------------------------ -struct rrc_gNB_ue_context_s * -rrc_gNB_get_ue_context_from_ngap_ids( - const instance_t instanceP, - const uint16_t ue_initial_idP, - const uint32_t gNB_ue_ngap_idP -) -//------------------------------------------------------------------------------ -{ - rrc_ue_ngap_ids_t *temp = NULL; - temp = rrc_gNB_NGAP_get_ue_ids(RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instanceP)], ue_initial_idP, gNB_ue_ngap_idP); - - if (temp != NULL) { - return rrc_gNB_get_ue_context(RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instanceP)], temp->ue_rnti); - } - - return NULL; -} +static int rrc_gNB_process_security(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_context_t *const ue_context_pP, ngap_security_capabilities_t *security_capabilities_pP); /*! \fn void process_gNB_security_key (const protocol_ctxt_t* const ctxt_pP, eNB_RRC_UE_t * const ue_context_pP, uint8_t *security_key) *\brief save security key. @@ -277,17 +99,19 @@ void process_gNB_security_key ( { char ascii_buffer[65]; uint8_t i; + gNB_RRC_UE_t *UE = &ue_context_pP->ue_context; + /* Saves the security key */ - memcpy (ue_context_pP->ue_context.kgnb, security_key_pP, SECURITY_KEY_LENGTH); - memset (ue_context_pP->ue_context.nh, 0, SECURITY_KEY_LENGTH); - ue_context_pP->ue_context.nh_ncc = -1; + memcpy(UE->kgnb, security_key_pP, SECURITY_KEY_LENGTH); + memset(UE->nh, 0, SECURITY_KEY_LENGTH); + UE->nh_ncc = -1; for (i = 0; i < 32; i++) { - sprintf(&ascii_buffer[2 * i], "%02X", ue_context_pP->ue_context.kgnb[i]); + sprintf(&ascii_buffer[2 * i], "%02X", UE->kgnb[i]); } ascii_buffer[2 * i] = '\0'; - LOG_I(NR_RRC, "[gNB %d][UE %x] Saved security key %s\n", ctxt_pP->module_id, ue_context_pP->ue_context.rnti, ascii_buffer); + LOG_I(NR_RRC, "[gNB %d][UE %x] Saved security key %s\n", ctxt_pP->module_id, UE->rnti, ascii_buffer); } //------------------------------------------------------------------------------ @@ -306,20 +130,15 @@ nr_rrc_pdcp_config_security( uint8_t *kUPenc = NULL; //uint8_t *k_kdf = NULL; static int print_keys= 1; + gNB_RRC_UE_t *UE = &ue_context_pP->ue_context; /* Derive the keys from kgnb */ - if (SRB_configList != NULL) { - nr_derive_key_up_enc(ue_context_pP->ue_context.ciphering_algorithm, - ue_context_pP->ue_context.kgnb, - &kUPenc); + if (UE->Srb[1].Active || UE->Srb[2].Active) { + nr_derive_key_up_enc(UE->ciphering_algorithm, UE->kgnb, &kUPenc); } - nr_derive_key_rrc_enc(ue_context_pP->ue_context.ciphering_algorithm, - ue_context_pP->ue_context.kgnb, - &kRRCenc); - nr_derive_key_rrc_int(ue_context_pP->ue_context.integrity_algorithm, - ue_context_pP->ue_context.kgnb, - &kRRCint); + nr_derive_key_rrc_enc(UE->ciphering_algorithm, UE->kgnb, &kRRCenc); + nr_derive_key_rrc_int(UE->integrity_algorithm, UE->kgnb, &kRRCint); if (!IS_SOFTMODEM_IQPLAYER) { SET_LOG_DUMP(DEBUG_SECURITY) ; } @@ -328,25 +147,20 @@ nr_rrc_pdcp_config_security( if ( LOG_DUMPFLAG( DEBUG_SECURITY ) ) { if (print_keys == 1 ) { print_keys =0; - LOG_DUMPMSG(NR_RRC, DEBUG_SECURITY, ue_context_pP->ue_context.kgnb, 32,"\nKgNB:" ); + LOG_DUMPMSG(NR_RRC, DEBUG_SECURITY, UE->kgnb, 32, "\nKgNB:"); LOG_DUMPMSG(NR_RRC, DEBUG_SECURITY, kRRCenc, 16,"\nKRRCenc:" ); LOG_DUMPMSG(NR_RRC, DEBUG_SECURITY, kRRCint, 16,"\nKRRCint:" ); } } - pdcp_config_set_security( - ctxt_pP, - NULL, /* pdcp_pP not used anymore in NR */ - DCCH, - DCCH+2, - enable_ciphering ? - ue_context_pP->ue_context.ciphering_algorithm - | (ue_context_pP->ue_context.integrity_algorithm << 4) - : 0 - | (ue_context_pP->ue_context.integrity_algorithm << 4), - kRRCenc, - kRRCint, - kUPenc); + pdcp_config_set_security(ctxt_pP, + NULL, /* pdcp_pP not used anymore in NR */ + DCCH, + DCCH + 2, + enable_ciphering ? UE->ciphering_algorithm | (UE->integrity_algorithm << 4) : 0 | (UE->integrity_algorithm << 4), + kRRCenc, + kRRCint, + kUPenc); } //------------------------------------------------------------------------------ @@ -363,75 +177,51 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ( { // gNB_RRC_INST *rrc = RC.nrrrc[ctxt_pP->module_id]; MessageDef *message_p = NULL; - rrc_ue_ngap_ids_t *rrc_ue_ngap_ids_p = NULL; - hashtable_rc_t h_rc; + gNB_RRC_UE_t *UE = &ue_context_pP->ue_context; message_p = itti_alloc_new_message(TASK_RRC_GNB, 0, NGAP_NAS_FIRST_REQ); - memset(&message_p->ittiMsg.ngap_nas_first_req, 0, sizeof(ngap_nas_first_req_t)); - ue_context_pP->ue_context.ue_initial_id = get_next_ue_initial_id(ctxt_pP->module_id); - NGAP_NAS_FIRST_REQ(message_p).ue_initial_id = ue_context_pP->ue_context.ue_initial_id; - rrc_ue_ngap_ids_p = malloc(sizeof(rrc_ue_ngap_ids_t)); - rrc_ue_ngap_ids_p->ue_initial_id = ue_context_pP->ue_context.ue_initial_id; - rrc_ue_ngap_ids_p->gNB_ue_ngap_id = UE_INITIAL_ID_INVALID; - rrc_ue_ngap_ids_p->ue_rnti = ctxt_pP->rntiMaybeUEid; + ngap_nas_first_req_t *req = &NGAP_NAS_FIRST_REQ(message_p); + memset(req, 0, sizeof(*req)); - h_rc = hashtable_insert(RC.nrrrc[ctxt_pP->module_id]->initial_id2_ngap_ids, - (hash_key_t)ue_context_pP->ue_context.ue_initial_id, - rrc_ue_ngap_ids_p); - - if (h_rc != HASH_TABLE_OK) { - LOG_E(NGAP, "[gNB %d] Error while hashtable_insert in initial_id2_ngap_ids ue_initial_id %u\n", - ctxt_pP->module_id, - ue_context_pP->ue_context.ue_initial_id); - } + req->gNB_ue_ngap_id = UE->gNB_ue_ngap_id; /* Assume that cause is coded in the same way in RRC and NGap, just check that the value is in NGap range */ - AssertFatal(ue_context_pP->ue_context.establishment_cause < NGAP_RRC_CAUSE_LAST, - "Establishment cause invalid (%jd/%d) for gNB %d!", - ue_context_pP->ue_context.establishment_cause, - NGAP_RRC_CAUSE_LAST, - ctxt_pP->module_id); - NGAP_NAS_FIRST_REQ(message_p).establishment_cause = ue_context_pP->ue_context.establishment_cause; - + AssertFatal(UE->establishment_cause < NGAP_RRC_CAUSE_LAST, "Establishment cause invalid (%jd/%d) for gNB %d!", UE->establishment_cause, NGAP_RRC_CAUSE_LAST, ctxt_pP->module_id); + req->establishment_cause = UE->establishment_cause; + /* Forward NAS message */ - NGAP_NAS_FIRST_REQ(message_p).nas_pdu.buffer = rrcSetupComplete->dedicatedNAS_Message.buf; - NGAP_NAS_FIRST_REQ(message_p).nas_pdu.length = rrcSetupComplete->dedicatedNAS_Message.size; + req->nas_pdu.buffer = rrcSetupComplete->dedicatedNAS_Message.buf; + req->nas_pdu.length = rrcSetupComplete->dedicatedNAS_Message.size; // extract_imsi(NGAP_NAS_FIRST_REQ (message_p).nas_pdu.buffer, // NGAP_NAS_FIRST_REQ (message_p).nas_pdu.length, // ue_context_pP); /* Fill UE identities with available information */ - NGAP_NAS_FIRST_REQ(message_p).ue_identity.presenceMask = NGAP_UE_IDENTITIES_NONE; + req->ue_identity.presenceMask = NGAP_UE_IDENTITIES_NONE; /* Fill s-TMSI */ - NGAP_NAS_FIRST_REQ(message_p).ue_identity.s_tmsi.amf_set_id = ue_context_pP->ue_context.Initialue_identity_5g_s_TMSI.amf_set_id; - NGAP_NAS_FIRST_REQ(message_p).ue_identity.s_tmsi.amf_pointer = ue_context_pP->ue_context.Initialue_identity_5g_s_TMSI.amf_pointer; - NGAP_NAS_FIRST_REQ(message_p).ue_identity.s_tmsi.m_tmsi = ue_context_pP->ue_context.Initialue_identity_5g_s_TMSI.fiveg_tmsi; + req->ue_identity.s_tmsi.amf_set_id = UE->Initialue_identity_5g_s_TMSI.amf_set_id; + req->ue_identity.s_tmsi.amf_pointer = UE->Initialue_identity_5g_s_TMSI.amf_pointer; + req->ue_identity.s_tmsi.m_tmsi = UE->Initialue_identity_5g_s_TMSI.fiveg_tmsi; /* selected_plmn_identity: IE is 1-based, convert to 0-based (C array) */ int selected_plmn_identity = rrcSetupComplete->selectedPLMN_Identity - 1; - NGAP_NAS_FIRST_REQ(message_p).selected_plmn_identity = selected_plmn_identity; + req->selected_plmn_identity = selected_plmn_identity; if (rrcSetupComplete->registeredAMF != NULL) { NR_RegisteredAMF_t *r_amf = rrcSetupComplete->registeredAMF; - NGAP_NAS_FIRST_REQ(message_p).ue_identity.presenceMask |= NGAP_UE_IDENTITIES_guami; + req->ue_identity.presenceMask |= NGAP_UE_IDENTITIES_guami; if (r_amf->plmn_Identity != NULL) { if ((r_amf->plmn_Identity->mcc != NULL) && (r_amf->plmn_Identity->mcc->list.count > 0)) { /* Use first indicated PLMN MCC if it is defined */ - NGAP_NAS_FIRST_REQ(message_p).ue_identity.guami.mcc = *r_amf->plmn_Identity->mcc->list.array[selected_plmn_identity]; - LOG_I(NGAP, "[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUMMEI MCC %u ue %x\n", - ctxt_pP->module_id, - NGAP_NAS_FIRST_REQ (message_p).ue_identity.guami.mcc, - ue_context_pP->ue_context.rnti); + req->ue_identity.guami.mcc = *r_amf->plmn_Identity->mcc->list.array[selected_plmn_identity]; + LOG_I(NGAP, "[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUMMEI MCC %u ue %x\n", ctxt_pP->module_id, req->ue_identity.guami.mcc, UE->rnti); } if (r_amf->plmn_Identity->mnc.list.count > 0) { /* Use first indicated PLMN MNC if it is defined */ - NGAP_NAS_FIRST_REQ(message_p).ue_identity.guami.mnc = *r_amf->plmn_Identity->mnc.list.array[selected_plmn_identity]; - LOG_I(NGAP, "[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUMMEI MNC %u ue %x\n", - ctxt_pP->module_id, - NGAP_NAS_FIRST_REQ (message_p).ue_identity.guami.mnc, - ue_context_pP->ue_context.rnti); + req->ue_identity.guami.mnc = *r_amf->plmn_Identity->mnc.list.array[selected_plmn_identity]; + LOG_I(NGAP, "[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUMMEI MNC %u ue %x\n", ctxt_pP->module_id, req->ue_identity.guami.mnc, UE->rnti); } } else { /* TODO */ @@ -439,192 +229,248 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ( /* amf_Identifier */ uint32_t amf_Id = BIT_STRING_to_uint32(&r_amf->amf_Identifier); - NGAP_NAS_FIRST_REQ(message_p).ue_identity.guami.amf_region_id = amf_Id >> 16; - NGAP_NAS_FIRST_REQ(message_p).ue_identity.guami.amf_set_id = ue_context_pP->ue_context.Initialue_identity_5g_s_TMSI.amf_set_id; - NGAP_NAS_FIRST_REQ(message_p).ue_identity.guami.amf_pointer = ue_context_pP->ue_context.Initialue_identity_5g_s_TMSI.amf_pointer; + req->ue_identity.guami.amf_region_id = amf_Id >> 16; + req->ue_identity.guami.amf_set_id = UE->Initialue_identity_5g_s_TMSI.amf_set_id; + req->ue_identity.guami.amf_pointer = UE->Initialue_identity_5g_s_TMSI.amf_pointer; - ue_context_pP->ue_context.ue_guami.mcc = NGAP_NAS_FIRST_REQ(message_p).ue_identity.guami.mcc; - ue_context_pP->ue_context.ue_guami.mnc = NGAP_NAS_FIRST_REQ(message_p).ue_identity.guami.mnc; - ue_context_pP->ue_context.ue_guami.mnc_len = NGAP_NAS_FIRST_REQ(message_p).ue_identity.guami.mnc_len; - ue_context_pP->ue_context.ue_guami.amf_region_id = NGAP_NAS_FIRST_REQ(message_p).ue_identity.guami.amf_region_id; - ue_context_pP->ue_context.ue_guami.amf_set_id = NGAP_NAS_FIRST_REQ(message_p).ue_identity.guami.amf_set_id; - ue_context_pP->ue_context.ue_guami.amf_pointer = NGAP_NAS_FIRST_REQ(message_p).ue_identity.guami.amf_pointer; + // fixme: illogical place to set UE values, should be in the function that call this one + UE->ue_guami.mcc = req->ue_identity.guami.mcc; + UE->ue_guami.mnc = req->ue_identity.guami.mnc; + UE->ue_guami.mnc_len = req->ue_identity.guami.mnc_len; + UE->ue_guami.amf_region_id = req->ue_identity.guami.amf_region_id; + UE->ue_guami.amf_set_id = req->ue_identity.guami.amf_set_id; + UE->ue_guami.amf_pointer = req->ue_identity.guami.amf_pointer; - LOG_I(NGAP, "[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUAMI amf_set_id %u amf_region_id %u ue %x\n", + LOG_I(NGAP, + "[gNB %d] Build NGAP_NAS_FIRST_REQ adding in s_TMSI: GUAMI amf_set_id %u amf_region_id %u ue %x\n", ctxt_pP->module_id, - NGAP_NAS_FIRST_REQ (message_p).ue_identity.guami.amf_set_id, - NGAP_NAS_FIRST_REQ (message_p).ue_identity.guami.amf_region_id, - ue_context_pP->ue_context.rnti); + req->ue_identity.guami.amf_set_id, + req->ue_identity.guami.amf_region_id, + UE->rnti); } itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, message_p); } -//------------------------------------------------------------------------------ -int -rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ( - MessageDef *msg_p, - const char *msg_name, - instance_t instance -) -//------------------------------------------------------------------------------ +static void fill_qos(NGAP_QosFlowSetupRequestList_t *qos, pdusession_t *session) { - uint16_t ue_initial_id; - uint32_t gNB_ue_ngap_id; - rrc_gNB_ue_context_t *ue_context_p = NULL; - protocol_ctxt_t ctxt={0}; - uint8_t pdu_sessions_done = 0; - gtpv1u_gnb_create_tunnel_resp_t create_tunnel_resp; - int ret = 0; - - ue_initial_id = NGAP_INITIAL_CONTEXT_SETUP_REQ(msg_p).ue_initial_id; - gNB_ue_ngap_id = NGAP_INITIAL_CONTEXT_SETUP_REQ(msg_p).gNB_ue_ngap_id; - - ue_context_p = rrc_gNB_get_ue_context_from_ngap_ids(instance, ue_initial_id, gNB_ue_ngap_id); - LOG_I(NR_RRC, "[gNB %ld] Received %s: ue_initial_id %d, gNB_ue_ngap_id %u \n", - instance, msg_name, ue_initial_id, gNB_ue_ngap_id); - - if (ue_context_p == NULL) { - /* Can not associate this message to an UE index, send a failure to NGAP and discard it! */ - MessageDef *msg_fail_p = NULL; - LOG_W(NR_RRC, "[gNB %ld] In NGAP_INITIAL_CONTEXT_SETUP_REQ: unknown UE from NGAP ids (%d, %u)\n", instance, ue_initial_id, gNB_ue_ngap_id); - msg_fail_p = itti_alloc_new_message (TASK_RRC_GNB, 0, NGAP_INITIAL_CONTEXT_SETUP_FAIL); - NGAP_INITIAL_CONTEXT_SETUP_FAIL (msg_fail_p).gNB_ue_ngap_id = gNB_ue_ngap_id; - // TODO add failure cause when defined! - itti_send_msg_to_task (TASK_NGAP, instance, msg_fail_p); - return (-1); - } else { - PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0); - gNB_RRC_INST *rrc = RC.nrrrc[ctxt.module_id]; - ue_context_p->ue_context.gNB_ue_ngap_id = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).gNB_ue_ngap_id; - ue_context_p->ue_context.amf_ue_ngap_id = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).amf_ue_ngap_id; - ue_context_p->ue_context.nas_pdu_flag = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).nas_pdu_flag; - - uint8_t nb_pdusessions_tosetup = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).nb_of_pdusessions; - if (nb_pdusessions_tosetup != 0) { - AssertFatal(rrc->node_type != ngran_gNB_CUCP, "PDU sessions in Initial context setup request not handled by E1 yet\n"); - gtpv1u_gnb_create_tunnel_req_t create_tunnel_req={0}; - for (int i = 0; i < NR_NB_RB_MAX - 3; i++) { - if(ue_context_p->ue_context.pduSession[i].status >= PDU_SESSION_STATUS_DONE) - continue; - ue_context_p->ue_context.pduSession[i].status = PDU_SESSION_STATUS_NEW; - ue_context_p->ue_context.pduSession[i].param = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).pdusession_param[pdu_sessions_done]; - create_tunnel_req.pdusession_id[pdu_sessions_done] = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).pdusession_param[pdu_sessions_done].pdusession_id; - create_tunnel_req.incoming_rb_id[pdu_sessions_done] = i+1; - create_tunnel_req.outgoing_teid[pdu_sessions_done] = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).pdusession_param[pdu_sessions_done].gtp_teid; - // To be developped: hardcoded first flow - create_tunnel_req.outgoing_qfi[pdu_sessions_done] = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).pdusession_param[pdu_sessions_done].qos[0].qfi; - create_tunnel_req.dst_addr[pdu_sessions_done].length = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).pdusession_param[pdu_sessions_done].upf_addr.length; - memcpy(create_tunnel_req.dst_addr[pdu_sessions_done].buffer, - NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).pdusession_param[pdu_sessions_done].upf_addr.buffer, - sizeof(uint8_t)*20); - LOG_I(NR_RRC, "PDUSESSION SETUP: local index %d teid %u, pdusession id %d \n", - i, - create_tunnel_req.outgoing_teid[pdu_sessions_done], - create_tunnel_req.pdusession_id[pdu_sessions_done]); - pdu_sessions_done++; - - if(pdu_sessions_done >= nb_pdusessions_tosetup) { - break; - } - } - - ue_context_p->ue_context.nb_of_pdusessions = NGAP_INITIAL_CONTEXT_SETUP_REQ (msg_p).nb_of_pdusessions; - create_tunnel_req.ue_id = ue_context_p->ue_context.rnti; - create_tunnel_req.num_tunnels = pdu_sessions_done; - - ret = gtpv1u_create_ngu_tunnel( - instance, - &create_tunnel_req, - &create_tunnel_resp); - if (ret != 0) { - LOG_E(NR_RRC,"rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ : gtpv1u_create_ngu_tunnel failed,start to release UE %x\n",ue_context_p->ue_context.rnti); - ue_context_p->ue_context.ue_release_timer_ng = 1; - ue_context_p->ue_context.ue_release_timer_thres_ng = 100; - ue_context_p->ue_context.ue_release_timer = 0; - ue_context_p->ue_context.ue_reestablishment_timer = 0; - ue_context_p->ue_context.ul_failure_timer = 20000; - ue_context_p->ue_context.ul_failure_timer = 0; - return (0); - } - - nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(&ctxt, &create_tunnel_resp, 0); - ue_context_p->ue_context.nb_of_pdusessions += NGAP_INITIAL_CONTEXT_SETUP_REQ(msg_p).nb_of_pdusessions; - ue_context_p->ue_context.established_pdu_sessions_flag = 1; + DevAssert(qos->list.count > 0); + DevAssert(qos->list.count <= NGAP_maxnoofQosFlows); + for (int qosIdx = 0; qosIdx < qos->list.count; qosIdx++) { + NGAP_QosFlowSetupRequestItem_t *qosFlowItem_p = qos->list.array[qosIdx]; + // Set the QOS informations + session->qos[qosIdx].qfi = (uint8_t)qosFlowItem_p->qosFlowIdentifier; + NGAP_QosCharacteristics_t *qosChar = &qosFlowItem_p->qosFlowLevelQosParameters.qosCharacteristics; + if (qosChar->present == NGAP_QosCharacteristics_PR_nonDynamic5QI) { + if (qosChar->choice.nonDynamic5QI != NULL) { + session->qos[qosIdx].fiveQI = (uint64_t)qosChar->choice.nonDynamic5QI->fiveQI; } - - /* NAS PDU */ - if (NGAP_INITIAL_CONTEXT_SETUP_REQ(msg_p).nas_pdu_flag == 1) { - ue_context_p->ue_context.nas_pdu_flag = NGAP_INITIAL_CONTEXT_SETUP_REQ(msg_p).nas_pdu_flag; - ue_context_p->ue_context.nas_pdu.length = NGAP_INITIAL_CONTEXT_SETUP_REQ(msg_p).nas_pdu.length; - ue_context_p->ue_context.nas_pdu.buffer = NGAP_INITIAL_CONTEXT_SETUP_REQ(msg_p).nas_pdu.buffer; - } - - /* security */ - rrc_gNB_process_security(&ctxt, ue_context_p, &(NGAP_INITIAL_CONTEXT_SETUP_REQ(msg_p).security_capabilities)); - process_gNB_security_key ( - &ctxt, - ue_context_p, - NGAP_INITIAL_CONTEXT_SETUP_REQ(msg_p).security_key); - - /* configure only integrity, ciphering comes after receiving SecurityModeComplete */ - nr_rrc_pdcp_config_security(&ctxt, ue_context_p, 0); - - rrc_gNB_generate_SecurityModeCommand (&ctxt, ue_context_p); - - // in case, send the S1SP initial context response if it is not sent with the attach complete message - if (ue_context_p->ue_context.StatusRrc == NR_RRC_RECONFIGURED) { - LOG_I(NR_RRC, "Sending rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP, cause %ld\n", ue_context_p->ue_context.reestablishment_cause); - rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(&ctxt,ue_context_p); } - return 0; + ngap_allocation_retention_priority_t *tmp = &session->qos[qosIdx].allocation_retention_priority; + NGAP_AllocationAndRetentionPriority_t *tmp2 = &qosFlowItem_p->qosFlowLevelQosParameters.allocationAndRetentionPriority; + tmp->priority_level = tmp2->priorityLevelARP; + tmp->pre_emp_capability = tmp2->pre_emptionCapability; + tmp->pre_emp_vulnerability = tmp2->pre_emptionVulnerability; } + session->nb_qos = qos->list.count; +} + +static int decodePDUSessionResourceSetup(pdusession_t *session) +{ + NGAP_PDUSessionResourceSetupRequestTransfer_t *pdusessionTransfer; + for (int i=0; ipdusessionTransfer.length; i++) + printf("%02x:",session->pdusessionTransfer.buffer[i]); + printf("\n"); + asn_codec_ctx_t st = {.max_stack_size = 100 * 1000}; + asn_dec_rval_t dec_rval = + aper_decode(&st, &asn_DEF_NGAP_PDUSessionResourceSetupRequestTransfer, (void **)&pdusessionTransfer, session->pdusessionTransfer.buffer, session->pdusessionTransfer.length, 0, 0); + + if (dec_rval.code != RC_OK) { + LOG_E(NR_RRC, "can not decode PDUSessionResourceSetupRequestTransfer\n"); + return -1; + } + + for (int i = 0; i < pdusessionTransfer->protocolIEs.list.count; i++) { + NGAP_PDUSessionResourceSetupRequestTransferIEs_t *pdusessionTransfer_ies = pdusessionTransfer->protocolIEs.list.array[i]; + switch (pdusessionTransfer_ies->id) { + /* optional PDUSessionAggregateMaximumBitRate */ + case NGAP_ProtocolIE_ID_id_PDUSessionAggregateMaximumBitRate: + break; + + /* mandatory UL-NGU-UP-TNLInformation */ + case NGAP_ProtocolIE_ID_id_UL_NGU_UP_TNLInformation: { + NGAP_GTPTunnel_t *gTPTunnel_p = pdusessionTransfer_ies->value.choice.UPTransportLayerInformation.choice.gTPTunnel; + + /* Set the transport layer address */ + memcpy(session->upf_addr.buffer, gTPTunnel_p->transportLayerAddress.buf, gTPTunnel_p->transportLayerAddress.size); + + session->upf_addr.length = gTPTunnel_p->transportLayerAddress.size * 8 - gTPTunnel_p->transportLayerAddress.bits_unused; + + /* GTP tunnel endpoint ID */ + OCTET_STRING_TO_INT32(&gTPTunnel_p->gTP_TEID, session->gtp_teid); + } + + break; + + /* optional AdditionalUL-NGU-UP-TNLInformation */ + case NGAP_ProtocolIE_ID_id_AdditionalUL_NGU_UP_TNLInformation: + break; + + /* optional DataForwardingNotPossible */ + case NGAP_ProtocolIE_ID_id_DataForwardingNotPossible: + break; + + /* mandatory PDUSessionType */ + case NGAP_ProtocolIE_ID_id_PDUSessionType: + session->upf_addr.pdu_session_type = (uint8_t)pdusessionTransfer_ies->value.choice.PDUSessionType; + break; + + /* optional SecurityIndication */ + case NGAP_ProtocolIE_ID_id_SecurityIndication: + break; + + /* optional NetworkInstance */ + case NGAP_ProtocolIE_ID_id_NetworkInstance: + break; + + /* mandatory QosFlowSetupRequestList */ + case NGAP_ProtocolIE_ID_id_QosFlowSetupRequestList: + fill_qos(&pdusessionTransfer_ies->value.choice.QosFlowSetupRequestList, session); + break; + + /* optional CommonNetworkInstance */ + case NGAP_ProtocolIE_ID_id_CommonNetworkInstance: + break; + + default: + LOG_E(NR_RRC, "could not found protocolIEs id %ld\n", pdusessionTransfer_ies->id); + return -1; + } + } + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_PDUSessionResourceSetupRequestTransfer,pdusessionTransfer ); + + return 0; } //------------------------------------------------------------------------------ -void -rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP( - const protocol_ctxt_t *const ctxt_pP, - rrc_gNB_ue_context_t *const ue_context_pP -) +int rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, instance_t instance) //------------------------------------------------------------------------------ { - MessageDef *msg_p = NULL; - int pdusession; + protocol_ctxt_t ctxt = {0}; + ngap_initial_context_setup_req_t *req = &NGAP_INITIAL_CONTEXT_SETUP_REQ(msg_p); + + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[instance], req->gNB_ue_ngap_id); + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; + + if (ue_context_p == NULL) { + /* Can not associate this message to an UE index, send a failure to NGAP and discard it! */ + MessageDef *msg_fail_p = NULL; + LOG_W(NR_RRC, "[gNB %ld] In NGAP_INITIAL_CONTEXT_SETUP_REQ: unknown UE from NGAP ids (%u)\n", instance, req->gNB_ue_ngap_id); + msg_fail_p = itti_alloc_new_message(TASK_RRC_GNB, 0, NGAP_INITIAL_CONTEXT_SETUP_FAIL); + NGAP_INITIAL_CONTEXT_SETUP_FAIL(msg_fail_p).gNB_ue_ngap_id = req->gNB_ue_ngap_id; + // TODO add failure cause when defined! + itti_send_msg_to_task(TASK_NGAP, instance, msg_fail_p); + return (-1); + } + PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, UE->rnti, 0, 0); + UE->amf_ue_ngap_id = req->amf_ue_ngap_id; + uint8_t nb_pdusessions_tosetup = req->nb_of_pdusessions; + if (nb_pdusessions_tosetup) { + AssertFatal(false, "PDU sessions in Initial context setup request not handled by E1 yet\n"); + gtpv1u_gnb_create_tunnel_req_t create_tunnel_req = {0}; + for (int i = 0; i < nb_pdusessions_tosetup; i++) { + UE->nb_of_pdusessions++; + if(UE->pduSession[i].status >= PDU_SESSION_STATUS_DONE) + continue; + UE->pduSession[i].status = PDU_SESSION_STATUS_NEW; + UE->pduSession[i].param = req->pdusession_param[i]; + create_tunnel_req.num_tunnels++; + create_tunnel_req.pdusession_id[i] = req->pdusession_param[i].pdusession_id; + create_tunnel_req.outgoing_teid[i] = req->pdusession_param[i].gtp_teid; + // To be developped: hardcoded first flow + create_tunnel_req.outgoing_qfi[i] = req->pdusession_param[i].qos[0].qfi; + create_tunnel_req.dst_addr[i].length = req->pdusession_param[i].upf_addr.length; + memcpy(create_tunnel_req.dst_addr[i].buffer, req->pdusession_param[i].upf_addr.buffer, sizeof(create_tunnel_req.dst_addr[i].buffer)); + LOG_I(NR_RRC, "PDUSESSION SETUP: local index %d teid %u, pdusession id %d \n", i, create_tunnel_req.outgoing_teid[i], create_tunnel_req.pdusession_id[i]); + } + create_tunnel_req.ue_id = UE->rnti; + gtpv1u_gnb_create_tunnel_resp_t create_tunnel_resp = {0}; + int ret = gtpv1u_create_ngu_tunnel(instance, &create_tunnel_req, &create_tunnel_resp); + if (ret != 0) { + LOG_E(NR_RRC, "rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ : gtpv1u_create_ngu_tunnel failed,start to release UE %x\n", UE->rnti); + UE->ue_release_timer_ng = 1; + UE->ue_release_timer_thres_ng = 100; + UE->ue_release_timer = 0; + UE->ue_reestablishment_timer = 0; + UE->ul_failure_timer = 20000; + UE->ul_failure_timer = 0; + return (0); + } + + nr_rrc_gNB_process_GTPV1U_CREATE_TUNNEL_RESP(&ctxt, &create_tunnel_resp, 0); + UE->established_pdu_sessions_flag = 1; + } + + /* NAS PDU */ + // this is malloced pointers, we pass it for later free() + UE->nas_pdu = req->nas_pdu; + + /* security */ + rrc_gNB_process_security(&ctxt, ue_context_p, &req->security_capabilities); + process_gNB_security_key(&ctxt, ue_context_p, req->security_key); + + /* configure only integrity, ciphering comes after receiving SecurityModeComplete */ + nr_rrc_pdcp_config_security(&ctxt, ue_context_p, 0); + + rrc_gNB_generate_SecurityModeCommand(&ctxt, ue_context_p); + + // in case, send the S1SP initial context response if it is not sent with the attach complete message + if (UE->StatusRrc == NR_RRC_RECONFIGURED) { + LOG_I(NR_RRC, "Sending rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP, cause %ld\n", UE->reestablishment_cause); + rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(&ctxt, ue_context_p); + } + + return 0; +} + +//------------------------------------------------------------------------------ +void rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_context_t *const ue_context_pP) +//------------------------------------------------------------------------------ +{ + MessageDef *msg_p = NULL; int pdu_sessions_done = 0; int pdu_sessions_failed = 0; - int qos_flow_index = 0; msg_p = itti_alloc_new_message (TASK_RRC_ENB, 0, NGAP_INITIAL_CONTEXT_SETUP_RESP); - NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).gNB_ue_ngap_id = ue_context_pP->ue_context.gNB_ue_ngap_id; + ngap_initial_context_setup_resp_t *resp = &NGAP_INITIAL_CONTEXT_SETUP_RESP(msg_p); + gNB_RRC_UE_t *UE = &ue_context_pP->ue_context; - for (pdusession = 0; pdusession < ue_context_pP->ue_context.nb_of_pdusessions; pdusession++) { - if (ue_context_pP->ue_context.pduSession[pdusession].status == PDU_SESSION_STATUS_DONE) { + resp->gNB_ue_ngap_id = UE->gNB_ue_ngap_id; + + for (int pdusession = 0; pdusession < UE->nb_of_pdusessions; pdusession++) { + rrc_pdu_session_param_t *session = &UE->pduSession[pdusession]; + if (session->status == PDU_SESSION_STATUS_DONE) { pdu_sessions_done++; - NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions[pdusession].pdusession_id = ue_context_pP->ue_context.pduSession[pdusession].param.pdusession_id; - // TODO add other information from S1-U when it will be integrated - NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions[pdusession].gtp_teid = ue_context_pP->ue_context.gnb_gtp_teid[pdusession]; - memcpy(NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions[pdusession].gNB_addr.buffer , ue_context_pP->ue_context.gnb_gtp_addrs[pdusession].buffer, 20); - NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions[pdusession].gNB_addr.length = 4; - ue_context_pP->ue_context.pduSession[pdusession].status = PDU_SESSION_STATUS_ESTABLISHED; - NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions[pdusession].nb_of_qos_flow = ue_context_pP->ue_context.pduSession[pdusession].param.nb_qos; - for (qos_flow_index = 0; qos_flow_index < ue_context_pP->ue_context.pduSession[pdusession].param.nb_qos; qos_flow_index++) { - NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions[pdusession].associated_qos_flows[qos_flow_index].qfi = - ue_context_pP->ue_context.pduSession[pdusession].param.qos[qos_flow_index].qfi; - NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions[pdusession].associated_qos_flows[qos_flow_index].qos_flow_mapping_ind = QOSFLOW_MAPPING_INDICATION_DL; + resp->pdusessions[pdusession].pdusession_id = session->param.pdusession_id; + resp->pdusessions[pdusession].gtp_teid = UE->gnb_gtp_teid[pdusession]; + memcpy(resp->pdusessions[pdusession].gNB_addr.buffer, UE->gnb_gtp_addrs[pdusession].buffer, 20); + resp->pdusessions[pdusession].gNB_addr.length = 4; + resp->pdusessions[pdusession].nb_of_qos_flow = session->param.nb_qos; + for (int qos_flow_index = 0; qos_flow_index < session->param.nb_qos; qos_flow_index++) { + resp->pdusessions[pdusession].associated_qos_flows[qos_flow_index].qfi = session->param.qos[qos_flow_index].qfi; + resp->pdusessions[pdusession].associated_qos_flows[qos_flow_index].qos_flow_mapping_ind = QOSFLOW_MAPPING_INDICATION_DL; } } else { pdu_sessions_failed++; - ue_context_pP->ue_context.pduSession[pdusession].status = PDU_SESSION_STATUS_FAILED; - NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions_failed[pdusession].pdusession_id = ue_context_pP->ue_context.pduSession[pdusession].param.pdusession_id; + resp->pdusessions_failed[pdusession].pdusession_id = session->param.pdusession_id; // TODO add cause when it will be integrated - NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions_failed[pdusession].cause = NGAP_Cause_PR_radioNetwork; - NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).pdusessions_failed[pdusession].cause_value = NGAP_CauseRadioNetwork_unknown_PDU_session_ID; + resp->pdusessions_failed[pdusession].cause = NGAP_CAUSE_RADIO_NETWORK; + resp->pdusessions_failed[pdusession].cause_value = NGAP_CauseRadioNetwork_unknown_PDU_session_ID; } } - NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).nb_of_pdusessions = pdu_sessions_done; - NGAP_INITIAL_CONTEXT_SETUP_RESP (msg_p).nb_of_pdusessions_failed = pdu_sessions_failed; + resp->nb_of_pdusessions = pdu_sessions_done; + resp->nb_of_pdusessions_failed = pdu_sessions_failed; itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, msg_p); } @@ -700,145 +546,87 @@ static e_NR_IntegrityProtAlgorithm rrc_gNB_select_integrity( return ret; } -int -rrc_gNB_process_security( - const protocol_ctxt_t *const ctxt_pP, - rrc_gNB_ue_context_t *const ue_context_pP, - ngap_security_capabilities_t *security_capabilities_pP -) { +static int rrc_gNB_process_security(const protocol_ctxt_t *const ctxt_pP, rrc_gNB_ue_context_t *const ue_context_pP, ngap_security_capabilities_t *security_capabilities_pP) +{ bool changed = false; NR_CipheringAlgorithm_t cipheringAlgorithm; e_NR_IntegrityProtAlgorithm integrityProtAlgorithm; + gNB_RRC_UE_t *UE = &ue_context_pP->ue_context; + /* Save security parameters */ - ue_context_pP->ue_context.security_capabilities = *security_capabilities_pP; + UE->security_capabilities = *security_capabilities_pP; // translation LOG_D(NR_RRC, "[gNB %d] NAS security_capabilities.encryption_algorithms %u AS ciphering_algorithm %lu NAS security_capabilities.integrity_algorithms %u AS integrity_algorithm %u\n", ctxt_pP->module_id, - ue_context_pP->ue_context.security_capabilities.nRencryption_algorithms, - (unsigned long)ue_context_pP->ue_context.ciphering_algorithm, - ue_context_pP->ue_context.security_capabilities.nRintegrity_algorithms, - ue_context_pP->ue_context.integrity_algorithm); + UE->security_capabilities.nRencryption_algorithms, + (unsigned long)UE->ciphering_algorithm, + UE->security_capabilities.nRintegrity_algorithms, + UE->integrity_algorithm); /* Select relevant algorithms */ - cipheringAlgorithm = rrc_gNB_select_ciphering(ctxt_pP, ue_context_pP->ue_context.security_capabilities.nRencryption_algorithms); + cipheringAlgorithm = rrc_gNB_select_ciphering(ctxt_pP, UE->security_capabilities.nRencryption_algorithms); - if (ue_context_pP->ue_context.ciphering_algorithm != cipheringAlgorithm) { - ue_context_pP->ue_context.ciphering_algorithm = cipheringAlgorithm; + if (UE->ciphering_algorithm != cipheringAlgorithm) { + UE->ciphering_algorithm = cipheringAlgorithm; changed = true; } - integrityProtAlgorithm = rrc_gNB_select_integrity(ctxt_pP, ue_context_pP->ue_context.security_capabilities.nRintegrity_algorithms); + integrityProtAlgorithm = rrc_gNB_select_integrity(ctxt_pP, UE->security_capabilities.nRintegrity_algorithms); - if (ue_context_pP->ue_context.integrity_algorithm != integrityProtAlgorithm) { - ue_context_pP->ue_context.integrity_algorithm = integrityProtAlgorithm; + if (UE->integrity_algorithm != integrityProtAlgorithm) { + UE->integrity_algorithm = integrityProtAlgorithm; changed = true; } - LOG_I (NR_RRC, "[gNB %d][UE %x] Selected security algorithms (%p): %lx, %x, %s\n", - ctxt_pP->module_id, - ue_context_pP->ue_context.rnti, - security_capabilities_pP, - (unsigned long)cipheringAlgorithm, - integrityProtAlgorithm, - changed ? "changed" : "same"); + LOG_I(NR_RRC, + "[gNB %d][UE %x] Selected security algorithms (%p): %lx, %x, %s\n", + ctxt_pP->module_id, + UE->rnti, + security_capabilities_pP, + (unsigned long)cipheringAlgorithm, + integrityProtAlgorithm, + changed ? "changed" : "same"); return changed; } //------------------------------------------------------------------------------ -int -rrc_gNB_process_NGAP_DOWNLINK_NAS( - MessageDef *msg_p, - const char *msg_name, - instance_t instance, - mui_t *rrc_gNB_mui -) +int rrc_gNB_process_NGAP_DOWNLINK_NAS(MessageDef *msg_p, instance_t instance, mui_t *rrc_gNB_mui) //------------------------------------------------------------------------------ { - uint16_t ue_initial_id; - uint32_t gNB_ue_ngap_id; - uint32_t length; - uint8_t *buffer; - struct rrc_gNB_ue_context_s *ue_context_p = NULL; - protocol_ctxt_t ctxt; - memset(&ctxt, 0, sizeof(protocol_ctxt_t)); - ue_initial_id = NGAP_DOWNLINK_NAS (msg_p).ue_initial_id; - gNB_ue_ngap_id = NGAP_DOWNLINK_NAS (msg_p).gNB_ue_ngap_id; - ue_context_p = rrc_gNB_get_ue_context_from_ngap_ids(instance, ue_initial_id, gNB_ue_ngap_id); - LOG_I(NR_RRC, "[gNB %ld] Received %s: ue_initial_id %d, gNB_ue_ngap_id %u\n", - instance, - msg_name, - ue_initial_id, - gNB_ue_ngap_id); + uint32_t length; + uint8_t *buffer; + protocol_ctxt_t ctxt = {0}; + ngap_downlink_nas_t *req = &NGAP_DOWNLINK_NAS(msg_p); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[instance], req->gNB_ue_ngap_id); - if (ue_context_p == NULL) { - /* Can not associate this message to an UE index, send a failure to NGAP and discard it! */ - MessageDef *msg_fail_p; - LOG_W(NR_RRC, "[gNB %ld] In NGAP_DOWNLINK_NAS: unknown UE from NGAP ids (%d, %u)\n", instance, ue_initial_id, gNB_ue_ngap_id); - msg_fail_p = itti_alloc_new_message (TASK_RRC_GNB, 0, NGAP_NAS_NON_DELIVERY_IND); - NGAP_NAS_NON_DELIVERY_IND (msg_fail_p).gNB_ue_ngap_id = gNB_ue_ngap_id; - NGAP_NAS_NON_DELIVERY_IND (msg_fail_p).nas_pdu.length = NGAP_DOWNLINK_NAS (msg_p).nas_pdu.length; - NGAP_NAS_NON_DELIVERY_IND (msg_fail_p).nas_pdu.buffer = NGAP_DOWNLINK_NAS (msg_p).nas_pdu.buffer; - // TODO add failure cause when defined! - itti_send_msg_to_task (TASK_NGAP, instance, msg_fail_p); - return (-1); - } else { - PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0); + if (ue_context_p == NULL) { + /* Can not associate this message to an UE index, send a failure to NGAP and discard it! */ + MessageDef *msg_fail_p; + LOG_W(NR_RRC, "[gNB %ld] In NGAP_DOWNLINK_NAS: unknown UE from NGAP ids (%u)\n", instance, req->gNB_ue_ngap_id); + msg_fail_p = itti_alloc_new_message(TASK_RRC_GNB, 0, NGAP_NAS_NON_DELIVERY_IND); + ngap_nas_non_delivery_ind_t *msg = &NGAP_NAS_NON_DELIVERY_IND(msg_fail_p); + msg->gNB_ue_ngap_id = req->gNB_ue_ngap_id; + msg->nas_pdu.length = req->nas_pdu.length; + msg->nas_pdu.buffer = req->nas_pdu.buffer; + // TODO add failure cause when defined! + itti_send_msg_to_task(TASK_NGAP, instance, msg_fail_p); + return (-1); + } - /* Is it the first income from NGAP ? */ - if (ue_context_p->ue_context.gNB_ue_ngap_id == 0) { - ue_context_p->ue_context.gNB_ue_ngap_id = NGAP_DOWNLINK_NAS (msg_p).gNB_ue_ngap_id; - } + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; + PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, UE->rnti, 0, 0); - /* Create message for PDCP (DLInformationTransfer_t) */ - length = do_NR_DLInformationTransfer ( - instance, - &buffer, - rrc_gNB_get_next_transaction_identifier (instance), - NGAP_DOWNLINK_NAS (msg_p).nas_pdu.length, - NGAP_DOWNLINK_NAS (msg_p).nas_pdu.buffer); - LOG_DUMPMSG(NR_RRC, DEBUG_RRC, buffer, length, "[MSG] RRC DL Information Transfer\n"); - /* - * switch UL or DL NAS message without RRC piggybacked to SRB2 if active. - */ - switch (RC.nrrrc[ctxt.module_id]->node_type) { - case ngran_gNB_CU: - case ngran_gNB_CUCP: - /* Transfer data to PDCP */ - nr_rrc_data_req ( - &ctxt, - ue_context_p->ue_context.Srb2.Active == 1 ? ue_context_p->ue_context.Srb2.Srb_info.Srb_id : ue_context_p->ue_context.Srb1.Srb_info.Srb_id, - (*rrc_gNB_mui)++, - SDU_CONFIRM_NO, - length, - buffer, - PDCP_TRANSMISSION_MODE_CONTROL); - break; - - case ngran_gNB_DU: - // nothing to do for DU - AssertFatal(1==0,"nothing to do for DU\n"); - break; - - case ngran_gNB: - { - // rrc_mac_config_req_gNB - /* Transfer data to PDCP */ - nr_rrc_data_req ( - &ctxt, - ue_context_p->ue_context.Srb2.Active == 1 ? ue_context_p->ue_context.Srb2.Srb_info.Srb_id : ue_context_p->ue_context.Srb1.Srb_info.Srb_id, - (*rrc_gNB_mui)++, - SDU_CONFIRM_NO, - length, - buffer, - PDCP_TRANSMISSION_MODE_CONTROL); - } - break; - - default : - LOG_W(NR_RRC, "Unknown node type %d\n", RC.nrrrc[ctxt.module_id]->node_type); - } - return (0); - } + /* Create message for PDCP (DLInformationTransfer_t) */ + length = do_NR_DLInformationTransfer(instance, &buffer, rrc_gNB_get_next_transaction_identifier(instance), req->nas_pdu.length, req->nas_pdu.buffer); + LOG_DUMPMSG(NR_RRC, DEBUG_RRC, buffer, length, "[MSG] RRC DL Information Transfer\n"); + /* + * switch UL or DL NAS message without RRC piggybacked to SRB2 if active. + */ + AssertFatal(!NODE_IS_DU(RC.nrrrc[ctxt.module_id]->node_type), "illegal node type DU: receiving NGAP messages at this node\n"); + /* Transfer data to PDCP */ + rb_id_t srb_id = UE->Srb[2].Active ? DCCH1 : DCCH; + nr_rrc_data_req(&ctxt, srb_id, (*rrc_gNB_mui)++, SDU_CONFIRM_NO, length, buffer, PDCP_TRANSMISSION_MODE_CONTROL); + return 0; } //------------------------------------------------------------------------------ @@ -854,12 +642,13 @@ rrc_gNB_send_NGAP_UPLINK_NAS( uint8_t *pdu_buffer; MessageDef *msg_p; NR_ULInformationTransfer_t *ulInformationTransfer = ul_dcch_msg->message.choice.c1->choice.ulInformationTransfer; + gNB_RRC_UE_t *UE = &ue_context_pP->ue_context; if (ulInformationTransfer->criticalExtensions.present == NR_ULInformationTransfer__criticalExtensions_PR_ulInformationTransfer) { pdu_length = ulInformationTransfer->criticalExtensions.choice.ulInformationTransfer->dedicatedNAS_Message->size; pdu_buffer = ulInformationTransfer->criticalExtensions.choice.ulInformationTransfer->dedicatedNAS_Message->buf; msg_p = itti_alloc_new_message (TASK_RRC_GNB, 0, NGAP_UPLINK_NAS); - NGAP_UPLINK_NAS (msg_p).gNB_ue_ngap_id = ue_context_pP->ue_context.gNB_ue_ngap_id; + NGAP_UPLINK_NAS(msg_p).gNB_ue_ngap_id = UE->gNB_ue_ngap_id; NGAP_UPLINK_NAS (msg_p).nas_pdu.length = pdu_length; NGAP_UPLINK_NAS (msg_p).nas_pdu.buffer = pdu_buffer; // extract_imsi(NGAP_UPLINK_NAS (msg_p).nas_pdu.buffer, @@ -882,156 +671,118 @@ rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP( MessageDef *msg_p; int pdu_sessions_done = 0; int pdu_sessions_failed = 0; - int pdusession; - int qos_flow_index; msg_p = itti_alloc_new_message (TASK_RRC_GNB, 0, NGAP_PDUSESSION_SETUP_RESP); - NGAP_PDUSESSION_SETUP_RESP(msg_p).gNB_ue_ngap_id = ue_context_pP->ue_context.gNB_ue_ngap_id; + ngap_pdusession_setup_resp_t *resp = &NGAP_PDUSESSION_SETUP_RESP(msg_p); + gNB_RRC_UE_t *UE = &ue_context_pP->ue_context; + resp->gNB_ue_ngap_id = UE->gNB_ue_ngap_id; - for (pdusession = 0; pdusession < ue_context_pP->ue_context.nb_of_pdusessions; pdusession++) { - // if (xid == ue_context_pP->ue_context.pdusession[pdusession].xid) { - if (ue_context_pP->ue_context.pduSession[pdusession].status == PDU_SESSION_STATUS_DONE) { - pdusession_setup_t * tmp=&NGAP_PDUSESSION_SETUP_RESP(msg_p).pdusessions[pdu_sessions_done]; - tmp->pdusession_id = ue_context_pP->ue_context.pduSession[pdusession].param.pdusession_id; - // tmp->pdusession_id = 1; - tmp->nb_of_qos_flow = ue_context_pP->ue_context.pduSession[pdusession].param.nb_qos; - tmp->gtp_teid = ue_context_pP->ue_context.gnb_gtp_teid[pdusession]; - tmp->gNB_addr.pdu_session_type = PDUSessionType_ipv4; - tmp->gNB_addr.length = ue_context_pP->ue_context.gnb_gtp_addrs[pdusession].length; - memcpy(tmp->gNB_addr.buffer, - ue_context_pP->ue_context.gnb_gtp_addrs[pdusession].buffer, tmp->gNB_addr.length); - for (qos_flow_index = 0; qos_flow_index < tmp->nb_of_qos_flow; qos_flow_index++) { - tmp->associated_qos_flows[qos_flow_index].qfi = - ue_context_pP->ue_context.pduSession[pdusession].param.qos[qos_flow_index].qfi; - tmp->associated_qos_flows[qos_flow_index].qos_flow_mapping_ind = QOSFLOW_MAPPING_INDICATION_DL; - } - - ue_context_pP->ue_context.pduSession[pdusession].status = PDU_SESSION_STATUS_ESTABLISHED; - LOG_I (NR_RRC,"gnb_gtp_addr (msg index %d, pdu_sessions index %d, status %d, xid %d): nb_of_pdusessions %d, pdusession_id %d, teid: %u \n ", - pdu_sessions_done, pdusession, ue_context_pP->ue_context.pduSession[pdusession].status, xid, - ue_context_pP->ue_context.nb_of_pdusessions, - NGAP_PDUSESSION_SETUP_RESP (msg_p).pdusessions[pdu_sessions_done].pdusession_id, - NGAP_PDUSESSION_SETUP_RESP (msg_p).pdusessions[pdu_sessions_done].gtp_teid); - pdu_sessions_done++; - } else if ((ue_context_pP->ue_context.pduSession[pdusession].status == PDU_SESSION_STATUS_NEW) || - (ue_context_pP->ue_context.pduSession[pdusession].status == PDU_SESSION_STATUS_ESTABLISHED)) { - LOG_D (NR_RRC,"PDU-SESSION is NEW or already ESTABLISHED\n"); - } else { /* to be improved */ - ue_context_pP->ue_context.pduSession[pdusession].status = PDU_SESSION_STATUS_FAILED; - NGAP_PDUSESSION_SETUP_RESP (msg_p).pdusessions_failed[pdu_sessions_failed].pdusession_id = ue_context_pP->ue_context.pduSession[pdusession].param.pdusession_id; - pdu_sessions_failed++; - // TODO add cause when it will be integrated + for (int pdusession = 0; pdusession < UE->nb_of_pdusessions; pdusession++) { + rrc_pdu_session_param_t *session = &UE->pduSession[pdusession]; + if (session->status == PDU_SESSION_STATUS_DONE) { + pdusession_setup_t *tmp = &resp->pdusessions[pdu_sessions_done]; + tmp->pdusession_id = session->param.pdusession_id; + tmp->nb_of_qos_flow = session->param.nb_qos; + tmp->gtp_teid = UE->gnb_gtp_teid[pdusession]; + tmp->gNB_addr.pdu_session_type = PDUSessionType_ipv4; + tmp->gNB_addr.length = UE->gnb_gtp_addrs[pdusession].length; + memcpy(tmp->gNB_addr.buffer, UE->gnb_gtp_addrs[pdusession].buffer, tmp->gNB_addr.length); + for (int qos_flow_index = 0; qos_flow_index < tmp->nb_of_qos_flow; qos_flow_index++) { + tmp->associated_qos_flows[qos_flow_index].qfi = session->param.qos[qos_flow_index].qfi; + tmp->associated_qos_flows[qos_flow_index].qos_flow_mapping_ind = QOSFLOW_MAPPING_INDICATION_DL; } - NGAP_PDUSESSION_SETUP_RESP(msg_p).nb_of_pdusessions = pdu_sessions_done; - NGAP_PDUSESSION_SETUP_RESP(msg_p).nb_of_pdusessions_failed = pdu_sessions_failed; + + session->status = PDU_SESSION_STATUS_ESTABLISHED; + LOG_I(NR_RRC, + "msg index %d, pdu_sessions index %d, status %d, xid %d): nb_of_pdusessions %d, pdusession_id %d, teid: %u \n ", + pdu_sessions_done, + pdusession, + session->status, + xid, + UE->nb_of_pdusessions, + tmp->pdusession_id, + tmp->gtp_teid); + pdu_sessions_done++; + } else if (session->status != PDU_SESSION_STATUS_ESTABLISHED) { + session->status = PDU_SESSION_STATUS_FAILED; + resp->pdusessions_failed[pdu_sessions_failed].pdusession_id = session->param.pdusession_id; + pdu_sessions_failed++; + // TODO add cause when it will be integrated + } + resp->nb_of_pdusessions = pdu_sessions_done; + resp->nb_of_pdusessions_failed = pdu_sessions_failed; // } else { // LOG_D(NR_RRC,"xid does not corresponds (context pdu_sessions index %d, status %d, xid %d/%d) \n ", - // pdusession, ue_context_pP->ue_context.pdusession[pdusession].status, xid, ue_context_pP->ue_context.pdusession[pdusession].xid); + // pdusession, UE->pdusession[pdusession].status, xid, UE->pdusession[pdusession].xid); // } } - if ((pdu_sessions_done > 0) ) { - LOG_I(NR_RRC, - "NGAP_PDUSESSION_SETUP_RESP: sending the message: nb_of_pdusessions %d, total pdu_sessions %d, index %d\n", - ue_context_pP->ue_context.nb_of_pdusessions, - ue_context_pP->ue_context.nb_of_pdusessions, - pdusession); + if ((pdu_sessions_done > 0 || pdu_sessions_failed)) { + LOG_I(NR_RRC, "NGAP_PDUSESSION_SETUP_RESP: sending the message\n"); itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, msg_p); } for(int i = 0; i < NB_RB_MAX; i++) { - ue_context_pP->ue_context.pduSession[i].xid = -1; + UE->pduSession[i].xid = -1; } return; } //------------------------------------------------------------------------------ -void -rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ( - MessageDef *msg_p, - const char *msg_name, - instance_t instance -) +void rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(MessageDef *msg_p, instance_t instance) //------------------------------------------------------------------------------ { - gNB_RRC_INST *rrc; - uint16_t ue_initial_id; - uint32_t gNB_ue_ngap_id; + gNB_RRC_INST *rrc; rrc_gNB_ue_context_t *ue_context_p = NULL; protocol_ctxt_t ctxt={0}; ngap_pdusession_setup_req_t* msg=&NGAP_PDUSESSION_SETUP_REQ(msg_p); - ue_initial_id = msg->ue_initial_id; - gNB_ue_ngap_id = msg->gNB_ue_ngap_id; - ue_context_p = rrc_gNB_get_ue_context_from_ngap_ids(instance, ue_initial_id, gNB_ue_ngap_id); - PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, GNB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0, 0); + ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[instance], msg->gNB_ue_ngap_id); + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; + PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, 0, GNB_FLAG_YES, UE->rnti, 0, 0, 0); rrc = RC.nrrrc[ctxt.module_id]; - LOG_I(NR_RRC, "[gNB %ld] Received %s: ue_initial_id %d, gNB_ue_ngap_id %u \n", - instance, msg_name, ue_initial_id, gNB_ue_ngap_id); + LOG_I(NR_RRC, "[gNB %ld] gNB_ue_ngap_id %u \n", instance, msg->gNB_ue_ngap_id); if (ue_context_p == NULL) { MessageDef *msg_fail_p = NULL; - LOG_W(NR_RRC, "[gNB %ld] In NGAP_PDUSESSION_SETUP_REQ: unknown UE from NGAP ids (%d, %u)\n", instance, ue_initial_id, gNB_ue_ngap_id); + LOG_W(NR_RRC, "[gNB %ld] In NGAP_PDUSESSION_SETUP_REQ: unknown UE from NGAP ids (%u)\n", instance, msg->gNB_ue_ngap_id); msg_fail_p = itti_alloc_new_message(TASK_RRC_GNB, 0, NGAP_PDUSESSION_SETUP_REQUEST_FAIL); - NGAP_PDUSESSION_SETUP_REQ(msg_fail_p).gNB_ue_ngap_id = gNB_ue_ngap_id; + NGAP_PDUSESSION_SETUP_FAIL(msg_fail_p).gNB_ue_ngap_id = msg->gNB_ue_ngap_id; // TODO add failure cause when defined! itti_send_msg_to_task (TASK_NGAP, instance, msg_fail_p); return ; } - ue_context_p->ue_context.gNB_ue_ngap_id = msg->gNB_ue_ngap_id; - ue_context_p->ue_context.amf_ue_ngap_id = msg->amf_ue_ngap_id; + UE->gNB_ue_ngap_id = msg->gNB_ue_ngap_id; + UE->amf_ue_ngap_id = msg->amf_ue_ngap_id; + e1ap_bearer_setup_req_t bearer_req = {0}; - /* Configurations are referred from rrc_gNB_generate_dedicatedRRCReconfiguration() and - rrc_gNB_process_RRCReconfigurationComplete() + for (int i = 0; i < msg->nb_pdusessions_tosetup; i++) { + rrc_pdu_session_param_t *pduSession = find_pduSession(UE, msg->pdusession_setup_params[i].pdusession_id, true); + pdusession_t *session = &pduSession->param; + LOG_I(NR_RRC, "Adding pdusession %d, total nb of sessions %d\n", session->pdusession_id, UE->nb_of_pdusessions); + session->pdusession_id = msg->pdusession_setup_params[i].pdusession_id; + session->nas_pdu = msg->pdusession_setup_params[i].nas_pdu; + session->pdusessionTransfer = msg->pdusession_setup_params[i].pdusessionTransfer; + decodePDUSessionResourceSetup(session); + bearer_req.gNB_cu_cp_ue_id = msg->gNB_ue_ngap_id; + bearer_req.rnti = UE->rnti; + bearer_req.cipheringAlgorithm = UE->ciphering_algorithm; + memcpy(bearer_req.encryptionKey, UE->kgnb, sizeof(UE->kgnb)); + bearer_req.integrityProtectionAlgorithm = UE->integrity_algorithm; + memcpy(bearer_req.integrityProtectionKey, UE->kgnb, sizeof(UE->kgnb)); + bearer_req.ueDlAggMaxBitRate = msg->ueAggMaxBitRateDownlink; + pdu_session_to_setup_t *pdu = bearer_req.pduSession + bearer_req.numPDUSessions; + bearer_req.numPDUSessions++; + pdu->sessionId = session->pdusession_id; + pdu->sst = msg->allowed_nssai[i].sST; + pdu->integrityProtectionIndication = rrc->security.do_drb_integrity ? E1AP_IntegrityProtectionIndication_required : E1AP_IntegrityProtectionIndication_not_needed; - At CU-CP we configure the E1 bearer context setup parameters (PDU sessions, DRBs and - QoS flows) same as in these functions. At CU-UP we create PDU Sessions and allocate DRBs. - */ - e1ap_bearer_setup_req_t bearer_req; - - bearer_req.gNB_cu_cp_ue_id = gNB_ue_ngap_id; - bearer_req.rnti = ue_context_p->ue_context.rnti; - bearer_req.cipheringAlgorithm = ue_context_p->ue_context.ciphering_algorithm; - memcpy(bearer_req.encryptionKey, ue_context_p->ue_context.kgnb, sizeof(ue_context_p->ue_context.kgnb)); - bearer_req.integrityProtectionAlgorithm = ue_context_p->ue_context.integrity_algorithm; - memcpy(bearer_req.integrityProtectionKey, ue_context_p->ue_context.kgnb, sizeof(ue_context_p->ue_context.kgnb)); - bearer_req.ueDlAggMaxBitRate = msg->ueAggMaxBitRateDownlink; - - bearer_req.numPDUSessions = msg->nb_pdusessions_tosetup; - int xid = rrc_gNB_get_next_transaction_identifier(ctxt.module_id); - - for (int i=0; i < bearer_req.numPDUSessions; i++) { - int idx = ue_context_p->ue_context.nb_of_pdusessions++; - pdu_session_to_setup_t *pdu = bearer_req.pduSession + i; + pdu->confidentialityProtectionIndication = rrc->security.do_drb_ciphering ? E1AP_ConfidentialityProtectionIndication_required : E1AP_ConfidentialityProtectionIndication_not_needed; + pdu->teId = session->gtp_teid; + memcpy(&pdu->tlAddress, session->upf_addr.buffer, 4); // Fixme: dirty IPv4 target pdu->numDRB2Setup = 1; // One DRB per PDU Session. TODO: Remove hardcoding - ue_context_p->ue_context.pduSession[idx].param = msg->pdusession_setup_params[i]; - ue_context_p->ue_context.pduSession[idx].xid = xid; - ue_context_p->ue_context.pduSession[idx].status = PDU_SESSION_STATUS_NEW; - - pdu->sessionId = msg->pdusession_setup_params[i].pdusession_id; - pdu->sessionType = msg->pdusession_setup_params[i].upf_addr.pdu_session_type; - pdu->sst = msg->allowed_nssai[i].sST; - if (rrc->security.do_drb_integrity) { - pdu->integrityProtectionIndication = E1AP_IntegrityProtectionIndication_required; - } else { - pdu->integrityProtectionIndication = E1AP_IntegrityProtectionIndication_not_needed; - } - - if (rrc->security.do_drb_ciphering) { - pdu->confidentialityProtectionIndication = E1AP_ConfidentialityProtectionIndication_required; - } else { - pdu->confidentialityProtectionIndication = E1AP_ConfidentialityProtectionIndication_not_needed; - } - pdu->teId = msg->pdusession_setup_params[i].gtp_teid; - memcpy(&pdu->tlAddress, - msg->pdusession_setup_params[i].upf_addr.buffer, - sizeof(uint8_t)*4); - - ue_context_p->ue_context.pduSession[idx].param = msg->pdusession_setup_params[i]; - ue_context_p->ue_context.gNB_ue_ngap_id = msg->gNB_ue_ngap_id; - ue_context_p->ue_context.amf_ue_ngap_id = msg->amf_ue_ngap_id; for (int j=0; j < pdu->numDRB2Setup; j++) { DRB_nGRAN_to_setup_t *drb = pdu->DRBnGRanList + j; @@ -1057,183 +808,197 @@ rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ( cellGroup->id = 0; // MCG } - drb->numQosFlow2Setup = msg->pdusession_setup_params[i].nb_qos; + drb->numQosFlow2Setup = session->nb_qos; for (int k=0; k < drb->numQosFlow2Setup; k++) { qos_flow_to_setup_t *qos = drb->qosFlows + k; - qos->id = msg->pdusession_setup_params[j].qos[k].qfi; - qos->fiveQI = msg->pdusession_setup_params[j].qos[k].fiveQI; - qos->fiveQI_type = msg->pdusession_setup_params[j].qos[k].fiveQI_type; + qos->id = session->qos[k].qfi; + qos->fiveQI = session->qos[k].fiveQI; + qos->fiveQI_type = session->qos[k].fiveQI_type; - qos->qoSPriorityLevel = msg->pdusession_setup_params[i].qos[k].allocation_retention_priority.priority_level; - qos->pre_emptionCapability = msg->pdusession_setup_params[i].qos[k].allocation_retention_priority.pre_emp_capability; - qos->pre_emptionVulnerability = msg->pdusession_setup_params[i].qos[k].allocation_retention_priority.pre_emp_vulnerability; + qos->qoSPriorityLevel = session->qos[k].allocation_retention_priority.priority_level; + qos->pre_emptionCapability = session->qos[k].allocation_retention_priority.pre_emp_capability; + qos->pre_emptionVulnerability = session->qos[k].allocation_retention_priority.pre_emp_vulnerability; } } } - rrc->cucp_cuup.bearer_context_setup(&bearer_req, instance); return; } -//------------------------------------------------------------------------------ -int -rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ( - MessageDef *msg_p, - const char *msg_name, - instance_t instance -) -//------------------------------------------------------------------------------ +static void fill_qos2(NGAP_QosFlowAddOrModifyRequestList_t *qos, pdusession_t *session) { - uint16_t ue_initial_id; - uint32_t gNB_ue_ngap_id; - uint8_t nb_pdusessions_tomodify; - rrc_gNB_ue_context_t *ue_context_p = NULL; - uint8_t i; - uint8_t qos_flow_index; - protocol_ctxt_t ctxt; - - ue_initial_id = NGAP_PDUSESSION_MODIFY_REQ(msg_p).ue_initial_id; - gNB_ue_ngap_id = NGAP_PDUSESSION_MODIFY_REQ(msg_p).gNB_ue_ngap_id; - nb_pdusessions_tomodify = NGAP_PDUSESSION_MODIFY_REQ(msg_p).nb_pdusessions_tomodify; - - ue_context_p = rrc_gNB_get_ue_context_from_ngap_ids(instance, ue_initial_id, gNB_ue_ngap_id); - if (ue_context_p == NULL) { - LOG_W(NR_RRC, "[gNB %ld] In NGAP_PDUSESSION_MODIFY_REQ: unknown UE from NGAP ids (%d, %u)\n", instance, ue_initial_id, gNB_ue_ngap_id); - // TODO - return (-1); - } else { - PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0); - ctxt.eNB_index = 0; - - ue_context_p->ue_context.gNB_ue_ngap_id = gNB_ue_ngap_id; - { - int j; - bool is_treated[NGAP_MAX_PDUSESSION] = {false}; - uint8_t nb_of_failed_pdusessions = 0; - - for (i = 0; i < nb_pdusessions_tomodify; i++) { - if (is_treated[i] == true) { - continue; - } - - //Check if same PDU session ID to handle multiple pdu sessions - for (j = i+1; j < nb_pdusessions_tomodify; j++) { - if (is_treated[j] == false && - NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[j].pdusession_id == - NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].pdusession_id) { - // handle multiple pdu session id - LOG_D(NR_RRC, "handle multiple pdu session id \n"); - ue_context_p->ue_context.modify_pdusession[j].status = PDU_SESSION_STATUS_NEW; - ue_context_p->ue_context.modify_pdusession[j].param.pdusession_id = - NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[j].pdusession_id; - ue_context_p->ue_context.modify_pdusession[j].cause = NGAP_CAUSE_RADIO_NETWORK; - ue_context_p->ue_context.modify_pdusession[j].cause_value = NGAP_CauseRadioNetwork_multiple_PDU_session_ID_instances; - nb_of_failed_pdusessions++; - is_treated[i] = true; - is_treated[j] = true; - } - } - // handle multiple pdu session id case - if (is_treated[i] == true) { - LOG_D(NR_RRC, "handle multiple pdu session id \n"); - ue_context_p->ue_context.modify_pdusession[i].status = PDU_SESSION_STATUS_NEW; - ue_context_p->ue_context.modify_pdusession[i].param.pdusession_id = - NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].pdusession_id; - ue_context_p->ue_context.modify_pdusession[i].cause = NGAP_CAUSE_RADIO_NETWORK; - ue_context_p->ue_context.modify_pdusession[i].cause_value = NGAP_CauseRadioNetwork_multiple_PDU_session_ID_instances; - nb_of_failed_pdusessions++; - continue; - } - - // Check pdu session ID is established - for (j = 0; j < NR_NB_RB_MAX -3; j++) { - if (ue_context_p->ue_context.pduSession[j].param.pdusession_id == - NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].pdusession_id) { - if (ue_context_p->ue_context.pduSession[j].status == PDU_SESSION_STATUS_TORELEASE || - ue_context_p->ue_context.pduSession[j].status == PDU_SESSION_STATUS_DONE) { - break; - } - // Found established pdu session, prepare to send RRC message - ue_context_p->ue_context.modify_pdusession[i].status = PDU_SESSION_STATUS_NEW; - ue_context_p->ue_context.modify_pdusession[i].param.pdusession_id = - NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].pdusession_id; - ue_context_p->ue_context.modify_pdusession[i].cause = NGAP_CAUSE_NOTHING; - if (NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].nas_pdu.buffer != NULL) { - ue_context_p->ue_context.modify_pdusession[i].param.nas_pdu.buffer = - NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].nas_pdu.buffer; - ue_context_p->ue_context.modify_pdusession[i].param.nas_pdu.length = - NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].nas_pdu.length; - } - // Save new pdu session parameters, qos, upf addr, teid - for (qos_flow_index = 0; qos_flow_index < NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].nb_qos; qos_flow_index++) { - ue_context_p->ue_context.modify_pdusession[i].param.qos[qos_flow_index] = - NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].qos[qos_flow_index]; - } - ue_context_p->ue_context.modify_pdusession[i].param.nb_qos = - NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].nb_qos; - - ue_context_p->ue_context.modify_pdusession[i].param.upf_addr = - ue_context_p->ue_context.pduSession[j].param.upf_addr; - ue_context_p->ue_context.modify_pdusession[i].param.gtp_teid = - ue_context_p->ue_context.pduSession[j].param.gtp_teid; - - is_treated[i] = true; - break; - } - } - - // handle Unknown pdu session ID - if (is_treated[i] == false) { - LOG_D(NR_RRC, "handle Unknown pdu session ID \n"); - ue_context_p->ue_context.modify_pdusession[i].status = PDU_SESSION_STATUS_NEW; - ue_context_p->ue_context.modify_pdusession[i].param.pdusession_id = - NGAP_PDUSESSION_MODIFY_REQ(msg_p).pdusession_modify_params[i].pdusession_id; - ue_context_p->ue_context.modify_pdusession[i].cause = NGAP_CAUSE_RADIO_NETWORK; - ue_context_p->ue_context.modify_pdusession[i].cause_value = NGAP_CauseRadioNetwork_unknown_PDU_session_ID; - nb_of_failed_pdusessions++; - is_treated[i] = true; - } + // we need to duplicate the function fill_qos because all data types are slightly different + DevAssert(qos->list.count > 0); + DevAssert(qos->list.count <= NGAP_maxnoofQosFlows); + for (int qosIdx = 0; qosIdx < qos->list.count; qosIdx++) { + NGAP_QosFlowAddOrModifyRequestItem_t *qosFlowItem_p = qos->list.array[qosIdx]; + // Set the QOS informations + session->qos[qosIdx].qfi = (uint8_t)qosFlowItem_p->qosFlowIdentifier; + NGAP_QosCharacteristics_t *qosChar = &qosFlowItem_p->qosFlowLevelQosParameters->qosCharacteristics; + if (qosChar->present == NGAP_QosCharacteristics_PR_nonDynamic5QI) { + if (qosChar->choice.nonDynamic5QI != NULL) { + session->qos[qosIdx].fiveQI = (uint64_t)qosChar->choice.nonDynamic5QI->fiveQI; } - - ue_context_p->ue_context.nb_of_modify_pdusessions = nb_pdusessions_tomodify; - ue_context_p->ue_context.nb_of_failed_pdusessions = nb_of_failed_pdusessions; + } else if (qosChar->present == NGAP_QosCharacteristics_PR_dynamic5QI) { + // TODO } - if (ue_context_p->ue_context.nb_of_failed_pdusessions < ue_context_p->ue_context.nb_of_modify_pdusessions) { - LOG_D(NR_RRC, "generate RRCReconfiguration \n"); - rrc_gNB_modify_dedicatedRRCReconfiguration(&ctxt, ue_context_p); - } else { // all pdu modification failed - LOG_I(NR_RRC, "pdu session modify failed, fill NGAP_PDUSESSION_MODIFY_RESP with the pdu session information that failed to modify \n"); - uint8_t nb_of_pdu_sessions_failed = 0; - MessageDef *msg_fail_p = NULL; - msg_fail_p = itti_alloc_new_message (TASK_RRC_GNB, 0, NGAP_PDUSESSION_MODIFY_RESP); - if (msg_fail_p == NULL) { - LOG_E(NR_RRC, "itti_alloc_new_message failed, msg_fail_p is NULL \n"); - return (-1); - } + ngap_allocation_retention_priority_t *tmp = &session->qos[qosIdx].allocation_retention_priority; + NGAP_AllocationAndRetentionPriority_t *tmp2 = &qosFlowItem_p->qosFlowLevelQosParameters->allocationAndRetentionPriority; + tmp->priority_level = tmp2->priorityLevelARP; + tmp->pre_emp_capability = tmp2->pre_emptionCapability; + tmp->pre_emp_vulnerability = tmp2->pre_emptionVulnerability; + } + session->nb_qos = qos->list.count; +} - NGAP_PDUSESSION_MODIFY_RESP(msg_fail_p).gNB_ue_ngap_id = gNB_ue_ngap_id; - NGAP_PDUSESSION_MODIFY_RESP(msg_fail_p).nb_of_pdusessions = 0; +static void decodePDUSessionResourceModify(pdusession_t *param, const ngap_pdu_t pdu) +{ + NGAP_PDUSessionResourceModifyRequestTransfer_t *pdusessionTransfer; + asn_dec_rval_t dec_rval = aper_decode(NULL, &asn_DEF_NGAP_PDUSessionResourceModifyRequestTransfer, (void **)&pdusessionTransfer, pdu.buffer, pdu.length, 0, 0); - for (nb_of_pdu_sessions_failed = 0; nb_of_pdu_sessions_failed < ue_context_p->ue_context.nb_of_failed_pdusessions; nb_of_pdu_sessions_failed++) { - NGAP_PDUSESSION_MODIFY_RESP(msg_fail_p).pdusessions_failed[nb_of_pdu_sessions_failed].pdusession_id = - ue_context_p->ue_context.modify_pdusession[nb_of_pdu_sessions_failed].param.pdusession_id; - NGAP_PDUSESSION_MODIFY_RESP(msg_fail_p).pdusessions_failed[nb_of_pdu_sessions_failed].cause = - ue_context_p->ue_context.modify_pdusession[nb_of_pdu_sessions_failed].cause; - NGAP_PDUSESSION_MODIFY_RESP(msg_fail_p).pdusessions_failed[nb_of_pdu_sessions_failed].cause_value = - ue_context_p->ue_context.modify_pdusession[nb_of_pdu_sessions_failed].cause_value; - } + if (dec_rval.code != RC_OK) { + LOG_E(NR_RRC, "could not decode PDUSessionResourceModifyRequestTransfer\n"); + return; + } - NGAP_PDUSESSION_MODIFY_RESP(msg_fail_p).nb_of_pdusessions_failed = - ue_context_p->ue_context.nb_of_failed_pdusessions; - itti_send_msg_to_task(TASK_NGAP, instance, msg_fail_p); - ue_context_p->ue_context.nb_of_modify_pdusessions = 0; - ue_context_p->ue_context.nb_of_failed_pdusessions = 0; - memset(ue_context_p->ue_context.modify_pdusession, 0, sizeof(ue_context_p->ue_context.modify_pdusession)); - return (0); + for (int j = 0; j < pdusessionTransfer->protocolIEs.list.count; j++) { + NGAP_PDUSessionResourceModifyRequestTransferIEs_t *pdusessionTransfer_ies = pdusessionTransfer->protocolIEs.list.array[j]; + switch (pdusessionTransfer_ies->id) { + /* optional PDUSessionAggregateMaximumBitRate */ + case NGAP_ProtocolIE_ID_id_PDUSessionAggregateMaximumBitRate: + // TODO + LOG_E(NR_RRC, "Cant' handle NGAP_ProtocolIE_ID_id_PDUSessionAggregateMaximumBitRate\n"); + break; + + /* optional UL-NGU-UP-TNLModifyList */ + case NGAP_ProtocolIE_ID_id_UL_NGU_UP_TNLModifyList: + // TODO + LOG_E(NR_RRC, "Cant' handle NGAP_ProtocolIE_ID_id_UL_NGU_UP_TNLModifyList\n"); + break; + + /* optional NetworkInstance */ + case NGAP_ProtocolIE_ID_id_NetworkInstance: + // TODO + LOG_E(NR_RRC, "Cant' handle NGAP_ProtocolIE_ID_id_NetworkInstance\n"); + break; + + /* optional QosFlowAddOrModifyRequestList */ + case NGAP_ProtocolIE_ID_id_QosFlowAddOrModifyRequestList: + fill_qos2(&pdusessionTransfer_ies->value.choice.QosFlowAddOrModifyRequestList, param); + break; + + /* optional QosFlowToReleaseList */ + case NGAP_ProtocolIE_ID_id_QosFlowToReleaseList: + // TODO + LOG_E(NR_RRC, "Can't handle NGAP_ProtocolIE_ID_id_QosFlowToReleaseList\n"); + break; + + /* optional AdditionalUL-NGU-UP-TNLInformation */ + case NGAP_ProtocolIE_ID_id_AdditionalUL_NGU_UP_TNLInformation: + // TODO + LOG_E(NR_RRC, "Cant' handle NGAP_ProtocolIE_ID_id_AdditionalUL_NGU_UP_TNLInformation\n"); + break; + + /* optional CommonNetworkInstance */ + case NGAP_ProtocolIE_ID_id_CommonNetworkInstance: + // TODO + LOG_E(NR_RRC, "Cant' handle NGAP_ProtocolIE_ID_id_CommonNetworkInstance\n"); + break; + + default: + LOG_E(NR_RRC, "could not found protocolIEs id %ld\n", pdusessionTransfer_ies->id); + return; } } + ASN_STRUCT_FREE(asn_DEF_NGAP_PDUSessionResourceModifyRequestTransfer,pdusessionTransfer ); +} + +//------------------------------------------------------------------------------ +int rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ(MessageDef *msg_p, instance_t instance) +//------------------------------------------------------------------------------ +{ + rrc_gNB_ue_context_t *ue_context_p = NULL; + + protocol_ctxt_t ctxt; + ngap_pdusession_modify_req_t *req = &NGAP_PDUSESSION_MODIFY_REQ(msg_p); + + ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[instance], req->gNB_ue_ngap_id); + if (ue_context_p == NULL) { + LOG_W(NR_RRC, "[gNB %ld] In NGAP_PDUSESSION_MODIFY_REQ: unknown UE from NGAP ids (%u)\n", instance, req->gNB_ue_ngap_id); + // TO implement return setup failed + return (-1); + } + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; + PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, UE->rnti, 0, 0); + ctxt.eNB_index = 0; + uint8_t nb_of_failed_pdusessions = 0; + + for (int i = 0; i < req->nb_pdusessions_tomodify; i++) { + int j; + for (j = 0; j < UE->nb_of_pdusessions; j++) + if (UE->modify_pdusession[j].param.pdusession_id == req->pdusession_modify_params[j].pdusession_id) + break; + if (j == UE->nb_of_pdusessions) { + LOG_W(NR_RRC, "To finish, modify a not existing pdu session\n"); + // handle multiple pdu session id + LOG_D(NR_RRC, "handle multiple pdu session id \n"); + UE->modify_pdusession[j].status = PDU_SESSION_STATUS_NEW; + UE->modify_pdusession[j].param.pdusession_id = req->pdusession_modify_params[j].pdusession_id; + UE->modify_pdusession[j].cause = NGAP_CAUSE_RADIO_NETWORK; + UE->modify_pdusession[i].cause_value = NGAP_CauseRadioNetwork_unknown_PDU_session_ID; + nb_of_failed_pdusessions++; + } else { + UE->modify_pdusession[j].status = PDU_SESSION_STATUS_NEW; + UE->modify_pdusession[j].param.pdusession_id = req->pdusession_modify_params[i].pdusession_id; + UE->modify_pdusession[j].cause = NGAP_CAUSE_RADIO_NETWORK; + UE->modify_pdusession[j].cause_value = NGAP_CauseRadioNetwork_multiple_PDU_session_ID_instances; + UE->modify_pdusession[j].status = PDU_SESSION_STATUS_NEW; + UE->modify_pdusession[j].param.pdusession_id = req->pdusession_modify_params[i].pdusession_id; + UE->modify_pdusession[j].cause = NGAP_CAUSE_NOTHING; + if (req->pdusession_modify_params[i].nas_pdu.buffer != NULL) { + UE->modify_pdusession[i].param.nas_pdu = req->pdusession_modify_params[i].nas_pdu; + } + // Save new pdu session parameters, qos, upf addr, teid + decodePDUSessionResourceModify(&UE->modify_pdusession[j].param, UE->modify_pdusession[i].param.pdusessionTransfer); + UE->modify_pdusession[j].param.upf_addr = UE->pduSession[j].param.upf_addr; + UE->modify_pdusession[j].param.gtp_teid = UE->pduSession[j].param.gtp_teid; + } + } + + UE->nb_of_modify_pdusessions = req->nb_pdusessions_tomodify - nb_of_failed_pdusessions; + UE->nb_of_failed_pdusessions = nb_of_failed_pdusessions; + + if (UE->nb_of_failed_pdusessions < UE->nb_of_modify_pdusessions) { + LOG_D(NR_RRC, "generate RRCReconfiguration \n"); + rrc_gNB_modify_dedicatedRRCReconfiguration(&ctxt, ue_context_p); + } else { // all pdu modification failed + LOG_I(NR_RRC, "pdu session modify failed, fill NGAP_PDUSESSION_MODIFY_RESP with the pdu session information that failed to modify \n"); + MessageDef *msg_fail_p = NULL; + msg_fail_p = itti_alloc_new_message(TASK_RRC_GNB, 0, NGAP_PDUSESSION_MODIFY_RESP); + if (msg_fail_p == NULL) { + LOG_E(NR_RRC, "itti_alloc_new_message failed, msg_fail_p is NULL \n"); + return (-1); + } + ngap_pdusession_modify_resp_t *msg = &NGAP_PDUSESSION_MODIFY_RESP(msg_fail_p); + msg->gNB_ue_ngap_id = req->gNB_ue_ngap_id; + msg->nb_of_pdusessions = 0; + + for (int i = 0; i < UE->nb_of_failed_pdusessions; i++) { + msg->pdusessions_failed[i].pdusession_id = UE->modify_pdusession[i].param.pdusession_id; + msg->pdusessions_failed[i].cause = UE->modify_pdusession[i].cause; + msg->pdusessions_failed[i].cause_value = UE->modify_pdusession[i].cause_value; + } + + msg->nb_of_pdusessions_failed = UE->nb_of_failed_pdusessions; + itti_send_msg_to_task(TASK_NGAP, instance, msg_fail_p); + UE->nb_of_modify_pdusessions = 0; + UE->nb_of_failed_pdusessions = 0; + memset(UE->modify_pdusession, 0, sizeof(UE->modify_pdusession)); + return (0); + } + return 0; } @@ -1246,88 +1011,78 @@ rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP( ) //------------------------------------------------------------------------------ { - MessageDef *msg_p = NULL; - int i, j; - uint8_t qos_flow_index; + MessageDef *msg_p = NULL; uint8_t pdu_sessions_failed = 0; uint8_t pdu_sessions_done = 0; - + gNB_RRC_UE_t *UE = &ue_context_pP->ue_context; + msg_p = itti_alloc_new_message (TASK_RRC_GNB, 0, NGAP_PDUSESSION_MODIFY_RESP); if (msg_p == NULL) { LOG_E(NR_RRC, "itti_alloc_new_message failed, msg_p is NULL \n"); return (-1); } - + ngap_pdusession_modify_resp_t *resp = &NGAP_PDUSESSION_MODIFY_RESP(msg_p); LOG_I(NR_RRC, "send message NGAP_PDUSESSION_MODIFY_RESP \n"); - NGAP_PDUSESSION_MODIFY_RESP(msg_p).gNB_ue_ngap_id = ue_context_pP->ue_context.gNB_ue_ngap_id; + resp->gNB_ue_ngap_id = UE->gNB_ue_ngap_id; - for (i = 0; i < ue_context_pP->ue_context.nb_of_modify_pdusessions; i++) { - if (xid == ue_context_pP->ue_context.modify_pdusession[i].xid) { - if (ue_context_pP->ue_context.modify_pdusession[i].status == PDU_SESSION_STATUS_DONE) { - for (j = 0; j < ue_context_pP->ue_context.nb_of_pdusessions; j++) { - if (ue_context_pP->ue_context.modify_pdusession[i].param.pdusession_id == - ue_context_pP->ue_context.pduSession[j].param.pdusession_id) { - LOG_I(NR_RRC, "update pdu session %d \n", ue_context_pP->ue_context.pduSession[j].param.pdusession_id); - // Update ue_context_pP->ue_context.pduSession - ue_context_pP->ue_context.pduSession[j].status = PDU_SESSION_STATUS_ESTABLISHED; - ue_context_pP->ue_context.pduSession[j].cause = NGAP_CAUSE_NOTHING; - for (qos_flow_index = 0; qos_flow_index < ue_context_pP->ue_context.modify_pdusession[i].param.nb_qos; qos_flow_index++) { - ue_context_pP->ue_context.pduSession[j].param.qos[qos_flow_index] = - ue_context_pP->ue_context.modify_pdusession[i].param.qos[qos_flow_index]; - } - break; - } + for (int i = 0; i < UE->nb_of_modify_pdusessions; i++) { + if (xid != UE->modify_pdusession[i].xid) { + LOG_W(NR_RRC, "xid does not correspond (context pdu session index %d, status %d, xid %d/%d) \n ", i, UE->modify_pdusession[i].status, xid, UE->modify_pdusession[i].xid); + continue; + } + if (UE->modify_pdusession[i].status == PDU_SESSION_STATUS_DONE) { + rrc_pdu_session_param_t *pduSession = find_pduSession(UE, UE->modify_pdusession[i].param.pdusession_id, false); + if (pduSession) { + LOG_I(NR_RRC, "update pdu session %d \n", pduSession->param.pdusession_id); + // Update UE->pduSession + pduSession->status = PDU_SESSION_STATUS_ESTABLISHED; + pduSession->cause = NGAP_CAUSE_NOTHING; + for (int qos_flow_index = 0; qos_flow_index < UE->modify_pdusession[i].param.nb_qos; qos_flow_index++) { + pduSession->param.qos[qos_flow_index] = UE->modify_pdusession[i].param.qos[qos_flow_index]; } - - if (j < ue_context_pP->ue_context.nb_of_pdusessions) { - NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions[pdu_sessions_done].pdusession_id = - ue_context_pP->ue_context.modify_pdusession[i].param.pdusession_id; - for (qos_flow_index = 0; qos_flow_index < ue_context_pP->ue_context.modify_pdusession[i].param.nb_qos; qos_flow_index++) { - NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions[pdu_sessions_done].qos[qos_flow_index].qfi = - ue_context_pP->ue_context.modify_pdusession[i].param.qos[qos_flow_index].qfi; - } - NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions[pdu_sessions_done].nb_of_qos_flow = - ue_context_pP->ue_context.modify_pdusession[i].param.nb_qos; - LOG_I(NR_RRC, "Modify Resp (msg index %d, pdu session index %d, status %d, xid %d): nb_of_modify_pdusessions %d, pdusession_id %d \n ", - pdu_sessions_done, i, ue_context_pP->ue_context.modify_pdusession[i].status, xid, - ue_context_pP->ue_context.nb_of_modify_pdusessions, - NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions[pdu_sessions_done].pdusession_id); - pdu_sessions_done++; - } else { - NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions_failed[pdu_sessions_failed].pdusession_id = - ue_context_pP->ue_context.modify_pdusession[i].param.pdusession_id; - NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions_failed[pdu_sessions_failed].cause = NGAP_CAUSE_RADIO_NETWORK; - NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions_failed[pdu_sessions_failed].cause_value = NGAP_CauseRadioNetwork_unknown_PDU_session_ID; - pdu_sessions_failed++; + resp->pdusessions[pdu_sessions_done].pdusession_id = UE->modify_pdusession[i].param.pdusession_id; + for (int qos_flow_index = 0; qos_flow_index < UE->modify_pdusession[i].param.nb_qos; qos_flow_index++) { + resp->pdusessions[pdu_sessions_done].qos[qos_flow_index].qfi = UE->modify_pdusession[i].param.qos[qos_flow_index].qfi; } - } else if ((ue_context_pP->ue_context.modify_pdusession[i].status == PDU_SESSION_STATUS_NEW) || - (ue_context_pP->ue_context.modify_pdusession[i].status == PDU_SESSION_STATUS_ESTABLISHED)) { - LOG_D (NR_RRC, "PDU SESSION is NEW or already ESTABLISHED\n"); - } else if (ue_context_pP->ue_context.modify_pdusession[i].status == PDU_SESSION_STATUS_FAILED) { - NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions_failed[pdu_sessions_failed].pdusession_id = - ue_context_pP->ue_context.modify_pdusession[i].param.pdusession_id; - NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions_failed[pdu_sessions_failed].cause = - ue_context_pP->ue_context.modify_pdusession[i].cause; - NGAP_PDUSESSION_MODIFY_RESP(msg_p).pdusessions_failed[pdu_sessions_failed].cause_value = - ue_context_pP->ue_context.modify_pdusession[i].cause_value; + resp->pdusessions[pdu_sessions_done].pdusession_id = UE->modify_pdusession[i].param.pdusession_id; + resp->pdusessions[pdu_sessions_done].nb_of_qos_flow = UE->modify_pdusession[i].param.nb_qos; + LOG_I(NR_RRC, + "Modify Resp (msg index %d, pdu session index %d, status %d, xid %d): nb_of_modify_pdusessions %d, pdusession_id %d \n ", + pdu_sessions_done, + i, + UE->modify_pdusession[i].status, + xid, + UE->nb_of_modify_pdusessions, + resp->pdusessions[pdu_sessions_done].pdusession_id); + pdu_sessions_done++; + } else { + LOG_W(NR_RRC, "PDU SESSION modify of a not existing pdu session %d \n", UE->modify_pdusession[i].param.pdusession_id); + resp->pdusessions_failed[pdu_sessions_failed].pdusession_id = UE->modify_pdusession[i].param.pdusession_id; + resp->pdusessions_failed[pdu_sessions_failed].cause = NGAP_CAUSE_RADIO_NETWORK; + resp->pdusessions_failed[pdu_sessions_failed].cause_value = NGAP_CauseRadioNetwork_unknown_PDU_session_ID; pdu_sessions_failed++; } - } else { - LOG_D(NR_RRC,"xid does not correspond (context pdu session index %d, status %d, xid %d/%d) \n ", - i, ue_context_pP->ue_context.modify_pdusession[i].status, xid, ue_context_pP->ue_context.modify_pdusession[i].xid); + } else if ((UE->modify_pdusession[i].status == PDU_SESSION_STATUS_NEW) || (UE->modify_pdusession[i].status == PDU_SESSION_STATUS_ESTABLISHED)) { + LOG_D(NR_RRC, "PDU SESSION is NEW or already ESTABLISHED\n"); + } else if (UE->modify_pdusession[i].status == PDU_SESSION_STATUS_FAILED) { + resp->pdusessions_failed[pdu_sessions_failed].pdusession_id = UE->modify_pdusession[i].param.pdusession_id; + resp->pdusessions_failed[pdu_sessions_failed].cause = UE->modify_pdusession[i].cause; + resp->pdusessions_failed[pdu_sessions_failed].cause_value = UE->modify_pdusession[i].cause_value; + pdu_sessions_failed++; } + else + LOG_W(NR_RRC, + "Modify pdu session %d, unknown state %d \n ", + UE->modify_pdusession[i].param.pdusession_id, + UE->modify_pdusession[i].status); } - NGAP_PDUSESSION_MODIFY_RESP(msg_p).nb_of_pdusessions = pdu_sessions_done; - NGAP_PDUSESSION_MODIFY_RESP(msg_p).nb_of_pdusessions_failed = pdu_sessions_failed; + resp->nb_of_pdusessions = pdu_sessions_done; + resp->nb_of_pdusessions_failed = pdu_sessions_failed; if (pdu_sessions_done > 0 || pdu_sessions_failed > 0) { - LOG_D(NR_RRC, - "NGAP_PDUSESSION_MODIFY_RESP: sending the message: nb_of_pdusessions %d, total pdu session %d, index %d\n", - ue_context_pP->ue_context.nb_of_modify_pdusessions, - ue_context_pP->ue_context.nb_of_pdusessions, - i); + LOG_D(NR_RRC, "NGAP_PDUSESSION_MODIFY_RESP: sending the message: nb_of_pdusessions %d, total pdu session %d\n", UE->nb_of_modify_pdusessions, UE->nb_of_pdusessions); itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, msg_p); } else { itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p); @@ -1337,40 +1092,32 @@ rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP( } //------------------------------------------------------------------------------ -void -rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_REQ( - const module_id_t gnb_mod_idP, - const rrc_gNB_ue_context_t *const ue_context_pP, - const ngap_Cause_t causeP, - const long cause_valueP) +void rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_REQ(const module_id_t gnb_mod_idP, const rrc_gNB_ue_context_t *const ue_context_pP, const ngap_Cause_t causeP, const long cause_valueP) //------------------------------------------------------------------------------ { if (ue_context_pP == NULL) { LOG_E(RRC, "[gNB] In NGAP_UE_CONTEXT_RELEASE_REQ: invalid UE\n"); } else { - MessageDef *msg_context_release_req_p = NULL; - msg_context_release_req_p = itti_alloc_new_message(TASK_RRC_GNB, 0, NGAP_UE_CONTEXT_RELEASE_REQ); - NGAP_UE_CONTEXT_RELEASE_REQ(msg_context_release_req_p).gNB_ue_ngap_id = ue_context_pP->ue_context.gNB_ue_ngap_id; - NGAP_UE_CONTEXT_RELEASE_REQ(msg_context_release_req_p).cause = causeP; - NGAP_UE_CONTEXT_RELEASE_REQ(msg_context_release_req_p).cause_value = cause_valueP; - NGAP_UE_CONTEXT_RELEASE_REQ(msg_context_release_req_p).nb_of_pdusessions = ue_context_pP->ue_context.nb_of_pdusessions; - for (int pdusession = 0; pdusession < ue_context_pP->ue_context.nb_of_pdusessions; pdusession++) { - NGAP_UE_CONTEXT_RELEASE_REQ(msg_context_release_req_p).pdusessions[pdusession].pdusession_id = ue_context_pP->ue_context.pduSession[pdusession].param.pdusession_id; + const gNB_RRC_UE_t *UE = &ue_context_pP->ue_context; + MessageDef *msg = itti_alloc_new_message(TASK_RRC_GNB, 0, NGAP_UE_CONTEXT_RELEASE_REQ); + ngap_ue_release_req_t *req = &NGAP_UE_CONTEXT_RELEASE_REQ(msg); + memset(req, 0, sizeof(*req)); + req->gNB_ue_ngap_id = UE->gNB_ue_ngap_id; + req->cause = causeP; + req->cause_value = cause_valueP; + for (int i = 0; i < UE->nb_of_pdusessions; i++) { + req->pdusessions[i].pdusession_id = UE->pduSession[i].param.pdusession_id; + req->nb_of_pdusessions++; } - itti_send_msg_to_task(TASK_NGAP, GNB_MODULE_ID_TO_INSTANCE(gnb_mod_idP), msg_context_release_req_p); + itti_send_msg_to_task(TASK_NGAP, GNB_MODULE_ID_TO_INSTANCE(gnb_mod_idP), msg); } } /*------------------------------------------------------------------------------*/ -int -rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_REQ ( - MessageDef *msg_p, - const char *msg_name, - instance_t instance) +int rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_REQ(MessageDef *msg_p, instance_t instance) { uint32_t gNB_ue_ngap_id; - struct rrc_gNB_ue_context_s *ue_context_p = NULL; gNB_ue_ngap_id = NGAP_UE_CONTEXT_RELEASE_REQ(msg_p).gNB_ue_ngap_id; - ue_context_p = rrc_gNB_get_ue_context_from_ngap_ids(instance, UE_INITIAL_ID_INVALID, gNB_ue_ngap_id); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[instance], gNB_ue_ngap_id); if (ue_context_p == NULL) { /* Can not associate this message to an UE index, send a failure to ngAP and discard it! */ @@ -1386,12 +1133,10 @@ rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_REQ ( } else { /* TODO release context. */ /* Send the response */ - { - MessageDef *msg_resp_p; - msg_resp_p = itti_alloc_new_message(TASK_RRC_GNB, 0, NGAP_UE_CONTEXT_RELEASE_RESP); - NGAP_UE_CONTEXT_RELEASE_RESP(msg_resp_p).gNB_ue_ngap_id = gNB_ue_ngap_id; - itti_send_msg_to_task(TASK_NGAP, instance, msg_resp_p); - } + MessageDef *msg_resp_p; + msg_resp_p = itti_alloc_new_message(TASK_RRC_GNB, 0, NGAP_UE_CONTEXT_RELEASE_RESP); + NGAP_UE_CONTEXT_RELEASE_RESP(msg_resp_p).gNB_ue_ngap_id = gNB_ue_ngap_id; + itti_send_msg_to_task(TASK_NGAP, instance, msg_resp_p); return (0); } } @@ -1401,18 +1146,13 @@ rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_REQ ( * Process the NG command NGAP_UE_CONTEXT_RELEASE_COMMAND, sent by AMF. * The gNB should remove all pdu session, NG context, and other context of the UE. */ -int -rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND( - MessageDef *msg_p, - const char *msg_name, - instance_t instance) { +int rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND(MessageDef *msg_p, instance_t instance) +{ //----------------------------------------------------------------------------- uint32_t gNB_ue_ngap_id = 0; protocol_ctxt_t ctxt; - struct rrc_gNB_ue_context_s *ue_context_p = NULL; - struct rrc_ue_ngap_ids_s *rrc_ue_ngap_ids = NULL; gNB_ue_ngap_id = NGAP_UE_CONTEXT_RELEASE_COMMAND(msg_p).gNB_ue_ngap_id; - ue_context_p = rrc_gNB_get_ue_context_from_ngap_ids(instance, UE_INITIAL_ID_INVALID, gNB_ue_ngap_id); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[instance], gNB_ue_ngap_id); if (ue_context_p == NULL) { /* Can not associate this message to an UE index */ @@ -1423,21 +1163,16 @@ rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND( msg_complete_p = itti_alloc_new_message(TASK_RRC_GNB, 0, NGAP_UE_CONTEXT_RELEASE_COMPLETE); NGAP_UE_CONTEXT_RELEASE_COMPLETE(msg_complete_p).gNB_ue_ngap_id = gNB_ue_ngap_id; itti_send_msg_to_task(TASK_NGAP, instance, msg_complete_p); - rrc_ue_ngap_ids = rrc_gNB_NGAP_get_ue_ids(RC.nrrrc[instance], UE_INITIAL_ID_INVALID, gNB_ue_ngap_id); - - if (rrc_ue_ngap_ids != NULL) { - rrc_gNB_NGAP_remove_ue_ids(RC.nrrrc[instance], rrc_ue_ngap_ids); - } - return -1; - } else { - ue_context_p->ue_context.ue_release_timer_ng = 0; - ue_context_p->ue_context.ue_release_timer_thres_rrc = 1000; - PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0); - ctxt.eNB_index = 0; - rrc_gNB_generate_RRCRelease(&ctxt, ue_context_p); - return 0; } + + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; + UE->ue_release_timer_ng = 0; + UE->ue_release_timer_thres_rrc = 1000; + PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, UE->rnti, 0, 0); + ctxt.eNB_index = 0; + rrc_gNB_generate_RRCRelease(&ctxt, ue_context_p); + return 0; } void rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_COMPLETE( @@ -1448,52 +1183,6 @@ void rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_COMPLETE( itti_send_msg_to_task(TASK_NGAP, instance, msg); } -//------------------------------------------------------------------------------ -/* -* Remove UE ids (ue_initial_id and ng_id) from hashtables. -*/ -void -rrc_gNB_NGAP_remove_ue_ids( - gNB_RRC_INST *const rrc_instance_pP, - struct rrc_ue_ngap_ids_s *const ue_ids_pP -) -//------------------------------------------------------------------------------ -{ - hashtable_rc_t h_rc; - - if (rrc_instance_pP == NULL) { - LOG_E(NR_RRC, "Bad NR RRC instance\n"); - return; - } - - if (ue_ids_pP == NULL) { - LOG_E(NR_RRC, "Trying to free a NULL NGAP UE IDs\n"); - return; - } - - const uint16_t ue_initial_id = ue_ids_pP->ue_initial_id; - const uint32_t gNB_ue_ngap_id = ue_ids_pP->gNB_ue_ngap_id; - - if (gNB_ue_ngap_id > 0) { - h_rc = hashtable_remove(rrc_instance_pP->ngap_id2_ngap_ids, (hash_key_t)gNB_ue_ngap_id); - - if (h_rc != HASH_TABLE_OK) { - LOG_W(NR_RRC, "NGAP Did not find entry in hashtable ngap_id2_ngap_ids for gNB_ue_ngap_id %u\n", gNB_ue_ngap_id); - } else { - LOG_W(NR_RRC, "NGAP removed entry in hashtable ngap_id2_ngap_ids for gNB_ue_ngap_id %u\n", gNB_ue_ngap_id); - } - } - - if (ue_initial_id != UE_INITIAL_ID_INVALID) { - h_rc = hashtable_remove(rrc_instance_pP->initial_id2_ngap_ids, (hash_key_t)ue_initial_id); - - if (h_rc != HASH_TABLE_OK) { - LOG_W(NR_RRC, "NGAP Did not find entry in hashtable initial_id2_ngap_ids for ue_initial_id %u\n", ue_initial_id); - } else { - LOG_W(NR_RRC, "NGAP removed entry in hashtable initial_id2_ngap_ids for ue_initial_id %u\n", ue_initial_id); - } - } -} void rrc_gNB_send_NGAP_UE_CAPABILITIES_IND( const protocol_ctxt_t *const ctxt_pP, @@ -1504,40 +1193,38 @@ rrc_gNB_send_NGAP_UE_CAPABILITIES_IND( { NR_UE_CapabilityRAT_ContainerList_t *ueCapabilityRATContainerList = ul_dcch_msg->message.choice.c1->choice.ueCapabilityInformation->criticalExtensions.choice.ueCapabilityInformation->ue_CapabilityRAT_ContainerList; /* 4096 is arbitrary, should be big enough */ - unsigned char buf[4096]; - unsigned char *buf2; - NR_UERadioAccessCapabilityInformation_t rac; - - if (ueCapabilityRATContainerList->list.count == 0) { - LOG_W(RRC, "[gNB %d][UE %x] bad UE capabilities\n", ctxt_pP->module_id, ue_context_pP->ue_context.rnti); - } - - asn_enc_rval_t ret = uper_encode_to_buffer(&asn_DEF_NR_UE_CapabilityRAT_ContainerList, NULL, ueCapabilityRATContainerList, buf, 4096); - - if (ret.encoded == -1) abort(); - - memset(&rac, 0, sizeof(NR_UERadioAccessCapabilityInformation_t)); - rac.criticalExtensions.present = NR_UERadioAccessCapabilityInformation__criticalExtensions_PR_c1; - rac.criticalExtensions.choice.c1 = calloc(1,sizeof(*rac.criticalExtensions.choice.c1)); - rac.criticalExtensions.choice.c1->present = NR_UERadioAccessCapabilityInformation__criticalExtensions__c1_PR_ueRadioAccessCapabilityInformation; - rac.criticalExtensions.choice.c1->choice.ueRadioAccessCapabilityInformation = calloc(1,sizeof(NR_UERadioAccessCapabilityInformation_IEs_t)); - rac.criticalExtensions.choice.c1->choice.ueRadioAccessCapabilityInformation->ue_RadioAccessCapabilityInfo.buf = buf; - rac.criticalExtensions.choice.c1->choice.ueRadioAccessCapabilityInformation->ue_RadioAccessCapabilityInfo.size = (ret.encoded+7)/8; - rac.criticalExtensions.choice.c1->choice.ueRadioAccessCapabilityInformation->nonCriticalExtension = NULL; - /* 8192 is arbitrary, should be big enough */ - buf2 = malloc16(8192); - - if (buf2 == NULL) abort(); - - ret = uper_encode_to_buffer(&asn_DEF_NR_UERadioAccessCapabilityInformation, NULL, &rac, buf2, 8192); - - if (ret.encoded == -1) abort(); + void *buf; + NR_UERadioAccessCapabilityInformation_t rac = {0}; + gNB_RRC_UE_t *UE = &ue_context_pP->ue_context; + if (ueCapabilityRATContainerList->list.count == 0) { + LOG_W(RRC, "[gNB %d][UE %x] bad UE capabilities\n", ctxt_pP->module_id, UE->rnti); + } + + int ret = uper_encode_to_new_buffer(&asn_DEF_NR_UE_CapabilityRAT_ContainerList, NULL, ueCapabilityRATContainerList, &buf); + AssertFatal(ret > 0, "fail to encode ue capabilities\n"); + + rac.criticalExtensions.present = NR_UERadioAccessCapabilityInformation__criticalExtensions_PR_c1; + asn1cCalloc(rac.criticalExtensions.choice.c1, c1); + c1->present = NR_UERadioAccessCapabilityInformation__criticalExtensions__c1_PR_ueRadioAccessCapabilityInformation; + asn1cCalloc(c1->choice.ueRadioAccessCapabilityInformation, info); + info->ue_RadioAccessCapabilityInfo.buf = buf; + info->ue_RadioAccessCapabilityInfo.size = ret; + info->nonCriticalExtension = NULL; + /* 8192 is arbitrary, should be big enough */ + void *buf2 = NULL; + int encoded = uper_encode_to_new_buffer(&asn_DEF_NR_UERadioAccessCapabilityInformation, NULL, &rac, &buf2); + + AssertFatal(encoded > 0, "fail to encode ue capabilities\n"); + ; + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NR_UERadioAccessCapabilityInformation, &rac); MessageDef *msg_p; msg_p = itti_alloc_new_message (TASK_RRC_GNB, 0, NGAP_UE_CAPABILITIES_IND); - NGAP_UE_CAPABILITIES_IND (msg_p).gNB_ue_ngap_id = ue_context_pP->ue_context.gNB_ue_ngap_id; - NGAP_UE_CAPABILITIES_IND (msg_p).ue_radio_cap.length = (ret.encoded+7)/8; - NGAP_UE_CAPABILITIES_IND (msg_p).ue_radio_cap.buffer = buf2; + ngap_ue_cap_info_ind_t *ind = &NGAP_UE_CAPABILITIES_IND(msg_p); + memset(ind, 0, sizeof(*ind)); + ind->gNB_ue_ngap_id = UE->gNB_ue_ngap_id; + ind->ue_radio_cap.length = encoded; + ind->ue_radio_cap.buffer = buf2; itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, msg_p); LOG_I(NR_RRC,"Send message to ngap: NGAP_UE_CAPABILITIES_IND\n"); } @@ -1553,154 +1240,118 @@ rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE( { int pdu_sessions_released = 0; MessageDef *msg_p; + gNB_RRC_UE_t *UE = &ue_context_pP->ue_context; msg_p = itti_alloc_new_message (TASK_RRC_GNB, 0, NGAP_PDUSESSION_RELEASE_RESPONSE); - NGAP_PDUSESSION_RELEASE_RESPONSE (msg_p).gNB_ue_ngap_id = ue_context_pP->ue_context.gNB_ue_ngap_id; + ngap_pdusession_release_resp_t *resp = &NGAP_PDUSESSION_RELEASE_RESPONSE(msg_p); + memset(resp, 0, sizeof(*resp)); + resp->gNB_ue_ngap_id = UE->gNB_ue_ngap_id; for (int i = 0; i < NB_RB_MAX; i++) { - if (xid == ue_context_pP->ue_context.pduSession[i].xid) { - NGAP_PDUSESSION_RELEASE_RESPONSE (msg_p).pdusession_release[pdu_sessions_released].pdusession_id = - ue_context_pP->ue_context.pduSession[i].param.pdusession_id; + if (xid == UE->pduSession[i].xid) { + resp->pdusession_release[pdu_sessions_released].pdusession_id = UE->pduSession[i].param.pdusession_id; pdu_sessions_released++; //clear - memset(&ue_context_pP->ue_context.pduSession[i], 0, sizeof(pdu_session_param_t)); + memset(&UE->pduSession[i], 0, sizeof(*UE->pduSession)); } } - NGAP_PDUSESSION_RELEASE_RESPONSE (msg_p).nb_of_pdusessions_released = pdu_sessions_released; - NGAP_PDUSESSION_RELEASE_RESPONSE (msg_p).nb_of_pdusessions_failed = ue_context_pP->ue_context.nb_release_of_pdusessions; - memcpy(&(NGAP_PDUSESSION_RELEASE_RESPONSE (msg_p).pdusessions_failed[0]), &ue_context_pP->ue_context.pdusessions_release_failed[0], - sizeof(pdusession_failed_t)*ue_context_pP->ue_context.nb_release_of_pdusessions); - ue_context_pP->ue_context.nb_of_pdusessions -= pdu_sessions_released; - LOG_I(NR_RRC, - "NGAP PDUSESSION RELEASE RESPONSE: GNB_UE_NGAP_ID %u release_pdu_sessions %d setup_pdu_sessions %d \n", - NGAP_PDUSESSION_RELEASE_RESPONSE(msg_p).gNB_ue_ngap_id, - pdu_sessions_released, - ue_context_pP->ue_context.nb_of_pdusessions); + resp->nb_of_pdusessions_released = pdu_sessions_released; + resp->nb_of_pdusessions_failed = UE->nb_release_of_pdusessions; + memcpy(resp->pdusessions_failed, UE->pdusessions_release_failed, sizeof(pdusession_failed_t) * UE->nb_release_of_pdusessions); + LOG_E(NR_RRC, "we have to pack the array!!!\n"); + UE->nb_of_pdusessions -= pdu_sessions_released; + LOG_I(NR_RRC, "NGAP PDUSESSION RELEASE RESPONSE: GNB_UE_NGAP_ID %u release_pdu_sessions %d\n", resp->gNB_ue_ngap_id, pdu_sessions_released); itti_send_msg_to_task (TASK_NGAP, ctxt_pP->instance, msg_p); //clear xid for(int i = 0; i < NB_RB_MAX; i++) { - ue_context_pP->ue_context.pduSession[i].xid = -1; + UE->pduSession[i].xid = -1; } //clear release pdusessions - ue_context_pP->ue_context.nb_release_of_pdusessions = 0; - memset(&ue_context_pP->ue_context.pdusessions_release_failed[0], 0, sizeof(pdusession_failed_t)*NGAP_MAX_PDUSESSION); + UE->nb_release_of_pdusessions = 0; + memset(UE->pdusessions_release_failed, 0, sizeof(UE->pdusessions_release_failed)); } //------------------------------------------------------------------------------ -int -rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND( - MessageDef *msg_p, - const char *msg_name, - instance_t instance -) +int rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(MessageDef *msg_p, instance_t instance) //------------------------------------------------------------------------------ { - uint32_t gNB_ue_ngap_id; - rrc_gNB_ue_context_t *ue_context_p = NULL; - protocol_ctxt_t ctxt; - pdusession_release_t pdusession_release_params[NGAP_MAX_PDUSESSION]; - uint8_t nb_pdusessions_torelease; + uint32_t gNB_ue_ngap_id; + protocol_ctxt_t ctxt; uint8_t xid; - int i, pdusession; - uint8_t b_existed,is_existed; uint8_t pdusession_release_drb = 0; - - memcpy(&pdusession_release_params[0], &(NGAP_PDUSESSION_RELEASE_COMMAND (msg_p).pdusession_release_params[0]), - sizeof(pdusession_release_t)*NGAP_MAX_PDUSESSION); - gNB_ue_ngap_id = NGAP_PDUSESSION_RELEASE_COMMAND(msg_p).gNB_ue_ngap_id; - nb_pdusessions_torelease = NGAP_PDUSESSION_RELEASE_COMMAND(msg_p).nb_pdusessions_torelease; - if (nb_pdusessions_torelease > NGAP_MAX_PDUSESSION) { + ngap_pdusession_release_command_t *cmd = &NGAP_PDUSESSION_RELEASE_COMMAND(msg_p); + gNB_ue_ngap_id = cmd->gNB_ue_ngap_id; + if (cmd->nb_pdusessions_torelease > NGAP_MAX_PDUSESSION) { + LOG_E(NR_RRC, "incorrect number of pdu session do release %d\n", cmd->nb_pdusessions_torelease); return -1; } - ue_context_p = rrc_gNB_get_ue_context_from_ngap_ids(instance, UE_INITIAL_ID_INVALID, gNB_ue_ngap_id); - LOG_I(NR_RRC, "[gNB %ld] Received %s: gNB_ue_ngap_id %u \n", instance, msg_name, gNB_ue_ngap_id); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[instance], gNB_ue_ngap_id); - if (ue_context_p != NULL) { - PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0); - xid = rrc_gNB_get_next_transaction_identifier(ctxt.module_id); - LOG_I(NR_RRC,"PDU Session Release Command: AMF_UE_NGAP_ID %lu GNB_UE_NGAP_ID %u release_pdusessions %d \n", - NGAP_PDUSESSION_RELEASE_COMMAND (msg_p).amf_ue_ngap_id&0x000000FFFFFFFFFF, gNB_ue_ngap_id, nb_pdusessions_torelease); + if (!ue_context_p) { + LOG_E(NR_RRC, "[gNB %ld] not found ue context gNB_ue_ngap_id %u \n", instance, gNB_ue_ngap_id); + return -1; + } - for (pdusession = 0; pdusession < nb_pdusessions_torelease; pdusession++) { - b_existed = 0; - is_existed = 0; + LOG_I(NR_RRC, "[gNB %ld] gNB_ue_ngap_id %u \n", instance, gNB_ue_ngap_id); + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; + PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, instance, GNB_FLAG_YES, UE->rnti, 0, 0); + xid = rrc_gNB_get_next_transaction_identifier(ctxt.module_id); + LOG_I( + NR_RRC, "PDU Session Release Command: AMF_UE_NGAP_ID %lu GNB_UE_NGAP_ID %u release_pdusessions %d \n", cmd->amf_ue_ngap_id, gNB_ue_ngap_id, cmd->nb_pdusessions_torelease); - for (i = pdusession-1; i >= 0; i--) { - if (pdusession_release_params[pdusession].pdusession_id == pdusession_release_params[i].pdusession_id) { - is_existed = 1; - break; - } - } - - if(is_existed == 1) { - // pdusession_id is existed - continue; - } - - for (i = 0; i < NR_NB_RB_MAX; i++) { - if (pdusession_release_params[pdusession].pdusession_id == ue_context_p->ue_context.pduSession[i].param.pdusession_id) { - b_existed = 1; - break; - } - } - - if(b_existed == 0) { - // no pdusession_id - LOG_I(NR_RRC, "no pdusession_id \n"); - ue_context_p->ue_context.pdusessions_release_failed[ue_context_p->ue_context.nb_release_of_pdusessions].pdusession_id = pdusession_release_params[pdusession].pdusession_id; - ue_context_p->ue_context.pdusessions_release_failed[ue_context_p->ue_context.nb_release_of_pdusessions].cause = NGAP_CAUSE_RADIO_NETWORK; - ue_context_p->ue_context.pdusessions_release_failed[ue_context_p->ue_context.nb_release_of_pdusessions].cause_value = 30; - ue_context_p->ue_context.nb_release_of_pdusessions++; - } else { - if(ue_context_p->ue_context.pduSession[i].status == PDU_SESSION_STATUS_FAILED) { - ue_context_p->ue_context.pduSession[i].xid = xid; - continue; - } else if(ue_context_p->ue_context.pduSession[i].status == PDU_SESSION_STATUS_ESTABLISHED) { - LOG_I(NR_RRC, "RELEASE pdusession %d \n", ue_context_p->ue_context.pduSession[i].param.pdusession_id); - ue_context_p->ue_context.pduSession[i].status = PDU_SESSION_STATUS_TORELEASE; - ue_context_p->ue_context.pduSession[i].xid = xid; - pdusession_release_drb++; - } else { - // pdusession_id status NG - ue_context_p->ue_context.pdusessions_release_failed[ue_context_p->ue_context.nb_release_of_pdusessions].pdusession_id = pdusession_release_params[pdusession].pdusession_id; - ue_context_p->ue_context.pdusessions_release_failed[ue_context_p->ue_context.nb_release_of_pdusessions].cause = NGAP_CAUSE_RADIO_NETWORK; - ue_context_p->ue_context.pdusessions_release_failed[ue_context_p->ue_context.nb_release_of_pdusessions].cause_value = 0; - ue_context_p->ue_context.nb_release_of_pdusessions++; - } - } + for (int pdusession = 0; pdusession < cmd->nb_pdusessions_torelease; pdusession++) { + rrc_pdu_session_param_t *pduSession = find_pduSession(UE, cmd->pdusession_release_params[pdusession].pdusession_id, false); + if (!pduSession) { + LOG_I(NR_RRC, "no pdusession_id \n"); + UE->pdusessions_release_failed[UE->nb_release_of_pdusessions].pdusession_id = cmd->pdusession_release_params[pdusession].pdusession_id; + UE->pdusessions_release_failed[UE->nb_release_of_pdusessions].cause = NGAP_CAUSE_RADIO_NETWORK; + UE->pdusessions_release_failed[UE->nb_release_of_pdusessions].cause_value = 30; + UE->nb_release_of_pdusessions++; + continue; } - - if(pdusession_release_drb > 0) { - //TODO RRCReconfiguration To UE - LOG_I(NR_RRC, "Send RRCReconfiguration To UE \n"); - rrc_gNB_generate_dedicatedRRCReconfiguration_release(&ctxt, ue_context_p, xid, NGAP_PDUSESSION_RELEASE_COMMAND (msg_p).nas_pdu.length, NGAP_PDUSESSION_RELEASE_COMMAND (msg_p).nas_pdu.buffer); - } else { - //gtp tunnel delete - LOG_I(NR_RRC, "gtp tunnel delete \n"); - gtpv1u_gnb_delete_tunnel_req_t req={0}; - req.ue_id = ue_context_p->ue_context.rnti; - - for(i = 0; i < NB_RB_MAX; i++) { - if(xid == ue_context_p->ue_context.pduSession[i].xid) { - req.pdusession_id[req.num_pdusession++] = ue_context_p->ue_context.gnb_gtp_psi[i]; - ue_context_p->ue_context.gnb_gtp_teid[i] = 0; - memset(&ue_context_p->ue_context.gnb_gtp_addrs[i], 0, sizeof(ue_context_p->ue_context.gnb_gtp_addrs[i])); - ue_context_p->ue_context.gnb_gtp_psi[i] = 0; - } - } - gtpv1u_delete_ngu_tunnel(instance, &req); - //NGAP_PDUSESSION_RELEASE_RESPONSE - rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(&ctxt, ue_context_p, xid); - LOG_I(NR_RRC, "Send PDU Session Release Response \n"); + if (pduSession->status == PDU_SESSION_STATUS_FAILED) { + pduSession->xid = xid; + continue; } + if (pduSession->status == PDU_SESSION_STATUS_ESTABLISHED) { + LOG_I(NR_RRC, "RELEASE pdusession %d \n", pduSession->param.pdusession_id); + pduSession->status = PDU_SESSION_STATUS_TORELEASE; + pduSession->xid = xid; + pdusession_release_drb++; + continue; + } + // pdusession_id status NG + UE->pdusessions_release_failed[UE->nb_release_of_pdusessions].pdusession_id = cmd->pdusession_release_params[pdusession].pdusession_id; + UE->pdusessions_release_failed[UE->nb_release_of_pdusessions].cause = NGAP_CAUSE_RADIO_NETWORK; + UE->pdusessions_release_failed[UE->nb_release_of_pdusessions].cause_value = 0; + UE->nb_release_of_pdusessions++; + } + + if (pdusession_release_drb > 0) { + // TODO RRCReconfiguration To UE + LOG_I(NR_RRC, "Send RRCReconfiguration To UE \n"); + rrc_gNB_generate_dedicatedRRCReconfiguration_release(&ctxt, ue_context_p, xid, cmd->nas_pdu.length, cmd->nas_pdu.buffer); } else { - LOG_E(NR_RRC, "PDU Session Release Command: AMF_UE_NGAP_ID %lu GNB_UE_NGAP_ID %u Error ue_context_p NULL \n", - NGAP_PDUSESSION_RELEASE_COMMAND (msg_p).amf_ue_ngap_id&0x000000FFFFFFFFFF, NGAP_PDUSESSION_RELEASE_COMMAND(msg_p).gNB_ue_ngap_id); - return -1; - } + // gtp tunnel delete + LOG_I(NR_RRC, "gtp tunnel delete \n"); + gtpv1u_gnb_delete_tunnel_req_t req = {0}; + req.ue_id = UE->rnti; + for (int i = 0; i < NB_RB_MAX; i++) { + if (xid == UE->pduSession[i].xid) { + req.pdusession_id[req.num_pdusession++] = UE->gnb_gtp_psi[i]; + UE->gnb_gtp_teid[i] = 0; + memset(&UE->gnb_gtp_addrs[i], 0, sizeof(UE->gnb_gtp_addrs[i])); + UE->gnb_gtp_psi[i] = 0; + } + } + gtpv1u_delete_ngu_tunnel(instance, &req); + // NGAP_PDUSESSION_RELEASE_RESPONSE + rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE(&ctxt, ue_context_p, xid); + LOG_I(NR_RRC, "Send PDU Session Release Response \n"); + } return 0; } @@ -1714,8 +1365,8 @@ void nr_rrc_rx_tx(void) { } /*------------------------------------------------------------------------------*/ -int rrc_gNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance_t instance) { - +int rrc_gNB_process_PAGING_IND(MessageDef *msg_p, instance_t instance) +{ for (uint16_t tai_size = 0; tai_size < NGAP_PAGING_IND(msg_p).tai_size; tai_size++) { LOG_I(NR_RRC,"[gNB %ld] In NGAP_PAGING_IND: MCC %d, MNC %d, TAC %d\n", instance, NGAP_PAGING_IND(msg_p).plmn_identity[tai_size].mcc, NGAP_PAGING_IND(msg_p).plmn_identity[tai_size].mnc, NGAP_PAGING_IND(msg_p).tac[tai_size]); @@ -1746,4 +1397,3 @@ int rrc_gNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance return 0; } - diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.h b/openair2/RRC/NR/rrc_gNB_NGAP.h index 6c8a861f03..a0c42dcaaf 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.h +++ b/openair2/RRC/NR/rrc_gNB_NGAP.h @@ -40,18 +40,6 @@ #include "NR_UL-DCCH-Message.h" #include "NGAP_CauseRadioNetwork.h" -typedef struct rrc_ue_ngap_ids_s { - /* Tree related data */ - RB_ENTRY(rrc_ue_ngap_ids_s) entries; - - // keys - uint16_t ue_initial_id; - uint32_t gNB_ue_ngap_id; - - // value - rnti_t ue_rnti; -} rrc_ue_ngap_ids_t; - void rrc_gNB_send_NGAP_NAS_FIRST_REQ( const protocol_ctxt_t *const ctxt_pP, @@ -59,12 +47,7 @@ rrc_gNB_send_NGAP_NAS_FIRST_REQ( NR_RRCSetupComplete_IEs_t *rrcSetupComplete ); -int -rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ( - MessageDef *msg_p, - const char *msg_name, - instance_t instance -); +int rrc_gNB_process_NGAP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, instance_t instance); void rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP( @@ -72,20 +55,7 @@ rrc_gNB_send_NGAP_INITIAL_CONTEXT_SETUP_RESP( rrc_gNB_ue_context_t *const ue_context_pP ); -int -rrc_gNB_process_security( - const protocol_ctxt_t *const ctxt_pP, - rrc_gNB_ue_context_t *const ue_context_pP, - ngap_security_capabilities_t *security_capabilities_pP -); - -int -rrc_gNB_process_NGAP_DOWNLINK_NAS( - MessageDef *msg_p, - const char *msg_name, - instance_t instance, - mui_t *rrc_gNB_mui -); +int rrc_gNB_process_NGAP_DOWNLINK_NAS(MessageDef *msg_p, instance_t instance, mui_t *rrc_gNB_mui); void rrc_gNB_send_NGAP_UPLINK_NAS( @@ -101,19 +71,9 @@ rrc_gNB_send_NGAP_PDUSESSION_SETUP_RESP( uint8_t xid ); -void -rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ( - MessageDef *msg_p, - const char *msg_name, - instance_t instance -); +void rrc_gNB_process_NGAP_PDUSESSION_SETUP_REQ(MessageDef *msg_p, instance_t instance); -int -rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ( - MessageDef *msg_p, - const char *msg_name, - instance_t instance -); +int rrc_gNB_process_NGAP_PDUSESSION_MODIFY_REQ(MessageDef *msg_p, instance_t instance); int rrc_gNB_send_NGAP_PDUSESSION_MODIFY_RESP( @@ -128,38 +88,13 @@ rrc_gNB_modify_dedicatedRRCReconfiguration( rrc_gNB_ue_context_t *ue_context_pP ); +void rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_REQ(const module_id_t gnb_mod_idP, const rrc_gNB_ue_context_t *const ue_context_pP, const ngap_Cause_t causeP, const long cause_valueP); -void -rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_REQ( - const module_id_t gnb_mod_idP, - const rrc_gNB_ue_context_t *const ue_context_pP, - const ngap_Cause_t causeP, - const long cause_valueP -); +int rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_REQ(MessageDef *msg_p, instance_t instance); -int -rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_REQ ( - MessageDef *msg_p, - const char *msg_name, - instance_t instance -); +int rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND(MessageDef *msg_p, instance_t instance); -int -rrc_gNB_process_NGAP_UE_CONTEXT_RELEASE_COMMAND( - MessageDef *msg_p, - const char *msg_name, - instance_t instance -); - -void rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_COMPLETE( - instance_t instance, - uint32_t gNB_ue_ngap_id); - -void -rrc_gNB_NGAP_remove_ue_ids( - gNB_RRC_INST *const rrc_instance_pP, - struct rrc_ue_ngap_ids_s *const ue_ids_pP -); +void rrc_gNB_send_NGAP_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, uint32_t gNB_ue_ngap_id); void rrc_gNB_send_NGAP_UE_CAPABILITIES_IND( @@ -168,12 +103,7 @@ rrc_gNB_send_NGAP_UE_CAPABILITIES_IND( NR_UL_DCCH_Message_t *const ul_dcch_msg ); -int -rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND( - MessageDef *msg_p, - const char *msg_name, - instance_t instance -); +int rrc_gNB_process_NGAP_PDUSESSION_RELEASE_COMMAND(MessageDef *msg_p, instance_t instance); void rrc_gNB_send_NGAP_PDUSESSION_RELEASE_RESPONSE( @@ -189,17 +119,6 @@ nr_rrc_pdcp_config_security( const uint8_t send_security_mode_command ); -struct rrc_gNB_ue_context_s * -rrc_gNB_get_ue_context_from_ngap_ids( - const instance_t instanceP, - const uint16_t ue_initial_idP, - const uint32_t gNB_ue_ngap_idP -); - -int -rrc_gNB_process_PAGING_IND( - MessageDef *msg_p, - const char *msg_name, - instance_t instance); +int rrc_gNB_process_PAGING_IND(MessageDef *msg_p, instance_t instance); #endif diff --git a/openair2/RRC/NR/rrc_gNB_UE_context.c b/openair2/RRC/NR/rrc_gNB_UE_context.c index 87b4de23b2..137ed695f5 100644 --- a/openair2/RRC/NR/rrc_gNB_UE_context.c +++ b/openair2/RRC/NR/rrc_gNB_UE_context.c @@ -38,15 +38,14 @@ //------------------------------------------------------------------------------ -int rrc_gNB_compare_ue_rnti_id( - struct rrc_gNB_ue_context_s *c1_pP, struct rrc_gNB_ue_context_s *c2_pP) +int rrc_gNB_compare_ue_rnti_id(rrc_gNB_ue_context_t *c1_pP, rrc_gNB_ue_context_t *c2_pP) //------------------------------------------------------------------------------ { - if (c1_pP->ue_id_rnti > c2_pP->ue_id_rnti) { + if (c1_pP->ue_context.gNB_ue_ngap_id > c2_pP->ue_context.gNB_ue_ngap_id) { return 1; } - if (c1_pP->ue_id_rnti < c2_pP->ue_id_rnti) { + if (c1_pP->ue_context.gNB_ue_ngap_id < c2_pP->ue_context.gNB_ue_ngap_id) { return -1; } @@ -57,25 +56,17 @@ int rrc_gNB_compare_ue_rnti_id( RB_GENERATE(rrc_nr_ue_tree_s, rrc_gNB_ue_context_s, entries, rrc_gNB_compare_ue_rnti_id); - - //------------------------------------------------------------------------------ -struct rrc_gNB_ue_context_s * -rrc_gNB_allocate_new_UE_context( - gNB_RRC_INST *rrc_instance_pP -) +rrc_gNB_ue_context_t *rrc_gNB_allocate_new_ue_context(gNB_RRC_INST *rrc_instance_pP) //------------------------------------------------------------------------------ { - struct rrc_gNB_ue_context_s *new_p; - new_p = (struct rrc_gNB_ue_context_s * )malloc(sizeof(struct rrc_gNB_ue_context_s)); + rrc_gNB_ue_context_t *new_p = calloc(1, sizeof(*new_p)); if (new_p == NULL) { - LOG_E(RRC, "Cannot allocate new ue context\n"); + LOG_E(NR_RRC, "Cannot allocate new ue context\n"); return NULL; } - - memset(new_p, 0, sizeof(struct rrc_gNB_ue_context_s)); - new_p->local_uid = uid_linear_allocator_new(&rrc_instance_pP->uid_allocator); + new_p->ue_context.gNB_ue_ngap_id = uid_linear_allocator_new(&rrc_instance_pP->uid_allocator); for(int i = 0; i < NB_RB_MAX; i++) { new_p->ue_context.e_rab[i].xid = -1; @@ -83,94 +74,66 @@ rrc_gNB_allocate_new_UE_context( new_p->ue_context.modify_e_rab[i].xid = -1; } - LOG_D(NR_RRC,"Returning new UE context at %p\n",new_p); + LOG_I(NR_RRC, "Returning new RRC UE context RRC ue id: %d\n", new_p->ue_context.gNB_ue_ngap_id); return(new_p); } //------------------------------------------------------------------------------ -struct rrc_gNB_ue_context_s * -rrc_gNB_get_ue_context( - gNB_RRC_INST *rrc_instance_pP, - rnti_t rntiP) +rrc_gNB_ue_context_t *rrc_gNB_get_ue_context(gNB_RRC_INST *rrc_instance_pP, ue_id_t ue) //------------------------------------------------------------------------------ { rrc_gNB_ue_context_t temp; - memset(&temp, 0, sizeof(struct rrc_gNB_ue_context_s)); /* gNB ue rrc id = 24 bits wide */ - temp.ue_id_rnti = rntiP; - struct rrc_gNB_ue_context_s *ue_context_p = NULL; - ue_context_p = RB_FIND(rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head, &temp); - - if ( ue_context_p != NULL) { - return ue_context_p; - } else { - RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &(rrc_instance_pP->rrc_ue_head)) { - if (ue_context_p->ue_context.rnti == rntiP) { - return ue_context_p; - } - } - return NULL; - } + temp.ue_context.gNB_ue_ngap_id = ue; + return RB_FIND(rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head, &temp); } -void rrc_gNB_free_mem_UE_context( - const protocol_ctxt_t *const ctxt_pP, - struct rrc_gNB_ue_context_s *const ue_context_pP -) +rrc_gNB_ue_context_t *rrc_gNB_get_ue_context_by_rnti(gNB_RRC_INST *rrc_instance_pP, rnti_t rntiP) +{ + rrc_gNB_ue_context_t *ue_context_p; + RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &(rrc_instance_pP->rrc_ue_head)) + { + if (ue_context_p->ue_context.rnti == rntiP) + return ue_context_p; + } + LOG_W(NR_RRC, "search by rnti not found %04x\n", rntiP); + return NULL; +} + +void rrc_gNB_free_mem_ue_context(rrc_gNB_ue_context_t *const ue_context_pP) //----------------------------------------------------------------------------- { - - LOG_T(RRC, - PROTOCOL_NR_RRC_CTXT_UE_FMT" Clearing UE context 0x%p (free internal structs)\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), - ue_context_pP); - - //ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_LTE_SCellToAddMod_r10, &ue_context_pP->ue_context.sCell_config[0]); - //ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_LTE_SCellToAddMod_r10, &ue_context_pP->ue_context.sCell_config[1]); - - // empty the internal fields of the UE context here + free(ue_context_pP); + LOG_T(NR_RRC, " Clearing UE context 0x%p (free internal structs)\n", ue_context_pP); } //------------------------------------------------------------------------------ -void rrc_gNB_remove_ue_context( - const protocol_ctxt_t *const ctxt_pP, - gNB_RRC_INST *rrc_instance_pP, - struct rrc_gNB_ue_context_s *ue_context_pP) +void rrc_gNB_remove_ue_context(gNB_RRC_INST *rrc_instance_pP, rrc_gNB_ue_context_t *ue_context_pP) //------------------------------------------------------------------------------ { if (rrc_instance_pP == NULL) { - LOG_E(RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" Bad RRC instance\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); + LOG_E(NR_RRC, " Bad RRC instance\n"); return; } if (ue_context_pP == NULL) { - LOG_E(RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" Trying to free a NULL UE context\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); + LOG_E(NR_RRC, "Trying to free a NULL UE context\n"); return; } RB_REMOVE(rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head, ue_context_pP); - rrc_gNB_free_mem_UE_context(ctxt_pP, ue_context_pP); - uid_linear_allocator_free(&rrc_instance_pP->uid_allocator, ue_context_pP->local_uid); - free(ue_context_pP); - rrc_instance_pP->Nb_ue --; - LOG_I(RRC, - PROTOCOL_NR_RRC_CTXT_UE_FMT" Removed UE context\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); + uid_linear_allocator_free(&rrc_instance_pP->uid_allocator, ue_context_pP->ue_context.gNB_ue_ngap_id); + rrc_gNB_free_mem_ue_context(ue_context_pP); + LOG_I(NR_RRC, "Removed UE context\n"); } //----------------------------------------------------------------------------- // return the ue context if there is already an UE with ue_identityP, NULL otherwise -struct rrc_gNB_ue_context_s * -rrc_gNB_ue_context_random_exist( - gNB_RRC_INST *rrc_instance_pP, - const uint64_t ue_identityP -) +rrc_gNB_ue_context_t *rrc_gNB_ue_context_random_exist(gNB_RRC_INST *rrc_instance_pP, const uint64_t ue_identityP) //----------------------------------------------------------------------------- { - struct rrc_gNB_ue_context_s *ue_context_p = NULL; + rrc_gNB_ue_context_t *ue_context_p = NULL; RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head) { if (ue_context_p->ue_context.random_ue_identity == ue_identityP) return ue_context_p; @@ -180,63 +143,48 @@ rrc_gNB_ue_context_random_exist( //----------------------------------------------------------------------------- // return the ue context if there is already an UE with the same S-TMSI, NULL otherwise -struct rrc_gNB_ue_context_s * -rrc_gNB_ue_context_5g_s_tmsi_exist( - gNB_RRC_INST *rrc_instance_pP, - const uint64_t s_TMSI -) +rrc_gNB_ue_context_t *rrc_gNB_ue_context_5g_s_tmsi_exist(gNB_RRC_INST *rrc_instance_pP, const uint64_t s_TMSI) //----------------------------------------------------------------------------- { - struct rrc_gNB_ue_context_s *ue_context_p = NULL; - RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head) { - LOG_I(NR_RRC,"Checking for UE 5G S-TMSI %ld: RNTI %04x\n", - s_TMSI, ue_context_p->ue_context.rnti); - - if (ue_context_p->ue_context.ng_5G_S_TMSI_Part1 == s_TMSI) { - return ue_context_p; - } - } + rrc_gNB_ue_context_t *ue_context_p = NULL; + RB_FOREACH(ue_context_p, rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head) + { + LOG_I(NR_RRC, "Checking for UE 5G S-TMSI %ld: RNTI %04x\n", s_TMSI, ue_context_p->ue_context.rnti); + if (ue_context_p->ue_context.ng_5G_S_TMSI_Part1 == s_TMSI) + return ue_context_p; + } return NULL; } +void rrc_gNB_update_ue_context_rnti(rnti_t rnti, gNB_RRC_INST *rrc_instance_pP, uint32_t gNB_ue_ngap_id) +{ + // rnti will need to be a fast access key, with indexing, today it is sequential search + // This function will update the index when it will be made + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context(rrc_instance_pP, gNB_ue_ngap_id); + if (ue_context_p) + ue_context_p->ue_context.rnti = rnti; + else + LOG_E(NR_RRC, "update rnti on a wrong UE id\n"); +} //----------------------------------------------------------------------------- -// return a new ue context structure if ue_identityP, ctxt_pP->rnti not found in collection -struct rrc_gNB_ue_context_s * -rrc_gNB_get_next_free_ue_context( - const protocol_ctxt_t *const ctxt_pP, - gNB_RRC_INST *rrc_instance_pP, - const uint64_t ue_identityP -) +// return a new ue context structure if ue_identityP, rnti not found in collection +rrc_gNB_ue_context_t *rrc_gNB_create_ue_context(rnti_t rnti, gNB_RRC_INST *rrc_instance_pP, const uint64_t ue_identityP) //----------------------------------------------------------------------------- { - struct rrc_gNB_ue_context_s *ue_context_p = NULL; - ue_context_p = rrc_gNB_get_ue_context(rrc_instance_pP, ctxt_pP->rntiMaybeUEid); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_get_ue_context_by_rnti(rrc_instance_pP, rnti); - if (ue_context_p == NULL) { - ue_context_p = rrc_gNB_allocate_new_UE_context(rrc_instance_pP); - - if (ue_context_p == NULL) { - LOG_E(NR_RRC, - PROTOCOL_NR_RRC_CTXT_UE_FMT" Cannot create new UE context, no memory\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); - return NULL; - } - - ue_context_p->ue_id_rnti = ctxt_pP->rntiMaybeUEid; // here ue_id_rnti is just a key, may be something else - ue_context_p->ue_context.rnti = ctxt_pP->rntiMaybeUEid; // yes duplicate, 1 may be removed - ue_context_p->ue_context.random_ue_identity = ue_identityP; - RB_INSERT(rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head, ue_context_p); - LOG_D(NR_RRC, - PROTOCOL_NR_RRC_CTXT_UE_FMT" Created new UE context uid %u\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP), - ue_context_p->local_uid); + if (ue_context_p) { + LOG_E(NR_RRC, "Cannot create new UE context, already exist rnti: %04x\n", rnti); return ue_context_p; - } else { - LOG_E(NR_RRC, - PROTOCOL_NR_RRC_CTXT_UE_FMT" Cannot create new UE context, already exist\n", - PROTOCOL_NR_RRC_CTXT_UE_ARGS(ctxt_pP)); - return NULL; } - return(ue_context_p); + ue_context_p = rrc_gNB_allocate_new_ue_context(rrc_instance_pP); + if (ue_context_p == NULL) + return NULL; + + ue_context_p->ue_context.rnti = rnti; + ue_context_p->ue_context.random_ue_identity = ue_identityP; + RB_INSERT(rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head, ue_context_p); + LOG_W(NR_RRC, " Created new UE context rnti: %04x, random ue id %lx, RRC ue id %u\n", rnti, ue_identityP, ue_context_p->ue_context.gNB_ue_ngap_id); + return ue_context_p; } diff --git a/openair2/RRC/NR/rrc_gNB_UE_context.h b/openair2/RRC/NR/rrc_gNB_UE_context.h index 4009f2617f..9c1ec2c164 100644 --- a/openair2/RRC/NR/rrc_gNB_UE_context.h +++ b/openair2/RRC/NR/rrc_gNB_UE_context.h @@ -34,52 +34,23 @@ #include "COMMON/platform_types.h" #include "nr_rrc_defs.h" -int rrc_gNB_compare_ue_rnti_id( - struct rrc_gNB_ue_context_s* c1_pP, - struct rrc_gNB_ue_context_s* c2_pP -); +int rrc_gNB_compare_ue_rnti_id(rrc_gNB_ue_context_t* c1_pP, rrc_gNB_ue_context_t* c2_pP); RB_PROTOTYPE(rrc_nr_ue_tree_s, rrc_gNB_ue_context_s, entries, rrc_gNB_compare_ue_rnti_id); -struct rrc_gNB_ue_context_s* -rrc_gNB_allocate_new_UE_context( - gNB_RRC_INST* rrc_instance_pP -); +rrc_gNB_ue_context_t* rrc_gNB_allocate_new_ue_context(gNB_RRC_INST* rrc_instance_pP); -struct rrc_gNB_ue_context_s* -rrc_gNB_get_ue_context( - gNB_RRC_INST* rrc_instance_pP, - rnti_t rntiP -); +rrc_gNB_ue_context_t* rrc_gNB_get_ue_context(gNB_RRC_INST* rrc_instance_pP, ue_id_t ue); +rrc_gNB_ue_context_t* rrc_gNB_get_ue_context_by_rnti(gNB_RRC_INST* rrc_instance_pP, rnti_t rntiP); -void rrc_gNB_free_mem_UE_context( - const protocol_ctxt_t *const ctxt_pP, - struct rrc_gNB_ue_context_s *const ue_context_pP -); +void rrc_gNB_free_mem_ue_context(rrc_gNB_ue_context_t* const ue_context_pP); -void rrc_gNB_remove_ue_context( - const protocol_ctxt_t* const ctxt_pP, - gNB_RRC_INST* rrc_instance_pP, - struct rrc_gNB_ue_context_s* ue_context_pP -); +void rrc_gNB_remove_ue_context(gNB_RRC_INST* rrc_instance_pP, rrc_gNB_ue_context_t* ue_context_pP); -struct rrc_gNB_ue_context_s * -rrc_gNB_ue_context_random_exist( - gNB_RRC_INST *rrc_instance_pP, - const uint64_t ue_identityP -); +rrc_gNB_ue_context_t* rrc_gNB_ue_context_random_exist(gNB_RRC_INST* rrc_instance_pP, const uint64_t ue_identityP); -struct rrc_gNB_ue_context_s * -rrc_gNB_ue_context_5g_s_tmsi_exist( - gNB_RRC_INST *rrc_instance_pP, - const uint64_t s_TMSI -); - -struct rrc_gNB_ue_context_s * -rrc_gNB_get_next_free_ue_context( - const protocol_ctxt_t *const ctxt_pP, - gNB_RRC_INST *rrc_instance_pP, - const uint64_t ue_identityP -); +rrc_gNB_ue_context_t* rrc_gNB_ue_context_5g_s_tmsi_exist(gNB_RRC_INST* rrc_instance_pP, const uint64_t s_TMSI); +void rrc_gNB_update_ue_context_rnti(rnti_t rnti, gNB_RRC_INST* rrc_instance_pP, uint32_t gNB_ue_ngap_id); +rrc_gNB_ue_context_t* rrc_gNB_create_ue_context(rnti_t rnti, gNB_RRC_INST* rrc_instance_pP, const uint64_t ue_identityP); #endif diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index df30753595..0a6eb050e5 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -33,9 +33,11 @@ #include "NR_UE-NR-Capability.h" //#include "NR_UE-CapabilityRAT-ContainerList.h" #include "LTE_UE-CapabilityRAT-ContainerList.h" +#include "NR_CellGroupConfig.h" #include "NR_CG-Config.h" //#include "NR_SRB-ToAddModList.h" #include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h" +#include "openair2/LAYER2/nr_rlc/nr_rlc_oai_api.h" #include "openair2/RRC/LTE/rrc_eNB_GTPV1U.h" #include "executables/softmodem-common.h" #include "executables/nr-softmodem.h" @@ -43,10 +45,10 @@ #include #include "UTIL/OSA/osa_defs.h" #include +#include "pdcp.h" -void rrc_parse_ue_capabilities(gNB_RRC_INST *rrc, NR_UE_CapabilityRAT_ContainerList_t *UE_CapabilityRAT_ContainerList, x2ap_ENDC_sgnb_addition_req_t *m, NR_CG_ConfigInfo_IEs_t *cg_config_info) { - struct rrc_gNB_ue_context_s *ue_context_p = NULL; - +void rrc_parse_ue_capabilities(gNB_RRC_INST *rrc, NR_UE_CapabilityRAT_ContainerList_t *UE_CapabilityRAT_ContainerList, x2ap_ENDC_sgnb_addition_req_t *m, NR_CG_ConfigInfo_IEs_t *cg_config_info) +{ OCTET_STRING_t *ueCapabilityRAT_Container_nr=NULL; OCTET_STRING_t *ueCapabilityRAT_Container_MRDC=NULL; asn_dec_rval_t dec_rval; @@ -61,36 +63,27 @@ void rrc_parse_ue_capabilities(gNB_RRC_INST *rrc, NR_UE_CapabilityRAT_ContainerL } // decode and store capabilities - ue_context_p = rrc_gNB_allocate_new_UE_context(rrc); + rrc_gNB_ue_context_t *ue_context_p = rrc_gNB_allocate_new_ue_context(rrc); + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; if (ueCapabilityRAT_Container_nr != NULL) { - dec_rval = uper_decode(NULL, - &asn_DEF_NR_UE_NR_Capability, - (void **)&ue_context_p->ue_context.UE_Capability_nr, - ueCapabilityRAT_Container_nr->buf, - ueCapabilityRAT_Container_nr->size, 0, 0); + dec_rval = uper_decode(NULL, &asn_DEF_NR_UE_NR_Capability, (void **)&UE->UE_Capability_nr, ueCapabilityRAT_Container_nr->buf, ueCapabilityRAT_Container_nr->size, 0, 0); if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)) { LOG_E(RRC, "Failed to decode UE NR capabilities (%zu bytes) container size %lu\n", dec_rval.consumed,ueCapabilityRAT_Container_nr->size); - ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability, - ue_context_p->ue_context.UE_Capability_nr); - ue_context_p->ue_context.UE_Capability_nr = 0; + ASN_STRUCT_FREE(asn_DEF_NR_UE_NR_Capability, UE->UE_Capability_nr); + UE->UE_Capability_nr = 0; AssertFatal(1==0,"exiting\n"); } } if (ueCapabilityRAT_Container_MRDC != NULL) { - dec_rval = uper_decode(NULL, - &asn_DEF_NR_UE_MRDC_Capability, - (void **)&ue_context_p->ue_context.UE_Capability_MRDC, - ueCapabilityRAT_Container_MRDC->buf, - ueCapabilityRAT_Container_MRDC->size, 0, 0); + dec_rval = uper_decode(NULL, &asn_DEF_NR_UE_MRDC_Capability, (void **)&UE->UE_Capability_MRDC, ueCapabilityRAT_Container_MRDC->buf, ueCapabilityRAT_Container_MRDC->size, 0, 0); if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)) { LOG_E(RRC, "Failed to decode UE MRDC capabilities (%zu bytes)\n", dec_rval.consumed); - ASN_STRUCT_FREE(asn_DEF_NR_UE_MRDC_Capability, - ue_context_p->ue_context.UE_Capability_MRDC); - ue_context_p->ue_context.UE_Capability_MRDC = 0; + ASN_STRUCT_FREE(asn_DEF_NR_UE_MRDC_Capability, UE->UE_Capability_MRDC); + UE->UE_Capability_MRDC = 0; AssertFatal(1==0,"exiting\n"); } } @@ -98,16 +91,16 @@ void rrc_parse_ue_capabilities(gNB_RRC_INST *rrc, NR_UE_CapabilityRAT_ContainerL // dump ue_capabilities if ( LOG_DEBUGFLAG(DEBUG_ASN1) && ueCapabilityRAT_Container_nr != NULL ) { - xer_fprint(stdout, &asn_DEF_NR_UE_NR_Capability, ue_context_p->ue_context.UE_Capability_nr); + xer_fprint(stdout, &asn_DEF_NR_UE_NR_Capability, UE->UE_Capability_nr); } if ( LOG_DEBUGFLAG(DEBUG_ASN1) && ueCapabilityRAT_Container_MRDC != NULL ) { - xer_fprint(stdout, &asn_DEF_NR_UE_MRDC_Capability, ue_context_p->ue_context.UE_Capability_MRDC); + xer_fprint(stdout, &asn_DEF_NR_UE_MRDC_Capability, UE->UE_Capability_MRDC); } LOG_A(NR_RRC, "Successfully decoded UE NR capabilities (NR and MRDC)\n"); - ue_context_p->ue_context.spCellConfig = calloc(1, sizeof(struct NR_SpCellConfig)); - ue_context_p->ue_context.spCellConfig->spCellConfigDedicated = rrc->carrier.servingcellconfig; + UE->spCellConfig = calloc(1, sizeof(struct NR_SpCellConfig)); + UE->spCellConfig->spCellConfigDedicated = rrc->carrier.servingcellconfig; LOG_I(NR_RRC,"Adding new NSA user (%p)\n",ue_context_p); rrc_add_nsa_user(rrc,ue_context_p, m); } @@ -116,7 +109,9 @@ void rrc_parse_ue_capabilities(gNB_RRC_INST *rrc, NR_UE_CapabilityRAT_ContainerL RB_PROTOTYPE(rrc_nr_ue_tree_s, rrc_gNB_ue_context_s, entries, rrc_gNB_compare_ue_rnti_id); -void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_p, x2ap_ENDC_sgnb_addition_req_t *m) { +void rrc_add_nsa_user(gNB_RRC_INST *rrc, rrc_gNB_ue_context_t *ue_context_p, x2ap_ENDC_sgnb_addition_req_t *m) +{ + AssertFatal(!get_softmodem_params()->sa, "%s() cannot be called in SA mode, it is intrinsically for NSA\n", __func__); // generate nr-Config-r15 containers for LTE RRC : inside message for X2 EN-DC (CG-Config Message from 38.331) rrc_gNB_carrier_data_t *carrier=&rrc->carrier; const gNB_RrcConfigurationReq *configuration = &rrc->configuration; @@ -128,6 +123,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ unsigned char *kUPenc = NULL; unsigned char *kUPint = NULL; int i; + gNB_RRC_UE_t *UE = &ue_context_p->ue_context; // In case of phy-test and do-ra mode, read UE capabilities directly from file if (get_softmodem_params()->phy_test == 1 || get_softmodem_params()->do_ra == 1) { @@ -149,25 +145,20 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ } else LOG_E(NR_RRC,"Could not open UE Capabilities input file. Not handling OAI UE Capabilities.\n"); - ue_context_p->ue_context.UE_Capability_nr = UE_Capability_nr; + UE->UE_Capability_nr = UE_Capability_nr; } // NR RRCReconfiguration - AssertFatal(rrc->Nb_ue < MAX_NR_RRC_UE_CONTEXTS,"cannot add another UE\n"); - ue_context_p->ue_context.reconfig = calloc(1,sizeof(NR_RRCReconfiguration_t)); - ue_context_p->ue_context.secondaryCellGroup = calloc(1,sizeof(NR_CellGroupConfig_t)); - memset((void *)ue_context_p->ue_context.reconfig,0,sizeof(NR_RRCReconfiguration_t)); - ue_context_p->ue_context.reconfig->rrc_TransactionIdentifier=0; - ue_context_p->ue_context.reconfig->criticalExtensions.present = NR_RRCReconfiguration__criticalExtensions_PR_rrcReconfiguration; + UE->reconfig = calloc(1, sizeof(NR_RRCReconfiguration_t)); + UE->secondaryCellGroup = calloc(1, sizeof(NR_CellGroupConfig_t)); + memset((void *)UE->reconfig, 0, sizeof(NR_RRCReconfiguration_t)); + UE->reconfig->rrc_TransactionIdentifier = 0; + UE->reconfig->criticalExtensions.present = NR_RRCReconfiguration__criticalExtensions_PR_rrcReconfiguration; NR_RRCReconfiguration_IEs_t *reconfig_ies=calloc(1,sizeof(NR_RRCReconfiguration_IEs_t)); - ue_context_p->ue_context.reconfig->criticalExtensions.choice.rrcReconfiguration = reconfig_ies; - ue_context_p->ue_context.rb_config = calloc(1,sizeof(NR_RRCReconfiguration_t)); + UE->reconfig->criticalExtensions.choice.rrcReconfiguration = reconfig_ies; + UE->rb_config = calloc(1, sizeof(NR_RRCReconfiguration_t)); if (get_softmodem_params()->phy_test == 1 || get_softmodem_params()->do_ra == 1 || get_softmodem_params()->sa == 1){ - fill_default_rbconfig(ue_context_p->ue_context.rb_config, - 10 /* EPS bearer ID */, - 1 /* drb ID */, - NR_CipheringAlgorithm_nea0, - NR_SecurityConfig__keyToUse_master); + fill_default_rbconfig(UE->rb_config, 10 /* EPS bearer ID */, 1 /* drb ID */, NR_CipheringAlgorithm_nea0, NR_SecurityConfig__keyToUse_master); } else { /* TODO: handle more than one bearer */ if (m == NULL) { @@ -180,9 +171,9 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ } /* store security key and security capabilities */ - memcpy(ue_context_p->ue_context.kgnb, m->kgnb, 32); - ue_context_p->ue_context.security_capabilities.nRencryption_algorithms = m->security_capabilities.encryption_algorithms; - ue_context_p->ue_context.security_capabilities.nRintegrity_algorithms = m->security_capabilities.integrity_algorithms; + memcpy(UE->kgnb, m->kgnb, 32); + UE->security_capabilities.nRencryption_algorithms = m->security_capabilities.encryption_algorithms; + UE->security_capabilities.nRintegrity_algorithms = m->security_capabilities.integrity_algorithms; /* Select ciphering algorithm based on gNB configuration file and * UE's supported algorithms. @@ -190,7 +181,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ * The ordering of the list comes from the configuration file. */ /* preset nea0 as fallback */ - ue_context_p->ue_context.ciphering_algorithm = 0; + UE->ciphering_algorithm = 0; for (i = 0; i < rrc->security.ciphering_algorithms_count; i++) { int nea_mask[4] = { 0, @@ -202,13 +193,13 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ /* nea0 already preselected */ break; } - if (ue_context_p->ue_context.security_capabilities.nRencryption_algorithms & nea_mask[rrc->security.ciphering_algorithms[i]]) { - ue_context_p->ue_context.ciphering_algorithm = rrc->security.ciphering_algorithms[i]; + if (UE->security_capabilities.nRencryption_algorithms & nea_mask[rrc->security.ciphering_algorithms[i]]) { + UE->ciphering_algorithm = rrc->security.ciphering_algorithms[i]; break; } } - LOG_I(RRC, "selecting ciphering algorithm %d\n", (int)ue_context_p->ue_context.ciphering_algorithm); + LOG_I(RRC, "selecting ciphering algorithm %d\n", (int)UE->ciphering_algorithm); /* integrity: no integrity protection for DRB in ENDC mode * as written in 38.331: "If UE is connected to E-UTRA/EPC, this field @@ -217,49 +208,46 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ * So nothing for DRB. Plus a test with a COTS UE revealed that it * did not apply integrity on the DRB. */ - ue_context_p->ue_context.integrity_algorithm = 0; + UE->integrity_algorithm = 0; - LOG_I(RRC, "selecting integrity algorithm %d\n", ue_context_p->ue_context.integrity_algorithm); + LOG_I(RRC, "selecting integrity algorithm %d\n", UE->integrity_algorithm); /* derive UP security key */ - nr_derive_key_up_enc(ue_context_p->ue_context.ciphering_algorithm, - ue_context_p->ue_context.kgnb, - &kUPenc); - nr_derive_key_up_int(ue_context_p->ue_context.integrity_algorithm, - ue_context_p->ue_context.kgnb, - &kUPint); + nr_derive_key_up_enc(UE->ciphering_algorithm, UE->kgnb, &kUPenc); + nr_derive_key_up_int(UE->integrity_algorithm, UE->kgnb, &kUPint); e_NR_CipheringAlgorithm cipher_algo; - switch (ue_context_p->ue_context.ciphering_algorithm) { - case 0: cipher_algo = NR_CipheringAlgorithm_nea0; break; - case 1: cipher_algo = NR_CipheringAlgorithm_nea1; break; - case 2: cipher_algo = NR_CipheringAlgorithm_nea2; break; - case 3: cipher_algo = NR_CipheringAlgorithm_nea3; break; - default: LOG_E(RRC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__); exit(1); + switch (UE->ciphering_algorithm) { + case 0: + cipher_algo = NR_CipheringAlgorithm_nea0; + break; + case 1: + cipher_algo = NR_CipheringAlgorithm_nea1; + break; + case 2: + cipher_algo = NR_CipheringAlgorithm_nea2; + break; + case 3: + cipher_algo = NR_CipheringAlgorithm_nea3; + break; + default: + LOG_E(RRC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__); + exit(1); } - fill_default_rbconfig(ue_context_p->ue_context.rb_config, - m->e_rabs_tobeadded[0].e_rab_id, - m->e_rabs_tobeadded[0].drb_ID, - cipher_algo, - NR_SecurityConfig__keyToUse_secondary); + fill_default_rbconfig(UE->rb_config, m->e_rabs_tobeadded[0].e_rab_id, m->e_rabs_tobeadded[0].drb_ID, cipher_algo, NR_SecurityConfig__keyToUse_secondary); } - NR_ServingCellConfig_t *scc = ue_context_p->ue_context.spCellConfig ? - ue_context_p->ue_context.spCellConfig->spCellConfigDedicated : NULL; - fill_default_reconfig(carrier->servingcellconfigcommon, - scc, - reconfig_ies, - ue_context_p->ue_context.secondaryCellGroup, - ue_context_p->ue_context.UE_Capability_nr, - configuration, - ue_context_p->local_uid); - - ue_context_p->ue_id_rnti = ue_context_p->ue_context.secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity; + NR_ServingCellConfig_t *scc = UE->spCellConfig ? UE->spCellConfig->spCellConfigDedicated : NULL; + fill_default_reconfig(carrier->servingcellconfigcommon, scc, reconfig_ies, UE->secondaryCellGroup, UE->UE_Capability_nr, configuration, ue_context_p->ue_context.gNB_ue_ngap_id); + // the UE context is not yet inserted in the RRC UE manager + // rrc_gNB_update_ue_context_rnti(UE->secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity, rrc, + // UE->gNB_ue_ngap_id); + UE->rnti = UE->secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity; NR_CG_Config_t *CG_Config = calloc(1,sizeof(*CG_Config)); memset((void *)CG_Config,0,sizeof(*CG_Config)); - //int CG_Config_size = generate_CG_Config(rrc,CG_Config,ue_context_p->ue_context.reconfig,ue_context_p->ue_context.rb_config); - generate_CG_Config(rrc,CG_Config,ue_context_p->ue_context.reconfig,ue_context_p->ue_context.rb_config); + // int CG_Config_size = generate_CG_Config(rrc,CG_Config,UE->reconfig,UE->rb_config); + generate_CG_Config(rrc, CG_Config, UE->reconfig, UE->rb_config); if(m!=NULL) { uint8_t inde_list[m->nb_e_rabs_tobeadded]; @@ -267,15 +255,15 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ if (m->nb_e_rabs_tobeadded>0) { for (int i=0; inb_e_rabs_tobeadded; i++) { - // Add the new E-RABs at the corresponding rrc ue context of the gNB - ue_context_p->ue_context.e_rab[i].param.e_rab_id = m->e_rabs_tobeadded[i].e_rab_id; - ue_context_p->ue_context.e_rab[i].param.gtp_teid = m->e_rabs_tobeadded[i].gtp_teid; - memcpy(&ue_context_p->ue_context.e_rab[i].param.sgw_addr, &m->e_rabs_tobeadded[i].sgw_addr, sizeof(transport_layer_addr_t)); - ue_context_p->ue_context.nb_of_e_rabs++; + // Add the new E-RABs at the corresponding rrc ue context of the gNB + UE->e_rab[i].param.e_rab_id = m->e_rabs_tobeadded[i].e_rab_id; + UE->e_rab[i].param.gtp_teid = m->e_rabs_tobeadded[i].gtp_teid; + memcpy(&UE->e_rab[i].param.sgw_addr, &m->e_rabs_tobeadded[i].sgw_addr, sizeof(transport_layer_addr_t)); + UE->nb_of_e_rabs++; //Fill the required E-RAB specific information for the creation of the S1-U tunnel between the gNB and the SGW - create_tunnel_req.eps_bearer_id[i] = ue_context_p->ue_context.e_rab[i].param.e_rab_id; - create_tunnel_req.sgw_S1u_teid[i] = ue_context_p->ue_context.e_rab[i].param.gtp_teid; - memcpy(&create_tunnel_req.sgw_addr[i], &ue_context_p->ue_context.e_rab[i].param.sgw_addr, sizeof(transport_layer_addr_t)); + create_tunnel_req.eps_bearer_id[i] = UE->e_rab[i].param.e_rab_id; + create_tunnel_req.sgw_S1u_teid[i] = UE->e_rab[i].param.gtp_teid; + memcpy(&create_tunnel_req.sgw_addr[i], &UE->e_rab[i].param.sgw_addr, sizeof(transport_layer_addr_t)); inde_list[i] = i; LOG_I(RRC,"S1-U tunnel: index %d target sgw ip %d.%d.%d.%d length %d gtp teid %u\n", i, @@ -287,10 +275,10 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ create_tunnel_req.sgw_S1u_teid[i]); } - create_tunnel_req.rnti = ue_context_p->ue_id_rnti; + create_tunnel_req.rnti = ue_context_p->ue_context.rnti; create_tunnel_req.num_tunnels = m->nb_e_rabs_tobeadded; RB_INSERT(rrc_nr_ue_tree_s, &RC.nrrrc[rrc->module_id]->rrc_ue_head, ue_context_p); - PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, rrc->module_id, GNB_FLAG_YES, ue_context_p->ue_id_rnti, 0, 0,rrc->module_id); + PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, rrc->module_id, GNB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0, rrc->module_id); memset(&create_tunnel_resp, 0, sizeof(create_tunnel_resp)); if (!IS_SOFTMODEM_NOS1) { LOG_D(RRC, "Calling gtpv1u_create_s1u_tunnel()\n"); @@ -306,8 +294,8 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ X2AP_ENDC_SGNB_ADDITION_REQ_ACK(msg).nb_e_rabs_admitted_tobeadded = m->nb_e_rabs_tobeadded; X2AP_ENDC_SGNB_ADDITION_REQ_ACK(msg).target_assoc_id = m->target_assoc_id; - for(int i=0; iue_context.nb_of_e_rabs; i++) { - X2AP_ENDC_SGNB_ADDITION_REQ_ACK(msg).e_rabs_admitted_tobeadded[i].e_rab_id = ue_context_p->ue_context.e_rab[i].param.e_rab_id; + for (int i = 0; i < UE->nb_of_e_rabs; i++) { + X2AP_ENDC_SGNB_ADDITION_REQ_ACK(msg).e_rabs_admitted_tobeadded[i].e_rab_id = UE->e_rab[i].param.e_rab_id; X2AP_ENDC_SGNB_ADDITION_REQ_ACK(msg).e_rabs_admitted_tobeadded[i].gtp_teid = create_tunnel_resp.enb_S1u_teid[i]; memcpy(&X2AP_ENDC_SGNB_ADDITION_REQ_ACK(msg).e_rabs_admitted_tobeadded[i].gnb_addr, &create_tunnel_resp.enb_addr, sizeof(transport_layer_addr_t)); //The length field in the X2AP targetting structure is expected in bits but the create_tunnel_resp returns the address length in bytes @@ -333,7 +321,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ LOG_W(RRC, "No E-RAB to be added received from SgNB Addition Request message \n"); X2AP_ENDC_SGNB_ADDITION_REQ_ACK(msg).MeNB_ue_x2_id = m->ue_x2_id; - X2AP_ENDC_SGNB_ADDITION_REQ_ACK(msg).SgNB_ue_x2_id = ue_context_p->ue_context.secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity; + X2AP_ENDC_SGNB_ADDITION_REQ_ACK(msg).SgNB_ue_x2_id = UE->secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity; //X2AP_ENDC_SGNB_ADDITION_REQ_ACK(msg).rrc_buffer_size = CG_Config_size; //Need to verify correct value for the buffer_size // Send to X2 entity to transport to MeNB asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CG_Config, @@ -345,35 +333,17 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ itti_send_msg_to_task(TASK_X2AP, ENB_MODULE_ID_TO_INSTANCE(0), msg); //Check right id instead of hardcoding } - rrc->Nb_ue++; // configure MAC and RLC - if (NODE_IS_DU(rrc->node_type)) { - rrc_mac_config_req_gNB(rrc->module_id, - rrc->configuration.pdsch_AntennaPorts, - rrc->configuration.pusch_AntennaPorts, - rrc->configuration.sib1_tda, - rrc->configuration.minRXTXTIME, - rrc->carrier.servingcellconfigcommon, - &rrc->carrier.mib, - NULL, - 1, // add_ue flag - ue_context_p->ue_id_rnti, - ue_context_p->ue_context.secondaryCellGroup); + bool ret = false; + if (get_softmodem_params()->phy_test) { + // phytest mode: we don't set up RA, etc + ret = nr_mac_add_test_ue(RC.nrmac[rrc->module_id] , ue_context_p->ue_context.rnti, ue_context_p->ue_context.secondaryCellGroup); } else { - rrc_mac_config_req_gNB(rrc->module_id, - rrc->configuration.pdsch_AntennaPorts, - rrc->configuration.pusch_AntennaPorts, - rrc->configuration.sib1_tda, - rrc->configuration.minRXTXTIME, - NULL, - NULL, - NULL, - 1, // add_ue flag - ue_context_p->ue_id_rnti, - ue_context_p->ue_context.secondaryCellGroup); + ret = nr_mac_prepare_ra_nsa_ue(RC.nrmac[rrc->module_id], ue_context_p->ue_context.rnti, ue_context_p->ue_context.secondaryCellGroup); } + AssertFatal(ret, "cannot add NSA UE in MAC, aborting\n"); - PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, rrc->module_id, GNB_FLAG_YES, ue_context_p->ue_id_rnti, 0, 0, rrc->module_id); + PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, rrc->module_id, GNB_FLAG_YES, ue_context_p->ue_context.rnti, 0, 0, rrc->module_id); if (get_softmodem_params()->do_ra) ctxt.enb_flag = 0; LOG_W(RRC, "Calling RRC PDCP/RLC ASN1 request functions for protocol context %p with module_id %d, rnti %lx, frame %d, subframe %d eNB_index %d \n", @@ -393,11 +363,16 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ kUPint, ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList); - nr_rrc_rlc_config_asn1_req(&ctxt, - get_softmodem_params()->sa ? ue_context_p->ue_context.rb_config->srb_ToAddModList : NULL, - ue_context_p->ue_context.rb_config->drb_ToAddModList, - ue_context_p->ue_context.rb_config->drb_ToReleaseList, - ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList); + // assume only a single bearer + const NR_DRB_ToAddModList_t *drb_list = ue_context_p->ue_context.rb_config->drb_ToAddModList; + DevAssert(drb_list->list.count == 1); + const NR_DRB_ToAddMod_t *drb = drb_list->list.array[0]; + const struct NR_CellGroupConfig__rlc_BearerToAddModList *bearer_list = + ue_context_p->ue_context.secondaryCellGroup->rlc_BearerToAddModList; + const NR_RLC_BearerConfig_t *bearer = bearer_list->list.array[0]; + DevAssert(bearer_list->list.count == 1); + DevAssert(drb->drb_Identity == bearer->servedRadioBearer->choice.drb_Identity); + nr_rlc_add_drb(ctxt.rntiMaybeUEid, drb->drb_Identity, bearer); LOG_D(RRC, "%s:%d: done RRC PDCP/RLC ASN1 request for UE rnti %lx\n", __FUNCTION__, __LINE__, ctxt.rntiMaybeUEid); } @@ -410,7 +385,7 @@ void rrc_remove_nsa_user(gNB_RRC_INST *rrc, int rnti) { LOG_D(RRC, "calling rrc_remove_nsa_user rnti %d\n", rnti); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, rrc->module_id, GNB_FLAG_YES, rnti, 0, 0, rrc->module_id); - ue_context = rrc_gNB_get_ue_context(rrc, rnti); + ue_context = rrc_gNB_get_ue_context_by_rnti(rrc, rnti); if (ue_context == NULL) { LOG_W(RRC, "rrc_remove_nsa_user: rnti %d not found\n", rnti); return; @@ -435,5 +410,5 @@ void rrc_remove_nsa_user(gNB_RRC_INST *rrc, int rnti) { } gtpv1u_delete_s1u_tunnel(rrc->module_id, &tmp); /* remove context */ - rrc_gNB_remove_ue_context(&ctxt, rrc, ue_context); + rrc_gNB_remove_ue_context(rrc, ue_context); } diff --git a/openair2/RRC/NR/rrc_gNB_radio_bearers.c b/openair2/RRC/NR/rrc_gNB_radio_bearers.c index 13a24cbea7..1848601de8 100644 --- a/openair2/RRC/NR/rrc_gNB_radio_bearers.c +++ b/openair2/RRC/NR/rrc_gNB_radio_bearers.c @@ -22,19 +22,30 @@ #include "rrc_gNB_radio_bearers.h" #include "oai_asn1.h" -NR_DRB_ToAddMod_t *generateDRB(gNB_RRC_UE_t *ue, uint8_t drb_id, pdu_session_param_t *pduSession, bool enable_sdap, int do_drb_integrity, int do_drb_ciphering) +rrc_pdu_session_param_t *find_pduSession(gNB_RRC_UE_t *ue, int id, bool create) { - NR_DRB_ToAddMod_t *DRB_config = NULL; - NR_SDAP_Config_t *SDAP_config = NULL; + int j; + for (j = 0; j < ue->nb_of_pdusessions; j++) + if (id == ue->pduSession[j].param.pdusession_id) + break; + if (j == ue->nb_of_pdusessions && create) + ue->nb_of_pdusessions++; + else + return NULL; + AssertFatal(ue->nb_of_pdusessions < NGAP_MAX_PDU_SESSION, ""); + return ue->pduSession + j; +} - DRB_config = CALLOC(1, sizeof(*DRB_config)); +NR_DRB_ToAddMod_t *generateDRB(gNB_RRC_UE_t *ue, uint8_t drb_id, rrc_pdu_session_param_t *pduSession, bool enable_sdap, int do_drb_integrity, int do_drb_ciphering) +{ + NR_DRB_ToAddMod_t *DRB_config = CALLOC(1, sizeof(*DRB_config)); DRB_config->drb_Identity = drb_id; - DRB_config->cnAssociation = CALLOC(1, sizeof(*DRB_config->cnAssociation)); - DRB_config->cnAssociation->present = NR_DRB_ToAddMod__cnAssociation_PR_sdap_Config; - + asn1cCalloc(DRB_config->cnAssociation, association); + association->present = NR_DRB_ToAddMod__cnAssociation_PR_sdap_Config; + /* SDAP Configuration */ - SDAP_config = CALLOC(1, sizeof(NR_SDAP_Config_t)); - SDAP_config->mappedQoS_FlowsToAdd = calloc(1, sizeof(struct NR_SDAP_Config__mappedQoS_FlowsToAdd)); + NR_SDAP_Config_t *SDAP_config = CALLOC(1, sizeof(NR_SDAP_Config_t)); + asn1cCalloc(SDAP_config->mappedQoS_FlowsToAdd, sdapFlows); SDAP_config->pdu_Session = pduSession->param.pdusession_id; @@ -50,53 +61,36 @@ NR_DRB_ToAddMod_t *generateDRB(gNB_RRC_UE_t *ue, uint8_t drb_id, pdu_session_par for (int qos_flow_index = 0; qos_flow_index < pduSession->param.nb_qos; qos_flow_index++) { - NR_QFI_t *qfi = calloc(1, sizeof(NR_QFI_t)); + asn1cSequenceAdd(sdapFlows->list, NR_QFI_t, qfi); *qfi = pduSession->param.qos[qos_flow_index].qfi; - asn1cSeqAdd(&SDAP_config->mappedQoS_FlowsToAdd->list, qfi); - if(pduSession->param.qos[qos_flow_index].fiveQI > 5) pduSession->param.used_drbs[drb_id - 1] = DRB_ACTIVE_NONGBR; else pduSession->param.used_drbs[drb_id - 1] = DRB_ACTIVE; } - - SDAP_config->mappedQoS_FlowsToRelease = NULL; - DRB_config->cnAssociation->choice.sdap_Config = SDAP_config; - + + association->choice.sdap_Config = SDAP_config; + /* PDCP Configuration */ - DRB_config->reestablishPDCP = NULL; - DRB_config->recoverPDCP = NULL; - DRB_config->pdcp_Config = calloc(1, sizeof(*DRB_config->pdcp_Config)); - DRB_config->pdcp_Config->drb = calloc(1,sizeof(*DRB_config->pdcp_Config->drb)); + asn1cCalloc(DRB_config->pdcp_Config, pdcpConfig); + asn1cCalloc(pdcpConfig->drb, drb); - DRB_config->pdcp_Config->drb->discardTimer = calloc(1, sizeof(*DRB_config->pdcp_Config->drb->discardTimer)); - *DRB_config->pdcp_Config->drb->discardTimer = NR_PDCP_Config__drb__discardTimer_infinity; - DRB_config->pdcp_Config->drb->pdcp_SN_SizeUL = calloc(1, sizeof(*DRB_config->pdcp_Config->drb->pdcp_SN_SizeUL)); - *DRB_config->pdcp_Config->drb->pdcp_SN_SizeUL = NR_PDCP_Config__drb__pdcp_SN_SizeUL_len18bits; - DRB_config->pdcp_Config->drb->pdcp_SN_SizeDL = calloc(1, sizeof(*DRB_config->pdcp_Config->drb->pdcp_SN_SizeDL)); - *DRB_config->pdcp_Config->drb->pdcp_SN_SizeDL = NR_PDCP_Config__drb__pdcp_SN_SizeDL_len18bits; + asn1cCallocOne(drb->discardTimer, NR_PDCP_Config__drb__discardTimer_infinity); - DRB_config->pdcp_Config->drb->headerCompression.present = NR_PDCP_Config__drb__headerCompression_PR_notUsed; - DRB_config->pdcp_Config->drb->headerCompression.choice.notUsed = 0; - - DRB_config->pdcp_Config->drb->integrityProtection = NULL; - DRB_config->pdcp_Config->drb->statusReportRequired = NULL; - DRB_config->pdcp_Config->drb->outOfOrderDelivery = NULL; - DRB_config->pdcp_Config->moreThanOneRLC = NULL; - - DRB_config->pdcp_Config->t_Reordering = calloc(1, sizeof(*DRB_config->pdcp_Config->t_Reordering)); - *DRB_config->pdcp_Config->t_Reordering = NR_PDCP_Config__t_Reordering_ms0; - DRB_config->pdcp_Config->ext1 = NULL; + asn1cCallocOne(drb->pdcp_SN_SizeUL, NR_PDCP_Config__drb__pdcp_SN_SizeUL_len18bits); + asn1cCallocOne(drb->pdcp_SN_SizeDL, NR_PDCP_Config__drb__pdcp_SN_SizeDL_len18bits); + + drb->headerCompression.present = NR_PDCP_Config__drb__headerCompression_PR_notUsed; + drb->headerCompression.choice.notUsed = 0; + + asn1cCallocOne(pdcpConfig->t_Reordering, NR_PDCP_Config__t_Reordering_ms100); if (do_drb_integrity) { - DRB_config->pdcp_Config->drb->integrityProtection = calloc(1, sizeof(*DRB_config->pdcp_Config->drb->integrityProtection)); - *DRB_config->pdcp_Config->drb->integrityProtection = NR_PDCP_Config__drb__integrityProtection_enabled; + asn1cCallocOne(drb->integrityProtection, NR_PDCP_Config__drb__integrityProtection_enabled); } - if (!do_drb_ciphering) { - DRB_config->pdcp_Config->ext1 = calloc(1, sizeof(*DRB_config->pdcp_Config->ext1)); - DRB_config->pdcp_Config->ext1->cipheringDisabled = calloc(1, sizeof(*DRB_config->pdcp_Config->ext1->cipheringDisabled)); - *DRB_config->pdcp_Config->ext1->cipheringDisabled = NR_PDCP_Config__ext1__cipheringDisabled_true; + asn1cCalloc(pdcpConfig->ext1, ext1); + asn1cCallocOne(ext1->cipheringDisabled, NR_PDCP_Config__ext1__cipheringDisabled_true); } ue->DRB_active[drb_id-1] = DRB_ACTIVE; @@ -104,7 +98,7 @@ NR_DRB_ToAddMod_t *generateDRB(gNB_RRC_UE_t *ue, uint8_t drb_id, pdu_session_par return DRB_config; } -uint8_t next_available_drb(gNB_RRC_UE_t *ue, pdu_session_param_t *pdusession, bool is_gbr) +uint8_t next_available_drb(gNB_RRC_UE_t *ue, rrc_pdu_session_param_t *pdusession, bool is_gbr) { uint8_t drb_id; diff --git a/openair2/RRC/NR/rrc_gNB_radio_bearers.h b/openair2/RRC/NR/rrc_gNB_radio_bearers.h index 6cd6443d4f..62065c1d87 100644 --- a/openair2/RRC/NR/rrc_gNB_radio_bearers.h +++ b/openair2/RRC/NR/rrc_gNB_radio_bearers.h @@ -35,10 +35,10 @@ #define GBR_FLOW (1) #define NONGBR_FLOW (0) -NR_DRB_ToAddMod_t *generateDRB(gNB_RRC_UE_t *rrc_ue, uint8_t drb_id, pdu_session_param_t *pduSession, bool enable_sdap, int do_drb_integrity, int do_drb_ciphering); - -uint8_t next_available_drb(gNB_RRC_UE_t *ue, pdu_session_param_t *pdusession, bool is_gbr); - +NR_DRB_ToAddMod_t *generateDRB(gNB_RRC_UE_t *rrc_ue, uint8_t drb_id, rrc_pdu_session_param_t *pduSession, bool enable_sdap, int do_drb_integrity, int do_drb_ciphering); +uint8_t next_available_drb(gNB_RRC_UE_t *ue, rrc_pdu_session_param_t *pdusession, bool is_gbr); bool drb_is_active(gNB_RRC_UE_t *ue, uint8_t drb_id); +rrc_pdu_session_param_t *find_pduSession(gNB_RRC_UE_t *ue, int id, bool create); + #endif diff --git a/openair2/RRC/NR/rrc_gNB_reconfig.c b/openair2/RRC/NR/rrc_gNB_reconfig.c index 09330ff54e..4995662e71 100644 --- a/openair2/RRC/NR/rrc_gNB_reconfig.c +++ b/openair2/RRC/NR/rrc_gNB_reconfig.c @@ -119,24 +119,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco secondaryCellGroup->rlc_BearerToAddModList = calloc(1,sizeof(*secondaryCellGroup->rlc_BearerToAddModList)); asn1cSeqAdd(&secondaryCellGroup->rlc_BearerToAddModList->list, RLC_BearerConfig); - NR_MAC_CellGroupConfig_t *mac_CellGroupConfig = secondaryCellGroup->mac_CellGroupConfig; + secondaryCellGroup->mac_CellGroupConfig = configure_mac_cellgroup(); - mac_CellGroupConfig=calloc(1,sizeof(*mac_CellGroupConfig)); - mac_CellGroupConfig->drx_Config = NULL; - - mac_CellGroupConfig->bsr_Config=calloc(1,sizeof(*mac_CellGroupConfig->bsr_Config)); - mac_CellGroupConfig->bsr_Config->periodicBSR_Timer = NR_BSR_Config__periodicBSR_Timer_sf10; - mac_CellGroupConfig->bsr_Config->retxBSR_Timer = NR_BSR_Config__retxBSR_Timer_sf160; - mac_CellGroupConfig->tag_Config=calloc(1,sizeof(*mac_CellGroupConfig->tag_Config)); - mac_CellGroupConfig->tag_Config->tag_ToReleaseList = NULL; - mac_CellGroupConfig->tag_Config->tag_ToAddModList = calloc(1,sizeof(*mac_CellGroupConfig->tag_Config->tag_ToAddModList)); - struct NR_TAG *tag=calloc(1,sizeof(*tag)); - tag->tag_Id = 0; - tag->timeAlignmentTimer = NR_TimeAlignmentTimer_infinity; - asn1cSeqAdd(&mac_CellGroupConfig->tag_Config->tag_ToAddModList->list,tag); - set_phr_config(mac_CellGroupConfig); - mac_CellGroupConfig->skipUplinkTxDynamic=false; - mac_CellGroupConfig->ext1 = NULL; secondaryCellGroup->physicalCellGroupConfig = calloc(1,sizeof(*secondaryCellGroup->physicalCellGroupConfig)); secondaryCellGroup->physicalCellGroupConfig->harq_ACK_SpatialBundlingPUCCH=NULL; secondaryCellGroup->physicalCellGroupConfig->harq_ACK_SpatialBundlingPUSCH=NULL; @@ -237,7 +221,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco if (servingcellconfigdedicated->uplinkConfig->uplinkBWP_ToAddModList) { pusch_Config = servingcellconfigdedicated->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup; } - initialUplinkBWP->pusch_Config = config_pusch(pusch_Config, servingcellconfigcommon); + initialUplinkBWP->pusch_Config = config_pusch(pusch_Config); long maxMIMO_Layers = servingcellconfigdedicated->uplinkConfig && servingcellconfigdedicated->uplinkConfig->pusch_ServingCellConfig && @@ -296,14 +280,6 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToReleaseList= NULL; secondaryCellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->uplinkBWP_ToReleaseList = NULL; - mac_CellGroupConfig->schedulingRequestConfig = calloc(1, sizeof(*mac_CellGroupConfig->schedulingRequestConfig)); - mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList = CALLOC(1,sizeof(*mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList)); - struct NR_SchedulingRequestToAddMod *schedulingrequestlist = CALLOC(1,sizeof(*schedulingrequestlist)); - schedulingrequestlist->schedulingRequestId = 0; - schedulingrequestlist->sr_ProhibitTimer = NULL; - schedulingrequestlist->sr_TransMax = NR_SchedulingRequestToAddMod__sr_TransMax_n64; - asn1cSeqAdd(&(mac_CellGroupConfig->schedulingRequestConfig->schedulingRequestToAddModList->list),schedulingrequestlist); - secondaryCellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->pusch_ServingCellConfig = calloc(1,sizeof(*secondaryCellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->pusch_ServingCellConfig)); NR_PUSCH_ServingCellConfig_t *pusch_scc = calloc(1,sizeof(*pusch_scc)); secondaryCellGroup->spCellConfig->spCellConfigDedicated->uplinkConfig->pusch_ServingCellConfig->present = NR_SetupRelease_PUSCH_ServingCellConfig_PR_setup; @@ -499,7 +475,7 @@ void fill_default_rbconfig(NR_RadioBearerConfig_t *rbconfig, drb_ToAddMod->pdcp_Config->moreThanOneRLC = NULL; drb_ToAddMod->pdcp_Config->t_Reordering = calloc(1,sizeof(*drb_ToAddMod->pdcp_Config->t_Reordering)); - *drb_ToAddMod->pdcp_Config->t_Reordering = NR_PDCP_Config__t_Reordering_ms0; + *drb_ToAddMod->pdcp_Config->t_Reordering = NR_PDCP_Config__t_Reordering_ms100; drb_ToAddMod->pdcp_Config->ext1 = NULL; asn1cSeqAdd(&rbconfig->drb_ToAddModList->list,drb_ToAddMod); diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index 9c6174fb53..ecbaeea17e 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -54,6 +54,7 @@ #include "intertask_interface.h" +#include "LAYER2/nr_rlc/nr_rlc_oai_api.h" #include "nr-uesoftmodem.h" #include "executables/softmodem-common.h" #include "plmn_data.h" @@ -179,6 +180,46 @@ static int nr_rrc_set_sub_state( module_id_t ue_mod_idP, Rrc_Sub_State_NR_t subS return (0); } +static void nr_rrc_addmod_srbs(int rnti, + const NR_SRB_ToAddModList_t *srb_list, + const struct NR_CellGroupConfig__rlc_BearerToAddModList *bearer_list) +{ + if (srb_list == NULL || bearer_list == NULL) + return; + + for (int i = 0; i < srb_list->list.count; i++) { + const NR_SRB_ToAddMod_t *srb = srb_list->list.array[i]; + for (int j = 0; j < bearer_list->list.count; j++) { + const NR_RLC_BearerConfig_t *bearer = bearer_list->list.array[j]; + if (bearer->servedRadioBearer != NULL + && bearer->servedRadioBearer->present == NR_RLC_BearerConfig__servedRadioBearer_PR_srb_Identity + && srb->srb_Identity == bearer->servedRadioBearer->choice.srb_Identity) { + nr_rlc_add_srb(rnti, srb->srb_Identity, bearer); + } + } + } +} + +static void nr_rrc_addmod_drbs(int rnti, + const NR_DRB_ToAddModList_t *drb_list, + const struct NR_CellGroupConfig__rlc_BearerToAddModList *bearer_list) +{ + if (drb_list == NULL || bearer_list == NULL) + return; + + for (int i = 0; i < drb_list->list.count; i++) { + const NR_DRB_ToAddMod_t *drb = drb_list->list.array[i]; + for (int j = 0; j < bearer_list->list.count; j++) { + const NR_RLC_BearerConfig_t *bearer = bearer_list->list.array[j]; + if (bearer->servedRadioBearer != NULL + && bearer->servedRadioBearer->present == NR_RLC_BearerConfig__servedRadioBearer_PR_drb_Identity + && drb->drb_Identity == bearer->servedRadioBearer->choice.drb_Identity) { + nr_rlc_add_drb(rnti, drb->drb_Identity, bearer); + } + } + } +} + // from LTE-RRC DL-DCCH RRCConnectionReconfiguration nr-secondary-cell-group-config (encoded) int8_t nr_rrc_ue_decode_secondary_cellgroup_config(const module_id_t module_id, const uint8_t *buffer, @@ -194,10 +235,10 @@ int8_t nr_rrc_ue_decode_secondary_cellgroup_config(const module_id_t module_id, size, 0, 0); if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)) { - printf("NR_CellGroupConfig decode error\n"); + LOG_E(NR_RRC, "NR_CellGroupConfig decode error\n"); for (i=0; iintraFreqBlackCellList){ - LOG_I( RRC, "intraFreqBlackCellList : %p\n", - sib3->intraFreqBlackCellList ); - const int n = sib3->intraFreqBlackCellList->list.count; + if( sib3->intraFreqExcludedCellList){ + LOG_I( RRC, "intraFreqExcludedCellList : %p\n", + sib3->intraFreqExcludedCellList ); + const int n = sib3->intraFreqExcludedCellList->list.count; for (int i = 0; i < n; ++i){ - LOG_I( RRC, "intraFreqBlackCellList->start : %ld\n", - sib3->intraFreqBlackCellList->list.array[i]->start ); + LOG_I( RRC, "intraFreqExcludedCellList->start : %ld\n", + sib3->intraFreqExcludedCellList->list.array[i]->start ); - if( sib3->intraFreqBlackCellList->list.array[i]->range) - LOG_I( RRC, "intraFreqBlackCellList->range : %ld\n", - *sib3->intraFreqBlackCellList->list.array[i]->range ); + if( sib3->intraFreqExcludedCellList->list.array[i]->range) + LOG_I( RRC, "intraFreqExcludedCellList->range : %ld\n", + *sib3->intraFreqExcludedCellList->list.array[i]->range ); else - LOG_I( RRC, "intraFreqBlackCellList->range : not defined\n" ); + LOG_I( RRC, "intraFreqExcludedCellList->range : not defined\n" ); } } else{ - LOG_I( RRC, "intraFreqBlackCellList : not defined\n" ); + LOG_I( RRC, "intraFreqExcludedCellList : not defined\n" ); } //lateNonCriticalExtension @@ -992,7 +1033,7 @@ int nr_decode_SI( const protocol_ctxt_t *const ctxt_pP, const uint8_t gNB_index if (new_sib == 1) { NR_UE_rrc_inst[ctxt_pP->module_id].Info[gNB_index].SIcnt++; if (NR_UE_rrc_inst[ctxt_pP->module_id].Info[gNB_index].SIcnt == sib1->si_SchedulingInfo->schedulingInfoList.list.count) - nr_rrc_set_sub_state( ctxt_pP->module_id, RRC_SUB_STATE_IDLE_SIB_COMPLETE ); + nr_rrc_set_sub_state(ctxt_pP->module_id, RRC_SUB_STATE_IDLE_SIB_COMPLETE_NR); LOG_I(NR_RRC,"SIStatus %x, SIcnt %d/%d\n", NR_UE_rrc_inst[ctxt_pP->module_id].Info[gNB_index].SIStatus, @@ -1025,15 +1066,15 @@ static int8_t check_requested_SI_List(module_id_t module_id, BIT_STRING_t reques LOG_D(RRC, "SIBs broadcasting: "); for(int i = 0; i < sib1.si_SchedulingInfo->schedulingInfoList.list.array[0]->sib_MappingInfo.list.count; i++) { - printf("SIB%li ", sib1.si_SchedulingInfo->schedulingInfoList.list.array[0]->sib_MappingInfo.list.array[i]->type + 2); + LOG_D(RRC, "SIB%li ", sib1.si_SchedulingInfo->schedulingInfoList.list.array[0]->sib_MappingInfo.list.array[i]->type + 2); } - printf("\n"); + LOG_D(RRC, "\n"); LOG_D(RRC, "SIBs needed by UE: "); for(int j = 0; j < 8*requested_SI_List.size; j++) { if( ((requested_SI_List.buf[j/8]>>(j%8))&1) == 1) { - printf("SIB%i ", j + 2); + LOG_D(RRC, "SIB%i ", j + 2); SIB_to_request[j] = true; for(int i = 0; i < sib1.si_SchedulingInfo->schedulingInfoList.list.array[0]->sib_MappingInfo.list.count; i++) { @@ -1045,17 +1086,17 @@ static int8_t check_requested_SI_List(module_id_t module_id, BIT_STRING_t reques } } - printf("\n"); + LOG_D(RRC, "\n"); LOG_D(RRC, "SIBs to request by UE: "); bool do_ra = false; for(int j = 0; j < 8*requested_SI_List.size; j++) { if(SIB_to_request[j]) { - printf("SIB%i ", j + 2); + LOG_D(RRC, "SIB%i ", j + 2); do_ra = true; } } - printf("\n"); + LOG_D(RRC, "\n"); if(do_ra) { @@ -1217,7 +1258,7 @@ int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(module_id_t module_id, if (nr_rrc_get_sub_state(module_id) == RRC_SUB_STATE_IDLE_SIB_COMPLETE_NR) { //if ( (NR_UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.data != NULL) || (!get_softmodem_params()->sa)) { nr_rrc_ue_generate_RRCSetupRequest(module_id, 0); - nr_rrc_set_sub_state( module_id, RRC_SUB_STATE_IDLE_CONNECTING ); + nr_rrc_set_sub_state(module_id, RRC_SUB_STATE_IDLE_CONNECTING_NR); //} } @@ -1458,8 +1499,8 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB if ((dec_rval.code != RC_OK) || (dec_rval.consumed == 0)) { for (i=0; imodule_id]; if (radioBearerConfig->srb_ToAddModList != NULL) { if (radioBearerConfig->securityConfig != NULL) { if (*radioBearerConfig->securityConfig->keyToUse == NR_SecurityConfig__keyToUse_master) { - NR_UE_rrc_inst[ctxt_pP->module_id].cipheringAlgorithm = radioBearerConfig->securityConfig->securityAlgorithmConfig->cipheringAlgorithm; - NR_UE_rrc_inst[ctxt_pP->module_id].integrityProtAlgorithm = *radioBearerConfig->securityConfig->securityAlgorithmConfig->integrityProtAlgorithm; + ue_rrc->cipheringAlgorithm = radioBearerConfig->securityConfig->securityAlgorithmConfig->cipheringAlgorithm; + ue_rrc->integrityProtAlgorithm = *radioBearerConfig->securityConfig->securityAlgorithmConfig->integrityProtAlgorithm; } } uint8_t *kRRCenc = NULL; uint8_t *kRRCint = NULL; - nr_derive_key_rrc_enc(NR_UE_rrc_inst[ctxt_pP->module_id].cipheringAlgorithm, - NR_UE_rrc_inst[ctxt_pP->module_id].kgnb, &kRRCenc); - nr_derive_key_rrc_int(NR_UE_rrc_inst[ctxt_pP->module_id].integrityProtAlgorithm, - NR_UE_rrc_inst[ctxt_pP->module_id].kgnb, &kRRCint); + nr_derive_key_rrc_enc(ue_rrc->cipheringAlgorithm, ue_rrc->kgnb, &kRRCenc); + nr_derive_key_rrc_int(ue_rrc->integrityProtAlgorithm, ue_rrc->kgnb, &kRRCint); // Refresh SRBs nr_pdcp_add_srbs(ctxt_pP->enb_flag, ctxt_pP->rntiMaybeUEid, radioBearerConfig->srb_ToAddModList, - NR_UE_rrc_inst[ctxt_pP->module_id].cipheringAlgorithm | (NR_UE_rrc_inst[ctxt_pP->module_id].integrityProtAlgorithm << 4), + ue_rrc->cipheringAlgorithm | (ue_rrc->integrityProtAlgorithm << 4), kRRCenc, kRRCint); // Refresh SRBs - nr_rrc_rlc_config_asn1_req(ctxt_pP, - radioBearerConfig->srb_ToAddModList, - NULL, - NULL, - NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->rlc_BearerToAddModList - ); + nr_rrc_addmod_srbs(ctxt_pP->rntiMaybeUEid, + radioBearerConfig->srb_ToAddModList, + ue_rrc->cell_group_config->rlc_BearerToAddModList); for (cnt = 0; cnt < radioBearerConfig->srb_ToAddModList->list.count; cnt++) { SRB_id = radioBearerConfig->srb_ToAddModList->list.array[cnt]->srb_Identity; @@ -2054,22 +2091,24 @@ nr_rrc_ue_establish_srb2( uint8_t *kUPenc = NULL; uint8_t *kUPint = NULL; - nr_derive_key_up_enc(NR_UE_rrc_inst[ctxt_pP->module_id].cipheringAlgorithm, - NR_UE_rrc_inst[ctxt_pP->module_id].kgnb, &kUPenc); - nr_derive_key_up_int(NR_UE_rrc_inst[ctxt_pP->module_id].integrityProtAlgorithm, - NR_UE_rrc_inst[ctxt_pP->module_id].kgnb, &kUPint); + NR_UE_RRC_INST_t *ue_rrc = &NR_UE_rrc_inst[ctxt_pP->module_id]; + nr_derive_key_up_enc(ue_rrc->cipheringAlgorithm, ue_rrc->kgnb, &kUPenc); + nr_derive_key_up_int(ue_rrc->integrityProtAlgorithm, ue_rrc->kgnb, &kUPint); - // Refresh DRBs + // Refresh DRBs nr_pdcp_add_drbs(ctxt_pP->enb_flag, ctxt_pP->rntiMaybeUEid, 0, radioBearerConfig->drb_ToAddModList, - NR_UE_rrc_inst[ctxt_pP->module_id].cipheringAlgorithm | (NR_UE_rrc_inst[ctxt_pP->module_id].integrityProtAlgorithm << 4), + ue_rrc->cipheringAlgorithm | (ue_rrc->integrityProtAlgorithm << 4), kUPenc, kUPint, - NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->rlc_BearerToAddModList); + ue_rrc->cell_group_config->rlc_BearerToAddModList); // Refresh DRBs - nr_rrc_rlc_config_asn1_req(ctxt_pP, NULL, radioBearerConfig->drb_ToAddModList, NULL, NR_UE_rrc_inst[ctxt_pP->module_id].cell_group_config->rlc_BearerToAddModList); + nr_rrc_addmod_drbs(ctxt_pP->rntiMaybeUEid, + radioBearerConfig->drb_ToAddModList, + ue_rrc->cell_group_config->rlc_BearerToAddModList); + } // drb_ToAddModList // if (radioBearerConfig->drb_ToReleaseList != NULL) { diff --git a/openair2/SDAP/nr_sdap/nr_sdap_entity.c b/openair2/SDAP/nr_sdap/nr_sdap_entity.c index e9a22eb578..280663e2b0 100644 --- a/openair2/SDAP/nr_sdap/nr_sdap_entity.c +++ b/openair2/SDAP/nr_sdap/nr_sdap_entity.c @@ -435,14 +435,9 @@ nr_sdap_entity_t *new_nr_sdap_entity(int is_gnb, bool has_sdap_rx, bool has_sdap if(is_defaultDRB) { sdap_entity->default_drb = drb_identity; LOG_I(SDAP, "Default DRB for the created SDAP entity: %ld \n", sdap_entity->default_drb); - - if(mappedQFIs2AddCount) { - LOG_D(SDAP, "RRC updating mapping rules\n"); - for (int i = 0; i < mappedQFIs2AddCount; i++) - { - sdap_entity->qfi2drb_map_update(sdap_entity, mapped_qfi_2_add[i], sdap_entity->default_drb, has_sdap_rx, has_sdap_tx); - } - } + LOG_D(SDAP, "RRC updating mapping rules: %d\n", mappedQFIs2AddCount); + for (int i = 0; i < mappedQFIs2AddCount; i++) + sdap_entity->qfi2drb_map_update(sdap_entity, mapped_qfi_2_add[i], sdap_entity->default_drb, has_sdap_rx, has_sdap_tx); } sdap_entity->next_entity = sdap_info.sdap_entity_llist; diff --git a/openair2/UTIL/CLI/cli_cmd.c b/openair2/UTIL/CLI/cli_cmd.c index a490255574..021c7c0b97 100644 --- a/openair2/UTIL/CLI/cli_cmd.c +++ b/openair2/UTIL/CLI/cli_cmd.c @@ -31,8 +31,6 @@ #include "cli.h" -#include "OCG.h" -#include "OCG_extern.h" #include "log.h" #include "log_extern.h" diff --git a/openair2/UTIL/MATH/oml.h b/openair2/UTIL/MATH/oml.h index 70f677a559..abdc8fbf09 100644 --- a/openair2/UTIL/MATH/oml.h +++ b/openair2/UTIL/MATH/oml.h @@ -20,7 +20,7 @@ */ /*! \file oml.h -* \brief Data structure for OCG of OpenAir emulator +* \brief Data structure for OML * \author N. Nikaein and A. Hafsaoui * \date 2011 * \version 1.0 diff --git a/openair2/UTIL/OCG/.directory b/openair2/UTIL/OCG/.directory deleted file mode 100644 index 7e667a51d7..0000000000 --- a/openair2/UTIL/OCG/.directory +++ /dev/null @@ -1,3 +0,0 @@ -[Dolphin] -Sorting=6 -Timestamp=2011,2,7,10,19,55 diff --git a/openair2/UTIL/OCG/Doxyfile b/openair2/UTIL/OCG/Doxyfile deleted file mode 100644 index 5f58666d6e..0000000000 --- a/openair2/UTIL/OCG/Doxyfile +++ /dev/null @@ -1,231 +0,0 @@ -# Doxyfile 1.5.3 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = OpenAirInterface -PROJECT_NUMBER = V1.0 -OUTPUT_DIRECTORY = -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -QT_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -CPP_CLI_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = NO -EXTRACT_STATIC = NO -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -EXTRACT_ANON_NSPACES = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = OCG.h OCG_vars.h OCG_extern.h OCG_get_opt.h OCG_detect_file.h OCG_parse_filename.h OCG_create_dir.h OCG_parse_XML.h OCG_save_XML.h OCG_generate_report.h Readme.doxy -INPUT_ENCODING = UTF-8 -FILE_PATTERNS = -RECURSIVE = NO -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXCLUDE_SYMBOLS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = images/ -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = YES -REFERENCES_RELATION = YES -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -HTML_DYNAMIC_SECTIONS = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = YES -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = YES -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = YES -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -MSCGEN_PATH = -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = YES -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = YES -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = /usr/bin/dot -DOTFILE_DIRS = -DOT_GRAPH_MAX_NODES = 50 -MAX_DOT_GRAPH_DEPTH = 0 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/openair2/UTIL/OCG/OCG.c b/openair2/UTIL/OCG/OCG.c deleted file mode 100644 index c3665c93f5..0000000000 --- a/openair2/UTIL/OCG/OCG.c +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG.c -* \brief Main function containing the FSM of OCG -* \author Navid Nikaein and Lusheng Wang -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include -#include -#include -#include -#include -#include "OCG.h" -#include "OCG_vars.h" -#include "OCG_detect_file.h" -#include "OCG_parse_filename.h" -#include "OCG_create_dir.h" -#include "OCG_parse_XML.h" -#include "OCG_save_XML.h" -#include "OCG_generate_report.h" -#include "UTIL/LOG/log.h" -/*----------------------------------------------------------------------------*/ -//#define TEST_OCG - - - -#ifdef TEST_OCG -int main(int argc, char *argv[]) -{ -#else -int OCG_main(char is_local_server[FILENAME_LENGTH_MAX]) -{ -#endif - int state = STATE_START_OCG; - char web_XML_folder[DIR_LENGTH_MAX] = ""; - char output_dir[DIR_LENGTH_MAX] = ""; // the output folder during the OCG procedure. Change step by step - - char *OPENAIR_TARGETS=getenv("OPENAIR_TARGETS"); - - if (OPENAIR_TARGETS == NULL) { - LOG_E(OCG, "please set the PATH for OPENAIR_TARGETS"); - exit(EXIT_FAILURE); - } - - if (!strcmp(is_local_server, "0")) { // Eurecom web server - strcpy(web_XML_folder, WEB_XML_FOLDER); - strcat(output_dir, OUTPUT_DIR); - } else { // local user - - sprintf(web_XML_folder,"%s/SIMU/EXAMPLES/OSD/WEBXML/",getenv("OPENAIR_TARGETS")); - sprintf(output_dir,"%s/SIMU/EXAMPLES/OSD/RESULTS/",getenv("OPENAIR_TARGETS")); - /* - strcpy(web_XML_folder, OPENAIR_TARGETS); - strcpy(output_dir, OPENAIR_TARGETS); - - char *slash; - slash = web_XML_folder + strlen(web_XML_folder) - 1; - if (strcmp(slash, "/")) { // check if the path OPENAIR_TARGETS is ended with a '/' - strcat(web_XML_folder, "/"); - strcat(output_dir, "/"); - } - strcat(web_XML_folder, "SIMU/EXAMPLES/OSD/WEBXML/"); - strcat(output_dir, "SIMU/EXAMPLES/OSD/RESULTS/"); - */ - } - - LOG_I(OCG, "Folder for detecting the XML configuration file is %s\n", web_XML_folder); - LOG_I(OCG, "Folder for generating the results is %s\n", output_dir); - LOG_I(OCG, "OSD XML config file is %s\n", is_local_server); - - - while(state != STATE_END) { - - switch(state) { - - case STATE_START_OCG : - LOG_I(OCG, "OCG starts ...\n\n"); - get_opt_OK = MODULE_NOT_PROCESSED; // -9999 is the initial value, representing the module not processed - detect_file_OK = MODULE_NOT_PROCESSED; - create_dir_OK = MODULE_NOT_PROCESSED; - - // to write the pid into a file 'OCG.pid' so that the web portal part could check if OCG is running - /* - pid_t pid; - pid = getpid(); - FILE *OCG_pid; - OCG_pid = fopen("OCG.pid", "w"); - fprintf(OCG_pid, "%d\n", pid); - fclose(OCG_pid); - */ -#ifdef TEST_OCG - state = STATE_GET_OPT; - - case STATE_GET_OPT : - get_opt_OK = get_opt(argc, argv); - - if (get_opt_OK == MODULE_OK) { - strcpy(src_file, LOCAL_XML_FOLDER); - copy_or_move = 1; - state = STATE_INI_EMU; - } else if (get_opt_OK == GET_HELP) state = STATE_END; - else state = STATE_DETECT_FILE; - - break; -#else - state = STATE_DETECT_FILE; - //get_opt_OK == MODULE_OK; -#endif - - case STATE_DETECT_FILE : - strcpy(src_file, web_XML_folder); - detect_file_OK = detect_file(src_file, is_local_server); - - if (detect_file_OK == MODULE_OK) { - if ((!strcmp(is_local_server, "0")) || (!strcmp(is_local_server, "-1"))) copy_or_move = 2; - - state = STATE_INI_EMU; - } else if (detect_file_OK == MODULE_ERROR) state = STATE_GENERATE_REPORT; - else if (detect_file_OK == NO_FILE) { - state = STATE_DETECT_FILE; - sleep(1); - } - - break; - - case STATE_INI_EMU : // before initiating an emu, an XML file should be found above - parse_filename_OK = MODULE_NOT_PROCESSED; - create_dir_OK = MODULE_NOT_PROCESSED; - parse_XML_OK = MODULE_NOT_PROCESSED; - save_XML_OK = MODULE_NOT_PROCESSED; - // call_emu_OK = MODULE_NOT_PROCESSED; - //config_mobi_OK = MODULE_NOT_PROCESSED; - generate_report_OK = MODULE_NOT_PROCESSED; - - LOG_I(OCG, "An emulation for file %s is initiated\n", filename); - state = STATE_PARSE_FILENAME; - break; - - case STATE_PARSE_FILENAME : - strcat(src_file, filename); - - if ((parse_filename_OK = parse_filename(filename)) == MODULE_OK) state = STATE_CREATE_DIR; - else { - if (copy_or_move == 2) { - remove(src_file); - state = STATE_DETECT_FILE; - } else state = STATE_GENERATE_REPORT; - } - - break; - - case STATE_CREATE_DIR : - if ((create_dir_OK = create_dir(output_dir, user_name, file_date)) == MODULE_OK) { - state = STATE_PARSE_XML; - strcat(output_dir, user_name); - strcat(output_dir, "/"); - strcat(output_dir, file_date); - strcat(output_dir, "/"); - strcpy(dst_dir, output_dir); - oai_emulation.info.output_path = dst_dir; // information for other modules within OAI - } else state = STATE_GENERATE_REPORT; - - break; - - case STATE_PARSE_XML : - if ((parse_XML_OK = parse_XML(src_file)) == MODULE_OK) state = STATE_SAVE_XML; - else { - if (copy_or_move == 2) remove(src_file); - - state = STATE_GENERATE_REPORT; - } - - break; - - case STATE_SAVE_XML : - if ((save_XML_OK = save_XML(copy_or_move, src_file, output_dir, filename)) == MODULE_OK) - state = STATE_CALL_EMU; - else state = STATE_GENERATE_REPORT; - - break; - - case STATE_CALL_EMU : // change this state to set_params - - if ((detect_file_OK == MODULE_OK) && (parse_filename_OK == MODULE_OK) && (create_dir_OK == MODULE_OK) && (parse_XML_OK == MODULE_OK) && (save_XML_OK == MODULE_OK)) { - // if the above tasks are all successful, we could tell the oaisim_config.c that everything is ready before running the emulation - oai_emulation.info.ocg_ok = 1; - } - -#ifdef TEST_OCG - call_emu_OK = call_emu(output_dir); - // config_mobi_OK = config_mobi("RWMEmulator.xml", filename); // generate the XML for Mobigen -#endif - state = STATE_GENERATE_REPORT; - break; - - case STATE_GENERATE_REPORT : - if (create_dir_OK != MODULE_OK) { - // a temp folder is required when the output folder could not be correctly generated - strncpy(output_dir, OPENAIR_TARGETS, sizeof(output_dir)); - output_dir[sizeof(output_dir) - 1] = 0; // terminate string - strncat(output_dir, "SIMU/EXAMPLES/OSD/", sizeof(output_dir) - strlen(output_dir) - 1); - strncat(output_dir, TEMP_OUTPUT_DIR, sizeof(output_dir) - strlen(output_dir) - 1); - struct stat st; - - if(stat(output_dir, &st) != 0) { // if temp output directory does not exist, we create it here - mkdir(output_dir, S_IRWXU | S_IRWXG | S_IRWXO); - LOG_I(OCG, "temp output directory %s is created", output_dir); - } - } else { - //strcat(output_dir, "SCENARIO/STATE/"); // if needeed the outpur directory can be further set - LOG_I(OCG, "Output directory is %s \n", output_dir); - } - - generate_report(output_dir, "OCG_report.xml"); - - if (copy_or_move == 1) state = STATE_END; - else state = STATE_END; - - //else state = STATE_DETECT_FILE; - break; - } - } // end while - - // Cleanup function for the XML library. - xmlCleanupParser(); - // this is to debug memory for regression tests - xmlMemoryDump(); - LOG_I(OCG, "... OCG ends\n\n"); -#ifdef TEST_OCG - return 0; -#else - return 1; -#endif -} - diff --git a/openair2/UTIL/OCG/OCG.h b/openair2/UTIL/OCG/OCG.h deleted file mode 100644 index 452581bb17..0000000000 --- a/openair2/UTIL/OCG/OCG.h +++ /dev/null @@ -1,769 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG.h -* \brief Data structure for OCG of OpenAir emulator -* \author Navid Nikaein, Lusheng Wang and Andre Gomes(One source) -* \date 2011 -* \version 1.0 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -//#include "SIMULATION/TOOLS/defs.h" - - -#ifndef __OCG_H__ -#define __OCG_H__ - -#include "PHY/defs_common.h" -#include "PHY/impl_defs_top.h" -#include "platform_types.h" -# include "s1ap_eNB.h" - - -#ifdef __cplusplus -extern "C" -{ -#endif -/** @defgroup _OCG OpenAir Config Generation (OCG) - * @{*/ -/* @}*/ - -/** @defgroup _useful_macro Macro Definition - * @ingroup _OCG - * @brief the following macros will be used in the code of OCG - * @{*/ -#define MODULE_NOT_PROCESSED -9999 /*!< \brief the module state indicator is set to -9999 before the module being processed */ -#define MODULE_ERROR -1 /*!< \brief the module state indicator is set to -1 for error */ -#define MODULE_OK 0 /*!< \brief the module state indicator is set to 0 when successfully processed */ -#define GET_HELP 1 /*!< \brief the module state indicator is set to 1 for get_opt_OK when the user types -h option */ -#define NO_FILE -2 /*!< \brief the module state indicator is set to -2 for detect_file_OK when no file is detected */ -#define WEB_XML_FOLDER "/nfs/webxml/" /*!< \brief the web portal generates XML files into this folder */ -#define LOCAL_XML_FOLDER "local_XML/" /*!< \brief this folder contains some XML files for demo, users could also put their own XML files into this folder for a direct emulation without using the web portal */ -#define TEMP_OUTPUT_DIR "temp_output/" /*!< \brief temporary output files will be generated in this folder when folders for an emulation could not be created due to errors */ -#define OUTPUT_DIR "/nfs/emu_results/" /*!< \brief this folder contains all the output files when folders for an emulation could be successfully created */ -#define FILENAME_LENGTH_MAX 128 /*!< \brief the maximum length of a filename */ -#define DIR_LENGTH_MAX 128 /*!< \brief the maximum length of the path name */ -#define MOBI_XML_FOLDER "mobi_XML/" /*!< \brief the folder that mobigen generate XML files in */ -#define DIR_TO_MOBIGEN "XML_to_mobigen/" /*!< \brief the folder that mobigen detects XML file from OCG */ - -#define NUMBER_OF_MASTER_MAX 20 - -/* @}*/ - - - -/** @defgroup _enum_fsm OCG Finite State Machine (FSM) - * @ingroup _OCG - * @brief See the flow chart for details - * @{*/ - -/** @defgroup _fsm_flow FSM Flow Chart - * @ingroup _enum_fsm - * @brief This flow chart shows how the FSM works - -There are the following steps the OCG module should contain : -- start OCG -- get option -- detect file -- initiate an emulation -- parse filename -- create directory -- parse XML -- save XML -- call OAI emulator -- generate report -- end OCG - -The following diagram is based on graphviz (http://www.graphviz.org/), you need to install the package to view the diagram. - - * \dot - * digraph ocg_flow_chart { - * node [shape=rect, fontname=Helvetica, fontsize=14,style=filled,fillcolor=lightgrey]; - * a [ label = " start OCG"]; - * b1 [ label = " get option"]; - * b2 [ label = " detect file"]; - * c [ label = " initiate an emulation"]; - * d [ label = " parse filename"]; - * e [ label = " create directory"]; - * f [ label = " parse XML"]; - * g [ label = " save XML"]; - * i [ label = " generate report"]; - * j [ label = " end OCG"]; - * a->b1; - * b1->b2 [ label = "OCG" ]; - * b1->c [ label = "OCG -f filename" ]; - * b1->j [ label = "OCG -h or command wrong" ]; - * b2->c [ label = "file detected" ]; - * b2->b2 [ label = "check every sec" ]; - * c->d; - * d->e [ label = "OK" ]; - * d->i [ label = "error" ]; - * e->f [ label = "OK" ]; - * e->i [ label = "error" ]; - * f->g [ label = "OK" ]; - * f->i [ label = "error" ]; - * g->i [ label = "OK" ]; - * g->i [ label = "error" ]; - * i->b2; - * label = "OCG Flow Chart" - * - * } - * \enddot - */ - -enum { - STATE_START_OCG, /*!< \brief initiate OCG */ - STATE_GET_OPT, /*!< \brief get options of OCG command */ - STATE_DETECT_FILE, /*!< \brief detect the configuration file in folder USER_XML_FOLDER */ - STATE_INI_EMU, /*!< \brief initiate an emulation after finding a configuration file */ - STATE_PARSE_FILENAME, /*!< \brief parse the filename into user_name and file_date */ - STATE_CREATE_DIR, /*!< \brief create directory for current emulation */ - STATE_PARSE_XML, /*!< \brief parse the configuration file */ - STATE_SAVE_XML, /*!< \brief save the configuration file to the created directory */ - STATE_CALL_EMU, /*!< \brief call the emulator */ - STATE_GENERATE_REPORT, /*!< \brief generate some information of OCG */ - STATE_END /*!< \brief lead to an end of the OCG process */ -}; -/* @}*/ - -// the OSD_basic : - - - -typedef struct { - char *selected_option; - int free_space; - int urban; - int rural; -} Large_Scale; - -////// options of generic -typedef struct { - double pathloss_exponent; // default 2 - double pathloss_0_dB; // default -50 dB -} Free_Space_Model_Parameters; - -typedef struct { - char *selected_option; - int SCM_A; //3GPP 36.384 Spatial channel model A - int SCM_B; - int SCM_C; - int SCM_D; - int rayleigh_8tap; // updated to advanced - int ricean_8tap; - int EPA; - int EVA; - int ETU; -} Small_Scale; - -////// options of Ricean_8Tap -typedef struct { - int rice_factor_dB; // default 10 dB -} Ricean_8Tap; - -typedef struct { - double decorrelation_distance_m; // (m), default 100m - double variance_dB; // (dB), default 10dB - double inter_site_correlation; // (0...1), default 1, not yet implemented -} Shadowing; - -typedef struct { - Large_Scale large_scale; - Small_Scale small_scale; - Shadowing shadowing; - - Free_Space_Model_Parameters free_space_model_parameters; - Ricean_8Tap ricean_8tap; -} Fading; - -typedef struct { - int number_of_sectors; /// Number of sectors (1-3), for UE always 1 - double beam_width_dB; /// Antenna 3dB beam width (in radians) (set to 2*M_PI for onmidirectional antennas), for UE always 2*M_PI - double alpha_rad[3]; /// Antenna orientation for each sector (for non-omnidirectional antennas) in radians wrt north - double antenna_gain_dBi; /// Antenna gain (dBi) (same for Tx and Rx) - double tx_power_dBm; /// Tx power (dBm) - double rx_noise_level_dB; /// Rx noise level (dB) - double antenna_orientation_degree[3]; // 3 is the number of sectors for OpenAir // we need think about how to parse it from the XML ?????? -} eNB_Antenna; - -typedef struct { - double antenna_gain_dBi; /// Antenna gain (dBi) (same for Tx and Rx) - double tx_power_dBm; /// Tx power (dBm) - double rx_noise_level_dB; /// Rx noise level (dB) -} UE_Antenna; - -typedef struct { - eNB_Antenna eNB_antenna; - UE_Antenna UE_antenna; -} Antenna; - -/** @defgroup _envi_config Environment Configuration - * @ingroup _OSD_basic - * @brief Including simulation area, geography, topography, fading information, etc - * @{*/ -typedef struct { - Fading fading; - double wall_penetration_loss_dB; - double system_bandwidth_MB; - double system_frequency_GHz; - Antenna antenna; -} Environment_System_Config; -/* @}*/ - - -typedef struct { - double x_m; - double y_m; - //double zz; // for test -} Area; - -typedef struct { - char *selected_option; - int homogeneous; - int heterogeneous; -} Network_Type; - -typedef struct { - char *selected_option; - int macrocell; - int microcell; - int picocell; - int femtocell; -} Cell_Type; - -typedef struct { - int number_of_relays; -} Relay; // may not exist in the XML if RELAY is not selected by the user - -typedef struct { - char *selected_option; - int fixed; // static - int random_waypoint; - int random_walk; - int grid_walk; - int trace; - int sumo; -} UE_Mobility_Type; - -////// options of UE_Mobility_Type -typedef struct { - char *selected_option; - int horizontal_grid; - int vertical_grid; -} Grid_Map; - -typedef struct { - char *selected_option; - int random_destination; // TRIP_RANDOM - int random_turn; // TRIP_NONE -} Grid_Trip_Type; - -typedef struct { - Grid_Map grid_map; - Grid_Trip_Type grid_trip_type; // JHNote: modificaiton -} Grid_Walk; -////// - -typedef struct { - char *selected_option; - int random; - int concentrated; - int grid; -} UE_Initial_Distribution; - -////// options of UE_Initial_Distribution -typedef struct { - int number_of_nodes; -} Random_UE_Distribution; - -typedef struct { - int number_of_nodes; -} Concentrated_UE_Distribution; - -typedef struct { - int number_of_nodes; -} Random_Grid; - -typedef struct { - int number_of_nodes; -} Border_Grid; - -typedef struct { - char *selected_option; - Random_Grid random_grid; // random choice of vertex in Grid_Graph mobility - Border_Grid border_grid; // random choice of vertex located on the border in Grid_Graph mobility -} Grid_UE_Distribution; -////// - -typedef struct { - double min_speed_mps; // m/s - double max_speed_mps; - double min_sleep_ms; - double max_sleep_ms; - double min_journey_time_ms; - double max_journey_time_ms; -} UE_Moving_Dynamics; // now, we use uniform distribution for these dynamics -typedef struct { - char *trace_mobility_file; -} Trace_Configuration; -typedef struct { - char *command; - char *file; //!< 256 bytes memory (see oaisim_config.c) - int start; - int end; - int step; - char *hip; - int hport; -} SUMO_Configuration; -typedef struct { - UE_Mobility_Type UE_mobility_type; - // ! Note: Grid_Walk is a UE_Mobility_Type, we put it here for the sake of simplicity of the XML file - Grid_Walk grid_walk; - - UE_Initial_Distribution UE_initial_distribution; - // ! Note: the following three options are for UE_Initial_Distribution, we put them here for the sake of simplicity of the XML file - Random_UE_Distribution random_UE_distribution; - Concentrated_UE_Distribution concentrated_UE_distribution; - Grid_UE_Distribution grid_UE_distribution; - - UE_Moving_Dynamics UE_moving_dynamics; - Trace_Configuration trace_config; - SUMO_Configuration sumo_config; -} UE_Mobility; - -typedef struct { - char *selected_option; - int fixed; - int mobile; // at this moment, it is OMG who decides this mobility type, so there is even no config of moving dynamics for eNB -} eNB_Mobility_Type; - -typedef struct { - char *selected_option; - int random; - int hexagonal; - int grid; -} eNB_Initial_Distribution; - -typedef struct { - double pos_x; - double pos_y; -} Fixed_eNB_Distribution; - -////// options of eNB_Initial_Distribution -typedef struct { - int number_of_cells; -} Random_eNB_Distribution; - -typedef struct { - int number_of_cells; - double inter_eNB_distance_km; -} Hexagonal_eNB_Distribution; - -typedef struct { - int number_of_grid_x; - int number_of_grid_y; -} Grid_eNB_Distribution; // inter_eNB_distance = (x/num_x) and (y/num_y) for horizontal and vertical dimensions -////// - -typedef struct { - eNB_Mobility_Type eNB_mobility_type; - - eNB_Initial_Distribution eNB_initial_distribution; - // ! Note: the following four options are for eNB_Initial_Distribution, we put them here for the sake of simplicity of the XML file - Fixed_eNB_Distribution fixed_eNB_distribution; - Random_eNB_Distribution random_eNB_distribution; - Hexagonal_eNB_Distribution hexagonal_eNB_distribution; - Grid_eNB_Distribution grid_eNB_distribution; - Trace_Configuration trace_config; -} eNB_Mobility; - -typedef struct { - UE_Mobility UE_mobility; - eNB_Mobility eNB_mobility; -} Mobility; - -/** @defgroup _topo_config Topology Configuration - * @ingroup _OSD_basic - * @brief Including cell type, eNB topology, UE distribution, mobility information, etc - * @{*/ -typedef struct { - Area area; - Network_Type network_type; - Cell_Type cell_type; - Relay relay; - Mobility mobility; - int omv; -} Topology_Config; -/* @}*/ - - -typedef struct { - uint16_t priority[11];//pas possible d'acceder au MAX_NUM_LCID - // - uint8_t DCI_aggregation_min; - uint8_t DLSCH_dci_size_bits; - //UL transmission bandwidth in RBs - uint8_t ul_bandwidth[11]; - //DL transmission bandwidth in RBs - uint8_t dl_bandwidth[11]; - //UL transmission bandwidth in RBs - uint8_t min_ul_bandwidth[11]; - //DL transmission bandwidth in RBs - uint8_t min_dl_bandwidth[11]; - //aggregated bit rate of non-gbr bearer per UE - uint64_t ue_AggregatedMaximumBitrateDL; - //aggregated bit rate of non-gbr bearer per UE - uint64_t ue_AggregatedMaximumBitrateUL; - //CQI scheduling interval in subframes. - uint16_t cqiSchedInterval; - //Contention resolution timer used during random access - uint8_t mac_ContentionResolutionTimer; - uint16_t max_allowed_rbs[11]; - uint8_t max_mcs[11]; - - - uint8_t num_groups; - - -} Mac_config; - -/** @defgroup _Predefined_traffic Configuration - * @ingroup _OSD_basic - * @brief Including Application type, Source, destination, background, etc - * @{*/ -typedef struct { - char *application_type[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *source_id[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *destination_id[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - unsigned int aggregation_level[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int flow_start[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int flow_duration[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - -} Predefined_Traffic; -/* @}*/ - - -/* - typedef struct - { - - } M2M_Traffic;*/ -/* @}*/ - -/** @defgroup _customized_traffic Configuration - * @ingroup _OSD_basic - * @brief Including Application type, Source, destination, background, idt, packet size, etc - * @{*/ -typedef struct { - //int pu; - //double prob_off_pu; - //double prob_pu_ed; - //double holding_time_off_pu; - //int pe; - //double prob_off_ed; - //double prob_ed_pe; - //double holding_time_off_ed; - //int ed; - //double holding_time_off_pe; - - char *application_type[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *source_id[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *destination_id[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *traffic[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *transport_protocol[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *ip_version[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *idt_dist[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int idt_min_ms[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int idt_max_ms[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double idt_standard_deviation[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double idt_lambda[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double idt_scale[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double idt_shape[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - char *size_dist[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int size_min_byte[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int size_max_byte[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double size_standard_deviation[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double size_lambda[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double size_scale[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double size_shape[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int stream[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int destination_port[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - unsigned int aggregation_level[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int flow_start[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - int flow_duration[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - - char *m2m[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - //M2M_Traffic m2m_traffic; - double prob_off_pu[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double prob_off_ed[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double prob_off_pe[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double prob_pu_ed[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double prob_pu_pe[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double prob_ed_pe[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - double prob_ed_pu[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - unsigned int holding_time_off_ed[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - unsigned int holding_time_off_pu[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - unsigned int holding_time_off_pe[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - unsigned int holding_time_pe_off[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - unsigned int pu_size_pkts[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; - unsigned int ed_size_pkts[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; -} Customized_Traffic; -/* @}*/ - - - - -/** @defgroup _app_config Application Configuration - * @ingroup _OSD_basic - * @brief Including application type and traffic information - * @{*/ -typedef struct { - char *packet_gen_type; - Predefined_Traffic predefined_traffic; - Customized_Traffic customized_traffic; -} Application_Config; -/* @}*/ - -typedef struct { - char *throughput; - char *latency; - char *loss_rate; - int signalling_overhead; - char *owd_radio_access; -} Performance_Metrics; - -typedef struct { - int phy; - int mac; - int rlc; - int rrc; - int pdcp; - int omg; - int emu; - int otg; -} Layer; - -typedef struct { - char *level; - char *verbosity; - int interval; -} Log_Emu; - -typedef struct { - int enabled; - unsigned int start_time; - unsigned int end_time; -} Packet_Trace; - -typedef struct { - int value; -} Seed; - - -/** @defgroup _emu_config Emulation Configuration - * @ingroup _OSD_basic - * @brief Including emulation time and performance output - * @{*/ -typedef struct { - double emulation_time_ms; - Performance_Metrics performance_metrics; - Layer layer; - Log_Emu log_emu; - Packet_Trace packet_trace; - Seed seed; - char *curve; - char *background_stats; - // CLI tags are in Info - //char g_log_level[20]; -} Emulation_Config; -/* @}*/ - -/** @defgroup _OSD_basic OAI protocol config - * @ingroup _OCG - * @brief OAI Emulation struct for protocol configuration - * @{*/ - -typedef struct { - uint8_t num_groups; -} eNB_MAC_Config; - -typedef struct { - eNB_MAC_Config eNB_mac_config; /*!< \brief eNB MAC configuration parameters */ - -} Protocol_Config; - - -/* @}*/ - -/** @defgroup _OSD_basic Basic OpenAirInterface Scenario Descriptor - * @ingroup _OCG - * @brief OAI Emulation struct for OSD_basic - * @{*/ - - -typedef struct { - unsigned char nb_ue; - module_id_t first_ue; - unsigned char nb_enb; - module_id_t first_enb; -} master_info_t; - -typedef struct { - char *output_path; /*!< \brief The path where we generate all the emulation results */ - int ocg_ok; - - // distributed emulation params - master_info_t master[NUMBER_OF_MASTER_MAX]; - unsigned char nb_ue_local; - unsigned char nb_ue_remote; - unsigned char nb_enb_local; - unsigned char nb_enb_remote; - unsigned char nb_ru_local; - unsigned char nb_ru_remote; - unsigned char nb_rn_local; - unsigned char nb_rn_remote; - module_id_t first_enb_local; - module_id_t first_rn_local; - module_id_t first_ue_local; - unsigned short master_id; - unsigned char nb_master; - unsigned int master_list; - unsigned int is_primary_master; - unsigned int ethernet_id; - char local_server[128]; // for the oaisim -c option : 0 = EURECOM web portal; -1 = local; 1 - N or filename = running a specific XML configuration file - unsigned char ethernet_flag; - unsigned char multicast_group; - char *multicast_ifname; - // status - unsigned char ocg_enabled; // openair config generator - unsigned char ocm_enabled; // openair channel modeling - unsigned char opt_enabled;//openair packet tracer - unsigned char opt_mode; // openair packet tracer mode: wireshark, pcap - unsigned char otg_enabled; // openair traffic generator - unsigned char omv_enabled; // openair mobility visulizer - unsigned char opp_enabled; // openair performance profiler - unsigned char oeh_enabled; // openair event handler, with CLI this could provide a remote event management - unsigned char vcd_enabled; - char *vcd_file; - unsigned char eMBMS_active_state; - unsigned char cba_group_active; - unsigned char cba_backoff; - unsigned char handover_active; - char *otg_traffic; - unsigned char otg_bg_traffic_enabled; - unsigned char omg_model_rn; - unsigned char omg_model_enb; - unsigned char omg_model_ue; - unsigned char omg_rwp_type; - unsigned char omg_model_ue_current; // when mixed mbility is used - // control eNB/UE instance through CLI - unsigned char cli_enabled; - unsigned char cli_num_enb; - unsigned char cli_start_enb[NUMBER_OF_eNB_MAX]; - unsigned char cli_num_ue; - unsigned char cli_start_ue[NUMBER_OF_UE_MAX]; - unsigned char oai_ifup[NUMBER_OF_eNB_MAX+NUMBER_OF_UE_MAX]; - // emu related - unsigned int seed; - unsigned int frame; - double time_s; - double time_ms; - unsigned int g_log_level; - unsigned int g_log_verbosity; - char *g_log_verbosity_option; - // phy related params - unsigned int n_frames; - unsigned int n_frames_flag; // if set, then let the emulation goes to infinity - node_function_t node_function[MAX_NUM_CCs]; - node_timing_t node_timing[MAX_NUM_CCs]; - unsigned char frame_type[MAX_NUM_CCs]; //! LTE frame type (TDD=1, FDD=0). \note this should be converted to \ref frame_type_t (header file reorganization needed) - char *frame_type_name[MAX_NUM_CCs]; - unsigned char tdd_config[MAX_NUM_CCs]; - unsigned char tdd_config_S[MAX_NUM_CCs]; - unsigned char extended_prefix_flag[MAX_NUM_CCs]; - unsigned char N_RB_DL[MAX_NUM_CCs]; - unsigned char transmission_mode[MAX_NUM_CCs]; - int max_predefined_traffic_config_index; - int max_customized_traffic_config_index; - s1ap_eNB_config_t s1ap_config; - - /* Per-Slot ISR - * Interval between two ISR = 500usec - */ - unsigned char slot_isr; - int slot_sfd; -} Info; -/* @}*/ - -/** @defgroup _OSD_basic Basic OpenAirInterface Scenario Descriptor - * @ingroup _OCG - * @brief OAI Emulation struct for OSD_basic - * @{*/ -typedef struct { - Mac_config mac_config[NUMBER_OF_UE_MAX]; - Environment_System_Config environment_system_config; /*!< \brief Evironment configuration */ - Topology_Config topology_config; /*!< \brief Topology configuration */ - Application_Config application_config; /*!< \brief Applications configuration */ - Emulation_Config emulation_config; /*!< \brief Emulation configuration */ - Protocol_Config protocol_config; /* specific protocol configuration*/ - Info info; /*!< \brief Some important information which should be able to be reached by OAISIM */ - char *profile; -} OAI_Emulation; -/* @}*/ - - -/** @defgroup _fn Functions in OCG - * @ingroup _OCG - * @brief describing all the functions used by OCG - * @{*/ -/* @} */ - -/** @defgroup _log_gen LOG GEN Commands - * @ingroup _OCG - * @brief using the following macro instead of "printf" - * @{*/ - -//#define LOG_A printf("OCG: "); printf /*!< \brief alert */ -//#define LOG_C printf("OCG: "); printf /*!< \brief critical */ -//#define LOG_W printf("OCG: "); printf /*!< \brief warning */ -//#define LOG_N printf("OCG: "); printf /*!< \brief notice */ -//#define LOG_E printf("OCG: "); printf /*!< \brief error */ -//#define LOG_I printf("OCG: "); printf /*!< \brief info */ -//#define LOG_D printf("OCG: "); printf /*!< \brief debug */ -//#define LOG_T printf("OCG: "); printf /*!< \brief trace */ -/* @}*/ - -int OCG_main (char is_local_server[FILENAME_LENGTH_MAX]); - -// void init_oai_emulation (void); -//#include "UTIL/LOG/log.h" - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_call_emu.c b/openair2/UTIL/OCG/OCG_call_emu.c deleted file mode 100644 index b6a2c924bf..0000000000 --- a/openair2/UTIL/OCG/OCG_call_emu.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -Lusheng Wang and -/*! \file OCG_call_emu.c -* \brief Call the emulator -* \author Lusheng Wang and Navid Nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include "OCG_vars.h" -#include "OCG_call_emu.h" -#include "UTIL/LOG/log.h" -/*----------------------------------------------------------------------------*/ - -OAI_Emulation oai_emulation; - -int call_emu(char dst_dir[DIR_LENGTH_MAX]) -{ - - - ////////// print the configuration - FILE *file; - char dst_file[DIR_LENGTH_MAX] = ""; - strcat(dst_file, dst_dir); - strcat(dst_file, "emulation_result.txt"); - file = fopen(dst_file,"w"); - //system("../../../openair1/SIMULATION/LTE_PHY_L2/physim --help"); - - fclose(file); - - LOG_I(OCG, "Emulation finished\n"); - return MODULE_OK; -} diff --git a/openair2/UTIL/OCG/OCG_call_emu.h b/openair2/UTIL/OCG/OCG_call_emu.h deleted file mode 100644 index c7b2bb4327..0000000000 --- a/openair2/UTIL/OCG/OCG_call_emu.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_call_emu.h -* \brief -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __OCG_CALL_EMU_H__ - -#define __OCG_CALL_EMU_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _call_emu Call Emu - * @ingroup _fn - * @brief Call the emulator - * @{*/ -int call_emu(char dst_dir[DIR_LENGTH_MAX]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_config_mobi.c b/openair2/UTIL/OCG/OCG_config_mobi.c deleted file mode 100644 index b3100a4214..0000000000 --- a/openair2/UTIL/OCG/OCG_config_mobi.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_config_mobi.c -* \brief Generate an XML to configure the mobility -* \author Lusheng Wang & Navid Nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include -#include "OCG.h" -#include "OCG_extern.h" -#include "OCG_config_mobi.h" -/*----------------------------------------------------------------------------*/ - -int config_mobi(char mobigen_filename[FILENAME_LENGTH_MAX], char filename[FILENAME_LENGTH_MAX]) { - // for the xml writer, refer to http://xmlsoft.org/html/libxml-xmlwriter.html - char dir_to_mobigen_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX]; - char mobi_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX] = ""; - xmlTextWriterPtr writer; - strcpy(dir_to_mobigen_file, DIR_TO_MOBIGEN); - strcat(dir_to_mobigen_file, mobigen_filename); - /* Create a new XmlWriter for uri, with no compression. */ - writer = xmlNewTextWriterFilename(dir_to_mobigen_file, 0); - // set the output format of the XML file - xmlTextWriterSetIndent(writer, 1); - xmlTextWriterSetIndentString(writer, " "); - /* Start the document with the xml default for the version, - * encoding ISO 8859-1 and the default for the standalone - * declaration. */ - xmlTextWriterStartDocument(writer, NULL, NULL, NULL); - /* Start an element named "EXAMPLE". Since this is the first - * element, this will be the root element of the document. */ - xmlTextWriterStartElement(writer, "universe"); - /* Write an element named "X_ORDER_ID" as child of HEADER. */ - xmlTextWriterWriteFormatElement(writer, "dimx", "%lf", oai_emulation.topo_config.area.x); - /* Write an element named "X_ORDER_ID" as child of HEADER. */ - xmlTextWriterWriteFormatElement(writer, "dimy", "%lf", oai_emulation.topo_config.area.y); - xmlTextWriterWriteFormatElement(writer, "seed", "%d", 1); - xmlTextWriterStartElement(writer, "extension"); - xmlTextWriterWriteAttribute(writer, "class", "de.uni_stuttgart.informatik.canu.mobisim.simulations.TimeSimulation"); - xmlTextWriterWriteFormatAttribute(writer, "param", "%lf", oai_emulation.emu_config.emu_time); - xmlTextWriterEndElement(writer); - xmlTextWriterStartElement(writer, "extension"); - xmlTextWriterWriteAttribute(writer, "class", "de.uni_stuttgart.informatik.canu.spatialmodel.core.SpatialModel"); - xmlTextWriterWriteFormatAttribute(writer, "max_x", "%lf", oai_emulation.topo_config.area.x); - xmlTextWriterWriteFormatAttribute(writer, "max_y", "%lf", oai_emulation.topo_config.area.y); - xmlTextWriterWriteAttribute(writer, "min_x", "0"); - xmlTextWriterWriteAttribute(writer, "min_y", "0"); - xmlTextWriterWriteFormatElement(writer, "dump_boundary_points", "%s", "false"); - xmlTextWriterWriteFormatElement(writer, "separated_flow", "%s", "false"); - xmlTextWriterWriteFormatElement(writer, "max_traffic_lights", "%d", 500); - xmlTextWriterEndElement(writer); - xmlTextWriterStartElement(writer, "extension"); - xmlTextWriterWriteAttribute(writer, "class", "de.uni_stuttgart.informatik.canu.mobisim.extensions.ReportNodeMobility"); - strcpy(mobi_file, MOBI_XML_FOLDER); - strcat(mobi_file, filename); - xmlTextWriterWriteAttribute(writer, "output", mobi_file); - xmlTextWriterWriteFormatElement(writer, "step", "%d", 1); - xmlTextWriterEndElement(writer); - xmlTextWriterStartElement(writer, "nodegroup"); - xmlTextWriterWriteAttribute(writer, "car2x", "false"); - xmlTextWriterWriteAttribute(writer, "id", ""); - xmlTextWriterWriteAttribute(writer, "n", "50"); - xmlTextWriterWriteAttribute(writer, "type", "car"); - xmlTextWriterStartElement(writer, "position"); - xmlTextWriterWriteAttribute(writer, "random", "true"); - xmlTextWriterWriteFormatElement(writer, "z", "%s", "0.0"); - xmlTextWriterEndElement(writer); - xmlTextWriterStartElement(writer, "extension"); - xmlTextWriterWriteAttribute(writer, "class", "de.uni_stuttgart.informatik.canu.mobisim.mobilitymodels.RandomWaypointWalk"); - - if (!strcmp(oai_emulation.topo_config.UE_mobility.UE_mobility_type.selected_option, "fixed")) { - xmlTextWriterWriteFormatElement(writer, "minspeed", "%d", 0); - xmlTextWriterWriteFormatElement(writer, "maxspeed", "%d", 0); - xmlTextWriterWriteFormatElement(writer, "minstay", "%d", 9999); - xmlTextWriterWriteFormatElement(writer, "maxstay", "%d", 9999); - } else if (!strcmp(oai_emulation.topo_config.UE_mobility.UE_mobility_type.selected_option, "random_waypoint")) { - xmlTextWriterWriteFormatElement(writer, "minspeed", "%lf", oai_emulation.topo_config.UE_mobility.UE_moving_dynamics.min_speed); - xmlTextWriterWriteFormatElement(writer, "maxspeed", "%lf", oai_emulation.topo_config.UE_mobility.UE_moving_dynamics.max_speed); - xmlTextWriterWriteFormatElement(writer, "minstay", "%lf", oai_emulation.topo_config.UE_mobility.UE_moving_dynamics.min_pause_time); - xmlTextWriterWriteFormatElement(writer, "maxstay", "%lf", oai_emulation.topo_config.UE_mobility.UE_moving_dynamics.max_pause_time); - } - - // Close the element named HEADER. - xmlTextWriterEndElement(writer); - xmlTextWriterEndDocument(writer); - xmlFreeTextWriter(writer); - return MODULE_OK; -} - diff --git a/openair2/UTIL/OCG/OCG_config_mobi.h b/openair2/UTIL/OCG/OCG_config_mobi.h deleted file mode 100644 index fbaeb4b281..0000000000 --- a/openair2/UTIL/OCG/OCG_config_mobi.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_config_mobi.h -* \brief -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __OCG_CONFIG_MOBI_H__ - -#define __OCG_CONFIG_MOBI_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _config_mobi Config Mobigen - * @ingroup _fn - * @brief Generate configuration XML for mobigen - * @{*/ -int config_mobi(char mobigen_filename[FILENAME_LENGTH_MAX], char filename[FILENAME_LENGTH_MAX]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_create_dir.c b/openair2/UTIL/OCG/OCG_create_dir.c deleted file mode 100644 index 364887163b..0000000000 --- a/openair2/UTIL/OCG/OCG_create_dir.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_create_dir.c -* \brief Create directory for current emulation -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include -#include "OCG_vars.h" -#include "OCG_create_dir.h" -#include "UTIL/LOG/log.h" -/*----------------------------------------------------------------------------*/ - -int create_dir(char output_dir[DIR_LENGTH_MAX], char user_name[FILENAME_LENGTH_MAX / 2], char file_date[FILENAME_LENGTH_MAX / 2]) -{ - - char directory[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX] = ""; - mode_t process_mask = umask(0); - - strncpy(directory, output_dir, FILENAME_LENGTH_MAX + DIR_LENGTH_MAX); - directory[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX - 1] = 0; // terminate string - - struct stat st; - - if(stat(directory, &st) != 0) { // if output_dir does not exist, we create it here - mkdir(directory, S_IRWXU | S_IRWXG | S_IRWXO); - LOG_I(OCG, "output_dir %s is created", directory); - } - - strncat(directory, user_name, FILENAME_LENGTH_MAX + DIR_LENGTH_MAX - strlen(directory) - 1); - - mkdir(directory, S_IRWXU | S_IRWXG | S_IRWXO); - - strncat(directory, "/", FILENAME_LENGTH_MAX + DIR_LENGTH_MAX - strlen(directory) - 1); - strncat(directory, file_date, FILENAME_LENGTH_MAX + DIR_LENGTH_MAX - strlen(directory) - 1); - - mkdir(directory, S_IRWXU | S_IRWXG |S_IRWXO); - - //char directory_extension[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX + 64] = ""; - /*strcpy(directory_extension, directory); // to create some more folders - strcat(directory_extension, "/LOGS"); - mkdir(directory_extension, S_IRWXU | S_IRWXG |S_IRWXO); - - strcpy(directory_extension, directory); - strcat(directory_extension, "/PACKET_TRACE"); - mkdir(directory_extension, S_IRWXU | S_IRWXG |S_IRWXO); - - strcpy(directory_extension, directory); - strcat(directory_extension, "/SCENARIO"); - mkdir(directory_extension, S_IRWXU | S_IRWXG |S_IRWXO); - - strcpy(directory_extension, directory); - strcat(directory_extension, "/SCENARIO/XML"); - mkdir(directory_extension, S_IRWXU | S_IRWXG |S_IRWXO); - - strcpy(directory_extension, directory); - strcat(directory_extension, "/SCENARIO/STATE"); - mkdir(directory_extension, S_IRWXU | S_IRWXG |S_IRWXO); - */ - umask(process_mask); - - LOG_I(OCG, "Directory for current emulation is created\n"); - return MODULE_OK; - -} diff --git a/openair2/UTIL/OCG/OCG_create_dir.h b/openair2/UTIL/OCG/OCG_create_dir.h deleted file mode 100644 index 692f4b095e..0000000000 --- a/openair2/UTIL/OCG/OCG_create_dir.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_create_dir.h -* \brief -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __OCG_CREATE_DIR_H__ - -#define __OCG_CREATE_DIR_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _create_dir Create Dir - * @ingroup _fn - * @brief Create directory in OUTPUT_DIR for current emulation - * @{*/ -int create_dir(char output_dir[DIR_LENGTH_MAX], char user_name[FILENAME_LENGTH_MAX / 2], char file_date[FILENAME_LENGTH_MAX / 2]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_detect_file.c b/openair2/UTIL/OCG/OCG_detect_file.c deleted file mode 100644 index 034f173b77..0000000000 --- a/openair2/UTIL/OCG/OCG_detect_file.c +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_detect_file.c -* \brief Detect if a new XML is generated from the web portal -* \author Lusheng Wang & Navid Nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include -#include -#include "OCG_vars.h" -#include "OCG_detect_file.h" -#include "UTIL/LOG/log.h" -/*----------------------------------------------------------------------------*/ - - -int detect_file(char src_dir[DIR_LENGTH_MAX], char is_local_server[FILENAME_LENGTH_MAX]) -{ - DIR *dir = NULL; - struct dirent *file = NULL; - char template[FILENAME_LENGTH_MAX] = ""; - char manual[FILENAME_LENGTH_MAX] = ""; - - if((dir = opendir(src_dir)) == NULL) { - LOG_E(OCG, "Folder %s for detecting the XML configuration file is not found\n", src_dir); - return MODULE_ERROR; - } - - while((file = readdir(dir)) != NULL) { - if(strcmp(file->d_name, ".") && strcmp(file->d_name, "..")) { - if(file->d_type != DT_DIR) { - if ((!strcmp(is_local_server, "0")) || (!strcmp(is_local_server, "-1"))) { // for EURECOM web or local user without specifying the file name - strncpy(template, file->d_name, sizeof("template") - 1); - strncpy(manual, file->d_name, sizeof("manual") - 1); - - if ((!strcmp(template, "template")) || (!strcmp(manual, "manual"))) { // should skip the templates and the manual XML files - - } else { - if (strlen(file->d_name) <= FILENAME_LENGTH_MAX) { - strcpy(filename, file->d_name); - LOG_I(OCG, "Configuration file \"%s\" is detected\n", filename); - closedir(dir); - return MODULE_OK; // find a good file and return - } else { - LOG_E(OCG, "File name too long: char filename[] should be less than 64 characters\n"); - closedir(dir); - return MODULE_ERROR; - } - } - } else { // should use a template or a manual XML file - strncpy(template, is_local_server, sizeof("template") - 1); - strncpy(manual, is_local_server, sizeof("manual") - 1); - - if ((!strcmp(template, "template")) || (!strcmp(manual, "manual"))) { - strcpy(filename, is_local_server); - } else { - strcpy(filename, "template_"); - strcat(filename, is_local_server); - strcat(filename, ".xml"); - } - - char check_src_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX]; - strncpy(check_src_file, src_dir, FILENAME_LENGTH_MAX + DIR_LENGTH_MAX); - check_src_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX - 1] = 0; // terminate string - strncat(check_src_file, filename, FILENAME_LENGTH_MAX + DIR_LENGTH_MAX - strlen(check_src_file) - 1); - struct stat st; - - if(stat(check_src_file, &st) != 0) { - LOG_E(OCG, "file %s does not exist\n", check_src_file); - closedir(dir); - return MODULE_ERROR; - } else { - LOG_I(OCG, "template/manual file \"%s\" is used\n", filename); - closedir(dir); - return MODULE_OK; - } - } - } else { // this option is not used at this moment : NO directory should be put in the src_dir - //detect_file(strncat(src_dir, file->d_name, FILENAME_LENGTH_MAX + DIR_LENGTH_MAX)); - } - } - } - - closedir(dir); - - if (strcmp(is_local_server, "0") && strcmp(is_local_server, "-1")) { - LOG_E(OCG, "file %s does not exist in directory %s\n", is_local_server, src_dir); - return MODULE_ERROR; - } else return NO_FILE; -} diff --git a/openair2/UTIL/OCG/OCG_detect_file.h b/openair2/UTIL/OCG/OCG_detect_file.h deleted file mode 100644 index 3a43b50552..0000000000 --- a/openair2/UTIL/OCG/OCG_detect_file.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_detect_file.h -* \brief -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __OCG_DETECT_FILE_H__ - -#define __OCG_DETECT_FILE_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _detect_file Detect File - * @ingroup _fn - * @brief Detect new XML configuration file in USER_XML_FOLDER - * @{*/ -//int detect_file(int argc, char *argv[], char folder[DIR_LENGTH_MAX]); -int detect_file(char folder[DIR_LENGTH_MAX], char is_local_server[FILENAME_LENGTH_MAX]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_extern.h b/openair2/UTIL/OCG/OCG_extern.h deleted file mode 100644 index 25fea4e90e..0000000000 --- a/openair2/UTIL/OCG/OCG_extern.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -#ifndef __OCG_EXTERN_H__ -#define __OCG_EXTERN_H__ - -extern char filename[]; /*!< \brief user_name.file_date.xml */ -extern char user_name[]; /*!< \brief user_name */ -extern char file_date[]; /*!< \brief file_date */ -extern char src_file[]; /*!< \brief USER_XML_FOLDER/user_name.file_date.xml or DEMO_XML_FOLDER/user_name.file_date.xml */ -extern char dst_dir[]; /*!< \brief user_name/file_date/ */ -extern int copy_or_move; /*!< \brief indicating if the current emulation is with a local XML or an XML generated from the web portal */ -extern int file_detected; /*!< \brief indicate whether a new file is detected */ -/* @}*/ - -/** @defgroup _oks OCG Module State Indicators - * @ingroup _OCG - * @brief Indicate whether a module has processed successfully - * @{*/ -extern int get_opt_OK; /*!< \brief value: -9999, -1, 0 or 1 */ -extern int detect_file_OK; /*!< \brief value: -9999, -1 or 0 */ -extern int parse_filename_OK; /*!< \brief value: -9999, -1 or 0 */ -extern int create_dir_OK; /*!< \brief value: -9999, -1 or 0 */ -extern int parse_XML_OK; /*!< \brief value: -9999, -1 or 0 */ -extern int save_XML_OK; /*!< \brief value: -9999, -1 or 0 */ -extern int call_emu_OK; /*!< \brief value: -9999, -1 or 0 */ -extern int config_mobi_OK; /*!< \brief value: -9999, -1 or 0 */ -extern int generate_report_OK; /*!< \brief value: -9999, -1 or 0 */ -/* @}*/ - -extern OAI_Emulation oai_emulation; - -#endif diff --git a/openair2/UTIL/OCG/OCG_generate_report.c b/openair2/UTIL/OCG/OCG_generate_report.c deleted file mode 100644 index a48b3a7af7..0000000000 --- a/openair2/UTIL/OCG/OCG_generate_report.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_generate_report.c -* \brief Generate a brief report for debug of OCG -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include -#include -#include "OCG_vars.h" -#include "OCG_generate_report.h" -#include "UTIL/LOG/log.h" - -/*----------------------------------------------------------------------------*/ - - -int generate_report(char dst_dir[DIR_LENGTH_MAX], char filename[FILENAME_LENGTH_MAX]) { - // for the xml writer, refer to http://xmlsoft.org/html/libxml-xmlwriter.html - char dst_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX]; - strncpy(dst_file, dst_dir, FILENAME_LENGTH_MAX + DIR_LENGTH_MAX - strlen(filename) - 1); - strcat(dst_file, filename); - xmlTextWriterPtr writer; - writer = xmlNewTextWriterFilename(dst_file, 0); - // set the output format of the XML file - xmlTextWriterSetIndent(writer, 1); - xmlTextWriterSetIndentString(writer,(unsigned char *) " "); - xmlTextWriterStartDocument(writer, NULL, NULL, NULL); - /* Write an element named "X_ORDER_ID" as child of HEADER. */ - xmlTextWriterWriteFormatElement(writer,(unsigned char *) "COMMENT ", " in this output file, %d means NOT_PROCESSED; %d means NO_FILE; %d means ERROR; %d means OK ", MODULE_NOT_PROCESSED, - NO_FILE, MODULE_ERROR, MODULE_OK); - xmlTextWriterWriteFormatElement(writer,(unsigned char *) "OCG_GET_OPT ", " %d ", get_opt_OK); - xmlTextWriterWriteFormatElement(writer,(unsigned char *) "OCG_DETECT_FILE ", " %d ", detect_file_OK); - xmlTextWriterWriteFormatElement(writer,(unsigned char *) "OCG_PARSE_FILENAME", " %d ", parse_filename_OK); - xmlTextWriterWriteFormatElement(writer,(unsigned char *) "OCG_CREATE_DIR ", " %d ", create_dir_OK); - xmlTextWriterWriteFormatElement(writer,(unsigned char *) "OCG_PARSE_XML ", " %d ", parse_XML_OK); - xmlTextWriterWriteFormatElement(writer,(unsigned char *) "OCG_SAVE_XML ", " %d ", save_XML_OK); - // xmlTextWriterWriteFormatElement(writer, "OCG_CALL_EMU ", " %d ", call_emu_OK); - xmlTextWriterEndDocument(writer); - xmlFreeTextWriter(writer); - LOG_I(OCG, "A report of OCG is generated in directory \"%s\"\n\n", dst_dir); - return MODULE_OK; -} diff --git a/openair2/UTIL/OCG/OCG_generate_report.h b/openair2/UTIL/OCG/OCG_generate_report.h deleted file mode 100644 index a67adf70c7..0000000000 --- a/openair2/UTIL/OCG/OCG_generate_report.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_generate_report.h -* \brief -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __OCG_GENERATE_REPORT_H__ - -#define __OCG_GENERATE_REPORT_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _generate_report Generate report - * @ingroup _fn - * @brief Generate a report to show the states of OCG modules - * @{*/ -int generate_report(char dst_dir[DIR_LENGTH_MAX], char filename[FILENAME_LENGTH_MAX]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_get_opt.c b/openair2/UTIL/OCG/OCG_get_opt.c deleted file mode 100644 index 0d52197d13..0000000000 --- a/openair2/UTIL/OCG/OCG_get_opt.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_get_opt.c -* \brief Get Options of the OCG command -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include -#include -#include -#include "OCG.h" -#include "OCG_get_opt.h" -//#include "log.h" -/*----------------------------------------------------------------------------*/ - -char filename[FILENAME_LENGTH_MAX]; - -int get_opt(int argc, char *argv[]) -{ - char opts; - - while((opts = getopt(argc, argv, "f:h")) != -1) { - - switch (opts) { - case 'f' : - strcpy(filename, optarg); - LOG_D(OCG, "User specified configuration file is \"%s\"\n", filename); - return MODULE_OK; - - case 'h' : - LOG_I(OCG, "OCG command : OCG -f \"filename.xml\"\n"); - return GET_HELP; - - default : - LOG_E(OCG, "OCG command : OCG -f \"filename.xml\"\n"); - return GET_HELP; - } - } - - return NO_FILE; -} diff --git a/openair2/UTIL/OCG/OCG_get_opt.h b/openair2/UTIL/OCG/OCG_get_opt.h deleted file mode 100644 index 7fdab0c574..0000000000 --- a/openair2/UTIL/OCG/OCG_get_opt.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_get_opt.h -* \brief -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ -#ifndef __OCG_GET_OPT_H__ - -#define __OCG_GET_OPT_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _get_opt Get Opt - * @ingroup _fn - * @brief Get options of the OCG command, e.g. "OCG -f" and "OCG -h" - * @{*/ -int get_opt(int argc, char *argv[]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_if.h b/openair2/UTIL/OCG/OCG_if.h deleted file mode 100644 index cc55b56f36..0000000000 --- a/openair2/UTIL/OCG/OCG_if.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_if.h -* \brief Interfaces to the outside of OCG -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __UTIL_OCG_OCG_IF__H__ -#define __UTIL_OCG_OCG_IF__H__ - -#ifdef __cplusplus -extern "C" { -#endif -/*--- INCLUDES ---------------------------------------------------------------*/ -# include "OCG.h" -/*----------------------------------------------------------------------------*/ - - -# ifdef COMPONENT_CONFIGEN -# ifdef COMPONENT_CONFIGEN_IF -# define private_configen_if(x) x -# define friend_configen_if(x) x -# define public_configen_if(x) x -# else -# define private_configen_if(x) -# define friend_configen_if(x) extern x -# define public_configen_if(x) extern x -# endif -# else -# define private_configen_if(x) -# define friend_configen_if(x) -# define public_configen_if(x) extern x -# endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_parse_XML.c b/openair2/UTIL/OCG/OCG_parse_XML.c deleted file mode 100644 index e52bf402db..0000000000 --- a/openair2/UTIL/OCG/OCG_parse_XML.c +++ /dev/null @@ -1,1357 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_parse_XML.c -* \brief Parse the content of the XML configuration file -* \author Lusheng Wang & Navid Nikaein & Andre Gomes(One Source) -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -//#include -#include -//#include -#include "OCG_vars.h" -#include "OCG_parse_XML.h" -#include "UTIL/LOG/log.h" -#include "UTIL/OTG/otg_defs.h" -#include "UTIL/OPT/opt.h" -/*----------------------------------------------------------------------------*/ - -static int oai_emulation_; /*!< \brief indicating that the parsing position is now within OAI_Emulation_*/ - -static int environment_system_config_; /*!< \brief indicating that the parsing position is now within Envi_Config_*/ -static int fading_; -static int large_scale_; -static int free_space_model_parameters_; -static int pathloss_exponent_; -static int pathloss_0_dB_; -static int small_scale_; -static int ricean_8tap_; -static int rice_factor_dB_; -static int shadowing_; -static int decorrelation_distance_m_; -static int variance_dB_; -static int inter_site_correlation_; -static int wall_penetration_loss_dB_; -static int system_bandwidth_MB_; -static int system_frequency_GHz_; -static int number_of_rbs_dl_; -static int transmission_mode_; -static int frame_config_; -static int frame_type_; -static int tdd_config_; -static int antenna_; -static int eNB_antenna_; -static int UE_antenna_; -static int number_of_sectors_; -static int beam_width_dB_; -static int alpha_rad_1_; -static int alpha_rad_2_; -static int alpha_rad_3_; -static int antenna_gain_dBi_; -static int tx_power_dBm_; -static int rx_noise_level_dB_; -static int antenna_orientation_degree_1_; -static int antenna_orientation_degree_2_; -static int antenna_orientation_degree_3_; - -static int topology_config_; -static int area_; /*!< \brief indicating that the parsing position is now within Area_*/ -static int x_m_; -static int y_m_; -static int network_type_; -static int cell_type_; -static int relay_; -static int number_of_relays_; -static int mobility_; -static int UE_mobility_; -static int UE_mobility_type_; -static int grid_walk_; -static int grid_map_; -static int horizontal_grid_; -static int vertical_grid_; -static int grid_trip_type_; -static int UE_initial_distribution_; -static int random_UE_distribution_; -static int number_of_nodes_; -static int concentrated_UE_distribution_; -static int grid_UE_distribution_; -static int random_grid_; -static int border_grid_; -static int UE_moving_dynamics_; -static int min_speed_mps_; -static int max_speed_mps_; -static int min_sleep_ms_; -static int max_sleep_ms_; -static int min_journey_time_ms_; -static int max_journey_time_ms_; -static int eNB_mobility_; -static int eNB_mobility_type_; -static int eNB_initial_distribution_; -static int eNB_initial_coordinates_; -static double eNB_pos_x_; -static double eNB_pos_y_; -static int random_eNB_distribution_; -static int number_of_cells_; -static int hexagonal_eNB_distribution_; -static int inter_eNB_distance_km_; -static int grid_eNB_distribution_; -static int number_of_grid_x_; -static int number_of_grid_y_; -static int trace_mobility_file_; -static int sumo_config_; -static int sumo_cmd_; -static int sumo_config_file_; -static int sumo_start_; -static int sumo_end_; -static int sumo_step_; -static int sumo_hip_; -static int sumo_hport_; -static int omv_; - -static int application_config_; /*!< \brief indicating that the parsing position is now within App_Config_*/ -static int predefined_traffic_; -static int background_traffic_; -static int customized_traffic_; -static int application_type_; /*!< \brief indicating that the parsing position is now within App_Type_*/ -static int source_id_; -static int destination_id_; -static int traffic_; /*!< \brief indicating that the parsing position is now within Traffic_*/ -static int transport_protocol_; /*!< \brief indicating that the parsing position is now within Transport_Protocol_*/ -static int ip_version_; -static unsigned int aggregation_level_; -static int flow_start_; -static int flow_duration_; -static int idt_dist_; -static int idt_min_ms_; -static int idt_max_ms_; -static double idt_standard_deviation_; -static double idt_lambda_; -static double idt_scale_; -static double idt_shape_; -static int size_dist_; -static int size_min_byte_; -static int size_max_byte_; -static double size_standard_deviation_; -static double size_lambda_; -static double size_scale_; -static double size_shape_; -static int stream_; -static int destination_port_; -static int packet_gen_type_; - -static int emulation_config_; /*!< \brief indicating that the parsing position is now within Emu_Config_*/ -static int emulation_time_ms_; -static int curve_; -static int profiling_; -static int trace_file_; -static int background_stats_; -static int performance_metrics_; /*!< \brief indicating that the parsing position is now within Performance_*/ -static int throughput_; -static int latency_; -static int loss_rate_; -static int owd_radio_access_; -static int layer_; /*!< \brief indicating that the parsing position is now within Layer_*/ -static int phy_; -static int mac_; -static int rlc_; -static int pdcp_; -static int rrc_; -static int emu_; -static int omg_; -static int otg_; - -/* MAC*/ -static int protocol_; -static int mac_; -static int num_groups_; - -static int log_; -static int level_; -static int verbosity_; -static int interval_; -static int packet_trace_; -static int seed_value_; - -static int cli_enabled_; -static int cli_start_enb_; -static int cli_start_ue_; - -static unsigned int m2m_traffic_; -static double prob_off_pu_; -double prob_off_ed_; -static double prob_off_pe_; -static double prob_pu_ed_; -static double prob_pu_pe_; -static double prob_ed_pe_; -static double prob_ed_pu_; -static unsigned int holding_time_off_ed_; -static unsigned int holding_time_off_pu_; -static unsigned int holding_time_off_pe_; -static unsigned int holding_time_pe_off_; -static unsigned int pu_size_pkts_; -static unsigned int ed_size_pkts_; - -static int profile_; - - -void start_document(void *user_data) -{ - //printf("Start parsing ............ \n"); -} - -void end_document(void *user_data) -{ - //printf("End parsing .\n"); -} - -void start_element(void *user_data, const xmlChar *name, const xmlChar **attrs) // called once at the beginning of each element -{ - if (!xmlStrcmp(name,(unsigned char*) "OAI_EMULATION")) { - oai_emulation_ = 1; - - } else if (!xmlStrcmp(name,(unsigned char*) "ENVIRONMENT_SYSTEM_CONFIG")) { - environment_system_config_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "FADING")) { - fading_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "LARGE_SCALE")) { - large_scale_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "FREE_SPACE_MODEL_PARAMETERS")) { - free_space_model_parameters_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "PATHLOSS_EXPONENT")) { - pathloss_exponent_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "PATHLOSS_0_dB")) { - pathloss_0_dB_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SMALL_SCALE")) { - small_scale_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RICEAN_8TAP")) { - ricean_8tap_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RICE_FACTOR_dB")) { - rice_factor_dB_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SHADOWING")) { - shadowing_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "DECORRELATION_DISTANCE_m")) { - decorrelation_distance_m_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "VARIANCE_dB")) { - variance_dB_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "INTER_SITE_CORRELATION")) { - inter_site_correlation_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "WALL_PENETRATION_LOSS_dB")) { - wall_penetration_loss_dB_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SYSTEM_BANDWIDTH_MB")) { - system_bandwidth_MB_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SYSTEM_FREQUENCY_GHz")) { - system_frequency_GHz_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_RBS_DL")) { - number_of_rbs_dl_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "TRANSMISSION_MODE")) { - transmission_mode_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "FRAME_CONFIG")) { - frame_config_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "FRAME_TYPE")) { - frame_type_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "TDD_CONFIG")) { - tdd_config_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA")) { - antenna_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_ANTENNA")) { - eNB_antenna_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_ANTENNA")) { - UE_antenna_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_SECTORS")) { - number_of_sectors_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "BEAM_WIDTH_dB")) { - beam_width_dB_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "ALPHA_RAD_1")) { - alpha_rad_1_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "ALPHA_RAD_2")) { - alpha_rad_2_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "ALPHA_RAD_3")) { - alpha_rad_3_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA_GAIN_dBi")) { - antenna_gain_dBi_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "TX_POWER_dBm")) { - tx_power_dBm_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RX_NOISE_LEVEL_dB")) { - rx_noise_level_dB_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA_ORIENTATION_degree1")) { - antenna_orientation_degree_1_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA_ORIENTATION_degree2")) { - antenna_orientation_degree_2_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA_ORIENTATION_degree3")) { - antenna_orientation_degree_3_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "TOPOLOGY_CONFIG")) { - topology_config_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "AREA")) { - area_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "X_m")) { - x_m_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "Y_m")) { - y_m_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NETWORK_TYPE")) { - network_type_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "CELL_TYPE")) { - cell_type_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RELAY")) { - relay_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_RELAYS")) { - number_of_relays_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MOBILITY")) { - mobility_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_MOBILITY")) { - UE_mobility_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_MOBILITY_TYPE")) { - UE_mobility_type_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_WALK")) { - grid_walk_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_MAP")) { - grid_map_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "HORIZONTAL_GRID")) { - horizontal_grid_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "VERTICAL_GRID")) { - vertical_grid_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_TRIP_TYPE")) { - grid_trip_type_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_INITIAL_DISTRIBUTION")) { - UE_initial_distribution_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RANDOM_UE_DISTRIBUTION")) { - random_UE_distribution_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_NODES")) { - number_of_nodes_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "CONCENTRATED_UE_DISTRIBUTION")) { - concentrated_UE_distribution_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_UE_DISTRIBUTION")) { - grid_UE_distribution_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RANDOM_GRID")) { - random_grid_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "BORDER_GRID")) { - border_grid_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_MOVING_DYNAMICS")) { - UE_moving_dynamics_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MIN_SPEED_mps")) { - min_speed_mps_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MAX_SPEED_mps")) { - max_speed_mps_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MIN_SLEEP_ms")) { - min_sleep_ms_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MAX_SLEEP_ms")) { - max_sleep_ms_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MIN_JOURNEY_TIME_ms")) { - min_journey_time_ms_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MAX_JOURNEY_TIME_ms")) { - max_journey_time_ms_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_MOBILITY")) { - eNB_mobility_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_MOBILITY_TYPE")) { - eNB_mobility_type_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_INITIAL_DISTRIBUTION")) { - eNB_initial_distribution_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_INITIAL_COORDINATES")) { - eNB_initial_coordinates_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "POS_X")) { - eNB_pos_x_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "POS_Y")) { - eNB_pos_y_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RANDOM_eNB_DISTRIBUTION")) { - random_eNB_distribution_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_CELLS")) { - number_of_cells_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "HEXAGONAL_eNB_DISTRIBUTION")) { - hexagonal_eNB_distribution_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "INTER_eNB_DISTANCE_km")) { - inter_eNB_distance_km_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_eNB_DISTRIBUTION")) { - grid_eNB_distribution_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_GRID_X")) { - number_of_grid_x_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_GRID_Y")) { - number_of_grid_y_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "TRACE_MOBILITY_FILE")) { - trace_mobility_file_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_CONFIG")) { - sumo_config_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_CMD")) { - sumo_cmd_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_CONFIG_FILE")) { - sumo_config_file_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_START")) { - sumo_start_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_END")) { - sumo_end_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_STEP")) { - sumo_step_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_HOST_IP")) { - sumo_hip_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_HOST_PORT")) { - sumo_hport_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "OMV")) { - omv_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "APPLICATION_CONFIG")) { - application_config_ = 1; - oai_emulation.info.max_predefined_traffic_config_index = 0; - oai_emulation.info.max_customized_traffic_config_index = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PREDEFINED_TRAFFIC")) { - predefined_traffic_ = 1; - oai_emulation.info.otg_enabled =1; - oai_emulation.info.max_predefined_traffic_config_index ++; - } else if (!xmlStrcmp(name, (unsigned char*) "CUSTOMIZED_TRAFFIC")) { - customized_traffic_ = 1; - oai_emulation.info.otg_enabled =1; - oai_emulation.info.max_customized_traffic_config_index ++; - } else if (!xmlStrcmp(name, (unsigned char*) "CUSTOMIZED_TRAFFIC")) { - customized_traffic_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "M2M")) { - m2m_traffic_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_OFF_PU")) { - prob_off_pu_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_OFF_ED")) { - prob_off_ed_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_OFF_PE")) { - prob_off_pe_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_PU_ED")) { - prob_pu_ed_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_PU_PE")) { - prob_pu_pe_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_ED_PE")) { - prob_ed_pe_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_ED_PU")) { - prob_ed_pu_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "HOLDING_TIME_OFF_ED")) { - holding_time_off_ed_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "HOLDING_TIME_OFF_PU")) { - holding_time_off_pu_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "HOLDING_TIME_OFF_PE")) { - holding_time_off_pe_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "HOLDING_TIME_PE_OFF")) { - holding_time_pe_off_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PU_SIZE_PKTS")) { - pu_size_pkts_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "ED_SIZE_PKTS")) { - ed_size_pkts_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "SOURCE_ID")) { - source_id_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "DESTINATION_ID")) { - destination_id_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "APPLICATION_TYPE")) { - application_type_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "PACKET_GEN_TYPE")) { - packet_gen_type_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "BACKGROUND_TRAFFIC")) { - background_traffic_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "TRAFFIC")) { - traffic_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "TRANSPORT_PROTOCOL")) { - transport_protocol_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "IP_VERSION")) { - ip_version_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "AGGREGATION_LEVEL")) { - aggregation_level_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "FLOW_START_ms")) { - flow_start_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "FLOW_DURATION_ms")) { - flow_duration_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_DIST")) { - idt_dist_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_MIN_ms")) { - idt_min_ms_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_MAX_ms")) { - idt_max_ms_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_STANDARD_DEVIATION")) { - idt_standard_deviation_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_LAMBDA")) { - idt_lambda_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_SCALE")) { - idt_scale_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_SHAPE")) { - idt_shape_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_DIST")) { - size_dist_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_MIN_byte")) { - size_min_byte_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_MAX_byte")) { - size_max_byte_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_STANDARD_DEVIATION")) { - size_standard_deviation_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_LAMBDA")) { - size_lambda_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_SCALE")) { - size_scale_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_SHAPE")) { - size_shape_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "STREAM")) { - stream_ = 1; - } else if (!xmlStrcmp(name, (unsigned char*) "DESTINATION_PORT")) { - destination_port_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "EMULATION_CONFIG")) { - emulation_config_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "EMULATION_TIME_ms")) { - emulation_time_ms_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "CURVE")) { - curve_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "PROFILING")) { - profiling_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "TRACE_FILE")) { - trace_file_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "BACKGROUND_STATS")) { - background_stats_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "PERFORMANCE_METRICS")) { - performance_metrics_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "THROUGHPUT")) { - throughput_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "LATENCY")) { - latency_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "LOSS_RATE")) { - loss_rate_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "OWD_RADIO_ACCESS")) { - owd_radio_access_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "LAYER")) { - layer_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "PHY")) { - phy_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MAC")) { - mac_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RLC")) { - rlc_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "PDCP")) { - pdcp_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "RRC")) { - rrc_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "OMG")) { - omg_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "OTG")) { - otg_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "EMU")) { - emu_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "LOG")) { - log_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "LEVEL")) { - level_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "VERBOSITY")) { - verbosity_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "INTERVAL")) { - interval_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "PACKET_TRACE")) { - packet_trace_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "SEED_VALUE")) { - seed_value_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "CLI")) { - cli_enabled_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "START_ENB")) { - cli_start_enb_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "START_UE")) { - cli_start_ue_ = 1; - - } else if (!xmlStrcmp(name,(unsigned char*) "PROTOCOL")) { - protocol_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "MAC")) { - mac_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "NUM_GROUPS")) { - num_groups_ = 1; - } else if (!xmlStrcmp(name,(unsigned char*) "PROFILE")) { - profile_ = 1; - } else { - LOG_W(OCG, "One element could not be parsed : unknown element name '%s'\n", name); - } -} - -void end_element(void *user_data, const xmlChar *name) // called once at the end of each element -{ - if (!xmlStrcmp(name,(unsigned char*) "OAI_EMULATION")) { - oai_emulation_ = 0; - - } else if (!xmlStrcmp(name,(unsigned char*) "ENVIRONMENT_SYSTEM_CONFIG")) { - environment_system_config_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "FADING")) { - fading_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "LARGE_SCALE")) { - large_scale_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "FREE_SPACE_MODEL_PARAMETERS")) { - free_space_model_parameters_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PATHLOSS_EXPONENT")) { - pathloss_exponent_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PATHLOSS_0_dB")) { - pathloss_0_dB_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SMALL_SCALE")) { - small_scale_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RICEAN_8TAP")) { - ricean_8tap_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RICE_FACTOR_dB")) { - rice_factor_dB_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SHADOWING")) { - shadowing_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "DECORRELATION_DISTANCE_m")) { - decorrelation_distance_m_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "VARIANCE_dB")) { - variance_dB_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "INTER_SITE_CORRELATION")) { - inter_site_correlation_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "WALL_PENETRATION_LOSS_dB")) { - wall_penetration_loss_dB_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SYSTEM_BANDWIDTH_MB")) { - system_bandwidth_MB_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SYSTEM_FREQUENCY_GHz")) { - system_frequency_GHz_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_RBS_DL")) { - number_of_rbs_dl_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "TRANSMISSION_MODE")) { - transmission_mode_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "FRAME_CONFIG")) { - frame_config_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "FRAME_TYPE")) { - frame_type_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "TDD_CONFIG")) { - tdd_config_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA")) { - antenna_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_ANTENNA")) { - eNB_antenna_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_ANTENNA")) { - UE_antenna_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_SECTORS")) { - number_of_sectors_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "BEAM_WIDTH_dB")) { - beam_width_dB_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "ALPHA_RAD_1")) { - alpha_rad_1_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "ALPHA_RAD_2")) { - alpha_rad_2_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "ALPHA_RAD_3")) { - alpha_rad_3_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA_GAIN_dBi")) { - antenna_gain_dBi_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "TX_POWER_dBm")) { - tx_power_dBm_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RX_NOISE_LEVEL_dB")) { - rx_noise_level_dB_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA_ORIENTATION_degree1")) { - antenna_orientation_degree_1_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA_ORIENTATION_degree2")) { - antenna_orientation_degree_2_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "ANTENNA_ORIENTATION_degree3")) { - antenna_orientation_degree_3_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "TOPOLOGY_CONFIG")) { - topology_config_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "AREA")) { - area_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "X_m")) { - x_m_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "Y_m")) { - y_m_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NETWORK_TYPE")) { - network_type_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "CELL_TYPE")) { - cell_type_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RELAY")) { - relay_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_RELAYS")) { - number_of_relays_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MOBILITY")) { - mobility_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_MOBILITY")) { - UE_mobility_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_MOBILITY_TYPE")) { - UE_mobility_type_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_WALK")) { - grid_walk_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_MAP")) { - grid_map_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "HORIZONTAL_GRID")) { - horizontal_grid_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "VERTICAL_GRID")) { - vertical_grid_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_TRIP_TYPE")) { - grid_trip_type_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_INITIAL_DISTRIBUTION")) { - UE_initial_distribution_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RANDOM_UE_DISTRIBUTION")) { - random_UE_distribution_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_NODES")) { - number_of_nodes_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "CONCENTRATED_UE_DISTRIBUTION")) { - concentrated_UE_distribution_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_UE_DISTRIBUTION")) { - grid_UE_distribution_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RANDOM_GRID")) { - random_grid_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "BORDER_GRID")) { - border_grid_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "UE_MOVING_DYNAMICS")) { - UE_moving_dynamics_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MIN_SPEED_mps")) { - min_speed_mps_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MAX_SPEED_mps")) { - max_speed_mps_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MIN_SLEEP_ms")) { - min_sleep_ms_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MAX_SLEEP_ms")) { - max_sleep_ms_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MIN_JOURNEY_TIME_ms")) { - min_journey_time_ms_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MAX_JOURNEY_TIME_ms")) { - max_journey_time_ms_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_MOBILITY")) { - eNB_mobility_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_MOBILITY_TYPE")) { - eNB_mobility_type_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_INITIAL_DISTRIBUTION")) { - eNB_initial_distribution_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "eNB_INITIAL_COORDINATES")) { - eNB_initial_coordinates_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "POS_X")) { - eNB_pos_x_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "POS_Y")) { - eNB_pos_y_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RANDOM_eNB_DISTRIBUTION")) { - random_eNB_distribution_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_CELLS")) { - number_of_cells_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "HEXAGONAL_eNB_DISTRIBUTION")) { - hexagonal_eNB_distribution_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "INTER_eNB_DISTANCE_km")) { - inter_eNB_distance_km_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "GRID_eNB_DISTRIBUTION")) { - grid_eNB_distribution_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_GRID_X")) { - number_of_grid_x_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NUMBER_OF_GRID_Y")) { - number_of_grid_y_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "TRACE_MOBILITY_FILE")) { - trace_mobility_file_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_CONFIG")) { - sumo_config_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_CMD")) { - sumo_cmd_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_CONFIG_FILE")) { - sumo_config_file_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_START")) { - sumo_start_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_END")) { - sumo_end_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_STEP")) { - sumo_step_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_HOST_IP")) { - sumo_hip_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SUMO_HOST_PORT")) { - sumo_hport_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "OMV")) { - omv_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "APPLICATION_CONFIG")) { - application_config_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PREDEFINED_TRAFFIC")) { - predefined_traffic_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "CUSTOMIZED_TRAFFIC")) { - customized_traffic_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "M2M")) { - m2m_traffic_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_OFF_PU")) { - prob_off_pu_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_OFF_ED")) { - prob_off_ed_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_OFF_PE")) { - prob_off_pe_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_PU_ED")) { - prob_pu_ed_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_PU_PE")) { - prob_pu_pe_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_ED_PE")) { - prob_ed_pe_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PROB_ED_PU")) { - prob_ed_pu_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "HOLDING_TIME_OFF_ED")) { - holding_time_off_ed_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "HOLDING_TIME_OFF_PU")) { - holding_time_off_pu_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "HOLDING_TIME_OFF_PE")) { - holding_time_off_pe_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "HOLDING_TIME_PE_OFF")) { - holding_time_pe_off_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PU_SIZE_PKTS")) { - pu_size_pkts_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "ED_SIZE_PKTS")) { - ed_size_pkts_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "SOURCE_ID")) { - source_id_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "DESTINATION_ID")) { - destination_id_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "APPLICATION_TYPE")) { - application_type_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "PACKET_GEN_TYPE")) { - packet_gen_type_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "BACKGROUND_TRAFFIC")) { - background_traffic_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "TRAFFIC")) { - traffic_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "TRANSPORT_PROTOCOL")) { - transport_protocol_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "AGGREGATION_LEVEL")) { - aggregation_level_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "FLOW_START_ms")) { - flow_start_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "FLOW_DURATION_ms")) { - flow_duration_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "IP_VERSION")) { - ip_version_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_DIST")) { - idt_dist_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_MIN_ms")) { - idt_min_ms_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_MAX_ms")) { - idt_max_ms_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_STANDARD_DEVIATION")) { - idt_standard_deviation_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_LAMBDA")) { - idt_lambda_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_SCALE")) { - idt_scale_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "IDT_SHAPE")) { - idt_shape_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_DIST")) { - size_dist_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_MIN_byte")) { - size_min_byte_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_MAX_byte")) { - size_max_byte_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_STANDARD_DEVIATION")) { - size_standard_deviation_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_LAMBDA")) { - size_lambda_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_SCALE")) { - size_scale_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "SIZE_SHAPE")) { - size_shape_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "STREAM")) { - stream_ = 0; - } else if (!xmlStrcmp(name, (unsigned char*) "DESTINATION_PORT")) { - destination_port_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "EMULATION_CONFIG")) { - emulation_config_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "EMULATION_TIME_ms")) { - emulation_time_ms_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "CURVE")) { - curve_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PROFILING")) { - profiling_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "TRACE_FILE")) { - trace_file_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "BACKGROUND_STATS")) { - background_stats_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PERFORMANCE_METRICS")) { - performance_metrics_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "THROUGHPUT")) { - throughput_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "LATENCY")) { - latency_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "LOSS_RATE")) { - loss_rate_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "OWD_RADIO_ACCESS")) { - owd_radio_access_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "LAYER")) { - layer_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PHY")) { - phy_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MAC")) { - mac_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RLC")) { - rlc_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PDCP")) { - pdcp_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "RRC")) { - rrc_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "OMG")) { - omg_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "OTG")) { - otg_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "EMU")) { - emu_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "LOG")) { - log_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "LEVEL")) { - level_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "VERBOSITY")) { - verbosity_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "INTERVAL")) { - interval_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PACKET_TRACE")) { - packet_trace_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "SEED_VALUE")) { - seed_value_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "CLI")) { - cli_enabled_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "START_ENB")) { - cli_start_enb_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "START_UE")) { - cli_start_ue_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PROTOCOL")) { - protocol_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "MAC")) { - mac_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "NUM_GROUPS")) { - num_groups_ = 0; - } else if (!xmlStrcmp(name,(unsigned char*) "PROFILE")) { - profile_ = 0; - } -} - -void characters(void *user_data, const xmlChar *xmlch, int xmllen) // called once when there is content in each element -{ - - int i; - const char *ch = (const char*) xmlch; - size_t len = (size_t) xmllen; - - if (oai_emulation_) { - if (environment_system_config_) { - if (fading_) { - if (large_scale_) { - oai_emulation.environment_system_config.fading.large_scale.selected_option = strndup(ch, len); - } else if (small_scale_) { - oai_emulation.environment_system_config.fading.small_scale.selected_option = strndup(ch, len); - } else if (shadowing_) { - if (decorrelation_distance_m_) { - oai_emulation.environment_system_config.fading.shadowing.decorrelation_distance_m = atof(ch); - } else if (variance_dB_) { - oai_emulation.environment_system_config.fading.shadowing.variance_dB = atof(ch); - } else if (inter_site_correlation_) { - oai_emulation.environment_system_config.fading.shadowing.inter_site_correlation = atof(ch); - } - } else if (free_space_model_parameters_) { - if (pathloss_exponent_) { - oai_emulation.environment_system_config.fading.free_space_model_parameters.pathloss_exponent = atof(ch); - } else if (pathloss_0_dB_) { - oai_emulation.environment_system_config.fading.free_space_model_parameters.pathloss_0_dB = atof(ch); - } - } else if (ricean_8tap_) { - oai_emulation.environment_system_config.fading.ricean_8tap.rice_factor_dB = atof(ch); - } - } else if (wall_penetration_loss_dB_) { - oai_emulation.environment_system_config.wall_penetration_loss_dB = atof(ch); - } else if (system_bandwidth_MB_) { - oai_emulation.environment_system_config.system_bandwidth_MB = atof(ch); - } else if (system_frequency_GHz_) { - oai_emulation.environment_system_config.system_frequency_GHz = atof(ch); - } else if (number_of_rbs_dl_) { - oai_emulation.info.N_RB_DL[0] = atoi(ch); - } else if (transmission_mode_) { - oai_emulation.info.transmission_mode[0] = atoi(ch); - } else if (frame_config_) { - if (frame_type_) { - oai_emulation.info.frame_type[0] = atoi(ch); - - if (oai_emulation.info.frame_type[0]) { - oai_emulation.info.frame_type_name[0] = "TDD"; - } else { - oai_emulation.info.frame_type_name[0] = "FDD"; - } - } else if (tdd_config_) { - oai_emulation.info.tdd_config[0] = atoi(ch); - } - } else if (antenna_) { - if (eNB_antenna_) { - if (number_of_sectors_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.number_of_sectors = atoi(ch); - } else if (beam_width_dB_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.beam_width_dB = atof(ch); - } else if (alpha_rad_1_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.alpha_rad[0] = atof(ch); - } else if (alpha_rad_2_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.alpha_rad[1] = atof(ch); - } else if (alpha_rad_3_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.alpha_rad[2] = atof(ch); - } else if (antenna_gain_dBi_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.antenna_gain_dBi = atof(ch); - } else if (tx_power_dBm_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.tx_power_dBm = atof(ch); - } else if (rx_noise_level_dB_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.rx_noise_level_dB = atof(ch); - } else if (antenna_orientation_degree_1_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.antenna_orientation_degree[0] = atof(ch); - } else if (antenna_orientation_degree_2_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.antenna_orientation_degree[1] = atof(ch); - } else if (antenna_orientation_degree_3_) { - oai_emulation.environment_system_config.antenna.eNB_antenna.antenna_orientation_degree[2] = atof(ch); - } - } else if (UE_antenna_) { - if (antenna_gain_dBi_) { - oai_emulation.environment_system_config.antenna.UE_antenna.antenna_gain_dBi = atof(ch); - } else if (tx_power_dBm_) { - oai_emulation.environment_system_config.antenna.UE_antenna.tx_power_dBm = atof(ch); - } else if (rx_noise_level_dB_) { - oai_emulation.environment_system_config.antenna.UE_antenna.rx_noise_level_dB = atof(ch); - } - } - } - - } else if (topology_config_) { - if (area_) { - if (x_m_) { - oai_emulation.topology_config.area.x_m = atof(ch); - } else if (y_m_) { - oai_emulation.topology_config.area.y_m = atof(ch); - } - } else if (network_type_) { - oai_emulation.topology_config.network_type.selected_option = strndup(ch, len); - } else if (cell_type_) { - oai_emulation.topology_config.cell_type.selected_option = strndup(ch, len); - } else if (relay_) { - if (number_of_relays_) { - oai_emulation.topology_config.relay.number_of_relays = atoi(ch); - } - } else if (mobility_) { - if (UE_mobility_) { - if (UE_mobility_type_) { - oai_emulation.topology_config.mobility.UE_mobility.UE_mobility_type.selected_option = strndup(ch, len); - - } else if (grid_walk_) { - if (grid_map_) { - oai_emulation.topology_config.mobility.UE_mobility.grid_walk.grid_map.selected_option = strndup(ch, len); - /* - if (horizontal_grid_) { - oai_emulation.topology_config.mobility.UE_mobility.grid_walk.grid_map.horizontal_grid = atoi(ch); - } else if (vertical_grid_) { - oai_emulation.topology_config.mobility.UE_mobility.grid_walk.grid_map.vertical_grid = atoi(ch); - } - */ - } else if (grid_trip_type_) { - oai_emulation.topology_config.mobility.UE_mobility.grid_walk.grid_trip_type.selected_option = strndup(ch, len); - } - } else if (UE_initial_distribution_) { - oai_emulation.topology_config.mobility.UE_mobility.UE_initial_distribution.selected_option = strndup(ch, len); - } else if (random_UE_distribution_) { - if (number_of_nodes_) { - oai_emulation.topology_config.mobility.UE_mobility.random_UE_distribution.number_of_nodes = atoi(ch); - oai_emulation.info.nb_ue_local = oai_emulation.topology_config.mobility.UE_mobility.random_UE_distribution.number_of_nodes; - } - } else if (concentrated_UE_distribution_) { - if (number_of_nodes_) { - oai_emulation.topology_config.mobility.UE_mobility.concentrated_UE_distribution.number_of_nodes = atoi(ch); - oai_emulation.info.nb_ue_local = oai_emulation.topology_config.mobility.UE_mobility.concentrated_UE_distribution.number_of_nodes; - } - } else if (grid_UE_distribution_) { - if (random_grid_) { - if (number_of_nodes_) { - oai_emulation.topology_config.mobility.UE_mobility.grid_UE_distribution.random_grid.number_of_nodes = atoi(ch); - oai_emulation.info.nb_ue_local = oai_emulation.topology_config.mobility.UE_mobility.grid_UE_distribution.random_grid.number_of_nodes; - } - } else if (border_grid_) { - if (number_of_nodes_) { - oai_emulation.topology_config.mobility.UE_mobility.grid_UE_distribution.border_grid.number_of_nodes = atoi(ch); - oai_emulation.info.nb_ue_local = oai_emulation.topology_config.mobility.UE_mobility.grid_UE_distribution.border_grid.number_of_nodes; - } - } - } else if (UE_moving_dynamics_) { - if (min_speed_mps_) { - oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.min_speed_mps = atof(ch); - } else if (max_speed_mps_) { - oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.max_speed_mps = atof(ch); - } else if (min_sleep_ms_) { - oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.min_sleep_ms = atof(ch); - } else if (max_sleep_ms_) { - oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.max_sleep_ms = atof(ch); - } else if (min_journey_time_ms_) { - oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.min_journey_time_ms = atof(ch); - } else if (max_journey_time_ms_) { - oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.max_journey_time_ms = atof(ch); - } - } else if (trace_mobility_file_) { - oai_emulation.topology_config.mobility.UE_mobility.trace_config.trace_mobility_file=strndup(ch,len); - } else if (sumo_config_) { - if (sumo_cmd_) { - oai_emulation.topology_config.mobility.UE_mobility.sumo_config.command=strndup(ch,len); - } else if (sumo_config_file_) { - oai_emulation.topology_config.mobility.UE_mobility.sumo_config.file=strndup(ch,len); - } else if (sumo_start_) { - oai_emulation.topology_config.mobility.UE_mobility.sumo_config.start=atoi(ch); - } else if (sumo_end_) { - oai_emulation.topology_config.mobility.UE_mobility.sumo_config.end=atoi(ch); - } else if (sumo_step_) { - oai_emulation.topology_config.mobility.UE_mobility.sumo_config.step=atoi(ch); - } else if (sumo_hip_) { - oai_emulation.topology_config.mobility.UE_mobility.sumo_config.hip=strndup(ch,len); - } else if (sumo_hport_) { - oai_emulation.topology_config.mobility.UE_mobility.sumo_config.hport=atoi(ch); - } - } - - } else if (eNB_mobility_) { - if (eNB_mobility_type_) { - oai_emulation.topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option = strndup(ch, len); - - } else if (eNB_initial_distribution_) { - oai_emulation.topology_config.mobility.eNB_mobility.eNB_initial_distribution.selected_option = strndup(ch, len); - } else if (eNB_initial_coordinates_) { - if (eNB_pos_x_) { - oai_emulation.topology_config.mobility.eNB_mobility.fixed_eNB_distribution.pos_x = atof(ch); - } else if (eNB_pos_y_) { - oai_emulation.topology_config.mobility.eNB_mobility.fixed_eNB_distribution.pos_y = atof(ch); - } - } else if (random_eNB_distribution_) { - if (number_of_cells_) { - oai_emulation.topology_config.mobility.eNB_mobility.random_eNB_distribution.number_of_cells = atoi(ch); - oai_emulation.info.nb_enb_local = oai_emulation.topology_config.mobility.eNB_mobility.random_eNB_distribution.number_of_cells; - } - } else if (hexagonal_eNB_distribution_) { - if (number_of_cells_) { - oai_emulation.topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.number_of_cells = atoi(ch); - oai_emulation.info.nb_enb_local = oai_emulation.topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.number_of_cells; - } else if (inter_eNB_distance_km_) { - oai_emulation.topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.inter_eNB_distance_km = atof(ch); - } - } else if (grid_eNB_distribution_) { - if (number_of_grid_x_) { - oai_emulation.topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_x = atoi(ch); - } else if (number_of_grid_y_) { - oai_emulation.topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_y = atoi(ch); - oai_emulation.info.nb_enb_local = oai_emulation.topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_x * - oai_emulation.topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_y; - } - } else if (trace_mobility_file_) { - oai_emulation.topology_config.mobility.eNB_mobility.trace_config.trace_mobility_file=strndup(ch,len); - } - } - } else if (omv_) { - oai_emulation.topology_config.omv=atoi(ch); - } - - } else if (application_config_) { - if (packet_gen_type_) { - oai_emulation.application_config.packet_gen_type=strndup(ch, len); - } else if (predefined_traffic_) { - if (source_id_) { - oai_emulation.application_config.predefined_traffic.source_id[oai_emulation.info.max_predefined_traffic_config_index] = strndup(ch, len); - } else if (destination_id_) { - oai_emulation.application_config.predefined_traffic.destination_id[oai_emulation.info.max_predefined_traffic_config_index] = strndup(ch, len); - } else if (application_type_) { - oai_emulation.application_config.predefined_traffic.application_type[oai_emulation.info.max_predefined_traffic_config_index] = strndup(ch, len); - } else if (background_traffic_) { - oai_emulation.application_config.predefined_traffic.background[oai_emulation.info.max_predefined_traffic_config_index] = strndup(ch, len); - } else if (aggregation_level_) { - oai_emulation.application_config.predefined_traffic.aggregation_level[oai_emulation.info.max_predefined_traffic_config_index] = atoi(ch); - } else if (flow_start_) { - oai_emulation.application_config.predefined_traffic.flow_start[oai_emulation.info.max_predefined_traffic_config_index] = atoi(ch); - } else if (flow_duration_) { - oai_emulation.application_config.predefined_traffic.flow_duration[oai_emulation.info.max_predefined_traffic_config_index] = atoi(ch); - } - } else if (customized_traffic_) { - - - if (prob_off_pu_) { - oai_emulation.application_config.customized_traffic.prob_off_pu[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (prob_off_ed_) { - oai_emulation.application_config.customized_traffic.prob_off_ed[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (prob_off_pe_) { - oai_emulation.application_config.customized_traffic.prob_off_pe[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (prob_pu_ed_) { - oai_emulation.application_config.customized_traffic.prob_pu_ed[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (prob_pu_pe_) { - oai_emulation.application_config.customized_traffic.prob_pu_pe[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (prob_ed_pe_) { - oai_emulation.application_config.customized_traffic.prob_ed_pe[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (prob_ed_pu_) { - oai_emulation.application_config.customized_traffic.prob_ed_pu[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (holding_time_off_ed_) { - oai_emulation.application_config.customized_traffic.holding_time_off_ed[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (holding_time_off_pu_) { - oai_emulation.application_config.customized_traffic.holding_time_off_pu[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (holding_time_off_pe_) { - oai_emulation.application_config.customized_traffic.holding_time_off_pe[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (holding_time_pe_off_) { - oai_emulation.application_config.customized_traffic.holding_time_pe_off[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (pu_size_pkts_) { - oai_emulation.application_config.customized_traffic.pu_size_pkts[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = "enable"; - } else if (ed_size_pkts_) { - oai_emulation.application_config.customized_traffic.ed_size_pkts[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (background_traffic_) { - oai_emulation.application_config.customized_traffic.background[oai_emulation.info.max_customized_traffic_config_index] = strndup(ch, len); - } else if (m2m_traffic_) { - oai_emulation.application_config.customized_traffic.m2m[oai_emulation.info.max_customized_traffic_config_index] = strndup(ch, len); - } else if (source_id_) { - oai_emulation.application_config.customized_traffic.source_id[oai_emulation.info.max_customized_traffic_config_index] = strndup(ch, len); - } else if (destination_id_) { - oai_emulation.application_config.customized_traffic.destination_id[oai_emulation.info.max_customized_traffic_config_index] = strndup(ch, len); - } else if (transport_protocol_) { - oai_emulation.application_config.customized_traffic.transport_protocol[oai_emulation.info.max_customized_traffic_config_index] = strndup(ch, len); - } else if (ip_version_) { - oai_emulation.application_config.customized_traffic.ip_version[oai_emulation.info.max_customized_traffic_config_index] = strndup(ch, len); - } else if (aggregation_level_) { - oai_emulation.application_config.customized_traffic.aggregation_level[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } else if (flow_start_) { - oai_emulation.application_config.customized_traffic.flow_start[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } else if (flow_duration_) { - oai_emulation.application_config.customized_traffic.flow_duration[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } else if (idt_dist_) { - oai_emulation.application_config.customized_traffic.idt_dist[oai_emulation.info.max_customized_traffic_config_index] = strndup(ch, len); - } else if (idt_min_ms_) { - oai_emulation.application_config.customized_traffic.idt_min_ms[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } else if (idt_max_ms_) { - oai_emulation.application_config.customized_traffic.idt_max_ms[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } else if (idt_standard_deviation_) { - oai_emulation.application_config.customized_traffic.idt_standard_deviation[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (idt_lambda_) { - oai_emulation.application_config.customized_traffic.idt_lambda[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (idt_scale_) { - oai_emulation.application_config.customized_traffic.idt_scale[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (idt_shape_) { - oai_emulation.application_config.customized_traffic.idt_shape[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (size_dist_) { - oai_emulation.application_config.customized_traffic.size_dist[oai_emulation.info.max_customized_traffic_config_index] = strndup(ch, len); - } else if (size_min_byte_) { - oai_emulation.application_config.customized_traffic.size_min_byte[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } else if (size_max_byte_) { - oai_emulation.application_config.customized_traffic.size_max_byte[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } else if (size_standard_deviation_) { - oai_emulation.application_config.customized_traffic.size_standard_deviation[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (size_lambda_) { - oai_emulation.application_config.customized_traffic.size_lambda[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (size_scale_) { - oai_emulation.application_config.customized_traffic.size_scale[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (size_shape_) { - oai_emulation.application_config.customized_traffic.size_shape[oai_emulation.info.max_customized_traffic_config_index] = atof(ch); - } else if (stream_) { - oai_emulation.application_config.customized_traffic.stream[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } else if (destination_port_) { - oai_emulation.application_config.customized_traffic.destination_port[oai_emulation.info.max_customized_traffic_config_index] = atoi(ch); - } - } - - } else if (emulation_config_) { - if (emulation_time_ms_) { - oai_emulation.emulation_config.emulation_time_ms = atof(ch); - } else if (curve_) { - oai_emulation.emulation_config.curve = strndup(ch, len); - } else if (profiling_) { - oai_emulation.info.opp_enabled = atoi(ch); - } else if (trace_file_) { - oai_emulation.info.opt_enabled = 1; - - if (strncmp(ch, "wireshark", len) == 0) { - opt_type = OPT_WIRESHARK; - } else if (strncmp(ch, "pcap", len) == 0) { - opt_type = OPT_PCAP; - } else { - opt_type = OPT_NONE; - oai_emulation.info.opt_enabled = 0; - } - - oai_emulation.info.opt_mode = opt_type; - } else if (background_stats_) { - oai_emulation.emulation_config.background_stats = strndup(ch, len); - } else if (performance_metrics_) { - if (throughput_) { - oai_emulation.emulation_config.performance_metrics.throughput = strndup(ch, len); - } else if (latency_) { - oai_emulation.emulation_config.performance_metrics.latency = strndup(ch, len); - } else if (loss_rate_) { - oai_emulation.emulation_config.performance_metrics.loss_rate = strndup(ch, len); - } else if (owd_radio_access_) { - oai_emulation.emulation_config.performance_metrics.owd_radio_access = strndup(ch, len); - } - } else if (layer_) { - if (phy_) { - oai_emulation.emulation_config.layer.phy = atoi(ch); - } else if (mac_) { - oai_emulation.emulation_config.layer.mac = atoi(ch); - } else if (rlc_) { - oai_emulation.emulation_config.layer.rlc = atoi(ch); - } else if (pdcp_) { - oai_emulation.emulation_config.layer.pdcp = atoi(ch); - } else if (rrc_) { - oai_emulation.emulation_config.layer.rrc = atoi(ch); - } else if (omg_) { - oai_emulation.emulation_config.layer.omg = atoi(ch); - } else if (otg_) { - oai_emulation.emulation_config.layer.otg = atoi(ch); - } else if (emu_) { - oai_emulation.emulation_config.layer.emu = atoi(ch); - } - } else if (log_) { - if (level_) { - oai_emulation.emulation_config.log_emu.level = strndup(ch,len); - } else if (verbosity_) { - oai_emulation.emulation_config.log_emu.verbosity = strndup(ch,len); - } else if (interval_) { - oai_emulation.emulation_config.log_emu.interval = atoi(ch); - } - } else if (packet_trace_) { - oai_emulation.emulation_config.packet_trace.enabled = atoi(ch); - } else if (seed_value_) { - oai_emulation.emulation_config.seed.value = atoi(ch); - } else if (cli_enabled_) { - oai_emulation.info.cli_enabled = 1; - - if (cli_start_enb_) { - for (i=0; i < oai_emulation.info.cli_num_enb; i++) - oai_emulation.info.cli_start_enb[i] = atoi(ch); - } else if (cli_start_ue_) { - for (i=0; i < oai_emulation.info.cli_num_ue; i++) - oai_emulation.info.cli_start_ue[i] = atoi(ch); - } - } - } else if (protocol_) { - if (mac_) { - if (num_groups_) { - oai_emulation.protocol_config.eNB_mac_config.num_groups=atoi(ch); - } - } - } else if (profile_) { - oai_emulation.profile = strndup(ch, len); - } - } -} - - -int parse_XML(char src_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX]) -{ - // config the parser, refer to 'http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html' - xmlSAXHandler sax_handler = { 0 }; // a Simple API for XML (SAX) handler - sax_handler.startDocument = start_document; - sax_handler.endDocument = end_document; - sax_handler.startElement = start_element; - sax_handler.endElement = end_element; - sax_handler.characters = characters; - - // Parsing the XML file - if (xmlSAXUserParseFile(&sax_handler, NULL, src_file) != 0) { - LOG_E(OCG, "An error occurs while parsing the configuration file!\n"); - return MODULE_ERROR; - } - - LOG_I(OCG, "The configuration file is parsed\n"); - return MODULE_OK; -} diff --git a/openair2/UTIL/OCG/OCG_parse_XML.h b/openair2/UTIL/OCG/OCG_parse_XML.h deleted file mode 100644 index cb74a9fe1e..0000000000 --- a/openair2/UTIL/OCG/OCG_parse_XML.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_parse_XML.h -* \brief Variables indicating the element which is currently parsed -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __OCG_PARSE_XML_H__ - -#define __OCG_PARSE_XML_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _parsing_position_indicator Parsing Position Indicator - * @ingroup _parse_XML - * @brief Indicate the position where the program is current parsing in the XML file - * @{*/ - -/* @}*/ - -/** @defgroup _parse_XML Parse XML - * @ingroup _fn - * @brief Parse the XML configuration file - * @{*/ -int parse_XML(char src_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_parse_filename.c b/openair2/UTIL/OCG/OCG_parse_filename.c deleted file mode 100644 index 1ecad56e20..0000000000 --- a/openair2/UTIL/OCG/OCG_parse_filename.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_parse_filename.c -* \brief Parse the filename of the XML file -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include "OCG_vars.h" -#include "OCG_parse_filename.h" -#include "UTIL/LOG/log.h" - -/*----------------------------------------------------------------------------*/ - -int parse_filename(char filename[FILENAME_LENGTH_MAX]) -{ - char *delim = "._"; - char tmp_filename[FILENAME_LENGTH_MAX]; - char *fd_tmp; - char *un_tmp; - char *ex_tmp; - - //delim = "._"; - strncpy(tmp_filename, filename, FILENAME_LENGTH_MAX); - tmp_filename[FILENAME_LENGTH_MAX - 1] = 0; // terminate string - - un_tmp = strtok(tmp_filename, delim); - fd_tmp = strtok(NULL, delim); - ex_tmp = strtok(NULL, delim); - - if ((ex_tmp == NULL) || ((strcmp(ex_tmp, "xml")) && (strcmp(ex_tmp, "XML")))) { - LOG_E(OCG, - "Please use .xml file for configuration with the format \"user_name.file_date.xml\"\nfile_date = \"year month day hour minute second\" without space, \ne.g. 20100201193045 represents in the year 2010, February 1st, 19:30:45\n"); - return MODULE_ERROR; - } else { - strncpy(file_date, fd_tmp, sizeof(file_date)); - file_date[sizeof(file_date) - 1] = 0; // terminate string - strncpy(user_name, un_tmp, sizeof(user_name)); - user_name[sizeof(user_name) - 1] = 0; // terminate string - - LOG_I(OCG, "File name is parsed as user_name = %s, file_date = %s\n", user_name, file_date); - return MODULE_OK; - } -} diff --git a/openair2/UTIL/OCG/OCG_parse_filename.h b/openair2/UTIL/OCG/OCG_parse_filename.h deleted file mode 100644 index bcc8cd11ed..0000000000 --- a/openair2/UTIL/OCG/OCG_parse_filename.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_parse_filename.h -* \brief -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __OCG_PARSE_FILENAME_H__ - -#define __OCG_PARSE_FILENAME_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _parse_filename Parse Filename - * @ingroup _fn - * @brief Parse the filename to get user_name and file_date - * @{*/ -int parse_filename(char filename[FILENAME_LENGTH_MAX]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_save_XML.c b/openair2/UTIL/OCG/OCG_save_XML.c deleted file mode 100644 index 2b0d907cdf..0000000000 --- a/openair2/UTIL/OCG/OCG_save_XML.c +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_save_XML.c -* \brief Save the XML configuration file in the created directory for current emulation -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -/*--- INCLUDES ---------------------------------------------------------------*/ -#include -#include -#include "OCG_vars.h" -#include "OCG_save_XML.h" -#include "UTIL/LOG/log.h" -/*----------------------------------------------------------------------------*/ - -//int save_XML(int copy_or_move, char src_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX], char dst_dir[DIR_LENGTH_MAX], char filename[FILENAME_LENGTH_MAX]) { -int save_XML(int copy_or_move, char *src_file, char *output_dir, char *filename) -{ - - FILE *fs, *ft; - int ch; - char dst_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX + 32] = ""; - char XML_saving_dir[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX + 32] = ""; - - strncpy(dst_file, output_dir, sizeof(dst_file)); - dst_file[sizeof(dst_file) - 1] = 0; // terminate string - //strcat(dst_file, "SCENARIO/XML/"); - strncpy(XML_saving_dir, dst_file, sizeof(XML_saving_dir)); - XML_saving_dir[sizeof(XML_saving_dir) - 1] = 0; // terminate string - strncat(dst_file, filename, sizeof(dst_file) - strlen(dst_file) - 1); - fs = fopen(src_file, "r"); - ft = fopen(dst_file, "w"); - - if ((ft !=NULL)&&(fs!=NULL)) { - while(1) { - ch = getc(fs); - - if(ch == EOF) { - break; - } else { - putc(ch, ft); - } - } - - } - - if (fs) - fclose(fs); - - if (ft) - fclose(ft); - - if (copy_or_move == 2) remove(src_file); - - LOG_I(OCG, "The file is saved in directory \"%s\"\n", XML_saving_dir); - return MODULE_OK; -} diff --git a/openair2/UTIL/OCG/OCG_save_XML.h b/openair2/UTIL/OCG/OCG_save_XML.h deleted file mode 100644 index ba2d9240ca..0000000000 --- a/openair2/UTIL/OCG/OCG_save_XML.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file OCG_save_XML.h -* \brief -* \author Lusheng Wang and navid nikaein -* \date 2011 -* \version 0.1 -* \company Eurecom -* \email: navid.nikaein@eurecom.fr -* \note -* \warning -*/ - -#ifndef __OCG_SAVE_XML_H__ - -#define __OCG_SAVE_XML_H__ - -#ifdef __cplusplus -extern "C" { -#endif -/** @defgroup _save_XML Save XML - * @ingroup _fn - * @brief Save the XML configuration file in dst_dir - * @{*/ -int save_XML(int demo_or_user, char src_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX], char dst_dir[DIR_LENGTH_MAX], char filename[FILENAME_LENGTH_MAX]); -/* @}*/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/openair2/UTIL/OCG/OCG_vars.h b/openair2/UTIL/OCG/OCG_vars.h deleted file mode 100644 index 947a90715c..0000000000 --- a/openair2/UTIL/OCG/OCG_vars.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -#ifndef __OCG_VARS_H__ -#define __OCG_VARS_H__ - -#include "OCG.h" - -/** @defgroup _main_val Main Variables - * @ingroup _OCG - * @brief Variables used by the main function - * @{*/ -char filename[FILENAME_LENGTH_MAX]; /*!< \brief user_name.file_date.xml */ -char user_name[FILENAME_LENGTH_MAX / 2]; /*!< \brief user_name */ -char file_date[FILENAME_LENGTH_MAX / 2]; /*!< \brief file_date */ -char src_file[FILENAME_LENGTH_MAX + DIR_LENGTH_MAX]; /*!< \brief USER_XML_FOLDER/user_name.file_date.xml or DEMO_XML_FOLDER/user_name.file_date.xml */ -char dst_dir[DIR_LENGTH_MAX]; /*!< \brief user_name/file_date/ */ -int copy_or_move; /*!< \brief indicating if the current emulation is with a local XML or an XML generated from the web portal */ -int file_detected; /*!< \brief indicate whether a new file is detected */ -/* @}*/ - -/** @defgroup _oks OCG Module State Indicators - * @ingroup _OCG - * @brief Indicate whether a module has processed successfully - * @{*/ -int get_opt_OK; /*!< \brief value: -9999, -1, 0 or 1 */ -int detect_file_OK; /*!< \brief value: -9999, -1 or 0 */ -int parse_filename_OK; /*!< \brief value: -9999, -1 or 0 */ -int create_dir_OK; /*!< \brief value: -9999, -1 or 0 */ -int parse_XML_OK; /*!< \brief value: -9999, -1 or 0 */ -int save_XML_OK; /*!< \brief value: -9999, -1 or 0 */ -int call_emu_OK; /*!< \brief value: -9999, -1 or 0 */ -int config_mobi_OK; /*!< \brief value: -9999, -1 or 0 */ -int generate_report_OK; /*!< \brief value: -9999, -1 or 0 */ - -OAI_Emulation oai_emulation; - - -/* @}*/ -#endif - diff --git a/openair2/UTIL/OCG/XML_to_mobigen/RWMEmulator.xml b/openair2/UTIL/OCG/XML_to_mobigen/RWMEmulator.xml deleted file mode 100644 index 062b4c9aa0..0000000000 --- a/openair2/UTIL/OCG/XML_to_mobigen/RWMEmulator.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - 1.000000 - 1.000000 - 1 - - - false - false - 500 - - - 1 - - - - 0.0 - - - 0 - 0 - 9999 - 9999 - - - diff --git a/openair2/UTIL/OCG/eurecom_20110208110244.xml b/openair2/UTIL/OCG/eurecom_20110208110244.xml deleted file mode 100644 index 15acc6fd9a..0000000000 --- a/openair2/UTIL/OCG/eurecom_20110208110244.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - 100 - 1.5 - - home - obstructed - - - 2.3 - 56 - - - - 15 - - - - 1 - -10 - - - homogeneous - macrocell - - 5 - - - - 23 - - - 25 - - 1 - - 100 - 99 - - random_waypoint - - 1 - 3 - 1 - 2 - - - - - cbr - - udp - - - 54 - - - - - 19 - - - - - - 15 - - - 1 - 1 - - - - 1 - - - - - 1 - - - 1 - - - - - - - EURECOM - \ No newline at end of file diff --git a/openair2/UTIL/OCG/local_XML/Lusheng.20110208110244.xml b/openair2/UTIL/OCG/local_XML/Lusheng.20110208110244.xml deleted file mode 100644 index 15acc6fd9a..0000000000 --- a/openair2/UTIL/OCG/local_XML/Lusheng.20110208110244.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - 100 - 1.5 - - home - obstructed - - - 2.3 - 56 - - - - 15 - - - - 1 - -10 - - - homogeneous - macrocell - - 5 - - - - 23 - - - 25 - - 1 - - 100 - 99 - - random_waypoint - - 1 - 3 - 1 - 2 - - - - - cbr - - udp - - - 54 - - - - - 19 - - - - - - 15 - - - 1 - 1 - - - - 1 - - - - - 1 - - - 1 - - - - - - - EURECOM - \ No newline at end of file diff --git a/openair2/UTIL/OCG/makefile b/openair2/UTIL/OCG/makefile deleted file mode 100644 index 1ef4ec98dc..0000000000 --- a/openair2/UTIL/OCG/makefile +++ /dev/null @@ -1,72 +0,0 @@ -include $(OPENAIR_DIR)/common/utils/Makefile.inc -LIB = -lxml2 - -TOP_DIR = ../.. -OPENAIR1_TOP = ../.. -OPENAIR2_TOP = ../../../openair2 -OPENAIR3_TOP = ../../../openair3 -OPENAIR3 = $(OPENAIR3_DIR) - -CFLAGS += -DPHYSIM -DNODE_RG -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DMAX_MODULES=1 -I/usr/include/X11 #-Wno-packed-bitfield-compat - - -CFLAGS += -m32 -DOPENAIR_LTE -DOPENAIR2 #-DOFDMA_ULSCH -DIFFT_FPGA -DIFFT_FPGA_UE - -#CFLAGS += -DXFORMS - -ifdef DEBUG_PHY -CFLAGS += -DDEBUG_PHY -endif - -ifdef PDCP_USE_NETLINK -CFLAGS += -DPDCP_USE_NETLINK -DLINUX -DDEBUG_CONTROL -endif - -#ifdef OCG -CFLAGS += -I/usr/include/libxml2 -lxml2 -#endif - -include $(OPENAIR1_DIR)/PHY/Makefile.inc -include $(OPENAIR1_DIR)/SCHED/Makefile.inc -include $(OPENAIR2_DIR)/LAYER2/Makefile.inc -include $(OPENAIR1_DIR)/SIMULATION/ETH_TRANSPORT/Makefile.inc - -SIMULATION_OBJS = $(TOP_DIR)/SIMULATION/TOOLS/gauss.o -SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/random_channel.o -SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/rangen_double.o -SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/taus.o -SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/multipath_channel.o -SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/RF/rf.o -SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/RF/adc.o -SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/RF/dac.o - -OBJ = $(PHY_OBJS) $(SIMULATION_OBJS) $(ETHERNET_TRANSPORT_OBJS) $(TOOLS_OBJS) $(SCHED_OBJS) $(STATS_OBJS) - -all: physim - - -$(OBJ) : %.o : %.c - $(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) -DPHY_CONTEXT=1 -I$(TOP_DIR) $(L2_incl) -o $@ $< - -$(L2_OBJS) : %.o : %.c - $(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) -DMAC_CONTEXT=1 -DPHY_CONTEXT=1 -I$(TOP_DIR) $(L2_incl) -o $@ $< - -physim : $(OBJ) $(L2_OBJS) OCG.c OCG_get_opt.c OCG_detect_file.c OCG_parse_filename.c OCG_create_dir.c OCG_parse_XML.c OCG_save_XML.c OCG_config_mobi.c OCG_generate_report.c - $(CC) OCG.c OCG_get_opt.c OCG_detect_file.c OCG_parse_filename.c OCG_create_dir.c OCG_parse_XML.c OCG_save_XML.c OCG_config_mobi.c OCG_generate_report.c -I$(TOP_DIR) $(L2_incl) -o physim $(CFLAGS) $(EXTRA_CFLAGS) $(OBJ) $(L2_OBJS) -lm -lforms -L/usr/local/lib -lforms -lX11 -L/usr/X11R6/lib -lXpm -lblas -lpthread - -clean: - rm -f physim - rm -f $(OBJ) - rm -f $(L2_OBJS) - rm -f *.o - rm -f *.exe* - -cleanl1: - rm -f physim - rm -f $(OBJ) - rm -f *.o - rm -f *.exe -cleanl2: - rm -f $(L2_OBJS) - - diff --git a/openair2/UTIL/OCG/readme.txt b/openair2/UTIL/OCG/readme.txt deleted file mode 100644 index 35300aa39f..0000000000 --- a/openair2/UTIL/OCG/readme.txt +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*________________________OEPNAIR/OPENAIR0/________________________ - - File : Readme.txt - Authors : Lusheng Wang - Company : EURECOM - Emails : lusheng.wang@eurecom.fr -________________________________________________________________*/ - - ------------------ -Table of contents ------------------ - -The content of this readme is the following: - - 1) What is this block about in OpenAirInterface - 2) Organization of the folders and their dependancies - 3) Folders and files description - 4) Makefile targets and how to build - 5) How to use OCG: run a simple experimentation - -------------------------------------------------- -1) What is this block about in OpenAirInterface ? -------------------------------------------------- - - This block is called OpenAirInterface Configuration Generation (OCG). Its major function is to parse the XML configuration file and configure an emulation. - - When the user specifies a scenario for emulation from the web portal, the web portal will generate an XML configuration file in the scenario folder of OCG. OCG automatically detects this file and initiates an emulation for it. During the emulation, OCG calls other blocks (such as MobiGen and TrafficGen) and gets feedbacks from them. After the emulation, OCG generates output files in the created folder of the emulation. - - OCG contains the following key modules: - - a) get opt : Get options of the OCG command, e.g. "OCG -f" and "OCG -h" - b) detect file : Detect new XML configuration file in the scenario folder - c) parse filename : Parse the filename to get user name and file date - d) create dir : Create directory in the output directory for an emulation - e) parse XML : Parse the XML configuration file - f) save XML : Save the XML configuration file in created directory - g) call emu : Call the emulator - h) generate report : Generate a report to show the states of OCG modules - ------------------------------------------------------ -2) Organization of the folders and their dependancies ------------------------------------------------------ - - Folder Description - ------ ----------- - - - src/ contains source files - - - include/ contains header files - - - demo/ contains XML configuration files for demo - - - detecting_XML/ contains nothing, but OCG will detect here the XML files generated by the web portal - - - output_folder/ if filename of the XML file can be successfully parsed, OCG creates output folders for users and generates output files for emulations here - - - temp_output_folder/ if filename of the XML file cannot be successfully parsed, OCG generates an output file here - --------------------------------- -3) Folders and files description --------------------------------- - - Folder/File Description - ----------- ----------- - - - src/OCG.c contains the main() function with the FSM of OCG - - - src/OCG_get_opt.c contains the get_opt() function - - - src/OCG_detect_file.c contains the detect_file() function - - - src/OCG_parse_filename.c contains the parse_filename() function - - - src/OCG_create_dir.c contains the create_dir() function - - - src/OCG_parse_XML.c contains the parse_XML() function - - - src/OCG_save_XML.c contains the save_XML() function - - - src/OCG_call_emu.c contains the call_emu() function - - - src/OCG_generate_report.c contains the generate_report() function - - - include/OCG.h header file of main(), contains the data structure of the basic OpenAirInterface Scenario Descriptor (OSD), etc. - - - include/OCG_get_opt.h header file of get_opt() - - - include/OCG_detect_file.h header file of detect_file() - - - include/OCG_parse_filename.h header file of parse_filename() - - - include/OCG_create_dir.h header file of create_dir() - - - include/OCG_parse_XML.h header file of parse_XML(), contains the declaration of parsing position indicators - - - include/OCG_save_XML.h header file of save_XML() - - - include/OCG_call_emu.h header file of call_emu() - - - include/OCG_generate_report.h header file of generate_report() - - - demo/eurecom.20110208110244.xml contains a demo - -------------------------------------- -4) Makefile targets and how to build -------------------------------------- - - CC= gcc - CFLAGS = -I/usr/include/libxml2 - LIB = -lxml2 - - OCG: - ${CC} ${CFLAGS} ${LIB} src/OCG.c src/OCG_get_opt.c src/OCG_detect_file.c src/OCG_parse_filename.c src/OCG_create_dir.c src/OCG_parse_XML.c src/OCG_save_XML.c src/OCG_call_emu.c src/OCG_generate_OCG_report.c -o OCG - ---------------------------------------------------------------- -6) How to use OCG: run a simple experimentation ---------------------------------------------------------------- - - There are two methods to use the OCG for an emulation: - - a) DEMO mode : use command "OCG -f filename" to run a DEMO mode emulation - - The following steps are required for a DEMO mode emulation: - - i) Put your XML configuration file into the demo/ folder; - - ii) Change the filename as user_name.file_date.xml; - - iii) Run the emulation with the above command; - - iv) Check debug information in the shell, which indicates you the directory where OCG generates the outputs. - - To run an existing demo XML file, step i) and ii) are not required. - - Note that OCG automatically set the path of a demo XML file as demo/, so only filename is required in the command. - - b) USER mode : use command "OCG" to start OCG as a daemon - - The following steps are required for a USER mode emulation: - - i) Run OCG as a daemon with the above command; - - iiA) Configure an emulation scenario through the web portal and press the button to generate an XML file; or - - iiB) Copy your XML file to the detecting_XML/ folder directly; - - iii) Check debug information in the shell, which indicates you the directory where OCG generates the outputs. - - For option iiB), make sure the filename is with the correct format "user_name.file_date.xml". Moreover, make sure the configuration in the XML file is correct. - For the format of the XML configuration file, refer to "demo/eurecom.20110208110244.xml". - - diff --git a/openair2/UTIL/OCG/temp_output/OCG_report.xml b/openair2/UTIL/OCG/temp_output/OCG_report.xml deleted file mode 100644 index 37ef79b4b8..0000000000 --- a/openair2/UTIL/OCG/temp_output/OCG_report.xml +++ /dev/null @@ -1,9 +0,0 @@ - - in this output file, -9999 means NOT_PROCESSED; -2 means NO_FILE; -1 means ERROR; 0 means OK - -2 - 0 - -1 - -9999 - -9999 - -9999 - -9999 diff --git a/openair2/UTIL/OMG/omg.h b/openair2/UTIL/OMG/omg.h index 07dbf1f750..a233164062 100644 --- a/openair2/UTIL/OMG/omg.h +++ b/openair2/UTIL/OMG/omg.h @@ -63,7 +63,7 @@ Given the great importance of mobility features in the world of wireless communi /** @defgroup _omg_ OMG: The mobility generator of OpenAirInterface * @ingroup _omg OMG, or OpenAir Mobility Generation has born to add the mobility features to OpenAir given the increasing importance of realistic mobility patterns in the world of wireless networks and the need for simulation to explore this area. OMG includes the most used mobility models, in three classes, namely: \b EMBEDDED \b TRACE \ FEDERATED. In the \b EMBEDDED class, random mobility is embedded in OMG. The most used random models have been implemneted, namely \b Random \b Walk , \b Random \b Way \b Point and \b Graph based mobility. The \b TRACE class is able to load into OMG and OAI trace-based mobility files. The \b FEDERATED class allows OMG to interface with an external mobility/traffic generator to obtain and change mobility patterns. The \b FEDERATED class currently support the federation with SUMO, Simulation of Urban Mobility, but could easily be extended to accept other simulator. Thus, it is capable of abstracting the motion of vehicles or mobile nodes in different ways. And since it is also useful to model the fix nodes that can exist in the road to communicate with the mobile nodes, a \b STATIC model is also included in OMG. \n -OMG has a direct relation ship with the already existing \b OCG module (OpenAir Config Generation). Actually, this latter module is responsible of setting the emulation time to synchronize OMG, requesting OMG to start simulation scenario, update the nodes positions and many other features. (see section Specification) \n +OMG has a direct relation ship with the (edit: deleted as of 2023-03-09) OCG module (OpenAir Config Generation). Actually, this latter module is responsible of setting the emulation time to synchronize OMG, requesting OMG to start simulation scenario, update the nodes positions and many other features. (see section Specification) \n */ diff --git a/openair2/UTIL/OPT/opt.h b/openair2/UTIL/OPT/opt.h index 40b704b6c5..ce890a7933 100644 --- a/openair2/UTIL/OPT/opt.h +++ b/openair2/UTIL/OPT/opt.h @@ -73,21 +73,25 @@ typedef guint8 gboolean; /* command line parameters for LOG utility */ /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*---------------------------------------------------------------------------------------------------------------------------------------------*/ +// clang-format off #define OPT_PARAMS_DESC { \ - {"type" , CONFIG_HLP_TYPEMON, 0, strptr:&in_type, defstrval:"none", TYPE_STRING, 0}, \ - {"ip" , CONFIG_HLP_L2MONIP, 0, strptr:&in_ip, defstrval:"127.0.0.1", TYPE_STRING, 0}, \ - {"path" , CONFIG_HLP_L2MONPATH, 0, strptr:&in_path,defstrval:"/tmp/oai_opt.pcap", TYPE_STRING, 0}, \ - } + {"type" , CONFIG_HLP_TYPEMON, 0, .strptr=&in_type, .defstrval="none", TYPE_STRING, 0}, \ + {"ip" , CONFIG_HLP_L2MONIP, 0, .strptr=&in_ip, .defstrval="127.0.0.1", TYPE_STRING, 0}, \ + {"path" , CONFIG_HLP_L2MONPATH, 0, .strptr=&in_path, .defstrval="/tmp/oai_opt.pcap", TYPE_STRING, 0}, \ +} +// clang-format on #define OPTTYPE_IDX 0 /* check function for opt parameters */ #define OPTTYPE_OKSTRINGS {"none","pcap","wireshark"} #define OPTTYPE_VALUES {OPT_NONE,OPT_PCAP,OPT_WIRESHARK} +// clang-format off #define OPTPARAMS_CHECK_DESC { \ - { .s3a= { config_checkstr_assign_integer, OPTTYPE_OKSTRINGS,OPTTYPE_VALUES ,3}} ,\ - { .s5= {NULL }} , \ - { .s5= {NULL }} , \ - } + { .s3a= { config_checkstr_assign_integer, OPTTYPE_OKSTRINGS,OPTTYPE_VALUES ,3}} ,\ + { .s5= {NULL }} , \ + { .s5= {NULL }} , \ +} +// clang-format on typedef enum trace_mode_e { OPT_WIRESHARK, diff --git a/openair2/UTIL/OTG/otg_rx.c b/openair2/UTIL/OTG/otg_rx.c index 135378ff3b..eb123e7216 100644 --- a/openair2/UTIL/OTG/otg_rx.c +++ b/openair2/UTIL/OTG/otg_rx.c @@ -37,12 +37,6 @@ #include "otg_form.h" #include "otg_kpi.h" -#ifdef ENABLE_DB_STATS - #include - #include - #include -#endif - extern uint16_t NB_UE_INST; //#include "LAYER2/MAC/extern.h" diff --git a/openair2/X2AP/x2ap_eNB.c b/openair2/X2AP/x2ap_eNB.c index a73bc0a640..c775726e87 100644 --- a/openair2/X2AP/x2ap_eNB.c +++ b/openair2/X2AP/x2ap_eNB.c @@ -742,7 +742,7 @@ int is_x2ap_enabled(void) char *enable_x2 = NULL; paramdef_t p[] = { - { "enable_x2", "yes/no", 0, strptr:&enable_x2, defstrval:"", TYPE_STRING, 0 } + { "enable_x2", "yes/no", 0, .strptr=&enable_x2, .defstrval="", TYPE_STRING, 0 } }; /* TODO: do it per module - we check only first eNB */ diff --git a/openair2/X2AP/x2ap_eNB_defs.h b/openair2/X2AP/x2ap_eNB_defs.h index bd6092e0cb..96e76f5603 100644 --- a/openair2/X2AP/x2ap_eNB_defs.h +++ b/openair2/X2AP/x2ap_eNB_defs.h @@ -32,6 +32,8 @@ #include "tree.h" #include "sctp_eNB_defs.h" +#include "s1ap_messages_types.h" +#include "x2ap_messages_types.h" #include "x2ap_ids.h" #include "x2ap_timers.h" diff --git a/openair2/X2AP/x2ap_eNB_generate_messages.c b/openair2/X2AP/x2ap_eNB_generate_messages.c index 09cf85c527..de797293de 100644 --- a/openair2/X2AP/x2ap_eNB_generate_messages.c +++ b/openair2/X2AP/x2ap_eNB_generate_messages.c @@ -1241,7 +1241,7 @@ int x2ap_gNB_generate_ENDC_x2_setup_request( ie_GNB_ENDC = (X2AP_En_gNB_ENDCX2SetupReqIEs_t *)calloc(1, sizeof(X2AP_En_gNB_ENDCX2SetupReqIEs_t)); ie_GNB_ENDC->id = X2AP_ProtocolIE_ID_id_Globalen_gNB_ID; ie_GNB_ENDC->criticality = X2AP_Criticality_reject; - ie_GNB_ENDC->value.present = X2AP_En_gNB_ENDCX2SetupReqAckIEs__value_PR_GlobalGNB_ID; + ie_GNB_ENDC->value.present = X2AP_En_gNB_ENDCX2SetupReqIEs__value_PR_GlobalGNB_ID; ie_GNB_ENDC->value.choice.GlobalGNB_ID.gNB_ID.present = X2AP_GNB_ID_PR_gNB_ID; INT32_TO_OCTET_STRING(instance_p->eNB_id, &ie_GNB_ENDC->value.choice.GlobalGNB_ID.gNB_ID.choice.gNB_ID); diff --git a/openair2/X2AP/x2ap_eNB_itti_messaging.c b/openair2/X2AP/x2ap_eNB_itti_messaging.c index 26e26ba411..66be3520e2 100644 --- a/openair2/X2AP/x2ap_eNB_itti_messaging.c +++ b/openair2/X2AP/x2ap_eNB_itti_messaging.c @@ -43,7 +43,7 @@ void x2ap_eNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uin sctp_data_req->assoc_id = assoc_id; sctp_data_req->buffer = buffer; sctp_data_req->buffer_length = buffer_length; - sctp_data_req->stream = stream; + sctp_data_req->stream = stream; itti_send_msg_to_task(TASK_SCTP, instance, message_p); } diff --git a/openair3/DOCS/DOXYGEN/Doxyfile.in b/openair3/DOCS/DOXYGEN/Doxyfile.in deleted file mode 100644 index 90679f9ecd..0000000000 --- a/openair3/DOCS/DOXYGEN/Doxyfile.in +++ /dev/null @@ -1,1718 +0,0 @@ -# Doxyfile 1.7.4 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" "). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = @PACKAGE_NAME@ - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = @PACKAGE_VERSION@ - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer -# a quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = "The OAISIM MME provides an almost complete implementation of Evolved Packet Core network for LTE. This include MME, S+P-Gateways." - -# With the PROJECT_LOGO tag one can specify an logo or icon that is -# included in the documentation. The maximum height of the logo should not -# exceed 55 pixels and the maximum width should not exceed 200 pixels. -# Doxygen will copy the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = ../Documentation - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = YES - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = YES - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful if your file system -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this -# tag. The format is ext=language, where ext is a file extension, and language -# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, -# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make -# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C -# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions -# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also makes the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and -# unions are shown inside the group in which they are included (e.g. using -# @ingroup) instead of on a separate page (for HTML and Man pages) or -# section (for LaTeX and RTF). - -INLINE_GROUPED_CLASSES = NO - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = NO - -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penalty. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will roughly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols - -SYMBOL_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespaces are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen -# will list include files with double quotes in the documentation -# rather than with sharp brackets. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen -# will sort the (brief and detailed) documentation of class members so that -# constructors and destructors are listed first. If set to NO (the default) -# the constructors will appear in the respective orders defined by -# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. -# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO -# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to -# do proper type resolution of all parameters of a function it will reject a -# match between the prototype and the implementation of a member function even -# if there is only one candidate or it is obvious which candidate to choose -# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen -# will still accept a match between prototype and implementation in such cases. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or macro consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and macros in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. -# This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. The create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. -# You can optionally specify a file name after the option, if omitted -# DoxygenLayout.xml will be used as the name of the layout file. - -LAYOUT_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# The WARN_NO_PARAMDOC option can be enabled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = @top_srcdir@ \ - @top_builddir@/S1AP/s1ap_ies_defs.h - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh -# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py -# *.f90 *.f *.for *.vhd *.vhdl - -FILE_PATTERNS = *.h - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = @top_builddir@ \ - @top_srcdir@/S1AP/MESSAGES - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = *.d - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. -# If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. -# Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. -# The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty or if -# non of the patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) -# and it is also possible to disable source filtering for a specific pattern -# using *.ext= (so without naming a filter). This option only has effect when -# FILTER_SOURCE_FILES is enabled. - -FILTER_SOURCE_PATTERNS = - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. -# Otherwise they will link to the documentation. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. Note that when using a custom header you are responsible -# for the proper inclusion of any scripts and style sheets that doxygen -# needs, which is dependent on the configuration options used. -# It is adviced to generate a default header using "doxygen -w html -# header.html footer.html stylesheet.css YourConfigFile" and then modify -# that header. Note that the header is subject to change so you typically -# have to redo this when upgrading to a newer version of doxygen or when changing the value of configuration settings such as GENERATE_TREEVIEW! - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that -# the files will be copied as-is; there are no commands or markers available. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. -# Doxygen will adjust the colors in the stylesheet and background images -# according to this color. Hue is specified as an angle on a colorwheel, -# see http://en.wikipedia.org/wiki/Hue for more information. -# For instance the value 0 represents red, 60 is yellow, 120 is green, -# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. -# The allowed range is 0 to 359. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of -# the colors in the HTML output. For a value of 0 the output will use -# grayscales only. A value of 255 will produce the most vivid colors. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to -# the luminance component of the colors in the HTML output. Values below -# 100 gradually make the output lighter, whereas values above 100 make -# the output darker. The value divided by 100 is the actual gamma applied, -# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, -# and 100 does not change the gamma. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting -# this to NO can help when comparing the output of multiple runs. - -HTML_TIMESTAMP = YES - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = NO - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated -# that can be used as input for Qt's qhelpgenerator to generate a -# Qt Compressed Help (.qch) of the generated HTML documentation. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders - -QHP_VIRTUAL_FOLDER = doc - -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to -# add. For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see -# -# Qt Help Project / Custom Filters. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's -# filter section matches. -# -# Qt Help Project / Filter Attributes. - -QHP_SECT_FILTER_ATTRS = - -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files -# will be generated, which together with the HTML files, form an Eclipse help -# plugin. To install this plugin and make it available under the help contents -# menu in Eclipse, the contents of the directory containing the HTML and XML -# files needs to be copied into the plugins directory of eclipse. The name of -# the directory within the plugins directory should be the same as -# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before -# the help appears. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have -# this name. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values -# (range [0,1..20]) that doxygen will group on one line in the generated HTML -# documentation. Note that a value of 0 will completely suppress the enum -# values from appearing in the overview section. - -ENUM_VALUES_PER_LINE = 4 - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to YES, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). -# Windows users are probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, -# and Class Hierarchy pages using a tree view instead of an ordered list. - -USE_INLINE_TREES = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open -# links to external symbols imported via tag files in a separate window. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are -# not supported properly for IE 6.0, but are supported on all modern browsers. -# Note that when changing this option you need to delete any form_*.png files -# in the HTML output before the changes have effect. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax -# (see http://www.mathjax.org) which uses client side Javascript for the -# rendering instead of using prerendered bitmaps. Use this if you do not -# have LaTeX installed or if you want to formulas look prettier in the HTML -# output. When enabled you also need to install MathJax separately and -# configure the path to it using the MATHJAX_RELPATH option. - -USE_MATHJAX = NO - -# When MathJax is enabled you need to specify the location relative to the -# HTML output directory using the MATHJAX_RELPATH option. The destination -# directory should contain the MathJax.js script. For instance, if the mathjax -# directory is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the -# mathjax.org site, so you can quickly see the result without installing -# MathJax, but it is strongly recommended to install a local copy of MathJax -# before deployment. - -MATHJAX_RELPATH = http://www.mathjax.org/mathjax - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box -# for the HTML output. The underlying search engine uses javascript -# and DHTML and should work on any modern browser. Note that when using -# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets -# (GENERATE_DOCSET) there is already a search function so this one should -# typically be disabled. For large projects the javascript based search engine -# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. - -SEARCHENGINE = YES - -# When the SERVER_BASED_SEARCH tag is enabled the search engine will be -# implemented using a PHP enabled web server instead of at the web client -# using Javascript. Doxygen will generate the search PHP script and index -# file to put on the web server. The advantage of the server -# based approach is that it scales better to large projects and allows -# full text search. The disadvantages are that it is more difficult to setup -# and does not have live searching capabilities. - -SERVER_BASED_SEARCH = NO - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. -# Note that when enabling USE_PDFLATEX this option is only used for -# generating bitmaps for formulas in the HTML output, but not in the -# Makefile that is written to the output directory. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4 - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for -# the generated latex document. The footer should contain everything after -# the last chapter. If it is left blank doxygen will generate a -# standard footer. Notice: only use this tag if you know what you are doing! - -LATEX_FOOTER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -# If LATEX_SOURCE_CODE is set to YES then doxygen will include -# source code with syntax highlighting in the LaTeX output. -# Note that which sources are shown also depends on other settings -# such as SOURCE_BROWSER. - -LATEX_SOURCE_CODE = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. -# This is useful -# if you want to understand what is going on. -# On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# pointed to by INCLUDE_PATH will be searched when a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition that -# overrules the definition found in the source code. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all references to function-like macros -# that are alone on a line, have an all uppercase name, and do not end with a -# semicolon, because these will confuse the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option also works with HAVE_DOT disabled, but it is recommended to -# install and use dot, since it yields more powerful graphs. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is -# allowed to run in parallel. When set to 0 (the default) doxygen will -# base this on the number of processors available in the system. You can set it -# explicitly to a value larger than 0 to get control over the balance -# between CPU load and processing speed. - -DOT_NUM_THREADS = 0 - -# By default doxygen will write a font called Helvetica to the output -# directory and reference it in all dot files that doxygen generates. -# When you want a differently looking font you can specify the font name -# using DOT_FONTNAME. You need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory -# containing the font. - -DOT_FONTNAME = Helvetica - -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. -# The default size is 10pt. - -DOT_FONTSIZE = 10 - -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot -# can find it using this tag. - -DOT_FONTPATH = - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs -# for selected functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller -# graphs for selected functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will generate a graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are svg, png, jpg, or gif. -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MSCFILE_DIRS tag can be used to specify one or more directories that -# contain msc files that are included in the documentation (see the -# \mscfile command). - -MSCFILE_DIRS = - -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. - -DOT_GRAPH_MAX_NODES = 50 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of -# a graph (i.e. they become hard to read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = YES - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES diff --git a/openair3/DOCS/DOXYGEN/Makefile.am b/openair3/DOCS/DOXYGEN/Makefile.am deleted file mode 100644 index a291a8817e..0000000000 --- a/openair3/DOCS/DOXYGEN/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -#/* -# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more -# * contributor license agreements. See the NOTICE file distributed with -# * this work for additional information regarding copyright ownership. -# * The OpenAirInterface Software Alliance licenses this file to You under -# * the OAI Public License, Version 1.1 (the "License"); you may not use this file -# * except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.openairinterface.org/?page_id=698 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# *------------------------------------------------------------------------------- -# * For more information about the OpenAirInterface (OAI) Software Alliance: -# * contact@openairinterface.org -# */ - -if HAVE_DOXYGEN -directory = $(top_srcdir)/DOCS/Documentation - -if HAVE_PDFLATEX - doc_DATA = $(directory)oaisim_mme.pdf -else - doc_DATA = $(directory) -endif -$(directory): doxyfile.stamp - -doxyfile.stamp: - $(DOXYGEN) Doxyfile - echo Timestamp > doxyfile.stamp - -CLEANFILES = doxyfile.stamp - -all-local: doxyfile.stamp -clean-local: - rm -f doxyfile.stamp - rm -rf $(top_srcdir)/DOCS/Documentation/html - rm -rf $(top_srcdir)/DOCS/Documentation/latex -endif diff --git a/openair3/DOCS/Latex/EPC/EPC.tex b/openair3/DOCS/Latex/EPC/EPC.tex deleted file mode 100644 index 97e4f52565..0000000000 --- a/openair3/DOCS/Latex/EPC/EPC.tex +++ /dev/null @@ -1,751 +0,0 @@ -\documentclass[a4paper,oneside]{report} -\usepackage{pgfplots} -\ifx\HCode\UnDef\else\def\pgfsysdriver{pgfsys-tex4ht.def}\fi -\usepackage{verbatim} -\usepackage{listings} -\usepackage{tikz,graphicx} -\usepackage{caption} -\usepackage{float} -\usepackage{hyperref} -\usepackage{subfiles} -\usepackage{nomencl} -\usepackage{chngcntr} -\makenomenclature - -\usepackage{makeidx} -\makeindex - -\counterwithout{figure}{chapter} - -\usetikzlibrary{external,calc,trees,positioning,arrows,chains,shapes.geometric,% -decorations.pathreplacing,decorations.pathmorphing,shapes,% -matrix,fit,shapes.symbols,backgrounds,fit} -\captionsetup[figure]{labelformat=simple} - -\renewcommand{\figurename}{Figure} -% Returns three nodes: The argument, and the projections of the argument on the left and right borders of the bounding box -\newcommand{\extendnode}[1]{ - (#1) - ($(current bounding box.north east)!(#1)!(current bounding box.south east)$) - ($(current bounding box.north west)!(#1)!(current bounding box.south west)$) -} - -\usetikzlibrary{calc,trees,positioning,arrows,chains,shapes.geometric,% -decorations.pathreplacing,decorations.pathmorphing,shapes,% -matrix,shapes.symbols,backgrounds,fit,intersections} - -\title{OAI EPC current development} -\author{Sebastien ROUX\\Eurecom\\sebastien.roux@eurecom.fr} - -\definecolor{javared}{rgb}{0.6,0,0} % for strings -\definecolor{javagreen}{rgb}{0.25,0.5,0.35} % comments -\definecolor{ckeyw}{rgb}{0,0,0.8} % keywords -\definecolor{ccomment}{rgb}{0.6,0.6,0.6} % javadoc - -\lstset{ - language=C, - basicstyle=\ttfamily, - keywordstyle=\color{ckeyw}\bfseries, - stringstyle=\color{javared}, - commentstyle=\color{ccomment}, - morecomment=[s][\color{ccomment}]{/**}{*/}, - numbers=left, - numberstyle=\tiny\color{black}, - stepnumber=1, - numbersep=10pt, - tabsize=4, - showspaces=false, - showstringspaces=false, - breaklines -} - - -\tikzset{ - table nodes/.style={ - rectangle, - rounded corners=0.6mm, - draw=black, - align=center, - minimum height=7mm, - minimum width=22mm, - text depth=0.5ex, - text height=2ex, - % inner xsep=0pt, - outer sep=0pt, - }, - table/.style={ - matrix of nodes, - % row sep=-\pgflinewidth, - % column sep=-\pgflinewidth, - rectangle, - nodes={ - table nodes - }, - execute at empty cell={\node[draw=none]{};} - }, - cps/.style={ - draw=black, - fill=blue!20, - rounded corners=0.6mm, - }, - ups/.style={ - draw=black, - fill=yellow!30, - rounded corners=0.6mm, - }, - stdlinux/.style={ - draw=black, - fill=green!10, - rounded corners=0.6mm, - }, - rect/.style={ - rectangle, - draw, - }, - schritt/.style={ - draw, - rounded corners, - fill=blue!20, - inner xsep=2em, - }, - t0/.style={draw,fill=blue!20}, - t1/.style={draw,fill=blue!40}, - background/.style={ - draw, - fill=yellow!30, - align=center, - dashed, - }, - background2/.style={ - draw, - fill=green!15, - align=center, - }, - connector/.style={ - -latex, - font=\scriptsize - }, - rectangle connector/.style={ - connector, - to path={(\tikztostart) -| (\tikztotarget) }, - pos=0.5 - }, - rectangle connector/.default=-2cm, - straight connector/.style={ - connector, - to path=--(\tikztotarget) \tikztonodes - }, - queue/.style={ - draw, - fill=yellow!30, - cylinder, - aspect=0.7, - minimum height=1cm, - minimum width=0.7cm - }, -} -\renewcommand{\nomname}{List of Abbreviations} -\renewcommand{\thefigure}{\Alph{figure}} - -\begin{document} -\maketitle -\tableofcontents -\printnomenclature[2cm] - -\chapter*{MME and S+P-Gateway} \stepcounter{chapter} -\addcontentsline{toc}{chapter}{MME and S+P-Gateway} - -% \nomenclature{MME}{Mobility Management Entity} -% \nomenclature{S-GW}{Serving Gateway} -% \nomenclature{P-GW}{PDN Gateway} -\begin{figure}[H] -\begin{center} -\begin{tikzpicture} -\tikzstyle{every node}=[font=\footnotesize] -\matrix (table) [row sep=0.5cm, column sep={3.2cm,between origins}, table,text width=3mm,name=table] { - & & &\\ - & & &\\ - & & &\\ - & & &\\ - & & &\\ -}; -\node(MMEAPP)[cps,draw,fit=(table-1-1)(table-1-2),table nodes]{MME Application}; -\node(SPGW)[cps,draw,fit=(table-1-3)(table-1-4),table nodes]{S+P-GW Application}; -\node(NAS)[cps,draw,fit=(table-2-2),table nodes]{NAS}; -\node(S6A)[dashed,cps,draw,fit=(table-3-1),table nodes]{S6a/Diameter}; -\node(S1AP)[cps,draw,fit=(table-3-2),table nodes]{S1-MME/S1AP}; -\node(S1U)[ups,draw,fit=(table-3-3),table nodes]{S1-U/GTPU}; -\node(SGI)[dashed,ups,draw,fit=(table-3-4),table nodes]{SGi}; -\node(SCTP)[stdlinux,draw,fit=(table-4-1)(table-4-2),table nodes]{SCTP}; -\node(UDP)[stdlinux,draw,fit=(table-4-3),table nodes]{UDP}; -\node(IP)[stdlinux,draw,fit=(table-5-1)(table-5-2)(table-5-3)(table-5-4),table nodes]{IP}; - -\draw[<->, dashed, draw=red] (MMEAPP) -- node(arrow1)[above, align=center]{S11}(SPGW); -\draw[<-,dashed] (S1U) -- (SPGW.south-|S1U); -\draw[<-,dashed] (SGI) -- (SPGW.south-|SGI); -\draw[-] (S6A) -- (MMEAPP.south-|S6A); -\draw[-] (NAS) -- (MMEAPP.south-|NAS); -\draw[-] (S1AP) -- (NAS); -\draw[-] (S1U) -- (SGI); -\draw[-] (S1U) -- (UDP); -\draw[-] (S1AP) -- (SCTP.north-|S1AP); -\draw[-] (S6A) -- (SCTP.north-|S6A); -\draw[-] (SCTP) -- (IP.north-|SCTP); -\draw[-] (UDP) -- (IP.north-|UDP); -\draw[-] (SGI) -- (IP.north-|SGI); -\draw[-] (MMEAPP.south) |- (S1AP.west); - -\draw($(table.north west) + (-2mm,1mm)$) rectangle ($(table.south east) + (2mm,-1mm)$); - -\node[cps, minimum width=5mm,minimum height=5mm,below=of IP.south west,anchor=west](l1){}; -\node[right=2mm of l1](ct1) {Control Plane}; -\node[ups,minimum width=5mm,minimum height=5mm,below=0.3cm of l1](l2){}; -\node[below=0.3cm of ct1, right=2mm of l2](ct2) {User Plane}; -\node[stdlinux,minimum width=5mm,minimum height=5mm,below=0.3cm of l2](l3){}; -\node[below=0.3cm of ct2, right=2mm of l3](ct3) {Linux IP Stack}; -\draw[minimum width=5mm,minimum height=5mm,below=0.3cm of l3,<->,dashed, draw=red] -($(l3.south west) - (0,0.55cm)$) -- node(l4){} ($(l3.south east) - (0,0.55cm)$); -\node[right=2mm of l4.north east](ct4) {Abstraction link}; -\draw[minimum width=5mm,minimum height=5mm,below=0.3cm of l4,->,dashed] -($(l4.south west) - (0,0.25cm)$) -- node(l5){} ($(l4.south east) - (0,0.25cm)$); -\node[right=2mm of l5.north east](ct5) {Control}; -\node[draw,fit=(ct1)(l1)(ct2)(l2)(ct3)(l3)(ct4)(l4)(ct5)(l5)] {}; - -\end{tikzpicture} -\caption{MME and S+P-GW architecture} \label{fig:MMEoverall} -\end{center} -\end{figure} - -Figure \ref{fig:MMEoverall} shows the targeted implementation of Eurecom -EPC. - -\chapter*{S1AP layer} \stepcounter{chapter} -\addcontentsline{toc}{chapter}{S1AP layer} - -\nomenclature{S1AP}{S1 Application Protocol}S1AP layer relies on -\nomenclature{ASN.1}{Abstract Syntax Notation.1}ASN.1 messages -description. Generating C code from the specification -implies three steps: -\begin{enumerate} -\item Modify .asn files to match tools limitation. -\item Generate \nomenclature{IE}{Informations Elements}IEs with the help of the asn1c free tool. -\item Use the provided script which generates \nomenclature{PDU}{Protocol Data Unit}PDU codec\footnote{Encode/Decode}. -\end{enumerate} - -\chapter*{Inter-task interface} \stepcounter{chapter} -\addcontentsline{toc}{chapter}{Inter-task interface} - -\section{Concurrency} - -Code divided in layers should be able to be executed in parallel to use the full -\nomenclature{CPU}{Control Processing Unit}CPUs power. We can achieve better performance -by using some mechanisms that runs part of code in parallel on UNIX platforms: -\begin{itemize} -\item Multi-process: no link between processes, usage of sockets or pipes is mandatory. -\item Forks: code is duplicated and data are stored in different spaces. -\item Threads: only code is duplicated, data space is shared between processes -\end{itemize} -Data synchronization is the first issue to think about when using such mechanisms. - -\section{Overall description} - -A single \nomenclature{API}{Application Programming Interface}API -(called ITTI\footnote{InTer-Task Interface}) is used to manage messages -exchanged between the tasks which are running on separate threads. -This will lead in better usage of multi-core environments. -\begin{figure}[h] - \begin{center} - \begin{tikzpicture} - \node[](t1) { Task A }; - \node[below=of t1,yshift=7mm,font=\tiny](s1) { send msg to task }; - \node[queue,rotate=90,below=of t1.south,anchor=top](c1) {}; - \node[right=of t1,xshift=15mm](t2) { Task B }; - \node[below=of t2,yshift=7mm,font=\tiny](r2) { recv msg from task }; - \node[queue,rotate=90,below=of t2.south,anchor=top](c2) {}; - \node[dashed,fit=(c1)(t1)(s1),draw](T1){}; - \node[dashed,fit=(c2)(t2)(r2),draw](T2){}; - \node[draw](ITTI) at ($(T1)!0.5!(T2) + (0, -2.3)$){ITTI interface}; - \draw[->] (T1) |- (ITTI); - \draw[->] (ITTI.east) -| (c2.bottom); - \draw[->] (c2.east) -- (r2); - \node[queue,rotate=90,minimum width=5mm,minimum height=7mm,right=of c2,anchor=top,yshift=-15mm](c3) {}; - \node[dashed,rectangle,minimum width=5mm,minimum height=5mm,draw,below=7mm of c3,anchor=east](c4) {}; - \node[right=4mm of c3.shape center](x3){Message queue}; - \node[right=4mm of c4.center](x4){Thread}; - \node[draw,fit=(c3)(x3)(x4)(c4)](T4){}; - \end{tikzpicture} - \caption{Overall process} \label{fig:Overall process} - \end{center} -\end{figure} -Figure \ref{fig:Overall process} describes the basic fonctionnement of the inter-task interface. -A message sent from -Task A is en-queued to the message queue belonging to the target task. Note that -tasks can send messages to themselves. Another API (See Figure \ref{fig:Broadcasting process}) defines broadcast messaging -where any task can send a broadcast message to every other task. -\begin{figure}[H] - \begin{center} - \begin{tikzpicture} - \node[](t1) { Task A }; - \node[below=of t1,yshift=7mm,font=\tiny](s1) { send broadcast msg }; - \node[queue,rotate=90,below=of t1.south,anchor=top](c1) {}; - - \node[right=of t1,xshift=35mm](t2) { Task B }; - \node[below=of t2,yshift=7mm,font=\tiny](r2) { recv msg from task }; - \node[queue,rotate=90,below=of t2.south,anchor=top](c2) {}; - - \node[right=of t2,xshift=15mm](tn) { Task N }; - \node[below=of tn,yshift=7mm,font=\tiny](rn) { recv msg from task }; - \node[queue,rotate=90,below=of tn.south,anchor=top](cn) {}; - \node[dashed,fit=(c1)(t1)(s1),draw](T1){}; - \node[dashed,fit=(c2)(t2)(r2),draw](T2){}; - \node[dashed,fit=(cn)(tn)(rn),draw](TN){}; - - \node[](ITTI) at ($(T2)!0.5!(TN)$){...}; - \node[draw](ITTI) at ($(T1)!0.5!(T2) + (0, -2.3)$){ITTI interface}; - \draw[->] (T1) |- (ITTI); - \draw[->] (ITTI.east) -| (c2.bottom); - \draw[->] (ITTI.east) -| (cn.bottom); - \draw[->] (c2.east) -- (r2); - \draw[->] (cn.east) -- (rn); - \node[queue,rotate=90,minimum width=5mm,minimum height=7mm,below=23mm of T1](c3) {}; - \node[dashed,rectangle,minimum width=5mm,minimum height=5mm,draw,below=7mm of c3,anchor=east](c4) {}; - \node[right=4mm of c3.shape center](x3){Message queue}; - \node[right=4mm of c4.center](x4){Thread}; - \node[draw,fit=(c3)(x3)(x4)(c4)](T4){}; - \end{tikzpicture} - \caption{Broadcasting process} \label{fig:Broadcasting process} - \end{center} -\end{figure} -Once a task received a new message and if the task is in sleep mode (i.e. not handling -any message), the task is waken up and the message is de-queued. We can imagine a limit -in number of parallel tasks, for example N+1 CPU's. Architectures using hyper-threading -mechanism can have this value extended to 2 x CPU's. -Every task is running in a separated pthread, awaiting for new messages to handle. - -\section{Signals from kernel} - -Handling of signals from kernel is the more critical part as a signal can be raised -at any moment and will interrupt one of the running thread. Used signals should be restricted -to a single task that will handle them (using the POSIX sigmask function) . Moreover, it isn't -thread-safe to use mutexes inside a signal handler, a synchronization flag should be used to -notify the signal handler task. This task will then send the appropriate message -to the right task. For example, handling of signals can be done in the main thread or by a background task -scheduled periodically. -To overcome these issues, sigtimedwait and sigwaitinfo API functions can be used -to wait for a signal to happen. Signals will be received in the thread context, as far as -other threads block these signals. - -\section{Priority handling} - -Usage of message prioritization enables tasks to send critical messages with a faster -delivery time regarding other messages en-queued for the target task. -For now only seven priority levels can be applied when defining tasks: -\begin{itemize} -\item TASK\_PRIORITY\_MAX -\item TASK\_PRIORITY\_MAX\_LEAST -\item TASK\_PRIORITY\_MED\_PLUS -\item TASK\_PRIORITY\_MED -\item TASK\_PRIORITY\_MED\_LEAST -\item TASK\_PRIORITY\_MIN\_PLUS -\item TASK\_PRIORITY\_MIN -\end{itemize} -For now message priority does not involve any suitable scheduler: every time a message is de-queued, -message priority of other messages is incremented by one. - -\section{Message scheduling} -Currently, there is no software limit on the maximum number of threads executed in parallel. -When a task sends a message, it is en-queued in the right message queue, belonging to -the target task. The queue is a double-linked list. A mutex prevents other tasks -from modifying this queue while a task is en-queueing or removing a message. - -\section{Message definition} -Messages are defined using a single macro that adds the message to the ids enumeration -and maps data of the message to the union of messages. -\begin{lstlisting} -MESSAGE_DEF(S1AP_SCTP_NEW_MESSAGE_IND, TASK_PRIORITY_MED, S1apSctpNewMessageInd s1apSctpNewMessageInd) -\end{lstlisting} -and the associated data: -\begin{lstlisting} -typedef struct { - uint8_t *buffer; ///< SCTP buffer - uint32_t bufLen; ///< SCTP buffer length - int32_t assocId; ///< SCTP physical association ID - uint8_t stream; ///< Stream number on which data had been received - uint16_t instreams; ///< Number of input streams for the SCTP connection between peers - uint16_t outstreams; ///< Number of output streams for the SCTP connection between peers -} S1apSctpNewMessageInd; -\end{lstlisting} -\section{Task message handling} -\begin{lstlisting} -void* s1ap_mme_thread(void *args) { - while(1) { - /* Trying to fetch a message from the message queue. - * If the queue is empty, this function will block till a - * message is sent to the task. - */ - receive_msg(TASK_S1AP, &receivedMessage); - assert(receivedMessage != NULL); - switch(receivedMessage->messageId) { - case S1AP_SCTP_NEW_MESSAGE_IND: - { - //Some processing - } break; - default: - { - S1AP_DEBUG("Unkwnon message ID %d\n", receivedMessage->messageId); - } break; - } - free(receivedMessage); - receivedMessage = NULL; - } - return NULL; -} -\end{lstlisting} -\section{Messages logging} -\begin{figure}[H] - \begin{center} - \begin{tikzpicture} - \node[](p1) { Process }; - \node[below=5mm of p1](i1) { ITTI }; - \node[queue,right=of i1,rotate=90,anchor=base](q1) {}; - \node[draw,fit=(i1)(q1)](s1) { }; - \node[fit=(p1)(i1)(q1)(s1),draw](T1){}; - \node[queue,fill=red!30,right=of s1.east,yshift=-5mm](c1) { TCP socket }; - \node[right=of c1](r1){ Remote host n }; - \node[fit=(r1),draw](R2){}; - \node[queue,fill=red!30,right=of s1.east,yshift=5mm](c2) { TCP socket }; - \node[right=of c2](r1){ Remote host 1 }; - \node[fit=(r1),draw](R1){}; - \draw[-] (q1.base) -- ++ (1,0) -| ++ (0,.6) -- (c2.west); - \draw[-] (c2) -- (R1); - \draw[-] (q1.base) -- ++ (1,0) -| ++ (0,-.4) -- (c1.west); - \draw[-] (c1) -- (R2); - \end{tikzpicture} - \caption{Remote debugging} \label{fig:Remote debugging} - \end{center} -\end{figure} -Logging of inter-tasks messages can be setup using an external tool that will be -connected to the ITTI. Based on an array of dumped messages, they are serialized -to produce an array of byte sent over a socket. A remote tool can then decode -messages and display fields, message number, time.\\ -Additionaly, logs from standard output can be printed over the debug tool. -Multi-user debugging on only one running process can be achieved using this interface. -Messages to dump should be queued for a pure asynchronous communication between the -dump task and the remote hosts. -Another interesting feature could be to send a message to a task from an host, -allowing run-time re-configuration. -The C pre-processor can be used to generate messages definition (using -\nomenclature{XML}{Extensible Markup Language}XML templates -for example).\\ -\section{Limitations} -Data pointers belonging to one task should never be passed to another task. -The presented mechanism does not prevent a task from being locked. In such a case, -the blocked task will no more handle messages incoming from other tasks. - -\section{Benefits} -\begin{itemize} - \item Only a single entry point between all tasks (easy inter-task communication tracking and debugging). - \item Usage of message queues enables parallelization of layers. - \item Message prioritization and scheduling. - \item Protection of data between threads is done by the API at an higher level. -\end{itemize} - -\section{To do} -\begin{itemize} - \item Implement a priority based scheduler. Currently the queue of messages works as a FIFO. - \item Limit the number of tasks thread that can be run in parallel -\end{itemize} - -\chapter*{Signal API} \stepcounter{chapter} -\addcontentsline{toc}{chapter}{Signal API} - -On LINUX platforms, processes will receive signals comming from Kernel. -A single blocking entry point handles all used signals that are requested by the -MME. The main application thread is reserved to signal handling as this thread will -be blocked till a new signal is ready for handling.\\ -Using this method prevents threads from being interrupted by signals handler which -can interrupt the thread at any time and as a consequence create some misbehaving -in threads contexts. -Following is a sample list of signals handled: -\begin{itemize} - \item SIGABRT This is signal is sent to the process when abort() function is called - within the process and kill the process. Process can for example display the stack - once this signal is received. - \item SIGRTMIN This signal is used by the timer API and is raised everytime a - timer has expired. -\end{itemize} -Till now there is no way for tasks to request a new signal. - -\chapter*{Timer API} \stepcounter{chapter} -\addcontentsline{toc}{chapter}{Timer API} - -Timer API doesn't consist of a task (i.e. tasks cannot send messages to it). -Handling of UNIX signal associated to the timers is a Real-time signal with an id (SIGRTMIN) -depending on the platform. Management of this signal is done by the signal interface -and developpers should not care about handling timer signals incoming from Kernel. -Once a timer has expired the task which has requested it will receive the TIMER\_HAS\_EXPIRED -signal. -Note that timer\_id is of type long and thus its size is platform specific. - -\section{Timer types} - -\begin{itemize} - \item TIMER\_ONE\_SHOT After expiry and its associated signal, the timer is removed. - \item TIMER\_PERIODIC The timer is automatically reloaded on each expiry while the task -which has setup this timer doesn't cancel it. -\end{itemize} - -\section{Requesting a new signal} -Any task can request a new signal by invoking the following API: -\begin{lstlisting} -int timer_setup( - uint32_t interval_sec, - uint32_t interval_us, - task_id_t task_id, - timer_type_t type, - long *timer_id); -\end{lstlisting} - -Note that timer id is a unique identifier to distinguish timers. - -\section{Disable and remove a timer} - -Disable and remove the timer referenced by timer\_id. -\begin{lstlisting} -int timer_remove(long timer_id); -\end{lstlisting} - -\section{Timer signal expiry} - -Once the signal dispatcher receives the SIGRTMIN signal, a new signal is sent -to the task which has requested the timer. Contrary to signal request, timer -expiry notification is achieved using the intertask mechanism. -The signal data associated to this event follows: -\begin{lstlisting} -typedef struct { - long timer_id; -} timer_has_expired_t; -\end{lstlisting} - -\chapter*{Compiling core EPC} \stepcounter{chapter} -\addcontentsline{toc}{chapter}{Compiling core EPC} - -The core EPC software has been tested on Ubuntu 12.04LTS x86 and ia64. -Before compiling the core EPC, some packages should be installed on the platform. - -\section{Dependencies} - -\begin{itemize} - \item libsctp-dev - \item libpthread-dev - \item automake and autoconf - \item libtoolize - \item gcc, g++, make - \item flex and bison - \item openssl-dev - \item asn1c (see section \ref{sec:asn1c}) - \item freediameter (see section \ref{sec:freediameter}) and gnutls 3.1.0 - (see section \ref{sec:gnutls}) -\end{itemize} -Command-line to install the required packages: -\begin{lstlisting} -sudo apt-get install cmake make gcc flex bison \ -libsctp1 libsctp-dev libidn2-0-dev libidn11-dev \ -libmysqlclient-dev libxml2-dev swig python-dev \ -cmake-curses-gui valgrind guile-2.0-dev \ -libgmp-dev libgcrypt11-dev gdb unzip \ -libtasn1-3-dev g++ autoconf automake \ -openssl-dev -y -\end{lstlisting} - -\subsection{ASN1c} -\label{sec:asn1c} - -\subsection{gnutls} -\label{sec:gnutls} - -The GNUTls library is only used by freediameter for certificate handling and as a -consequence should be installed before trying to compile the freediameter library. -\begin{lstlisting} -wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/gnutls-3.1.0.tar.xz -tar -xvf gnutls-3.1.0.tar.xz -cd gnutls-3.1.0/ -./configure LDFLAGS='-L/usr/local/lib' -make -sudo make install -\end{lstlisting} -Note: when dependencies are installed in /usr/local instead of /usr, -LDFLAGS has to be overriden with the path to libraries when configuring the package: -LDFLAGS='-L/usr/local/lib'. - -\subsection{freediameter} -\label{sec:freediameter} -Freediameter is the package that provides diameter capabilities to the MME/HSS. -On top of this stack, S6A avp dictionnary is used to enable a compliant S6A interface. -\begin{lstlisting} -wget http://www.freediameter.net/hg/freeDiameter/archive/1.1.5.tar.gz -tar -xvf 1.1.5.tar.gz -cd freeDiameter-1.1.5 -patch -p1 < ../../freediameter-1.1.5.patch -mkdir build -cd build -cmake ../ -make -make test -sudo make install -\end{lstlisting} -If you want ot install this package in /usr instead of /usr/local,\\ --DCMAKE\_INSTALL\_PREFIX:PATH=/usr should be passed to cmake at configuration. - -\chapter*{System configuration} \stepcounter{chapter} -\addcontentsline{toc}{chapter}{System configuration} - -Currently there is two ways to configure the system: -\begin{itemize} - \item Compilation configuration - \item Boot-up configuration -\end{itemize} -In the first type of configuration, the single system configuration structure -is filled in with default values that can be found in the mme\_default\_values.h -header file.\\ -When Boot-up configuration is used, a configuration file is passed to the process -by using the either -c filename.conf or --conf=filename.conf. This file is then parsed -by the bison interpreter and values are replaced in the global system configuration -structure. - -\section{Global MME parameters} - -\subsection{Relative MME capacity} -Even though this parameter is not used by the MME for controlling the MME load -balancing within a pool (at least for now), the parameter has to be to forwarded -to the eNBs during association procedure. -This parameter is encoded on 8bits, acceptable values going from 0 to 255. -(Default value = 15) -\begin{lstlisting} -RELATIVE_CAPACITY = 10; -\end{lstlisting} - -\subsection{Maximum number of UE} -\label{sec:Maximum number of UE} -This limit is present here only for debug purposes and is used to restrict -the number of served UE the MME can handle. In real network another mechanism -will trigger an MME overload for certain eNBs and will restrict certain types of -traffic. Such a mechanism would imply the Relative MME capacity. -\begin{lstlisting} -MAXUE = 100; -\end{lstlisting} - -\subsection{Maximum number of eNB} -Refer to \ref{sec:Maximum number of UE}. -\begin{lstlisting} -MAXENB = 10; -\end{lstlisting} - -\subsection{Tracking Area Identity} -\nomenclature{TAI}{Tracking Area Identity}TAI is the concatenation of -\nomenclature{MCC}{Mobile Country Code}MCC, \nomenclature{MNC}{Mobile Network Code}MNC and -\nomenclature{TAC}{Tracking Area Code}TAC. -The TAC uniquely identifies a PLMN within a Cell Id. -\begin{lstlisting} -PLMN = mcc.mnc:tac; -\end{lstlisting} -Multiple values can be given using a comma separator. Example: -\begin{lstlisting} -PLMN = 208.38:0,209.130:4,208.35:8; -\end{lstlisting} - -\subsection{MME Code} -A list of a maximum of 256 values can be provided. -\nomenclature{MMEC}{MME Code}MME Code is encoded on 8 bits, -so acceptable range is: 0 to 255. -Example: -\begin{lstlisting} -MME_CODE = 30,56,1,8; -\end{lstlisting} - -\subsection{MME Group Id} -A list of a maximum of 65356 values can be provided. -\nomenclature{MMEGID}{MME Group Id}MME Group Id is encoded on 16 bits, -so acceptable range is: 0 to 65535. -Example: -\begin{lstlisting} -MME_GID = 3,4,5,30,8,9,50021; -\end{lstlisting} - -\section{Intertask parameters} -\subsection{Queue size per task} -To restrict the number of messages in queues or to detect a possible MME overload, -an upper bound for the queue size can be defined like this: -\begin{lstlisting} -ITTI_QUEUE_SIZE = 2000000; -\end{lstlisting} -This parameter is expressed in bytes. Note that all messages exchanged by tasks -have the same size. - -\section{SCTP parameters} -\subsection{IN/OUT streams number} -The number of input/output streams can be configured to limit the number of streams -used for UE-associated signalling. Note that stream with id = 0 is reserved for -non-UE associated signalling. At least two streams should be used by the MME. -(Default value = 64/64 streams) -\begin{lstlisting} -SCTP_INSTREAMS = 32; -SCTP_OUTSTREAMS = 32; -\end{lstlisting} - -\section{S1AP parameters} -\subsection{Outcome timer} -Once an outcome is sent from MME to eNB, the MME locally starts a timer to abort -the procedure and release UE contexts if the expected answer to this outcome is not -received at the expiry of this timer.\\ -This timer is expressed in seconds. (Default value = 5 seconds) -\begin{lstlisting} -S1AP_OUTCOME_TIMER = 10; -\end{lstlisting} - -\section{Network interfaces parameters} - -Three paramters can be tuned in the configuration file: -\begin{itemize} - \item Interface Name: The related interface will be bind to this interface name - \item IP address: Currently only IPv4 address is allowed - \item IP netwmask: Netmask for the LAN -\end{itemize} -These three paramters can be setup for five different interfaces used: -\begin{itemize} - \item SGW interface for S11 - \item SGW interface for S1U/S12/S4 in user plane - \item SGW interface for S5/S8 in user plane - \item PGW interface for S5/S8 - \item PGW interface for SGi - \item MME interface for S1-MME in control plane -\end{itemize} -Example of configuration: -\begin{lstlisting} -# ------- Interfaces definitions -SGW_INTERFACE_NAME_FOR_S11 = "s11sgw"; -SGW_IP_ADDRESS_FOR_S11 = "192.168.10.1"; -SGW_IP_NETMASK_FOR_S11 = 24; - -SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP = "upsgw0"; -SGW_IP_ADDRESS_FOR_S1U_S12_S4_UP = "192.168.1.1"; -SGW_IP_NETMASK_FOR_S1U_S12_S4_UP = 24; - -SGW_INTERFACE_NAME_FOR_S5_S8_UP = "upsgw1"; -SGW_IP_ADDRESS_FOR_S5_S8_UP = "192.168.5.2"; -SGW_IP_NETMASK_FOR_S5_S8_UP = 24; - -PGW_INTERFACE_NAME_FOR_S5_S8 = "uppgw0"; -PGW_IP_ADDRESS_FOR_S5_S8 = "192.168.5.1"; -PGW_IP_NETMASK_FOR_S5_S8 = 24; - -PGW_INTERFACE_NAME_FOR_SGI = "eth1"; -PGW_IP_ADDR_FOR_SGI = "192.168.12.30"; -PGW_IP_NETMASK_FOR_SGI = 24; - -MME_INTERFACE_NAME_FOR_S1_MME = "cpmme0"; -MME_IP_ADDRESS_FOR_S1_MME = "192.168.11.1"; -MME_IP_NETMASK_FOR_S1_MME = 24; -\end{lstlisting} - -\end{document} diff --git a/openair3/DOCS/Latex/EPC/Makefile b/openair3/DOCS/Latex/EPC/Makefile deleted file mode 100644 index 0f0e799384..0000000000 --- a/openair3/DOCS/Latex/EPC/Makefile +++ /dev/null @@ -1,30 +0,0 @@ -#/* -# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more -# * contributor license agreements. See the NOTICE file distributed with -# * this work for additional information regarding copyright ownership. -# * The OpenAirInterface Software Alliance licenses this file to You under -# * the OAI Public License, Version 1.1 (the "License"); you may not use this file -# * except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.openairinterface.org/?page_id=698 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# *------------------------------------------------------------------------------- -# * For more information about the OpenAirInterface (OAI) Software Alliance: -# * contact@openairinterface.org -# */ - -MYFILE=EPC - -all: - pdflatex $(MYFILE).tex - pdflatex $(MYFILE).tex - makeindex $(MYFILE).nlo -s nomencl.ist -o $(MYFILE).nls - pdflatex $(MYFILE).tex - -.PHONY: all diff --git a/openair3/M3AP/m3ap_MCE.c b/openair3/M3AP/m3ap_MCE.c index 9362c8fcb6..3cb9ef5e14 100644 --- a/openair3/M3AP/m3ap_MCE.c +++ b/openair3/M3AP/m3ap_MCE.c @@ -683,7 +683,7 @@ int is_m3ap_MCE_enabled(void) char *enable_m3 = NULL; paramdef_t p[] = { - { "enable_mce_m3", "yes/no", 0, strptr:&enable_m3, defstrval:"", TYPE_STRING, 0 } + { "enable_mce_m3", "yes/no", 0, .strptr=&enable_m3, .defstrval="", TYPE_STRING, 0 } }; /* TODO: do it per module - we check only first MCE */ diff --git a/openair3/M3AP/m3ap_MME.c b/openair3/M3AP/m3ap_MME.c index cb3b7f96db..b3be5814d5 100644 --- a/openair3/M3AP/m3ap_MME.c +++ b/openair3/M3AP/m3ap_MME.c @@ -708,7 +708,7 @@ int is_m3ap_MME_enabled(void) char *enable_m3 = NULL; paramdef_t p[] = { - { "enable_mme_m3", "yes/no", 0, strptr:&enable_m3, defstrval:"", TYPE_STRING, 0 } + { "enable_mme_m3", "yes/no", 0, .strptr=&enable_m3, .defstrval="", TYPE_STRING, 0 } }; /* TODO: do it per module - we check only first MME */ diff --git a/openair3/M3AP/m3ap_MME_interface_management.c b/openair3/M3AP/m3ap_MME_interface_management.c index 2926261f0e..38e58c9b98 100644 --- a/openair3/M3AP/m3ap_MME_interface_management.c +++ b/openair3/M3AP/m3ap_MME_interface_management.c @@ -658,7 +658,7 @@ int MME_send_M3_SETUP_RESPONSE(instance_t instance, /*uint32_t assoc_id,*/ ie = (M3AP_M3SetupResponseIEs_t *)calloc(1, sizeof(M3AP_M3SetupResponseIEs_t)); ie->id = M3AP_ProtocolIE_ID_id_CriticalityDiagnostics; ie->criticality = M3AP_Criticality_ignore; - ie->value.present = M3AP_M3SetupFailureIEs__value_PR_CriticalityDiagnostics; + ie->value.present = M3AP_M3SetupResponseIEs__value_PR_CriticalityDiagnostics; ie->value.choice.CriticalityDiagnostics.procedureCode = (M3AP_ProcedureCode_t *)calloc(1, sizeof(M3AP_ProcedureCode_t)); *ie->value.choice.CriticalityDiagnostics.procedureCode = M3AP_ProcedureCode_id_m3Setup; ie->value.choice.CriticalityDiagnostics.triggeringMessage = (M3AP_TriggeringMessage_t *)calloc(1, sizeof(M3AP_TriggeringMessage_t)); diff --git a/openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.c b/openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.c index a87dc6348a..ddda52e5f7 100644 --- a/openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.c +++ b/openair3/NAS/COMMON/ESM/MSG/PduSessionEstablishmentAccept.c @@ -66,8 +66,8 @@ void capture_pdu_session_establishment_accept_msg(uint8_t *buffer, uint32_t msg_ packet_filter_t pf; if(qos_rule.oc == ROC_CREATE_NEW_QOS_RULE || - ROC_MODIFY_QOS_RULE_ADD_PF || - ROC_MODIFY_QOS_RULE_REPLACE_PF) { + qos_rule.oc == ROC_MODIFY_QOS_RULE_ADD_PF || + qos_rule.oc == ROC_MODIFY_QOS_RULE_REPLACE_PF) { pf.pf_type.type_1.pf_dir = (*(buffer + offset) & 0x30) >> 4; pf.pf_type.type_1.pf_id = *(buffer + offset++) & 0x0F; pf.pf_type.type_1.length = *(buffer + offset++); diff --git a/openair3/NAS/NR_UE/nr_nas_msg_sim.c b/openair3/NAS/NR_UE/nr_nas_msg_sim.c index cb3c6ae167..9d3eb6db76 100644 --- a/openair3/NAS/NR_UE/nr_nas_msg_sim.c +++ b/openair3/NAS/NR_UE/nr_nas_msg_sim.c @@ -859,6 +859,7 @@ void *nas_nrue_task(void *args_p) instance = msg_p->ittiMsgHeader.originInstance; Mod_id = instance ; uicc_t *uicc=checkUicc(Mod_id); + LOG_I(NAS, "[UE %d] Received %s\n", Mod_id, ITTI_MSG_NAME(msg_p)); if (instance == INSTANCE_DEFAULT) { printf("%s:%d: FATAL: instance is INSTANCE_DEFAULT, should not happen.\n", @@ -867,84 +868,83 @@ void *nas_nrue_task(void *args_p) } switch (ITTI_MSG_ID(msg_p)) { - case INITIALIZE_MESSAGE: - LOG_I(NAS, "[UE %d] Received %s\n", Mod_id, ITTI_MSG_NAME (msg_p)); + case INITIALIZE_MESSAGE: - break; + break; - case TERMINATE_MESSAGE: - itti_exit_task (); - break; + case TERMINATE_MESSAGE: + itti_exit_task(); + break; - case MESSAGE_TEST: - LOG_I(NAS, "[UE %d] Received %s\n", Mod_id, ITTI_MSG_NAME (msg_p)); - break; + case MESSAGE_TEST: + break; - case NAS_CELL_SELECTION_CNF: - LOG_I(NAS, "[UE %d] Received %s: errCode %u, cellID %u, tac %u\n", Mod_id, ITTI_MSG_NAME (msg_p), - NAS_CELL_SELECTION_CNF (msg_p).errCode, NAS_CELL_SELECTION_CNF (msg_p).cellID, NAS_CELL_SELECTION_CNF (msg_p).tac); - // as_stmsi_t s_tmsi={0, 0}; - // as_nas_info_t nas_info; - // plmn_t plmnID={0, 0, 0, 0}; - // generateRegistrationRequest(&nas_info); - // nr_nas_itti_nas_establish_req(0, AS_TYPE_ORIGINATING_SIGNAL, s_tmsi, plmnID, nas_info.data, nas_info.length, 0); - break; + case NAS_CELL_SELECTION_CNF: + LOG_I(NAS, + "[UE %d] Received %s: errCode %u, cellID %u, tac %u\n", + Mod_id, + ITTI_MSG_NAME(msg_p), + NAS_CELL_SELECTION_CNF(msg_p).errCode, + NAS_CELL_SELECTION_CNF(msg_p).cellID, + NAS_CELL_SELECTION_CNF(msg_p).tac); + // as_stmsi_t s_tmsi={0, 0}; + // as_nas_info_t nas_info; + // plmn_t plmnID={0, 0, 0, 0}; + // generateRegistrationRequest(&nas_info); + // nr_nas_itti_nas_establish_req(0, AS_TYPE_ORIGINATING_SIGNAL, s_tmsi, plmnID, nas_info.data, nas_info.length, 0); + break; - case NAS_CELL_SELECTION_IND: - LOG_I(NAS, "[UE %d] Received %s: cellID %u, tac %u\n", Mod_id, ITTI_MSG_NAME (msg_p), - NAS_CELL_SELECTION_IND (msg_p).cellID, NAS_CELL_SELECTION_IND (msg_p).tac); + case NAS_CELL_SELECTION_IND: + LOG_I(NAS, "[UE %d] Received %s: cellID %u, tac %u\n", Mod_id, ITTI_MSG_NAME(msg_p), NAS_CELL_SELECTION_IND(msg_p).cellID, NAS_CELL_SELECTION_IND(msg_p).tac); - /* TODO not processed by NAS currently */ - break; + /* TODO not processed by NAS currently */ + break; - case NAS_PAGING_IND: - LOG_I(NAS, "[UE %d] Received %s: cause %u\n", Mod_id, ITTI_MSG_NAME (msg_p), - NAS_PAGING_IND (msg_p).cause); + case NAS_PAGING_IND: + LOG_I(NAS, "[UE %d] Received %s: cause %u\n", Mod_id, ITTI_MSG_NAME(msg_p), NAS_PAGING_IND(msg_p).cause); - /* TODO not processed by NAS currently */ - break; + /* TODO not processed by NAS currently */ + break; - case NAS_CONN_ESTABLI_CNF: - { - LOG_I(NAS, "[UE %d] Received %s: errCode %u, length %u\n", Mod_id, ITTI_MSG_NAME (msg_p), - NAS_CONN_ESTABLI_CNF (msg_p).errCode, NAS_CONN_ESTABLI_CNF (msg_p).nasMsg.length); + case NAS_CONN_ESTABLI_CNF: { + LOG_I(NAS, "[UE %d] Received %s: errCode %u, length %u\n", Mod_id, ITTI_MSG_NAME(msg_p), NAS_CONN_ESTABLI_CNF(msg_p).errCode, NAS_CONN_ESTABLI_CNF(msg_p).nasMsg.length); - pdu_buffer = NAS_CONN_ESTABLI_CNF (msg_p).nasMsg.data; - msg_type = get_msg_type(pdu_buffer, NAS_CONN_ESTABLI_CNF (msg_p).nasMsg.length); + pdu_buffer = NAS_CONN_ESTABLI_CNF(msg_p).nasMsg.data; + msg_type = get_msg_type(pdu_buffer, NAS_CONN_ESTABLI_CNF(msg_p).nasMsg.length); - if(msg_type == REGISTRATION_ACCEPT){ - LOG_I(NAS, "[UE] Received REGISTRATION ACCEPT message\n"); + if (msg_type == REGISTRATION_ACCEPT) { + LOG_I(NAS, "[UE] Received REGISTRATION ACCEPT message\n"); - as_nas_info_t initialNasMsg; - memset(&initialNasMsg, 0, sizeof(as_nas_info_t)); - generateRegistrationComplete(Mod_id,&initialNasMsg, NULL); - if(initialNasMsg.length > 0){ - MessageDef *message_p; - message_p = itti_alloc_new_message(TASK_NAS_NRUE, 0, NAS_UPLINK_DATA_REQ); - NAS_UPLINK_DATA_REQ(message_p).UEid = Mod_id; - NAS_UPLINK_DATA_REQ(message_p).nasMsg.data = (uint8_t *)initialNasMsg.data; - NAS_UPLINK_DATA_REQ(message_p).nasMsg.length = initialNasMsg.length; - itti_send_msg_to_task(TASK_RRC_NRUE, instance, message_p); - LOG_I(NAS, "Send NAS_UPLINK_DATA_REQ message(RegistrationComplete)\n"); + as_nas_info_t initialNasMsg; + memset(&initialNasMsg, 0, sizeof(as_nas_info_t)); + generateRegistrationComplete(Mod_id, &initialNasMsg, NULL); + if (initialNasMsg.length > 0) { + MessageDef *message_p; + message_p = itti_alloc_new_message(TASK_NAS_NRUE, 0, NAS_UPLINK_DATA_REQ); + NAS_UPLINK_DATA_REQ(message_p).UEid = Mod_id; + NAS_UPLINK_DATA_REQ(message_p).nasMsg.data = (uint8_t *)initialNasMsg.data; + NAS_UPLINK_DATA_REQ(message_p).nasMsg.length = initialNasMsg.length; + itti_send_msg_to_task(TASK_RRC_NRUE, instance, message_p); + LOG_I(NAS, "Send NAS_UPLINK_DATA_REQ message(RegistrationComplete)\n"); + } + + as_nas_info_t pduEstablishMsg; + memset(&pduEstablishMsg, 0, sizeof(as_nas_info_t)); + generatePduSessionEstablishRequest(Mod_id, uicc, &pduEstablishMsg); + if (pduEstablishMsg.length > 0) { + MessageDef *message_p; + message_p = itti_alloc_new_message(TASK_NAS_NRUE, 0, NAS_UPLINK_DATA_REQ); + NAS_UPLINK_DATA_REQ(message_p).UEid = Mod_id; + NAS_UPLINK_DATA_REQ(message_p).nasMsg.data = (uint8_t *)pduEstablishMsg.data; + NAS_UPLINK_DATA_REQ(message_p).nasMsg.length = pduEstablishMsg.length; + itti_send_msg_to_task(TASK_RRC_NRUE, instance, message_p); + LOG_I(NAS, "Send NAS_UPLINK_DATA_REQ message(PduSessionEstablishRequest)\n"); + } + } else if (msg_type == FGS_PDU_SESSION_ESTABLISHMENT_ACC) { + capture_pdu_session_establishment_accept_msg(pdu_buffer, NAS_CONN_ESTABLI_CNF(msg_p).nasMsg.length); } - as_nas_info_t pduEstablishMsg; - memset(&pduEstablishMsg, 0, sizeof(as_nas_info_t)); - generatePduSessionEstablishRequest(Mod_id, uicc, &pduEstablishMsg); - if(pduEstablishMsg.length > 0){ - MessageDef *message_p; - message_p = itti_alloc_new_message(TASK_NAS_NRUE, 0, NAS_UPLINK_DATA_REQ); - NAS_UPLINK_DATA_REQ(message_p).UEid = Mod_id; - NAS_UPLINK_DATA_REQ(message_p).nasMsg.data = (uint8_t *)pduEstablishMsg.data; - NAS_UPLINK_DATA_REQ(message_p).nasMsg.length = pduEstablishMsg.length; - itti_send_msg_to_task(TASK_RRC_NRUE, instance, message_p); - LOG_I(NAS, "Send NAS_UPLINK_DATA_REQ message(PduSessionEstablishRequest)\n"); - } - } else if(msg_type == FGS_PDU_SESSION_ESTABLISHMENT_ACC){ - capture_pdu_session_establishment_accept_msg(pdu_buffer, NAS_CONN_ESTABLI_CNF (msg_p).nasMsg.length); - } - - break; + break; } case NAS_CONN_RELEASE_IND: @@ -991,7 +991,7 @@ void *nas_nrue_task(void *args_p) uint8_t offset = 0; uint8_t *payload_container = pdu_buffer; offset += SECURITY_PROTECTED_5GS_NAS_MESSAGE_HEADER_LENGTH; - uint16_t payload_container_length = htons(((dl_nas_transport_t *)(pdu_buffer + offset))->payload_container_length); + uint32_t payload_container_length = htons(((dl_nas_transport_t *)(pdu_buffer + offset))->payload_container_length); if ((payload_container_length >= PAYLOAD_CONTAINER_LENGTH_MIN) && (payload_container_length <= PAYLOAD_CONTAINER_LENGTH_MAX)) offset += (PLAIN_5GS_NAS_MESSAGE_HEADER_LENGTH + 3); diff --git a/openair3/NAS/UE/API/USER/at_response.c b/openair3/NAS/UE/API/USER/at_response.c index eef0385750..c0ebe514ad 100644 --- a/openair3/NAS/UE/API/USER/at_response.c +++ b/openair3/NAS/UE/API/USER/at_response.c @@ -1068,31 +1068,31 @@ static int _at_response_encode_cgpaddr(char* buffer, const at_response_t* data) if (cgpaddr->PDP_addr_1[i] != NULL) { /* IPv4 address */ offset += sprintf(buffer+offset, ",%hhu.%hhu.%hhu.%hhu", - (unsigned int)cgpaddr->PDP_addr_1[i][0], - (unsigned int)cgpaddr->PDP_addr_1[i][1], - (unsigned int)cgpaddr->PDP_addr_1[i][2], - (unsigned int)cgpaddr->PDP_addr_1[i][3]); + (unsigned char)cgpaddr->PDP_addr_1[i][0], + (unsigned char)cgpaddr->PDP_addr_1[i][1], + (unsigned char)cgpaddr->PDP_addr_1[i][2], + (unsigned char)cgpaddr->PDP_addr_1[i][3]); } if (cgpaddr->PDP_addr_2[i] != NULL) { /* IPv6 Link-local address prefixe */ offset += sprintf(buffer+offset, ",%hhu.%hhu.%hhu.%hhu.%hhu.%hhu.%hhu.%hhu", - (unsigned int)0xfe, (unsigned int)0x80, - (unsigned int)0, (unsigned int)0, - (unsigned int)0, (unsigned int)0, - (unsigned int)0, (unsigned int)0); + (unsigned char)0xfe, (unsigned char)0x80, + (unsigned char)0, (unsigned char)0, + (unsigned char)0, (unsigned char)0, + (unsigned char)0, (unsigned char)0); /* IPv6 Link-local address */ offset += sprintf(buffer+offset, ".%hhu.%hhu.%hhu.%hhu.%hhu.%hhu.%hhu.%hhu", - (unsigned int)cgpaddr->PDP_addr_2[i][0], - (unsigned int)cgpaddr->PDP_addr_2[i][1], - (unsigned int)cgpaddr->PDP_addr_2[i][2], - (unsigned int)cgpaddr->PDP_addr_2[i][3], - (unsigned int)cgpaddr->PDP_addr_2[i][4], - (unsigned int)cgpaddr->PDP_addr_2[i][5], - (unsigned int)cgpaddr->PDP_addr_2[i][6], - (unsigned int)cgpaddr->PDP_addr_2[i][7]); + (unsigned char)cgpaddr->PDP_addr_2[i][0], + (unsigned char)cgpaddr->PDP_addr_2[i][1], + (unsigned char)cgpaddr->PDP_addr_2[i][2], + (unsigned char)cgpaddr->PDP_addr_2[i][3], + (unsigned char)cgpaddr->PDP_addr_2[i][4], + (unsigned char)cgpaddr->PDP_addr_2[i][5], + (unsigned char)cgpaddr->PDP_addr_2[i][6], + (unsigned char)cgpaddr->PDP_addr_2[i][7]); } offset += sprintf(buffer+offset, "\r\n"); diff --git a/openair3/NAS/UE/nas_ue_task.c b/openair3/NAS/UE/nas_ue_task.c index b4e096c929..308d5b1f7f 100644 --- a/openair3/NAS/UE/nas_ue_task.c +++ b/openair3/NAS/UE/nas_ue_task.c @@ -308,7 +308,7 @@ void *nas_ue_task(void *args_p) struct epoll_event events[20]; nb_events = itti_get_events(TASK_NAS_UE, events, 20); - if ((nb_events > 0) && (events != NULL)) { + if (nb_events > 0) { if (nas_ue_process_events(users, events, nb_events) == true) { LOG_E(NAS, "[UE] Received exit loop\n"); } diff --git a/openair3/NGAP/ngap_common.h b/openair3/NGAP/ngap_common.h index 9879ce7313..8de2542766 100644 --- a/openair3/NGAP/ngap_common.h +++ b/openair3/NGAP/ngap_common.h @@ -113,27 +113,27 @@ extern int asn1_xer_print; # define NGAP_DEBUG(x, args...) do { fprintf(stdout, "[NGAP][D]"x, ##args); } while(0) #endif +#define NGAP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \ + do { \ + IE_TYPE **ptr; \ + ie = NULL; \ + for (ptr = container->protocolIEs.list.array; ptr < &container->protocolIEs.list.array[container->protocolIEs.list.count]; ptr++) { \ + if ((*ptr)->id == IE_ID) { \ + ie = *ptr; \ + break; \ + } \ + } \ + if (ie == NULL) { \ + if (mandatory) { \ + AssertFatal(NGAP, "NGAP_FIND_PROTOCOLIE_BY_ID ie is NULL (searching for ie: %ld)\n", IE_ID); \ + } else { \ + NGAP_INFO("NGAP_FIND_PROTOCOLIE_BY_ID ie is NULL (searching for ie: %ld)\n", IE_ID); \ + } \ + } \ + } while (0); \ + if (mandatory && !ie) \ + return -1 -#define NGAP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \ - do {\ - IE_TYPE **ptr; \ - ie = NULL; \ - for (ptr = container->protocolIEs.list.array; \ - ptr < &container->protocolIEs.list.array[container->protocolIEs.list.count]; \ - ptr++) { \ - if((*ptr)->id == IE_ID) { \ - ie = *ptr; \ - break; \ - } \ - } \ - if (ie == NULL ) { \ - if (mandatory) {\ - NGAP_ERROR("NGAP_FIND_PROTOCOLIE_BY_ID: %s %d: ie is NULL (searching for ie: %ld)\n",__FILE__,__LINE__, IE_ID);\ - abort();\ - }\ - else NGAP_INFO("NGAP_FIND_PROTOCOLIE_BY_ID: %s %d: ie is NULL (searching for ie: %ld)\n",__FILE__,__LINE__, IE_ID);\ - } \ - } while(0) /** \brief Function callback prototype. **/ typedef int (*ngap_message_decoded_callback)( diff --git a/openair3/NGAP/ngap_gNB.c b/openair3/NGAP/ngap_gNB.c index b4a3aa2f14..f877e9d4ba 100644 --- a/openair3/NGAP/ngap_gNB.c +++ b/openair3/NGAP/ngap_gNB.c @@ -162,7 +162,6 @@ void ngap_gNB_handle_register_gNB(instance_t instance, ngap_register_gnb_req_t * } else { new_instance = calloc(1, sizeof(ngap_gNB_instance_t)); DevAssert(new_instance != NULL); - RB_INIT(&new_instance->ngap_ue_head); RB_INIT(&new_instance->ngap_amf_head); /* Copy usefull parameters */ new_instance->instance = instance; @@ -276,127 +275,88 @@ void *ngap_gNB_process_itti_msg(void *notUsed) { MessageDef *received_msg = NULL; int result; itti_receive_msg(TASK_NGAP, &received_msg); + if (received_msg) { + instance_t instance = ITTI_MSG_DESTINATION_INSTANCE(received_msg); + LOG_D(RRC, "Received message %s\n", ITTI_MSG_NAME(received_msg)); + switch (ITTI_MSG_ID(received_msg)) { + case TERMINATE_MESSAGE: + NGAP_WARN(" *** Exiting NGAP thread\n"); + itti_exit_task(); + break; - switch (ITTI_MSG_ID(received_msg)) { - case TERMINATE_MESSAGE: - NGAP_WARN(" *** Exiting NGAP thread\n"); - itti_exit_task(); - break; + case NGAP_REGISTER_GNB_REQ: + /* Register a new gNB. + * in Virtual mode gNBs will be distinguished using the mod_id/ + * Each gNB has to send an NGAP_REGISTER_GNB message with its + * own parameters. + */ + ngap_gNB_handle_register_gNB(instance, &NGAP_REGISTER_GNB_REQ(received_msg)); + break; - case NGAP_REGISTER_GNB_REQ: { - /* Register a new gNB. - * in Virtual mode gNBs will be distinguished using the mod_id/ - * Each gNB has to send an NGAP_REGISTER_GNB message with its - * own parameters. - */ - ngap_gNB_handle_register_gNB(ITTI_MSG_DESTINATION_INSTANCE(received_msg), - &NGAP_REGISTER_GNB_REQ(received_msg)); + case SCTP_NEW_ASSOCIATION_RESP: + ngap_gNB_handle_sctp_association_resp(instance, &received_msg->ittiMsg.sctp_new_association_resp); + break; + + case SCTP_DATA_IND: + ngap_gNB_handle_sctp_data_ind(&received_msg->ittiMsg.sctp_data_ind); + break; + + case NGAP_NAS_FIRST_REQ: + ngap_gNB_handle_nas_first_req(instance, &NGAP_NAS_FIRST_REQ(received_msg)); + break; + + case NGAP_UPLINK_NAS: + ngap_gNB_nas_uplink(instance, &NGAP_UPLINK_NAS(received_msg)); + break; + + case NGAP_UE_CAPABILITIES_IND: + ngap_gNB_ue_capabilities(instance, &NGAP_UE_CAPABILITIES_IND(received_msg)); + break; + + case NGAP_INITIAL_CONTEXT_SETUP_RESP: + ngap_gNB_initial_ctxt_resp(instance, &NGAP_INITIAL_CONTEXT_SETUP_RESP(received_msg)); + break; + + case NGAP_PDUSESSION_SETUP_RESP: + ngap_gNB_pdusession_setup_resp(instance, &NGAP_PDUSESSION_SETUP_RESP(received_msg)); + break; + + case NGAP_PDUSESSION_MODIFY_RESP: + ngap_gNB_pdusession_modify_resp(instance, &NGAP_PDUSESSION_MODIFY_RESP(received_msg)); + break; + + case NGAP_NAS_NON_DELIVERY_IND: + ngap_gNB_nas_non_delivery_ind(instance, &NGAP_NAS_NON_DELIVERY_IND(received_msg)); + break; + + case NGAP_PATH_SWITCH_REQ: + ngap_gNB_path_switch_req(instance, &NGAP_PATH_SWITCH_REQ(received_msg)); + break; + + case NGAP_PDUSESSION_MODIFICATION_IND: + ngap_gNB_generate_PDUSESSION_Modification_Indication(instance, &NGAP_PDUSESSION_MODIFICATION_IND(received_msg)); + break; + + case NGAP_UE_CONTEXT_RELEASE_COMPLETE: + ngap_ue_context_release_complete(instance, &NGAP_UE_CONTEXT_RELEASE_COMPLETE(received_msg)); + break; + + case NGAP_UE_CONTEXT_RELEASE_REQ: + ngap_ue_context_release_req(instance, &NGAP_UE_CONTEXT_RELEASE_REQ(received_msg)); + break; + + case NGAP_PDUSESSION_RELEASE_RESPONSE: + ngap_gNB_pdusession_release_resp(instance, &NGAP_PDUSESSION_RELEASE_RESPONSE(received_msg)); + break; + + default: + NGAP_ERROR("Received unhandled message: %d:%s\n", ITTI_MSG_ID(received_msg), ITTI_MSG_NAME(received_msg)); + break; } - break; - case SCTP_NEW_ASSOCIATION_RESP: { - ngap_gNB_handle_sctp_association_resp(ITTI_MSG_DESTINATION_INSTANCE(received_msg), - &received_msg->ittiMsg.sctp_new_association_resp); - } - break; - - case SCTP_DATA_IND: { - ngap_gNB_handle_sctp_data_ind(&received_msg->ittiMsg.sctp_data_ind); - } - break; - - case NGAP_NAS_FIRST_REQ: { - ngap_gNB_handle_nas_first_req(ITTI_MSG_DESTINATION_INSTANCE(received_msg), - &NGAP_NAS_FIRST_REQ(received_msg)); - } - break; - - case NGAP_UPLINK_NAS: { - ngap_gNB_nas_uplink(ITTI_MSG_DESTINATION_INSTANCE(received_msg), - &NGAP_UPLINK_NAS(received_msg)); - } - break; - - case NGAP_UE_CAPABILITIES_IND: { - ngap_gNB_ue_capabilities(ITTI_MSG_DESTINATION_INSTANCE(received_msg), - &NGAP_UE_CAPABILITIES_IND(received_msg)); - } - break; - - case NGAP_INITIAL_CONTEXT_SETUP_RESP: { - ngap_gNB_initial_ctxt_resp(ITTI_MSG_DESTINATION_INSTANCE(received_msg), - &NGAP_INITIAL_CONTEXT_SETUP_RESP(received_msg)); - } - break; - - case NGAP_PDUSESSION_SETUP_RESP: { - ngap_gNB_pdusession_setup_resp(ITTI_MSG_DESTINATION_INSTANCE(received_msg), - &NGAP_PDUSESSION_SETUP_RESP(received_msg)); - } - break; - - case NGAP_PDUSESSION_MODIFY_RESP: { - ngap_gNB_pdusession_modify_resp(ITTI_MSG_DESTINATION_INSTANCE(received_msg), - &NGAP_PDUSESSION_MODIFY_RESP(received_msg)); - } - break; - - case NGAP_NAS_NON_DELIVERY_IND: { - ngap_gNB_nas_non_delivery_ind(ITTI_MSG_DESTINATION_INSTANCE(received_msg), - &NGAP_NAS_NON_DELIVERY_IND(received_msg)); - } - break; - - case NGAP_PATH_SWITCH_REQ: { - ngap_gNB_path_switch_req(ITTI_MSG_DESTINATION_INSTANCE(received_msg), - &NGAP_PATH_SWITCH_REQ(received_msg)); - } - break; - - case NGAP_PDUSESSION_MODIFICATION_IND: { - ngap_gNB_generate_PDUSESSION_Modification_Indication(ITTI_MSG_DESTINATION_INSTANCE(received_msg), - &NGAP_PDUSESSION_MODIFICATION_IND(received_msg)); - } - break; - - case NGAP_UE_CONTEXT_RELEASE_COMPLETE: { - ngap_ue_context_release_complete(ITTI_MSG_DESTINATION_INSTANCE(received_msg), - &NGAP_UE_CONTEXT_RELEASE_COMPLETE(received_msg)); - } - break; - - case NGAP_UE_CONTEXT_RELEASE_REQ: { - ngap_gNB_instance_t *ngap_gNB_instance_p = NULL; // test - struct ngap_gNB_ue_context_s *ue_context_p = NULL; // test - ngap_ue_context_release_req(ITTI_MSG_DESTINATION_INSTANCE(received_msg), - &NGAP_UE_CONTEXT_RELEASE_REQ(received_msg)); - ngap_gNB_instance_p = ngap_gNB_get_instance(ITTI_MSG_DESTINATION_INSTANCE(received_msg)); // test - DevAssert(ngap_gNB_instance_p != NULL); // test - - if ((ue_context_p = ngap_gNB_get_ue_context(ngap_gNB_instance_p, - NGAP_UE_CONTEXT_RELEASE_REQ(received_msg).gNB_ue_ngap_id)) == NULL) { // test - /* The context for this gNB ue ngap id doesn't exist in the map of gNB UEs */ - NGAP_ERROR("Failed to find ue context associated with gNB ue ngap id: %u\n", - NGAP_UE_CONTEXT_RELEASE_REQ(received_msg).gNB_ue_ngap_id); // test - } // test - } - break; - - case NGAP_PDUSESSION_RELEASE_RESPONSE: { - ngap_gNB_pdusession_release_resp(ITTI_MSG_DESTINATION_INSTANCE(received_msg), - &NGAP_PDUSESSION_RELEASE_RESPONSE(received_msg)); - } - break; - - default: - NGAP_ERROR("Received unhandled message: %d:%s\n", - ITTI_MSG_ID(received_msg), ITTI_MSG_NAME(received_msg)); - break; + result = itti_free(ITTI_MSG_ORIGIN_ID(received_msg), received_msg); + AssertFatal(result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); } - - result = itti_free (ITTI_MSG_ORIGIN_ID(received_msg), received_msg); - AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); - received_msg = NULL; return NULL; } diff --git a/openair3/NGAP/ngap_gNB_context_management_procedures.c b/openair3/NGAP/ngap_gNB_context_management_procedures.c index 6c1a8584a6..8d3c20d218 100644 --- a/openair3/NGAP/ngap_gNB_context_management_procedures.c +++ b/openair3/NGAP/ngap_gNB_context_management_procedures.c @@ -58,9 +58,7 @@ int ngap_ue_context_release_complete(instance_t instance, ngap_gNB_instance_t *ngap_gNB_instance_p = NULL; struct ngap_gNB_ue_context_s *ue_context_p = NULL; - NGAP_NGAP_PDU_t pdu; - NGAP_UEContextReleaseComplete_t *out; - NGAP_UEContextReleaseComplete_IEs_t *ie; + NGAP_NGAP_PDU_t pdu = {0}; uint8_t *buffer; uint32_t length; @@ -70,44 +68,37 @@ int ngap_ue_context_release_complete(instance_t instance, DevAssert(ue_release_complete_p != NULL); DevAssert(ngap_gNB_instance_p != NULL); - /*RB_FOREACH(ue_context_p, ngap_ue_map, &ngap_gNB_instance_p->ngap_ue_head) { - NGAP_WARN("in ngap_ue_map: UE context gNB_ue_ngap_id %u amf_ue_ngap_id %u state %u\n", - ue_context_p->gNB_ue_ngap_id, ue_context_p->amf_ue_ngap_id, - ue_context_p->ue_state); - }*/ - if ((ue_context_p = ngap_gNB_get_ue_context(ngap_gNB_instance_p, - ue_release_complete_p->gNB_ue_ngap_id)) == NULL) { + if ((ue_context_p = ngap_get_ue_context(ue_release_complete_p->gNB_ue_ngap_id)) == NULL) { /* The context for this gNB ue ngap id doesn't exist in the map of gNB UEs */ - NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: %u\n", - ue_release_complete_p->gNB_ue_ngap_id); + NGAP_ERROR("Failed to find ue context associated with gNB ue ngap id: %u\n", ue_release_complete_p->gNB_ue_ngap_id); return -1; } /* Prepare the NGAP message to encode */ - memset(&pdu, 0, sizeof(pdu)); pdu.present = NGAP_NGAP_PDU_PR_successfulOutcome; - pdu.choice.successfulOutcome = CALLOC(1, sizeof(struct NGAP_SuccessfulOutcome)); - pdu.choice.successfulOutcome->procedureCode = NGAP_ProcedureCode_id_UEContextRelease; - pdu.choice.successfulOutcome->criticality = NGAP_Criticality_reject; - pdu.choice.successfulOutcome->value.present = NGAP_SuccessfulOutcome__value_PR_UEContextReleaseComplete; - out = &pdu.choice.successfulOutcome->value.choice.UEContextReleaseComplete; + asn1cCalloc(pdu.choice.successfulOutcome, head); + head->procedureCode = NGAP_ProcedureCode_id_UEContextRelease; + head->criticality = NGAP_Criticality_reject; + head->value.present = NGAP_SuccessfulOutcome__value_PR_UEContextReleaseComplete; + NGAP_UEContextReleaseComplete_t *out = &head->value.choice.UEContextReleaseComplete; /* mandatory */ - ie = (NGAP_UEContextReleaseComplete_IEs_t *)calloc(1, sizeof(NGAP_UEContextReleaseComplete_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_UEContextReleaseComplete_IEs__value_PR_AMF_UE_NGAP_ID; - asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_UEContextReleaseComplete_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_UEContextReleaseComplete_IEs__value_PR_AMF_UE_NGAP_ID; + asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); + } /* mandatory */ - ie = (NGAP_UEContextReleaseComplete_IEs_t *)calloc(1, sizeof(NGAP_UEContextReleaseComplete_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_UEContextReleaseComplete_IEs__value_PR_RAN_UE_NGAP_ID; - ie->value.choice.RAN_UE_NGAP_ID = ue_release_complete_p->gNB_ue_ngap_id; - asn1cSeqAdd(&out->protocolIEs.list, ie); - + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_UEContextReleaseComplete_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_UEContextReleaseComplete_IEs__value_PR_RAN_UE_NGAP_ID; + ie->value.choice.RAN_UE_NGAP_ID = ue_release_complete_p->gNB_ue_ngap_id; + } if (ngap_gNB_encode_pdu(&pdu, &buffer, &length) < 0) { /* Encode procedure has failed... */ @@ -123,35 +114,18 @@ int ngap_ue_context_release_complete(instance_t instance, //LG ngap_gNB_itti_send_sctp_close_association(ngap_gNB_instance_p->instance, // ue_context_p->amf_ref->assoc_id); // release UE context - struct ngap_gNB_ue_context_s *ue_context2_p = NULL; - - if ((ue_context2_p = RB_REMOVE(ngap_ue_map, &ngap_gNB_instance_p->ngap_ue_head, ue_context_p)) - != NULL) { - NGAP_WARN("Removed UE context gNB_ue_ngap_id %u\n", - ue_context2_p->gNB_ue_ngap_id); - ngap_gNB_free_ue_context(ue_context2_p); - } else { - NGAP_WARN("Removing UE context gNB_ue_ngap_id %u: did not find context\n", - ue_context_p->gNB_ue_ngap_id); - } - /*RB_FOREACH(ue_context_p, ngap_ue_map, &ngap_gNB_instance_p->ngap_ue_head) { - NGAP_WARN("in ngap_ue_map: UE context gNB_ue_ngap_id %u amf_ue_ngap_id %u state %u\n", - ue_context_p->gNB_ue_ngap_id, ue_context_p->amf_ue_ngap_id, - ue_context_p->ue_state); - }*/ - + ngap_gNB_ue_context_t *tmp = ngap_detach_ue_context(ue_release_complete_p->gNB_ue_ngap_id); + if (tmp) + free(tmp); return 0; } - int ngap_ue_context_release_req(instance_t instance, ngap_ue_release_req_t *ue_release_req_p) { ngap_gNB_instance_t *ngap_gNB_instance_p = NULL; struct ngap_gNB_ue_context_s *ue_context_p = NULL; - NGAP_NGAP_PDU_t pdu; - NGAP_UEContextReleaseRequest_t *out; - NGAP_UEContextReleaseRequest_IEs_t *ie; + NGAP_NGAP_PDU_t pdu = {0}; uint8_t *buffer = NULL; uint32_t length; /* Retrieve the NGAP gNB instance associated with Mod_id */ @@ -160,8 +134,7 @@ int ngap_ue_context_release_req(instance_t instance, DevAssert(ue_release_req_p != NULL); DevAssert(ngap_gNB_instance_p != NULL); - if ((ue_context_p = ngap_gNB_get_ue_context(ngap_gNB_instance_p, - ue_release_req_p->gNB_ue_ngap_id)) == NULL) { + if ((ue_context_p = ngap_get_ue_context(ue_release_req_p->gNB_ue_ngap_id)) == NULL) { /* The context for this gNB ue ngap id doesn't exist in the map of gNB UEs */ NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: %u\n", ue_release_req_p->gNB_ue_ngap_id); @@ -169,33 +142,34 @@ int ngap_ue_context_release_req(instance_t instance, } /* Prepare the NGAP message to encode */ - memset(&pdu, 0, sizeof(pdu)); pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage; - pdu.choice.initiatingMessage = CALLOC(1, sizeof(struct NGAP_InitiatingMessage)); - pdu.choice.initiatingMessage->procedureCode = NGAP_ProcedureCode_id_UEContextReleaseRequest; - pdu.choice.initiatingMessage->criticality = NGAP_Criticality_ignore; - pdu.choice.initiatingMessage->value.present = NGAP_InitiatingMessage__value_PR_UEContextReleaseRequest; - out = &pdu.choice.initiatingMessage->value.choice.UEContextReleaseRequest; + asn1cCalloc(pdu.choice.initiatingMessage, head); + head->procedureCode = NGAP_ProcedureCode_id_UEContextReleaseRequest; + head->criticality = NGAP_Criticality_ignore; + head->value.present = NGAP_InitiatingMessage__value_PR_UEContextReleaseRequest; + NGAP_UEContextReleaseRequest_t *out = &head->value.choice.UEContextReleaseRequest; /* mandatory */ - ie = (NGAP_UEContextReleaseRequest_IEs_t *)calloc(1, sizeof(NGAP_UEContextReleaseRequest_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_reject; - ie->value.present = NGAP_UEContextReleaseRequest_IEs__value_PR_AMF_UE_NGAP_ID; - asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_UEContextReleaseRequest_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_reject; + ie->value.present = NGAP_UEContextReleaseRequest_IEs__value_PR_AMF_UE_NGAP_ID; + asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); + } /* mandatory */ - ie = (NGAP_UEContextReleaseRequest_IEs_t *)calloc(1, sizeof(NGAP_UEContextReleaseRequest_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_reject; - ie->value.present = NGAP_UEContextReleaseRequest_IEs__value_PR_RAN_UE_NGAP_ID; - ie->value.choice.RAN_UE_NGAP_ID = ue_release_req_p->gNB_ue_ngap_id; - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_UEContextReleaseRequest_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_reject; + ie->value.present = NGAP_UEContextReleaseRequest_IEs__value_PR_RAN_UE_NGAP_ID; + ie->value.choice.RAN_UE_NGAP_ID = ue_release_req_p->gNB_ue_ngap_id; + } /* optional */ if (ue_release_req_p->nb_of_pdusessions > 0) { - ie = (NGAP_UEContextReleaseRequest_IEs_t *)calloc(1, sizeof(NGAP_UEContextReleaseRequest_IEs_t)); + asn1cSequenceAdd(out->protocolIEs.list, NGAP_UEContextReleaseRequest_IEs_t, ie); ie->id = NGAP_ProtocolIE_ID_id_PDUSessionResourceListCxtRelReq; ie->criticality = NGAP_Criticality_reject; ie->value.present = NGAP_UEContextReleaseRequest_IEs__value_PR_PDUSessionResourceListCxtRelReq; @@ -205,51 +179,19 @@ int ngap_ue_context_release_req(instance_t instance, item->pDUSessionID = ue_release_req_p->pdusessions[i].pdusession_id; asn1cSeqAdd(&ie->value.choice.PDUSessionResourceListCxtRelReq.list, item); } - asn1cSeqAdd(&out->protocolIEs.list, ie); } /* mandatory */ - ie = (NGAP_UEContextReleaseRequest_IEs_t *)calloc(1, sizeof(NGAP_UEContextReleaseRequest_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_Cause; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_UEContextReleaseRequest_IEs__value_PR_Cause; - - switch (ue_release_req_p->cause) { - case NGAP_Cause_PR_radioNetwork: - ie->value.choice.Cause.present = NGAP_Cause_PR_radioNetwork; - ie->value.choice.Cause.choice.radioNetwork = ue_release_req_p->cause_value; - break; - - case NGAP_Cause_PR_transport: - ie->value.choice.Cause.present = NGAP_Cause_PR_transport; - ie->value.choice.Cause.choice.transport = ue_release_req_p->cause_value; - break; - - case NGAP_Cause_PR_nas: - ie->value.choice.Cause.present = NGAP_Cause_PR_nas; - ie->value.choice.Cause.choice.nas = ue_release_req_p->cause_value; - break; - - case NGAP_Cause_PR_protocol: - ie->value.choice.Cause.present = NGAP_Cause_PR_protocol; - ie->value.choice.Cause.choice.protocol = ue_release_req_p->cause_value; - break; - - case NGAP_Cause_PR_misc: - ie->value.choice.Cause.present = NGAP_Cause_PR_misc; - ie->value.choice.Cause.choice.misc = ue_release_req_p->cause_value; - break; - - case NGAP_Cause_PR_NOTHING: - default: - ie->value.choice.Cause.present = NGAP_Cause_PR_NOTHING; - break; + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_UEContextReleaseRequest_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_Cause; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_UEContextReleaseRequest_IEs__value_PR_Cause; + DevAssert(ue_release_req_p->cause <= NGAP_Cause_PR_choice_ExtensionS); + ie->value.choice.Cause.present = ue_release_req_p->cause; + ie->value.choice.Cause.choice.misc = ue_release_req_p->cause_value; } - asn1cSeqAdd(&out->protocolIEs.list, ie); - - - if (ngap_gNB_encode_pdu(&pdu, &buffer, &length) < 0) { /* Encode procedure has failed... */ NGAP_ERROR("Failed to encode UE context release complete\n"); diff --git a/openair3/NGAP/ngap_gNB_decoder.c b/openair3/NGAP/ngap_gNB_decoder.c index b551471a84..c752ace05d 100644 --- a/openair3/NGAP/ngap_gNB_decoder.c +++ b/openair3/NGAP/ngap_gNB_decoder.c @@ -156,13 +156,8 @@ int ngap_gNB_decode_pdu(NGAP_NGAP_PDU_t *pdu, const uint8_t *const buffer, asn_dec_rval_t dec_ret; DevAssert(pdu != NULL); DevAssert(buffer != NULL); - dec_ret = aper_decode(NULL, - &asn_DEF_NGAP_NGAP_PDU, - (void **)&pdu, - buffer, - length, - 0, - 0); + asn_codec_ctx_t st = {.max_stack_size = 100 * 1000}; // if we enable asn1c debug the stack size become large + dec_ret = aper_decode(&st, &asn_DEF_NGAP_NGAP_PDU, (void **)&pdu, buffer, length, 0, 0); if (dec_ret.code != RC_OK) { NGAP_ERROR("Failed to decode pdu\n"); diff --git a/openair3/NGAP/ngap_gNB_defs.h b/openair3/NGAP/ngap_gNB_defs.h index f2bdd646ae..5591ecb061 100644 --- a/openair3/NGAP/ngap_gNB_defs.h +++ b/openair3/NGAP/ngap_gNB_defs.h @@ -236,11 +236,6 @@ typedef struct ngap_gNB_instance_s { /* Tree of NGAP AMF associations ordered by association ID */ RB_HEAD(ngap_amf_map, ngap_gNB_amf_data_s) ngap_amf_head; - /* TODO: add a map ordered by relative AMF capacity */ - - /* Tree of UE ordered by gNB_ue_ngap_id's */ - RB_HEAD(ngap_ue_map, ngap_gNB_ue_context_s) ngap_ue_head; - /* For virtual mode, mod_id as defined in the rest of the L1/L2 stack */ instance_t instance; diff --git a/openair3/NGAP/ngap_gNB_encoder.c b/openair3/NGAP/ngap_gNB_encoder.c index c69de32467..e85ae4c8eb 100644 --- a/openair3/NGAP/ngap_gNB_encoder.c +++ b/openair3/NGAP/ngap_gNB_encoder.c @@ -38,23 +38,84 @@ #include "ngap_common.h" #include "ngap_gNB_encoder.h" -static inline int ngap_gNB_encode_initiating(NGAP_NGAP_PDU_t *pdu, - uint8_t **buffer, - uint32_t *len); +static inline int ngap_gNB_encode_initiating(NGAP_NGAP_PDU_t *pdu, uint8_t **buffer, uint32_t *len) +{ + DevAssert(pdu != NULL); -static inline int ngap_gNB_encode_successfull_outcome(NGAP_NGAP_PDU_t *pdu, - uint8_t **buffer, uint32_t *len); + const NGAP_ProcedureCode_t tmp[] = {NGAP_ProcedureCode_id_NGSetup, + NGAP_ProcedureCode_id_UplinkNASTransport, + NGAP_ProcedureCode_id_UERadioCapabilityInfoIndication, + NGAP_ProcedureCode_id_InitialUEMessage, + NGAP_ProcedureCode_id_NASNonDeliveryIndication, + NGAP_ProcedureCode_id_UEContextReleaseRequest, + NGAP_ProcedureCode_id_PathSwitchRequest, + NGAP_ProcedureCode_id_PDUSessionResourceModifyIndication}; + int i; + for (i = 0; i < sizeofArray(tmp); i++) + if (pdu->choice.initiatingMessage->procedureCode == tmp[i]) + break; + if (i == sizeofArray(tmp)) { + NGAP_DEBUG("Unknown procedure ID (%d) for initiating message\n", (int)pdu->choice.initiatingMessage->procedureCode); + return -1; + } -static inline int ngap_gNB_encode_unsuccessfull_outcome(NGAP_NGAP_PDU_t *pdu, - uint8_t **buffer, uint32_t *len); + asn_encode_to_new_buffer_result_t res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_NGAP_NGAP_PDU, pdu); + AssertFatal(res.result.encoded > 0, "failed to encode NGAP msg\n"); + *buffer = res.buffer; + *len = res.result.encoded; + return 0; +} -int ngap_gNB_encode_pdu(NGAP_NGAP_PDU_t *pdu, uint8_t **buffer, uint32_t *len) { +static inline int ngap_gNB_encode_successfull_outcome(NGAP_NGAP_PDU_t *pdu, uint8_t **buffer, uint32_t *len) +{ + DevAssert(pdu != NULL); + const NGAP_ProcedureCode_t tmp[] = {NGAP_ProcedureCode_id_InitialContextSetup, + NGAP_ProcedureCode_id_UEContextRelease, + NGAP_ProcedureCode_id_PDUSessionResourceSetup, + NGAP_ProcedureCode_id_PDUSessionResourceModify, + NGAP_ProcedureCode_id_PDUSessionResourceRelease}; + int i; + for (i = 0; i < sizeofArray(tmp); i++) + if (pdu->choice.successfulOutcome->procedureCode == tmp[i]) + break; + if (i == sizeofArray(tmp)) { + NGAP_WARN("Unknown procedure ID (%ld) for successfull outcome message\n", pdu->choice.successfulOutcome->procedureCode); + return -1; + } + + asn_encode_to_new_buffer_result_t res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_NGAP_NGAP_PDU, pdu); + AssertFatal(res.result.encoded > 0, "failed to encode NGAP msg\n"); + *buffer = res.buffer; + *len = res.result.encoded; + return 0; +} + +static inline int ngap_gNB_encode_unsuccessfull_outcome(NGAP_NGAP_PDU_t *pdu, uint8_t **buffer, uint32_t *len) +{ + DevAssert(pdu != NULL); + + if (pdu->choice.unsuccessfulOutcome->procedureCode != NGAP_ProcedureCode_id_InitialContextSetup) { + NGAP_DEBUG("Unknown procedure ID (%d) for unsuccessfull outcome message\n", (int)pdu->choice.unsuccessfulOutcome->procedureCode); + return -1; + } + + asn_encode_to_new_buffer_result_t res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_NGAP_NGAP_PDU, pdu); + AssertFatal(res.result.encoded > 0, "failed to encode NGAP msg\n"); + *buffer = res.buffer; + *len = res.result.encoded; + return 0; +} + +int ngap_gNB_encode_pdu(NGAP_NGAP_PDU_t *pdu, uint8_t **buffer, uint32_t *len) +{ int ret = -1; DevAssert(pdu != NULL); DevAssert(buffer != NULL); DevAssert(len != NULL); - - switch(pdu->present) { + if (asn1_xer_print) { + xer_fprint(stdout, &asn_DEF_NGAP_NGAP_PDU, (void *)pdu); + } + switch (pdu->present) { case NGAP_NGAP_PDU_PR_initiatingMessage: ret = ngap_gNB_encode_initiating(pdu, buffer, len); break; @@ -68,156 +129,9 @@ int ngap_gNB_encode_pdu(NGAP_NGAP_PDU_t *pdu, uint8_t **buffer, uint32_t *len) { break; default: - NGAP_DEBUG("Unknown message outcome (%d) or not implemented", - (int)pdu->present); + NGAP_DEBUG("Unknown message outcome (%d) or not implemented", (int)pdu->present); return -1; } - - //ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, pdu); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, pdu); return ret; } - -static inline -int ngap_gNB_encode_initiating(NGAP_NGAP_PDU_t *pdu, - uint8_t **buffer, uint32_t *len) { - asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} }; - DevAssert(pdu != NULL); - - switch(pdu->choice.initiatingMessage->procedureCode) { - case NGAP_ProcedureCode_id_NGSetup: - res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); - free(res.buffer); - break; - - case NGAP_ProcedureCode_id_UplinkNASTransport: - res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); - free(res.buffer); - break; - - case NGAP_ProcedureCode_id_UERadioCapabilityInfoIndication: - res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); - free(res.buffer); - break; - - case NGAP_ProcedureCode_id_InitialUEMessage: - res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); - free(res.buffer); - break; - - case NGAP_ProcedureCode_id_NASNonDeliveryIndication: - res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); - free(res.buffer); - break; - - case NGAP_ProcedureCode_id_UEContextReleaseRequest: - res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); - free(res.buffer); - break; - - case NGAP_ProcedureCode_id_PathSwitchRequest: - res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); - free(res.buffer); - break; - - case NGAP_ProcedureCode_id_PDUSessionResourceModifyIndication: - res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); - free(res.buffer); - break; - - default: - NGAP_DEBUG("Unknown procedure ID (%d) for initiating message\n", - (int)pdu->choice.initiatingMessage->procedureCode); - return -1; - } - - if (asn1_xer_print) { - xer_fprint(stdout, &asn_DEF_NGAP_NGAP_PDU, (void *)pdu); - } - - memset(&res, 0, sizeof(res)); - res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_NGAP_NGAP_PDU, pdu); - *buffer = res.buffer; - *len = res.result.encoded; - return 0; -} - -static inline -int ngap_gNB_encode_successfull_outcome(NGAP_NGAP_PDU_t *pdu, - uint8_t **buffer, uint32_t *len) { - asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} }; - DevAssert(pdu != NULL); - - switch(pdu->choice.successfulOutcome->procedureCode) { - case NGAP_ProcedureCode_id_InitialContextSetup: - res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); - free(res.buffer); - break; - - case NGAP_ProcedureCode_id_UEContextRelease: - res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); - free(res.buffer); - break; - - case NGAP_ProcedureCode_id_PDUSessionResourceSetup: - res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); - free(res.buffer); - NGAP_INFO("PDUSESSIONSetup successful message\n"); - break; - - case NGAP_ProcedureCode_id_PDUSessionResourceModify: - res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); - free(res.buffer); - NGAP_INFO("PDUSESSIONModify successful message\n"); - break; - - case NGAP_ProcedureCode_id_PDUSessionResourceRelease: - res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); - free(res.buffer); - NGAP_INFO("PDUSESSION Release successful message\n"); - break; - - default: - NGAP_WARN("Unknown procedure ID (%d) for successfull outcome message\n", - (int)pdu->choice.successfulOutcome->procedureCode); - return -1; - } - - if (asn1_xer_print) { - xer_fprint(stdout, &asn_DEF_NGAP_NGAP_PDU, (void *)pdu); - } - - memset(&res, 0, sizeof(res)); - res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_NGAP_NGAP_PDU, pdu); - *buffer = res.buffer; - *len = res.result.encoded; - return 0; -} - -static inline -int ngap_gNB_encode_unsuccessfull_outcome(NGAP_NGAP_PDU_t *pdu, - uint8_t **buffer, uint32_t *len) { - asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} }; - DevAssert(pdu != NULL); - - switch(pdu->choice.unsuccessfulOutcome->procedureCode) { - case NGAP_ProcedureCode_id_InitialContextSetup: - res = asn_encode_to_new_buffer(NULL, ATS_CANONICAL_XER, &asn_DEF_NGAP_NGAP_PDU, pdu); - free(res.buffer); - break; - - default: - NGAP_DEBUG("Unknown procedure ID (%d) for unsuccessfull outcome message\n", - (int)pdu->choice.unsuccessfulOutcome->procedureCode); - return -1; - } - - if (asn1_xer_print) { - xer_fprint(stdout, &asn_DEF_NGAP_NGAP_PDU, (void *)pdu); - } - - memset(&res, 0, sizeof(res)); - res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_NGAP_NGAP_PDU, pdu); - *buffer = res.buffer; - *len = res.result.encoded; - return 0; -} diff --git a/openair3/NGAP/ngap_gNB_handlers.c b/openair3/NGAP/ngap_gNB_handlers.c index 47f4b8445d..f3fd9e84e7 100644 --- a/openair3/NGAP/ngap_gNB_handlers.c +++ b/openair3/NGAP/ngap_gNB_handlers.c @@ -48,119 +48,15 @@ #include "conversions.h" #include "NGAP_NonDynamic5QIDescriptor.h" -static int ngap_gNB_handle_ng_setup_response(uint32_t ssoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu); -static -int ngap_gNB_handle_ng_setup_failure(uint32_t assoc_id, - uint32_t stream, - NGAP_NGAP_PDU_t *pdu); +static void allocCopy(ngap_pdu_t *out, OCTET_STRING_t in) +{ + if (in.size) { + out->buffer = malloc(in.size); + memcpy(out->buffer, in.buf, in.size); + } + out->length = in.size; +} -static -int ngap_gNB_handle_error_indication(uint32_t assoc_id, - uint32_t stream, - NGAP_NGAP_PDU_t *pdu); - -static -int ngap_gNB_handle_initial_context_request(uint32_t assoc_id, - uint32_t stream, - NGAP_NGAP_PDU_t *pdu); - -static -int ngap_gNB_handle_ue_context_release_command(uint32_t assoc_id, - uint32_t stream, - NGAP_NGAP_PDU_t *pdu); - -static -int ngap_gNB_handle_pdusession_setup_request(uint32_t assoc_id, - uint32_t stream, - NGAP_NGAP_PDU_t *pdu); - -static -int ngap_gNB_handle_paging(uint32_t assoc_id, - uint32_t stream, - NGAP_NGAP_PDU_t *pdu); - -static -int ngap_gNB_handle_pdusession_modify_request(uint32_t assoc_id, - uint32_t stream, - NGAP_NGAP_PDU_t *pdu); - -static -int ngap_gNB_handle_pdusession_release_command(uint32_t assoc_id, - uint32_t stream, - NGAP_NGAP_PDU_t *pdu); - -static -int ngap_gNB_handle_ng_path_switch_request_ack(uint32_t assoc_id, - uint32_t stream, - NGAP_NGAP_PDU_t *pdu); - -static -int ngap_gNB_handle_ng_path_switch_request_failure(uint32_t assoc_id, - uint32_t stream, - NGAP_NGAP_PDU_t *pdu); - -static -int ngap_gNB_handle_ng_ENDC_pdusession_modification_confirm(uint32_t assoc_id, - uint32_t stream, - NGAP_NGAP_PDU_t *pdu); - -/* Handlers matrix. Only gNB related procedure present here */ -ngap_message_decoded_callback ngap_messages_callback[][3] = { - { 0, 0, 0 }, /* AMFConfigurationUpdate */ - { 0, 0, 0 }, /* AMFStatusIndication */ - { 0, 0, 0 }, /* CellTrafficTrace */ - { ngap_gNB_handle_deactivate_trace, 0, 0 }, /* DeactivateTrace */ - { ngap_gNB_handle_nas_downlink, 0, 0 }, /* DownlinkNASTransport */ - { 0, 0, 0 }, /* DownlinkNonUEAssociatedNRPPaTransport */ - { 0, 0, 0 }, /* DownlinkRANConfigurationTransfer */ - { 0, 0, 0 }, /* DownlinkRANStatusTransfer */ - { 0, 0, 0 }, /* DownlinkUEAssociatedNRPPaTransport */ - { ngap_gNB_handle_error_indication, 0, 0 }, /* ErrorIndication */ - { 0, 0, 0 }, /* HandoverCancel */ - { 0, 0, 0 }, /* HandoverNotification */ - { 0, 0, 0 }, /* HandoverPreparation */ - { 0, 0, 0 }, /* HandoverResourceAllocation */ - { ngap_gNB_handle_initial_context_request, 0, 0 }, /* InitialContextSetup */ - { 0, 0, 0 }, /* InitialUEMessage */ - { 0, 0, 0 }, /* LocationReportingControl */ - { 0, 0, 0 }, /* LocationReportingFailureIndication */ - { 0, 0, 0 }, /* LocationReport */ - { 0, 0, 0 }, /* NASNonDeliveryIndication */ - { 0, 0, 0 }, /* NGReset */ - { 0, ngap_gNB_handle_ng_setup_response, ngap_gNB_handle_ng_setup_failure }, /* NGSetup */ - { 0, 0, 0 }, /* OverloadStart */ - { 0, 0, 0 }, /* OverloadStop */ - { ngap_gNB_handle_paging, 0, 0 }, /* Paging */ - { 0, ngap_gNB_handle_ng_path_switch_request_ack, ngap_gNB_handle_ng_path_switch_request_failure }, /* PathSwitchRequest */ - { ngap_gNB_handle_pdusession_modify_request, 0, 0 }, /* PDUSessionResourceModify */ - { 0, ngap_gNB_handle_ng_ENDC_pdusession_modification_confirm, 0 }, /* PDUSessionResourceModifyIndication */ - { ngap_gNB_handle_pdusession_release_command, 0, 0 }, /* PDUSessionResourceRelease */ - { ngap_gNB_handle_pdusession_setup_request, 0, 0 }, /* PDUSessionResourceSetup */ - { 0, 0, 0 }, /* PDUSessionResourceNotify */ - { 0, 0, 0 }, /* PrivateMessage */ - { 0, 0, 0 }, /* PWSCancel */ - { 0, 0, 0 }, /* PWSFailureIndication */ - { 0, 0, 0 }, /* PWSRestartIndication */ - { 0, 0, 0 }, /* RANConfigurationUpdate */ - { 0, 0, 0 }, /* RerouteNASRequest */ - { 0, 0, 0 }, /* RRCInactiveTransitionReport */ - { 0, 0, 0 }, /* TraceFailureIndication */ - { ngap_gNB_handle_trace_start, 0, 0 }, /* TraceStart */ - { 0, 0, 0 }, /* UEContextModification */ - { ngap_gNB_handle_ue_context_release_command, 0, 0 }, /* UEContextRelease */ - { 0, 0, 0 }, /* UEContextReleaseRequest */ - { 0, 0, 0 }, /* UERadioCapabilityCheck */ - { 0, 0, 0 }, /* UERadioCapabilityInfoIndication */ - { 0, 0, 0 }, /* UETNLABindingRelease */ - { 0, 0, 0 }, /* UplinkNASTransport */ - { 0, 0, 0 }, /* UplinkNonUEAssociatedNRPPaTransport */ - { 0, 0, 0 }, /* UplinkRANConfigurationTransfer */ - { 0, 0, 0 }, /* UplinkRANStatusTransfer */ - { 0, 0, 0 }, /* UplinkUEAssociatedNRPPaTransport */ - { 0, 0, 0 }, /* WriteReplaceWarning */ - { 0, 0, 0 }, /* SecondaryRATDataUsageReport */ - -}; char *ngap_direction2String(int ngap_dir) { static char *ngap_direction_String[] = { "", /* Nothing */ @@ -209,46 +105,6 @@ void ngap_handle_ng_setup_message(ngap_gNB_amf_data_t *amf_desc_p, int sctp_shut } } -int ngap_gNB_handle_message(uint32_t assoc_id, int32_t stream, - const uint8_t *const data, const uint32_t data_length) { - NGAP_NGAP_PDU_t pdu; - int ret; - DevAssert(data != NULL); - memset(&pdu, 0, sizeof(pdu)); - - if (ngap_gNB_decode_pdu(&pdu, data, data_length) < 0) { - NGAP_ERROR("Failed to decode PDU\n"); - return -1; - } - - /* Checking procedure Code and direction of message */ - if (pdu.choice.initiatingMessage->procedureCode >= sizeof(ngap_messages_callback) / (3 * sizeof( - ngap_message_decoded_callback)) - || (pdu.present > NGAP_NGAP_PDU_PR_unsuccessfulOutcome)) { - NGAP_ERROR("[SCTP %d] Either procedureCode %ld or direction %d exceed expected\n", - assoc_id, pdu.choice.initiatingMessage->procedureCode, pdu.present); - ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, &pdu); - return -1; - } - - /* No handler present. - * This can mean not implemented or no procedure for gNB (wrong direction). - */ - if (ngap_messages_callback[pdu.choice.initiatingMessage->procedureCode][pdu.present - 1] == NULL) { - NGAP_ERROR("[SCTP %d] No handler for procedureCode %ld in %s\n", - assoc_id, pdu.choice.initiatingMessage->procedureCode, - ngap_direction2String(pdu.present - 1)); - ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, &pdu); - return -1; - } - - /* Calling the right handler */ - ret = (*ngap_messages_callback[pdu.choice.initiatingMessage->procedureCode][pdu.present - 1]) - (assoc_id, stream, &pdu); - ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, &pdu); - return ret; -} - static int ngap_gNB_handle_ng_setup_failure(uint32_t assoc_id, uint32_t stream, @@ -378,10 +234,8 @@ int ngap_gNB_handle_ng_setup_response(uint32_t assoc_id, NGAP_ProtocolIE_ID_id_AMFName, true); if (ie) { - amf_desc_p->amf_name = calloc(ie->value.choice.AMFName.size + 1, sizeof(char)); - memcpy(amf_desc_p->amf_name, ie->value.choice.AMFName.buf, - ie->value.choice.AMFName.size); - /* Convert the amf name to a printable string */ + amf_desc_p->amf_name = malloc(ie->value.choice.AMFName.size + 1); + memcpy(amf_desc_p->amf_name, ie->value.choice.AMFName.buf, ie->value.choice.AMFName.size); amf_desc_p->amf_name[ie->value.choice.AMFName.size] = '\0'; } @@ -824,18 +678,12 @@ int ngap_gNB_handle_error_indication(uint32_t assoc_id, return 0; } - -static -int ngap_gNB_handle_initial_context_request(uint32_t assoc_id, - uint32_t stream, - NGAP_NGAP_PDU_t *pdu) { - +static int ngap_gNB_handle_initial_context_request(uint32_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu) +{ int i; - ngap_gNB_amf_data_t *amf_desc_p = NULL; - ngap_gNB_ue_context_t *ue_desc_p = NULL; + ngap_gNB_amf_data_t *amf_desc_p = NULL; NGAP_InitialContextSetupRequest_t *container; NGAP_InitialContextSetupRequestIEs_t *ie; - NGAP_RAN_UE_NGAP_ID_t ran_ue_ngap_id; uint64_t amf_ue_ngap_id; DevAssert(pdu != NULL); container = &pdu->choice.initiatingMessage->value.choice.InitialContextSetupRequest; @@ -850,27 +698,20 @@ int ngap_gNB_handle_initial_context_request(uint32_t assoc_id, NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_InitialContextSetupRequestIEs_t, ie, container, NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID, true); - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ - asn_INTEGER2ulong(&(ie->value.choice.AMF_UE_NGAP_ID), &amf_ue_ngap_id); - } else { - return -1; - } + asn_INTEGER2ulong(&(ie->value.choice.AMF_UE_NGAP_ID), &amf_ue_ngap_id); /* id-RAN-UE-NGAP-ID */ NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_InitialContextSetupRequestIEs_t, ie, container, NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID, true); - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ - ran_ue_ngap_id = ie->value.choice.RAN_UE_NGAP_ID; - - if ((ue_desc_p = ngap_gNB_get_ue_context(amf_desc_p->ngap_gNB_instance, - ran_ue_ngap_id)) == NULL) { - NGAP_ERROR("[SCTP %d] Received initial context setup request for non " - "existing UE context 0x%06lx\n", assoc_id, - ran_ue_ngap_id); - return -1; - } - } else { + const NGAP_RAN_UE_NGAP_ID_t ran_ue_ngap_id = ie->value.choice.RAN_UE_NGAP_ID; + ngap_gNB_ue_context_t *ue_desc_p = ngap_get_ue_context(ran_ue_ngap_id); + if (!ue_desc_p) { + NGAP_ERROR( + "[SCTP %d] Received initial context setup request for non " + "existing UE context 0x%06lx\n", + assoc_id, + ran_ue_ngap_id); return -1; } @@ -886,8 +727,7 @@ int ngap_gNB_handle_initial_context_request(uint32_t assoc_id, MessageDef *message_p = itti_alloc_new_message(TASK_NGAP, 0, NGAP_INITIAL_CONTEXT_SETUP_REQ); ngap_initial_context_setup_req_t * msg=&NGAP_INITIAL_CONTEXT_SETUP_REQ(message_p); - msg->ue_initial_id = ue_desc_p->ue_initial_id; - ue_desc_p->ue_initial_id = 0; + memset(msg, 0, sizeof(*msg)); msg->gNB_ue_ngap_id = ue_desc_p->gNB_ue_ngap_id; msg->amf_ue_ngap_id = ue_desc_p->amf_ue_ngap_id; /* id-UEAggregateMaximumBitRate */ @@ -908,154 +748,26 @@ int ngap_gNB_handle_initial_context_request(uint32_t assoc_id, NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_InitialContextSetupRequestIEs_t, ie, container, NGAP_ProtocolIE_ID_id_GUAMI, true); - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ TBCD_TO_MCC_MNC(&ie->value.choice.GUAMI.pLMNIdentity, msg->guami.mcc, msg->guami.mnc, msg->guami.mnc_len); OCTET_STRING_TO_INT8(&ie->value.choice.GUAMI.aMFRegionID, msg->guami.amf_region_id); OCTET_STRING_TO_INT16(&ie->value.choice.GUAMI.aMFSetID, msg->guami.amf_set_id); OCTET_STRING_TO_INT8(&ie->value.choice.GUAMI.aMFPointer, msg->guami.amf_pointer); - } else {/* ie != NULL */ - return -1; - } - NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_InitialContextSetupRequestIEs_t, ie, container, - NGAP_ProtocolIE_ID_id_PDUSessionResourceSetupListCxtReq, false); + NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_InitialContextSetupRequestIEs_t, ie, container, NGAP_ProtocolIE_ID_id_PDUSessionResourceSetupListCxtReq, false); + if (ie != NULL) { + msg->nb_of_pdusessions = ie->value.choice.PDUSessionResourceSetupListCxtReq.list.count; - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ - msg->nb_of_pdusessions = - ie->value.choice.PDUSessionResourceSetupListCxtReq.list.count; + for (i = 0; i < ie->value.choice.PDUSessionResourceSetupListCxtReq.list.count; i++) { + NGAP_PDUSessionResourceSetupItemCxtReq_t *item_p = ie->value.choice.PDUSessionResourceSetupListCxtReq.list.array[i]; + msg->pdusession_param[i].pdusession_id = item_p->pDUSessionID; - for (i = 0; i < ie->value.choice.PDUSessionResourceSetupListCxtReq.list.count; i++) { - NGAP_PDUSessionResourceSetupItemCxtReq_t *item_p; - asn_dec_rval_t dec_rval; - NGAP_PDUSessionResourceSetupRequestTransfer_t *pdusessionTransfer_p = NULL; - NGAP_PDUSessionResourceSetupRequestTransferIEs_t *pdusessionTransfer_ies = NULL; - - item_p = (NGAP_PDUSessionResourceSetupItemCxtReq_t *)ie->value.choice.PDUSessionResourceSetupListCxtReq.list.array[i]; - msg->pdusession_param[i].pdusession_id = item_p->pDUSessionID; - - if (item_p->nAS_PDU != NULL) { - /* Only copy NAS pdu if present */ - msg->pdusession_param[i].nas_pdu.length = item_p->nAS_PDU->size; - msg->pdusession_param[i].nas_pdu.buffer = - malloc(sizeof(uint8_t) * item_p->nAS_PDU->size); - memcpy(msg->pdusession_param[i].nas_pdu.buffer, - item_p->nAS_PDU->buf, item_p->nAS_PDU->size); - NGAP_DEBUG("Received NAS message with the PDUSESSION setup procedure\n"); - } else { - msg->pdusession_param[i].nas_pdu.length = 0; - msg->pdusession_param[i].nas_pdu.buffer = NULL; + allocCopy(&msg->pdusession_param[i].nas_pdu, *item_p->nAS_PDU); + allocCopy(&msg->pdusession_param[i].pdusessionTransfer, item_p->pDUSessionResourceSetupRequestTransfer); } + } - - dec_rval = aper_decode(NULL, - &asn_DEF_NGAP_PDUSessionResourceSetupRequestTransfer, - (void **)&pdusessionTransfer_p, - item_p->pDUSessionResourceSetupRequestTransfer.buf, - item_p->pDUSessionResourceSetupRequestTransfer.size, 0, 0); - - if(dec_rval.code != RC_OK) { - NGAP_ERROR("could not decode PDUSessionResourceSetupRequestTransfer\n"); - return -1; - } - - for(int j=0; j< pdusessionTransfer_p->protocolIEs.list.count; j++) { - pdusessionTransfer_ies = pdusessionTransfer_p->protocolIEs.list.array[j]; - switch(pdusessionTransfer_ies->id) { - /* optional PDUSessionAggregateMaximumBitRate */ - case NGAP_ProtocolIE_ID_id_PDUSessionAggregateMaximumBitRate: - break; - - /* mandatory UL-NGU-UP-TNLInformation */ - case NGAP_ProtocolIE_ID_id_UL_NGU_UP_TNLInformation: - { - NGAP_GTPTunnel_t *gTPTunnel_p; - gTPTunnel_p = pdusessionTransfer_ies->value.choice.UPTransportLayerInformation.choice.gTPTunnel; - - /* Set the transport layer address */ - memcpy(msg->pdusession_param[i].upf_addr.buffer, - gTPTunnel_p->transportLayerAddress.buf, gTPTunnel_p->transportLayerAddress.size); - - msg->pdusession_param[i].upf_addr.length = - gTPTunnel_p->transportLayerAddress.size * 8 - gTPTunnel_p->transportLayerAddress.bits_unused; - - /* GTP tunnel endpoint ID */ - OCTET_STRING_TO_INT32(&gTPTunnel_p->gTP_TEID, msg->pdusession_param[i].gtp_teid); - } - - break; - - /* optional AdditionalUL-NGU-UP-TNLInformation */ - case NGAP_ProtocolIE_ID_id_AdditionalUL_NGU_UP_TNLInformation: - break; - - /* optional DataForwardingNotPossible */ - case NGAP_ProtocolIE_ID_id_DataForwardingNotPossible: - break; - - /* mandatory PDUSessionType */ - case NGAP_ProtocolIE_ID_id_PDUSessionType: - msg->pdusession_param[i].upf_addr.pdu_session_type = (uint8_t)pdusessionTransfer_ies->value.choice.PDUSessionType; - break; - - /* optional SecurityIndication */ - case NGAP_ProtocolIE_ID_id_SecurityIndication: - break; - - /* optional NetworkInstance */ - case NGAP_ProtocolIE_ID_id_NetworkInstance: - break; - - /* mandatory QosFlowSetupRequestList */ - case NGAP_ProtocolIE_ID_id_QosFlowSetupRequestList: - { - NGAP_QosFlowSetupRequestItem_t *qosFlowItem_p; - - NGAP_DEBUG("QosFlowSetupRequestList.list.count %d\n", pdusessionTransfer_ies->value.choice.QosFlowSetupRequestList.list.count); - DevAssert(pdusessionTransfer_ies->value.choice.QosFlowSetupRequestList.list.count > 0); - DevAssert(pdusessionTransfer_ies->value.choice.QosFlowSetupRequestList.list.count <= NGAP_maxnoofQosFlows); - - msg->pdusession_param[i].nb_qos = pdusessionTransfer_ies->value.choice.QosFlowSetupRequestList.list.count; - - for(int qosIdx = 0; qosIdx < pdusessionTransfer_ies->value.choice.QosFlowSetupRequestList.list.count; qosIdx++) { - qosFlowItem_p = pdusessionTransfer_ies->value.choice.QosFlowSetupRequestList.list.array[qosIdx]; - - /* Set the QOS informations */ - msg->pdusession_param[i].qos[qosIdx].qfi = (uint8_t)qosFlowItem_p->qosFlowIdentifier; - if(qosFlowItem_p->qosFlowLevelQosParameters.qosCharacteristics.present == NGAP_QosCharacteristics_PR_nonDynamic5QI){ - if(qosFlowItem_p->qosFlowLevelQosParameters.qosCharacteristics.choice.nonDynamic5QI != NULL){ - msg->pdusession_param[i].qos[qosIdx].fiveQI = - (uint64_t)qosFlowItem_p->qosFlowLevelQosParameters.qosCharacteristics.choice.nonDynamic5QI->fiveQI; - } - } - - msg->pdusession_param[i].qos[qosIdx].allocation_retention_priority.priority_level = - qosFlowItem_p->qosFlowLevelQosParameters.allocationAndRetentionPriority.priorityLevelARP; - msg->pdusession_param[i].qos[qosIdx].allocation_retention_priority.pre_emp_capability = - qosFlowItem_p->qosFlowLevelQosParameters.allocationAndRetentionPriority.pre_emptionCapability; - msg->pdusession_param[i].qos[qosIdx].allocation_retention_priority.pre_emp_vulnerability = - qosFlowItem_p->qosFlowLevelQosParameters.allocationAndRetentionPriority.pre_emptionVulnerability; - } - } - - break; - - /* optional CommonNetworkInstance */ - case NGAP_ProtocolIE_ID_id_CommonNetworkInstance: - break; - - default: - NGAP_ERROR("Not found protocolIEs id %ld\n", pdusessionTransfer_ies->id); - return -1; - } - } - - } /* for i... */ - } else {/* ie != NULL */ - NGAP_ERROR("Not found NGAP_ProtocolIE_ID_id_PDUSessionResourceSetupListCxtReq\n"); - } - /* id-AllowedNSSAI */ NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_InitialContextSetupRequestIEs_t, ie, container, NGAP_ProtocolIE_ID_id_AllowedNSSAI, true); @@ -1067,25 +779,8 @@ int ngap_gNB_handle_initial_context_request(uint32_t assoc_id, //DevAssert(ie->value.choice.AllowedNSSAI.list.count > 0); //DevAssert(ie->value.choice.AllowedNSSAI.list.count <= NGAP_maxnoofAllowedS_NSSAIs); - if (ie == NULL) { - NGAP_WARN("AllowedNSSAI not present, forging 2 NSSAI\n"); + AssertFatal(ie, "AllowedNSSAI not present, forging 2 NSSAI\n"); - msg->nb_allowed_nssais = 2; - - msg->allowed_nssai[0].sST = 01; - - msg->allowed_nssai[0].sD_flag = 1; - msg->allowed_nssai[0].sD[0] = 01; - msg->allowed_nssai[0].sD[1] = 02; - msg->allowed_nssai[0].sD[2] = 03; - - msg->allowed_nssai[1].sST = 01; - - msg->allowed_nssai[1].sD_flag = 1; - msg->allowed_nssai[1].sD[0] = 00;//11; - msg->allowed_nssai[1].sD[1] = 00;//22; - msg->allowed_nssai[1].sD[2] = 01;//33; - } else { NGAP_INFO("AllowedNSSAI.list.count %d\n", ie->value.choice.AllowedNSSAI.list.count); msg->nb_allowed_nssais = ie->value.choice.AllowedNSSAI.list.count; @@ -1096,88 +791,56 @@ int ngap_gNB_handle_initial_context_request(uint32_t assoc_id, if(allow_nssai_item_p->s_NSSAI.sD != NULL) { msg->allowed_nssai[i].sD_flag = 1; - msg->allowed_nssai[i].sD[0] = allow_nssai_item_p->s_NSSAI.sD->buf[0]; - msg->allowed_nssai[i].sD[1] = allow_nssai_item_p->s_NSSAI.sD->buf[1]; - msg->allowed_nssai[i].sD[2] = allow_nssai_item_p->s_NSSAI.sD->buf[2]; + memcpy(msg->allowed_nssai[i].sD, allow_nssai_item_p->s_NSSAI.sD, sizeof(msg->allowed_nssai[i].sD)); } } - } - //} else {/* ie != NULL */ - // return -1; - //} /* id-UESecurityCapabilities */ NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_InitialContextSetupRequestIEs_t, ie, container, NGAP_ProtocolIE_ID_id_UESecurityCapabilities, true); - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ msg->security_capabilities.nRencryption_algorithms = BIT_STRING_to_uint16(&ie->value.choice.UESecurityCapabilities.nRencryptionAlgorithms); msg->security_capabilities.nRintegrity_algorithms = BIT_STRING_to_uint16(&ie->value.choice.UESecurityCapabilities.nRintegrityProtectionAlgorithms); msg->security_capabilities.eUTRAencryption_algorithms = BIT_STRING_to_uint16(&ie->value.choice.UESecurityCapabilities.eUTRAencryptionAlgorithms); - msg->security_capabilities.eUTRAintegrity_algorithms = - BIT_STRING_to_uint16(&ie->value.choice.UESecurityCapabilities.eUTRAintegrityProtectionAlgorithms); - } else {/* ie != NULL */ - return -1; - } + msg->security_capabilities.eUTRAintegrity_algorithms = BIT_STRING_to_uint16(&ie->value.choice.UESecurityCapabilities.eUTRAintegrityProtectionAlgorithms); - /* id-SecurityKey : Copy the security key */ - NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_InitialContextSetupRequestIEs_t, ie, container, - NGAP_ProtocolIE_ID_id_SecurityKey, true); + /* id-SecurityKey : Copy the security key */ + NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_InitialContextSetupRequestIEs_t, ie, container, NGAP_ProtocolIE_ID_id_SecurityKey, true); + memcpy(&msg->security_key, ie->value.choice.SecurityKey.buf, ie->value.choice.SecurityKey.size); - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ - memcpy(&msg->security_key, - ie->value.choice.SecurityKey.buf, ie->value.choice.SecurityKey.size); - - } else {/* ie != NULL */ - return -1; - } + /* id-MobilityRestrictionList */ + NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_InitialContextSetupRequestIEs_t, ie, container, NGAP_ProtocolIE_ID_id_MobilityRestrictionList, false); - /* id-MobilityRestrictionList */ - NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_InitialContextSetupRequestIEs_t, ie, container, - NGAP_ProtocolIE_ID_id_MobilityRestrictionList, false); - - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ - NGAP_MobilityRestrictionList_t *mobility_rest_list_p = NULL; - mobility_rest_list_p = &ie->value.choice.MobilityRestrictionList; + if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ + NGAP_MobilityRestrictionList_t *mobility_rest_list_p = NULL; + mobility_rest_list_p = &ie->value.choice.MobilityRestrictionList; - msg->mobility_restriction_flag = 1; - TBCD_TO_MCC_MNC(&mobility_rest_list_p->servingPLMN, - msg->mobility_restriction.serving_plmn.mcc, - msg->mobility_restriction.serving_plmn.mnc, - msg->mobility_restriction.serving_plmn.mnc_digit_length); + msg->mobility_restriction_flag = 1; + TBCD_TO_MCC_MNC( + &mobility_rest_list_p->servingPLMN, msg->mobility_restriction.serving_plmn.mcc, msg->mobility_restriction.serving_plmn.mnc, msg->mobility_restriction.serving_plmn.mnc_digit_length); } /* id-NAS-PDU */ NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_InitialContextSetupRequestIEs_t, ie, container, NGAP_ProtocolIE_ID_id_NAS_PDU, false); - - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ - if(ie->value.choice.NAS_PDU.size > 0) { - msg->nas_pdu_flag = 1; - msg->nas_pdu.length = ie->value.choice.NAS_PDU.size; - msg->nas_pdu.buffer = malloc(sizeof(uint8_t) * ie->value.choice.NAS_PDU.size); - memcpy(msg->nas_pdu.buffer, - ie->value.choice.NAS_PDU.buf, ie->value.choice.NAS_PDU.size); - } - } + + if (ie) + allocCopy(&msg->nas_pdu, ie->value.choice.NAS_PDU); itti_send_msg_to_task(TASK_RRC_GNB, ue_desc_p->gNB_instance->instance, message_p); return 0; } - static int ngap_gNB_handle_ue_context_release_command(uint32_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu) { - - ngap_gNB_amf_data_t *amf_desc_p = NULL; - ngap_gNB_ue_context_t *ue_desc_p = NULL; + ngap_gNB_amf_data_t *amf_desc_p = NULL; MessageDef *message_p = NULL; uint64_t amf_ue_ngap_id; NGAP_RAN_UE_NGAP_ID_t gnb_ue_ngap_id; @@ -1195,47 +858,43 @@ int ngap_gNB_handle_ue_context_release_command(uint32_t assoc_id, NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_UEContextReleaseCommand_IEs_t, ie, container, NGAP_ProtocolIE_ID_id_UE_NGAP_IDs, true); - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ - switch (ie->value.choice.UE_NGAP_IDs.present) { - case NGAP_UE_NGAP_IDs_PR_uE_NGAP_ID_pair: - gnb_ue_ngap_id = ie->value.choice.UE_NGAP_IDs.choice.uE_NGAP_ID_pair->rAN_UE_NGAP_ID; - asn_INTEGER2ulong(&(ie->value.choice.UE_NGAP_IDs.choice.uE_NGAP_ID_pair->aMF_UE_NGAP_ID), &amf_ue_ngap_id); + switch (ie->value.choice.UE_NGAP_IDs.present) { + case NGAP_UE_NGAP_IDs_PR_uE_NGAP_ID_pair: + gnb_ue_ngap_id = ie->value.choice.UE_NGAP_IDs.choice.uE_NGAP_ID_pair->rAN_UE_NGAP_ID; + asn_INTEGER2ulong(&(ie->value.choice.UE_NGAP_IDs.choice.uE_NGAP_ID_pair->aMF_UE_NGAP_ID), &amf_ue_ngap_id); + ngap_gNB_ue_context_t *ue_desc_p = ngap_get_ue_context(gnb_ue_ngap_id); + if (!ue_desc_p) { + NGAP_ERROR( + "[SCTP %d] Received UE context release command for non " + "existing UE context 0x%06lx\n", + assoc_id, + gnb_ue_ngap_id); + return -1; + } else { + message_p = itti_alloc_new_message(TASK_NGAP, 0, NGAP_UE_CONTEXT_RELEASE_COMMAND); - if ((ue_desc_p = ngap_gNB_get_ue_context(amf_desc_p->ngap_gNB_instance, - gnb_ue_ngap_id)) == NULL) { - NGAP_ERROR("[SCTP %d] Received UE context release command for non " - "existing UE context 0x%06lx\n", - assoc_id, - gnb_ue_ngap_id); - return -1; - } else { - message_p = itti_alloc_new_message(TASK_NGAP, 0, NGAP_UE_CONTEXT_RELEASE_COMMAND); - - if (ue_desc_p->amf_ue_ngap_id == 0) { // case of Detach Request and switch off from RRC_IDLE mode - ue_desc_p->amf_ue_ngap_id = amf_ue_ngap_id; - } - - NGAP_UE_CONTEXT_RELEASE_COMMAND(message_p).gNB_ue_ngap_id = gnb_ue_ngap_id; - itti_send_msg_to_task(TASK_RRC_GNB, ue_desc_p->gNB_instance->instance, message_p); - return 0; + if (ue_desc_p->amf_ue_ngap_id == 0) { // case of Detach Request and switch off from RRC_IDLE mode + ue_desc_p->amf_ue_ngap_id = amf_ue_ngap_id; } - break; + NGAP_UE_CONTEXT_RELEASE_COMMAND(message_p).gNB_ue_ngap_id = gnb_ue_ngap_id; + itti_send_msg_to_task(TASK_RRC_GNB, ue_desc_p->gNB_instance->instance, message_p); + return 0; + } + + break; //#warning "TODO mapping amf_ue_ngap_id gnb_ue_ngap_id?" - case NGAP_UE_NGAP_IDs_PR_aMF_UE_NGAP_ID: - asn_INTEGER2ulong(&(ie->value.choice.UE_NGAP_IDs.choice.aMF_UE_NGAP_ID), &amf_ue_ngap_id); - NGAP_ERROR("TO DO mapping amf_ue_ngap_id gnb_ue_ngap_id"); - (void)amf_ue_ngap_id; /* TODO: remove - it's to remove gcc warning about unused var */ + case NGAP_UE_NGAP_IDs_PR_aMF_UE_NGAP_ID: + asn_INTEGER2ulong(&(ie->value.choice.UE_NGAP_IDs.choice.aMF_UE_NGAP_ID), &amf_ue_ngap_id); + NGAP_ERROR("TO DO mapping amf_ue_ngap_id gnb_ue_ngap_id"); + (void)amf_ue_ngap_id; /* TODO: remove - it's to remove gcc warning about unused var */ - case NGAP_UE_NGAP_IDs_PR_NOTHING: - default: - NGAP_ERROR("NGAP_UE_CONTEXT_RELEASE_COMMAND not processed, missing info elements"); - return -1; - } - } else { - return -1; + case NGAP_UE_NGAP_IDs_PR_NOTHING: + default: + NGAP_ERROR("NGAP_UE_CONTEXT_RELEASE_COMMAND not processed, missing info elements"); + return -1; } NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_UEContextReleaseCommand_IEs_t, ie, container, @@ -1253,7 +912,7 @@ int ngap_gNB_handle_pdusession_setup_request(uint32_t assoc_id, uint64_t amf_ue_ngap_id; NGAP_RAN_UE_NGAP_ID_t ran_ue_ngap_id; ngap_gNB_amf_data_t *amf_desc_p = NULL; - ngap_gNB_ue_context_t *ue_desc_p = NULL; + NGAP_PDUSessionResourceSetupRequest_t *container; NGAP_PDUSessionResourceSetupRequestIEs_t *ie; DevAssert(pdu != NULL); @@ -1266,40 +925,21 @@ int ngap_gNB_handle_pdusession_setup_request(uint32_t assoc_id, } /* id-AMF-UE-NGAP-ID */ - NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PDUSessionResourceSetupRequestIEs_t, ie, container, - NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID, true); - - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ - asn_INTEGER2ulong(&(ie->value.choice.AMF_UE_NGAP_ID), &amf_ue_ngap_id); - } else { - return -1; - } + NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PDUSessionResourceSetupRequestIEs_t, ie, container, NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID, true); + asn_INTEGER2ulong(&(ie->value.choice.AMF_UE_NGAP_ID), &amf_ue_ngap_id); /* id-gNB-UE-NGAP-ID */ - NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PDUSessionResourceSetupRequestIEs_t, ie, container, - NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID, true); + NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PDUSessionResourceSetupRequestIEs_t, ie, container, NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID, true); + ran_ue_ngap_id = ie->value.choice.RAN_UE_NGAP_ID; - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ - ran_ue_ngap_id = ie->value.choice.RAN_UE_NGAP_ID; - } else { - return -1; - } - - if ((ue_desc_p = ngap_gNB_get_ue_context(amf_desc_p->ngap_gNB_instance, - ran_ue_ngap_id)) == NULL) { + ngap_gNB_ue_context_t *ue_desc_p = ngap_get_ue_context(ran_ue_ngap_id); + if (!ue_desc_p) { NGAP_ERROR("[SCTP %d] Received pdu session resource setup request for non " "existing UE context 0x%06lx\n", assoc_id, ran_ue_ngap_id); return -1; } - /* Initial context request = UE-related procedure -> stream != 0 */ - // if (stream == 0) { - // NGAP_ERROR("[SCTP %d] Received UE-related procedure on stream (%d)\n", - // assoc_id, stream); - // return -1; - // } - ue_desc_p->rx_stream = stream; if ( ue_desc_p->amf_ue_ngap_id != amf_ue_ngap_id) { @@ -1309,8 +949,7 @@ int ngap_gNB_handle_pdusession_setup_request(uint32_t assoc_id, MessageDef * message_p = itti_alloc_new_message(TASK_NGAP, 0, NGAP_PDUSESSION_SETUP_REQ); ngap_pdusession_setup_req_t * msg=&NGAP_PDUSESSION_SETUP_REQ(message_p); - msg->ue_initial_id = ue_desc_p->ue_initial_id; - ue_desc_p->ue_initial_id = 0; + memset(msg, 0, sizeof(*msg)); msg->gNB_ue_ngap_id = ue_desc_p->gNB_ue_ngap_id; msg->amf_ue_ngap_id = ue_desc_p->amf_ue_ngap_id; @@ -1325,147 +964,26 @@ int ngap_gNB_handle_pdusession_setup_request(uint32_t assoc_id, NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PDUSessionResourceSetupRequestIEs_t, ie, container, NGAP_ProtocolIE_ID_id_PDUSessionResourceSetupListSUReq, true); - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ - msg->nb_pdusessions_tosetup = - ie->value.choice.PDUSessionResourceSetupListSUReq.list.count; + msg->nb_pdusessions_tosetup = ie->value.choice.PDUSessionResourceSetupListSUReq.list.count; - for (int i = 0; i < ie->value.choice.PDUSessionResourceSetupListSUReq.list.count; i++) { - NGAP_PDUSessionResourceSetupItemSUReq_t *item_p; - asn_dec_rval_t dec_rval; - NGAP_PDUSessionResourceSetupRequestTransfer_t *pdusessionTransfer_p = NULL; - NGAP_PDUSessionResourceSetupRequestTransferIEs_t *pdusessionTransfer_ies = NULL; + for (int i = 0; i < ie->value.choice.PDUSessionResourceSetupListSUReq.list.count; i++) { + NGAP_PDUSessionResourceSetupItemSUReq_t *item_p = ie->value.choice.PDUSessionResourceSetupListSUReq.list.array[i]; + msg->pdusession_setup_params[i].pdusession_id = item_p->pDUSessionID; - // PDU session ID - item_p = (NGAP_PDUSessionResourceSetupItemSUReq_t *)ie->value.choice.PDUSessionResourceSetupListSUReq.list.array[i]; - msg->pdusession_setup_params[i].pdusession_id = item_p->pDUSessionID; + // S-NSSAI + OCTET_STRING_TO_INT8(&item_p->s_NSSAI.sST, msg->allowed_nssai[i].sST); + if (item_p->s_NSSAI.sD != NULL) { + msg->allowed_nssai[i].sD_flag = 1; + msg->allowed_nssai[i].sD[0] = item_p->s_NSSAI.sD->buf[0]; + msg->allowed_nssai[i].sD[1] = item_p->s_NSSAI.sD->buf[1]; + msg->allowed_nssai[i].sD[2] = item_p->s_NSSAI.sD->buf[2]; + } - // S-NSSAI - OCTET_STRING_TO_INT8(&item_p->s_NSSAI.sST, msg->allowed_nssai[i].sST); - if(item_p->s_NSSAI.sD != NULL) { - msg->allowed_nssai[i].sD_flag = 1; - msg->allowed_nssai[i].sD[0] = item_p->s_NSSAI.sD->buf[0]; - msg->allowed_nssai[i].sD[1] = item_p->s_NSSAI.sD->buf[1]; - msg->allowed_nssai[i].sD[2] = item_p->s_NSSAI.sD->buf[2]; - } - - // check for the NAS PDU - if (item_p->pDUSessionNAS_PDU->size > 0 ) { - msg->pdusession_setup_params[i].nas_pdu.length = item_p->pDUSessionNAS_PDU->size; - msg->pdusession_setup_params[i].nas_pdu.buffer = malloc(sizeof(uint8_t) * item_p->pDUSessionNAS_PDU->size); - memcpy(msg->pdusession_setup_params[i].nas_pdu.buffer, - item_p->pDUSessionNAS_PDU->buf, item_p->pDUSessionNAS_PDU->size); - // NGAP_INFO("received a NAS PDU with size %d (%02x.%02x)\n",msg->pdusession_setup_params[i].nas_pdu.length, item_p->nAS_PDU.buf[0], item_p->nAS_PDU.buf[1]); - } else { - msg->pdusession_setup_params[i].nas_pdu.length = 0; - msg->pdusession_setup_params[i].nas_pdu.buffer = NULL; - NGAP_WARN("NAS PDU is not provided, generate a PDUSESSION_SETUP Failure (TBD) back to AMF \n"); - } - - dec_rval = aper_decode(NULL, - &asn_DEF_NGAP_PDUSessionResourceSetupRequestTransfer, - (void **)&pdusessionTransfer_p, - item_p->pDUSessionResourceSetupRequestTransfer.buf, - item_p->pDUSessionResourceSetupRequestTransfer.size, 0, 0); - - if(dec_rval.code != RC_OK) { - NGAP_ERROR("could not decode PDUSessionResourceSetupRequestTransfer\n"); - return -1; - } - - for(int j=0; j< pdusessionTransfer_p->protocolIEs.list.count; j++) { - pdusessionTransfer_ies = pdusessionTransfer_p->protocolIEs.list.array[j]; - - switch(pdusessionTransfer_ies->id) { - /* optional PDUSessionAggregateMaximumBitRate */ - case NGAP_ProtocolIE_ID_id_PDUSessionAggregateMaximumBitRate: - break; - - /* mandatory UL-NGU-UP-TNLInformation */ - case NGAP_ProtocolIE_ID_id_UL_NGU_UP_TNLInformation: - { - NGAP_GTPTunnel_t *gTPTunnel_p; - gTPTunnel_p = pdusessionTransfer_ies->value.choice.UPTransportLayerInformation.choice.gTPTunnel; - /* The transport layer address for the IP packets */ - OCTET_STRING_TO_INT32(&gTPTunnel_p->gTP_TEID, msg->pdusession_setup_params[i].gtp_teid); - msg->pdusession_setup_params[i].upf_addr.length = - gTPTunnel_p->transportLayerAddress.size * 8 - gTPTunnel_p->transportLayerAddress.bits_unused; - memcpy(msg->pdusession_setup_params[i].upf_addr.buffer , - gTPTunnel_p->transportLayerAddress.buf, gTPTunnel_p->transportLayerAddress.size); - } - break; - - /* optional AdditionalUL-NGU-UP-TNLInformation */ - case NGAP_ProtocolIE_ID_id_AdditionalUL_NGU_UP_TNLInformation: - break; - - /* optional DataForwardingNotPossible */ - case NGAP_ProtocolIE_ID_id_DataForwardingNotPossible: - break; - - /* mandatory PDUSessionType */ - case NGAP_ProtocolIE_ID_id_PDUSessionType: - msg->pdusession_setup_params[i].upf_addr.pdu_session_type = (uint8_t)pdusessionTransfer_ies->value.choice.PDUSessionType; - break; - - /* optional SecurityIndication */ - case NGAP_ProtocolIE_ID_id_SecurityIndication: - break; - - /* optional NetworkInstance */ - case NGAP_ProtocolIE_ID_id_NetworkInstance: - break; - - /* mandatory QosFlowSetupRequestList */ - case NGAP_ProtocolIE_ID_id_QosFlowSetupRequestList: - { - NGAP_QosFlowSetupRequestItem_t *qosFlowItem_p; - - NGAP_DEBUG("servedGUAMIs.list.count %d\n", pdusessionTransfer_ies->value.choice.QosFlowSetupRequestList.list.count); - DevAssert(pdusessionTransfer_ies->value.choice.QosFlowSetupRequestList.list.count > 0); - DevAssert(pdusessionTransfer_ies->value.choice.QosFlowSetupRequestList.list.count <= NGAP_maxnoofQosFlows); - - msg->pdusession_setup_params[i].nb_qos = pdusessionTransfer_ies->value.choice.QosFlowSetupRequestList.list.count; - - for(int qosIdx = 0; qosIdx < pdusessionTransfer_ies->value.choice.QosFlowSetupRequestList.list.count; qosIdx++){ - qosFlowItem_p = pdusessionTransfer_ies->value.choice.QosFlowSetupRequestList.list.array[qosIdx]; - - /* Set the QOS informations */ - msg->pdusession_setup_params[i].qos[qosIdx].qfi = (uint8_t)qosFlowItem_p->qosFlowIdentifier; - if(qosFlowItem_p->qosFlowLevelQosParameters.qosCharacteristics.present == NGAP_QosCharacteristics_PR_nonDynamic5QI){ - msg->pdusession_setup_params[i].qos[qosIdx].fiveQI_type = non_dynamic; - if(qosFlowItem_p->qosFlowLevelQosParameters.qosCharacteristics.choice.nonDynamic5QI != NULL){ - msg->pdusession_setup_params[i].qos[qosIdx].fiveQI = - (uint64_t)qosFlowItem_p->qosFlowLevelQosParameters.qosCharacteristics.choice.nonDynamic5QI->fiveQI; - } - } else if (qosFlowItem_p->qosFlowLevelQosParameters.qosCharacteristics.present == NGAP_QosCharacteristics_PR_dynamic5QI) - { - msg->pdusession_setup_params[i].qos[qosIdx].fiveQI_type = dynamic; - } - msg->pdusession_setup_params[i].qos[qosIdx].allocation_retention_priority.priority_level = - qosFlowItem_p->qosFlowLevelQosParameters.allocationAndRetentionPriority.priorityLevelARP; - msg->pdusession_setup_params[i].qos[qosIdx].allocation_retention_priority.pre_emp_capability = - qosFlowItem_p->qosFlowLevelQosParameters.allocationAndRetentionPriority.pre_emptionCapability; - msg->pdusession_setup_params[i].qos[qosIdx].allocation_retention_priority.pre_emp_vulnerability = - qosFlowItem_p->qosFlowLevelQosParameters.allocationAndRetentionPriority.pre_emptionVulnerability; - } - } - break; - - /* optional CommonNetworkInstance */ - case NGAP_ProtocolIE_ID_id_CommonNetworkInstance: - break; - - default: - NGAP_ERROR("could not found protocolIEs id %ld\n", pdusessionTransfer_ies->id); - return -1; - } - }/* for j... */ - } /* for i... */ - itti_send_msg_to_task(TASK_RRC_GNB, ue_desc_p->gNB_instance->instance, message_p); - }else {/* ie == NULL */ - NGAP_ERROR("could not found NGAP_ProtocolIE_ID_id_PDUSessionResourceSetupListSUReq\n"); - return -1; + allocCopy(&msg->pdusession_setup_params[i].nas_pdu, *item_p->pDUSessionNAS_PDU); + allocCopy(&msg->pdusession_setup_params[i].pdusessionTransfer, item_p->pDUSessionResourceSetupRequestTransfer); } + itti_send_msg_to_task(TASK_RRC_GNB, ue_desc_p->gNB_instance->instance, message_p); + return 0; } @@ -1507,64 +1025,47 @@ int ngap_gNB_handle_paging(uint32_t assoc_id, MessageDef *message_p = itti_alloc_new_message(TASK_NGAP, 0, NGAP_PAGING_IND); ngap_paging_ind_t * msg=&NGAP_PAGING_IND(message_p); - - /* convert NGAP_PagingIEs_t to ngap_paging_ind_t */ - /* id-UEIdentityIndexValue : convert UE Identity Index value */ - NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PagingIEs_t, ie, container, - NGAP_ProtocolIE_ID_id_UEPagingIdentity, true); + memset(msg, 0, sizeof(*msg)); - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ - OCTET_STRING_TO_INT16(&ie->value.choice.UEPagingIdentity.choice.fiveG_S_TMSI->aMFSetID, msg->ue_paging_identity.s_tmsi.amf_set_id); - OCTET_STRING_TO_INT8(&ie->value.choice.UEPagingIdentity.choice.fiveG_S_TMSI->aMFPointer, msg->ue_paging_identity.s_tmsi.amf_pointer); - OCTET_STRING_TO_INT32(&ie->value.choice.UEPagingIdentity.choice.fiveG_S_TMSI->fiveG_TMSI, msg->ue_paging_identity.s_tmsi.m_tmsi); + /* convert NGAP_PagingIEs_t to ngap_paging_ind_t */ + /* id-UEIdentityIndexValue : convert UE Identity Index value */ + NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PagingIEs_t, ie, container, NGAP_ProtocolIE_ID_id_UEPagingIdentity, true); - NGAP_DEBUG("[SCTP %d] Received Paging Identity amf_set_id %d, amf_pointer %d, m_tmsi %d\n", - assoc_id, - msg->ue_paging_identity.s_tmsi.amf_set_id, - msg->ue_paging_identity.s_tmsi.amf_pointer, - msg->ue_paging_identity.s_tmsi.m_tmsi); - } else { - return -1; - } + struct NGAP_FiveG_S_TMSI *fiveG_S_TMSI = ie->value.choice.UEPagingIdentity.choice.fiveG_S_TMSI; + OCTET_STRING_TO_INT16(&fiveG_S_TMSI->aMFSetID, msg->ue_paging_identity.s_tmsi.amf_set_id); + OCTET_STRING_TO_INT8(&fiveG_S_TMSI->aMFPointer, msg->ue_paging_identity.s_tmsi.amf_pointer); + OCTET_STRING_TO_INT32(&fiveG_S_TMSI->fiveG_TMSI, msg->ue_paging_identity.s_tmsi.m_tmsi); + NGAP_DEBUG("[SCTP %d] Received Paging Identity amf_set_id %d, amf_pointer %d, m_tmsi %d\n", + assoc_id, + msg->ue_paging_identity.s_tmsi.amf_set_id, + msg->ue_paging_identity.s_tmsi.amf_pointer, + msg->ue_paging_identity.s_tmsi.m_tmsi); - msg->paging_drx = NGAP_PAGING_DRX_256; - /* id-pagingDRX */ - NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PagingIEs_t, ie, container, - NGAP_ProtocolIE_ID_id_PagingDRX, false); + msg->paging_drx = NGAP_PAGING_DRX_256; + /* id-pagingDRX */ + NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PagingIEs_t, ie, container, NGAP_ProtocolIE_ID_id_PagingDRX, false); - /* optional */ - if (ie) { - msg->paging_drx = ie->value.choice.PagingDRX; - } else { - msg->paging_drx = NGAP_PAGING_DRX_256; - } + /* optional */ + if (ie) { + msg->paging_drx = ie->value.choice.PagingDRX; + } else { + msg->paging_drx = NGAP_PAGING_DRX_256; + } - memset (&msg->plmn_identity[0], 0, sizeof(plmn_identity_t)*256); - memset (&msg->tac[0], 0, sizeof(int16_t)*256); - msg->tai_size = 0; /* id-TAIList */ NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PagingIEs_t, ie, container, NGAP_ProtocolIE_ID_id_TAIListForPaging, true); - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ - NGAP_INFO("[SCTP %d] Received Paging taiList For Paging: count %d\n", assoc_id, ie->value.choice.TAIListForPaging.list.count); + NGAP_INFO("[SCTP %d] Received Paging taiList For Paging: count %d\n", assoc_id, ie->value.choice.TAIListForPaging.list.count); - for (int i = 0; i < ie->value.choice.TAIListForPaging.list.count; i++) { - NGAP_TAIListForPagingItem_t *item_p; - item_p = (NGAP_TAIListForPagingItem_t *)ie->value.choice.TAIListForPaging.list.array[i]; - TBCD_TO_MCC_MNC(&(item_p->tAI.pLMNIdentity), msg->plmn_identity[i].mcc, - msg->plmn_identity[i].mnc, - msg->plmn_identity[i].mnc_digit_length); - OCTET_STRING_TO_INT16(&(item_p->tAI.tAC), msg->tac[i]); - msg->tai_size++; - NGAP_DEBUG("[SCTP %d] Received Paging: MCC %d, MNC %d, TAC %d\n", assoc_id, - msg->plmn_identity[i].mcc, - msg->plmn_identity[i].mnc, - msg->tac[i]); - } - } else { - return -1; + for (int i = 0; i < ie->value.choice.TAIListForPaging.list.count; i++) { + NGAP_TAIListForPagingItem_t *item_p; + item_p = (NGAP_TAIListForPagingItem_t *)ie->value.choice.TAIListForPaging.list.array[i]; + TBCD_TO_MCC_MNC(&(item_p->tAI.pLMNIdentity), msg->plmn_identity[i].mcc, msg->plmn_identity[i].mnc, msg->plmn_identity[i].mnc_digit_length); + OCTET_STRING_TO_INT16(&(item_p->tAI.tAC), msg->tac[i]); + msg->tai_size++; + NGAP_DEBUG("[SCTP %d] Received Paging: MCC %d, MNC %d, TAC %d\n", assoc_id, msg->plmn_identity[i].mcc, msg->plmn_identity[i].mnc, msg->tac[i]); } //paging parameter values @@ -1579,14 +1080,9 @@ int ngap_gNB_handle_paging(uint32_t assoc_id, return 0; } -static -int ngap_gNB_handle_pdusession_modify_request(uint32_t assoc_id, - uint32_t stream, - NGAP_NGAP_PDU_t *pdu) { - - int i, nb_of_pdusessions_failed; - ngap_gNB_amf_data_t *amf_desc_p = NULL; - ngap_gNB_ue_context_t *ue_desc_p = NULL; +static int ngap_gNB_handle_pdusession_modify_request(uint32_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu) +{ + ngap_gNB_amf_data_t *amf_desc_p = NULL; NGAP_PDUSessionResourceModifyRequest_t *container; NGAP_PDUSessionResourceModifyRequestIEs_t *ie; NGAP_RAN_UE_NGAP_ID_t gnb_ue_ngap_id; @@ -1614,184 +1110,69 @@ int ngap_gNB_handle_pdusession_modify_request(uint32_t assoc_id, NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PDUSessionResourceModifyRequestIEs_t, ie, container, NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID, true); - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ gnb_ue_ngap_id = ie->value.choice.RAN_UE_NGAP_ID; - } else { - return -1; - } - - if ((ue_desc_p = ngap_gNB_get_ue_context(amf_desc_p->ngap_gNB_instance, - gnb_ue_ngap_id)) == NULL) { - NGAP_ERROR("[SCTP %d] Received PDUSession Resource modify request for non " - "existing UE context 0x%08lx\n", assoc_id, - gnb_ue_ngap_id); - return -1; - } + ngap_gNB_ue_context_t *ue_desc_p = ngap_get_ue_context(gnb_ue_ngap_id); + if (!ue_desc_p) { + NGAP_ERROR( + "[SCTP %d] Received PDUSession Resource modify request for non " + "existing UE context 0x%08lx\n", + assoc_id, + gnb_ue_ngap_id); + return -1; + } ue_desc_p->rx_stream = stream; + /* id-PDUSessionResourceModifyListModReq */ + NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PDUSessionResourceModifyRequestIEs_t, ie, container, NGAP_ProtocolIE_ID_id_PDUSessionResourceModifyListModReq, true); if (ue_desc_p->amf_ue_ngap_id != amf_ue_ngap_id) { NGAP_WARN("UE context amf_ue_ngap_id is different form that of the message (%ld != %ld)", (uint64_t)ue_desc_p->amf_ue_ngap_id, amf_ue_ngap_id); MessageDef *message_p = itti_alloc_new_message (TASK_RRC_GNB, 0, NGAP_PDUSESSION_MODIFY_RESP); ngap_pdusession_modify_resp_t* msg=&NGAP_PDUSESSION_MODIFY_RESP(message_p); + memset(msg, 0, sizeof(*msg)); msg->gNB_ue_ngap_id = gnb_ue_ngap_id; - NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PDUSessionResourceModifyRequestIEs_t, ie, container, - NGAP_ProtocolIE_ID_id_PDUSessionResourceModifyListModReq, true); - - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ - for(nb_of_pdusessions_failed = 0; nb_of_pdusessions_failed < ie->value.choice.PDUSessionResourceModifyListModReq.list.count; nb_of_pdusessions_failed++) { + for (int nb_of_pdusessions_failed = 0; nb_of_pdusessions_failed < ie->value.choice.PDUSessionResourceModifyListModReq.list.count; nb_of_pdusessions_failed++) { NGAP_PDUSessionResourceModifyItemModReq_t *item_p; item_p = (NGAP_PDUSessionResourceModifyItemModReq_t *)ie->value.choice.PDUSessionResourceModifyListModReq.list.array[nb_of_pdusessions_failed]; - - msg->pdusessions_failed[nb_of_pdusessions_failed].pdusession_id = item_p->pDUSessionID; - msg->pdusessions_failed[nb_of_pdusessions_failed].cause = NGAP_Cause_PR_radioNetwork; - msg->pdusessions_failed[nb_of_pdusessions_failed].cause_value = NGAP_CauseRadioNetwork_unknown_local_UE_NGAP_ID; + pdusession_failed_t *tmp = &msg->pdusessions_failed[nb_of_pdusessions_failed]; + tmp->pdusession_id = item_p->pDUSessionID; + tmp->cause = NGAP_CAUSE_RADIO_NETWORK; + tmp->cause_value = NGAP_CauseRadioNetwork_unknown_local_UE_NGAP_ID; } - } else { - return -1; - } - - msg->nb_of_pdusessions_failed = nb_of_pdusessions_failed; + msg->nb_of_pdusessions_failed = ie->value.choice.PDUSessionResourceModifyListModReq.list.count; ngap_gNB_pdusession_modify_resp(amf_desc_p->ngap_gNB_instance->instance,msg); - itti_free(TASK_RRC_GNB,message_p); - message_p = NULL; + itti_free(TASK_RRC_GNB, message_p); return -1; } MessageDef *message_p = itti_alloc_new_message(TASK_NGAP, 0, NGAP_PDUSESSION_MODIFY_REQ); ngap_pdusession_modify_req_t * msg=&NGAP_PDUSESSION_MODIFY_REQ(message_p); - msg->ue_initial_id = ue_desc_p->ue_initial_id; + memset(msg, 0, sizeof(*msg)); msg->amf_ue_ngap_id = amf_ue_ngap_id; - msg->gNB_ue_ngap_id = gnb_ue_ngap_id; - /* id-PDUSessionResourceModifyListModReq */ - NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PDUSessionResourceModifyRequestIEs_t, ie, container, - NGAP_ProtocolIE_ID_id_PDUSessionResourceModifyListModReq, true); + msg->gNB_ue_ngap_id = gnb_ue_ngap_id; - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ - msg->nb_pdusessions_tomodify = - ie->value.choice.PDUSessionResourceModifyListModReq.list.count; + msg->nb_pdusessions_tomodify = ie->value.choice.PDUSessionResourceModifyListModReq.list.count; - for (i = 0; i < ie->value.choice.PDUSessionResourceModifyListModReq.list.count; i++) { - NGAP_PDUSessionResourceModifyItemModReq_t *item_p; - asn_dec_rval_t dec_rval; - NGAP_PDUSessionResourceModifyRequestTransfer_t *pdusessionTransfer_p = NULL; - NGAP_PDUSessionResourceModifyRequestTransferIEs_t *pdusessionTransfer_ies = NULL; - - item_p = (NGAP_PDUSessionResourceModifyItemModReq_t *)ie->value.choice.PDUSessionResourceModifyListModReq.list.array[i]; - - msg->pdusession_modify_params[i].pdusession_id = item_p->pDUSessionID; + for (int i = 0; i < ie->value.choice.PDUSessionResourceModifyListModReq.list.count; i++) { + NGAP_PDUSessionResourceModifyItemModReq_t *item_p = ie->value.choice.PDUSessionResourceModifyListModReq.list.array[i]; - // check for the NAS PDU - if (item_p->nAS_PDU != NULL && item_p->nAS_PDU->size > 0 ) { - msg->pdusession_modify_params[i].nas_pdu.length = item_p->nAS_PDU->size; - msg->pdusession_modify_params[i].nas_pdu.buffer = malloc(sizeof(uint8_t) * item_p->nAS_PDU->size); - memcpy(msg->pdusession_modify_params[i].nas_pdu.buffer, - item_p->nAS_PDU->buf, item_p->nAS_PDU->size); - } else { - msg->pdusession_modify_params[i].nas_pdu.length = 0; - msg->pdusession_modify_params[i].nas_pdu.buffer = NULL; - continue; - } + msg->pdusession_modify_params[i].pdusession_id = item_p->pDUSessionID; - dec_rval = aper_decode(NULL, - &asn_DEF_NGAP_PDUSessionResourceModifyRequestTransfer, - (void **)&pdusessionTransfer_p, - item_p->pDUSessionResourceModifyRequestTransfer.buf, - item_p->pDUSessionResourceModifyRequestTransfer.size, 0, 0); - - if(dec_rval.code != RC_OK) { - NGAP_ERROR("could not decode PDUSessionResourceModifyRequestTransfer\n"); - return -1; - } - - for(int j=0; j< pdusessionTransfer_p->protocolIEs.list.count; j++) { - pdusessionTransfer_ies = pdusessionTransfer_p->protocolIEs.list.array[j]; - switch(pdusessionTransfer_ies->id) { - /* optional PDUSessionAggregateMaximumBitRate */ - case NGAP_ProtocolIE_ID_id_PDUSessionAggregateMaximumBitRate: - // TODO - NGAP_ERROR("Cant' handle NGAP_ProtocolIE_ID_id_PDUSessionAggregateMaximumBitRate\n"); - break; - - /* optional UL-NGU-UP-TNLModifyList */ - case NGAP_ProtocolIE_ID_id_UL_NGU_UP_TNLModifyList: - // TODO - NGAP_ERROR("Cant' handle NGAP_ProtocolIE_ID_id_UL_NGU_UP_TNLModifyList\n"); - break; - - /* optional NetworkInstance */ - case NGAP_ProtocolIE_ID_id_NetworkInstance: - // TODO - NGAP_ERROR("Cant' handle NGAP_ProtocolIE_ID_id_NetworkInstance\n"); - break; - - /* optional QosFlowAddOrModifyRequestList */ - case NGAP_ProtocolIE_ID_id_QosFlowAddOrModifyRequestList: - { - NGAP_QosFlowAddOrModifyRequestItem_t *qosFlowItem_p; - - NGAP_DEBUG("QosFlowAddOrModifyRequestList.list.count %d\n", pdusessionTransfer_ies->value.choice.QosFlowAddOrModifyRequestList.list.count); - DevAssert(pdusessionTransfer_ies->value.choice.QosFlowAddOrModifyRequestList.list.count > 0); - DevAssert(pdusessionTransfer_ies->value.choice.QosFlowAddOrModifyRequestList.list.count <= NGAP_maxnoofQosFlows); - - msg->pdusession_modify_params[i].nb_qos = pdusessionTransfer_ies->value.choice.QosFlowAddOrModifyRequestList.list.count; - - for(int qosIdx = 0; qosIdx < pdusessionTransfer_ies->value.choice.QosFlowAddOrModifyRequestList.list.count; qosIdx++) { - qosFlowItem_p = pdusessionTransfer_ies->value.choice.QosFlowAddOrModifyRequestList.list.array[qosIdx]; - - /* Set the QOS informations */ - msg->pdusession_modify_params[i].qos[qosIdx].qfi = (uint8_t)qosFlowItem_p->qosFlowIdentifier; - if(qosFlowItem_p->qosFlowLevelQosParameters) { - if (qosFlowItem_p->qosFlowLevelQosParameters->qosCharacteristics.present == NGAP_QosCharacteristics_PR_nonDynamic5QI) { - msg->pdusession_modify_params[i].qos[qosIdx].fiveQI = - qosFlowItem_p->qosFlowLevelQosParameters->qosCharacteristics.choice.nonDynamic5QI->fiveQI; - } else if (qosFlowItem_p->qosFlowLevelQosParameters->qosCharacteristics.present == NGAP_QosCharacteristics_PR_dynamic5QI) { - // TODO - } - msg->pdusession_modify_params[i].qos[qosIdx].allocation_retention_priority.priority_level = - qosFlowItem_p->qosFlowLevelQosParameters->allocationAndRetentionPriority.priorityLevelARP; - msg->pdusession_modify_params[i].qos[qosIdx].allocation_retention_priority.pre_emp_capability = - qosFlowItem_p->qosFlowLevelQosParameters->allocationAndRetentionPriority.pre_emptionCapability; - msg->pdusession_modify_params[i].qos[qosIdx].allocation_retention_priority.pre_emp_vulnerability = - qosFlowItem_p->qosFlowLevelQosParameters->allocationAndRetentionPriority.pre_emptionVulnerability; - } - } - } - break; - - /* optional QosFlowToReleaseList */ - case NGAP_ProtocolIE_ID_id_QosFlowToReleaseList: - // TODO - NGAP_ERROR("Cant' handle NGAP_ProtocolIE_ID_id_QosFlowToReleaseList\n"); - break; - - /* optional AdditionalUL-NGU-UP-TNLInformation */ - case NGAP_ProtocolIE_ID_id_AdditionalUL_NGU_UP_TNLInformation: - // TODO - NGAP_ERROR("Cant' handle NGAP_ProtocolIE_ID_id_AdditionalUL_NGU_UP_TNLInformation\n"); - break; - - /* optional CommonNetworkInstance */ - case NGAP_ProtocolIE_ID_id_CommonNetworkInstance: - // TODO - NGAP_ERROR("Cant' handle NGAP_ProtocolIE_ID_id_CommonNetworkInstance\n"); - break; - - default: - NGAP_ERROR("could not found protocolIEs id %ld\n", pdusessionTransfer_ies->id); - return -1; - } - } + // check for the NAS PDU + if (item_p->nAS_PDU != NULL && item_p->nAS_PDU->size > 0) { + allocCopy(&msg->pdusession_modify_params[i].nas_pdu, *item_p->nAS_PDU); + allocCopy(&msg->pdusession_modify_params[i].pdusessionTransfer, item_p->pDUSessionResourceModifyRequestTransfer); + } else { + LOG_W(NGAP, "received pdu session modify with void content for UE %u, pdu session %lu\n", msg->gNB_ue_ngap_id, item_p->pDUSessionID); + continue; } - - itti_send_msg_to_task(TASK_RRC_GNB, ue_desc_p->gNB_instance->instance, message_p); - } else { /* of if (ie != NULL)*/ - return -1; } + itti_send_msg_to_task(TASK_RRC_GNB, ue_desc_p->gNB_instance->instance, message_p); return 0; } + // handle pdu session release command and send it to rrc_end static int ngap_gNB_handle_pdusession_release_command(uint32_t assoc_id, @@ -1799,8 +1180,7 @@ int ngap_gNB_handle_pdusession_release_command(uint32_t assoc_id, NGAP_NGAP_PDU_t *pdu) { int i; - ngap_gNB_amf_data_t *amf_desc_p = NULL; - ngap_gNB_ue_context_t *ue_desc_p = NULL; + ngap_gNB_amf_data_t *amf_desc_p = NULL; NGAP_PDUSessionResourceReleaseCommand_t *container; NGAP_PDUSessionResourceReleaseCommandIEs_t *ie; NGAP_RAN_UE_NGAP_ID_t gnb_ue_ngap_id; @@ -1834,20 +1214,13 @@ int ngap_gNB_handle_pdusession_release_command(uint32_t assoc_id, return -1; } - if ((ue_desc_p = ngap_gNB_get_ue_context(amf_desc_p->ngap_gNB_instance, - gnb_ue_ngap_id)) == NULL) { + ngap_gNB_ue_context_t *ue_desc_p = ngap_get_ue_context(gnb_ue_ngap_id); + if (!ue_desc_p) { NGAP_ERROR("[SCTP %d] Received PDUSession Resource release command for non existing UE context 0x%08lx\n", assoc_id, ie->value.choice.RAN_UE_NGAP_ID); return -1; } - /* Initial context request = UE-related procedure -> stream != 0 */ - // if (stream == 0) { - // NGAP_ERROR("[SCTP %d] Received UE-related procedure on stream (%d)\n", - // assoc_id, stream); - // return -1; - // } - ue_desc_p->rx_stream = stream; if (ue_desc_p->amf_ue_ngap_id != amf_ue_ngap_id) { @@ -1859,6 +1232,7 @@ int ngap_gNB_handle_pdusession_release_command(uint32_t assoc_id, assoc_id, gnb_ue_ngap_id, amf_ue_ngap_id); MessageDef * message_p = itti_alloc_new_message(TASK_NGAP, 0, NGAP_PDUSESSION_RELEASE_COMMAND); ngap_pdusession_release_command_t * msg=&NGAP_PDUSESSION_RELEASE_COMMAND(message_p); + memset(msg, 0, sizeof(*msg)); msg->gNB_ue_ngap_id = gnb_ue_ngap_id; msg->amf_ue_ngap_id = amf_ue_ngap_id; @@ -1866,44 +1240,20 @@ int ngap_gNB_handle_pdusession_release_command(uint32_t assoc_id, NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PDUSessionResourceReleaseCommandIEs_t, ie, container, NGAP_ProtocolIE_ID_id_NAS_PDU, false); - if(ie && ie->value.choice.NAS_PDU.size > 0) { - msg->nas_pdu.length = ie->value.choice.NAS_PDU.size; - msg->nas_pdu.buffer = malloc(sizeof(uint8_t) * ie->value.choice.NAS_PDU.size); - memcpy(msg->nas_pdu.buffer, - ie->value.choice.NAS_PDU.buf, - ie->value.choice.NAS_PDU.size); - } else { - msg->nas_pdu.length = 0; - msg->nas_pdu.buffer = NULL; - } + if (ie) + allocCopy(&msg->nas_pdu, ie->value.choice.NAS_PDU); /* id-PDUSessionResourceToReleaseListRelCmd */ NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_PDUSessionResourceReleaseCommandIEs_t, ie, container, NGAP_ProtocolIE_ID_id_PDUSessionResourceToReleaseListRelCmd, true); - if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */ - msg->nb_pdusessions_torelease = ie->value.choice.PDUSessionResourceToReleaseListRelCmd.list.count; + msg->nb_pdusessions_torelease = ie->value.choice.PDUSessionResourceToReleaseListRelCmd.list.count; - for (i = 0; i < ie->value.choice.PDUSessionResourceToReleaseListRelCmd.list.count; i++) { - NGAP_PDUSessionResourceToReleaseItemRelCmd_t *item_p; - item_p = (NGAP_PDUSessionResourceToReleaseItemRelCmd_t *)ie->value.choice.PDUSessionResourceToReleaseListRelCmd.list.array[i]; - - msg->pdusession_release_params[i].pdusession_id = item_p->pDUSessionID; - if(item_p->pDUSessionResourceReleaseCommandTransfer.size > 0) { - msg->pdusession_release_params[i].transfer_length = item_p->pDUSessionResourceReleaseCommandTransfer.size; - msg->pdusession_release_params[i].transfer_buffer = malloc(sizeof(uint8_t) * item_p->pDUSessionResourceReleaseCommandTransfer.size); - memcpy(msg->pdusession_release_params[i].transfer_buffer, - item_p->pDUSessionResourceReleaseCommandTransfer.buf, - item_p->pDUSessionResourceReleaseCommandTransfer.size); - }else { - msg->pdusession_release_params[i].transfer_length = 0; - msg->pdusession_release_params[i].transfer_buffer = NULL; - NGAP_ERROR("[NGAP] Received pdu session release command for pDUSessionResourceReleaseCommandTransfer is NULL!\n"); - } - NGAP_DEBUG("[NGAP] Received pdu session release command for pDUSessionID id %ld\n", item_p->pDUSessionID); - } - } else { - return -1; + for (i = 0; i < ie->value.choice.PDUSessionResourceToReleaseListRelCmd.list.count; i++) { + NGAP_PDUSessionResourceToReleaseItemRelCmd_t *item_p; + item_p = ie->value.choice.PDUSessionResourceToReleaseListRelCmd.list.array[i]; + msg->pdusession_release_params[i].pdusession_id = item_p->pDUSessionID; + allocCopy(&msg->pdusession_release_params[i].data, item_p->pDUSessionResourceReleaseCommandTransfer); } itti_send_msg_to_task(TASK_RRC_GNB, ue_desc_p->gNB_instance->instance, message_p); @@ -1937,3 +1287,94 @@ int ngap_gNB_handle_ng_ENDC_pdusession_modification_confirm(uint32_t return 0; } +/* Handlers matrix. Only gNB related procedure present here */ +ngap_message_decoded_callback ngap_messages_callback[][3] = { + {0, 0, 0}, /* AMFConfigurationUpdate */ + {0, 0, 0}, /* AMFStatusIndication */ + {0, 0, 0}, /* CellTrafficTrace */ + {ngap_gNB_handle_deactivate_trace, 0, 0}, /* DeactivateTrace */ + {ngap_gNB_handle_nas_downlink, 0, 0}, /* DownlinkNASTransport */ + {0, 0, 0}, /* DownlinkNonUEAssociatedNRPPaTransport */ + {0, 0, 0}, /* DownlinkRANConfigurationTransfer */ + {0, 0, 0}, /* DownlinkRANStatusTransfer */ + {0, 0, 0}, /* DownlinkUEAssociatedNRPPaTransport */ + {ngap_gNB_handle_error_indication, 0, 0}, /* ErrorIndication */ + {0, 0, 0}, /* HandoverCancel */ + {0, 0, 0}, /* HandoverNotification */ + {0, 0, 0}, /* HandoverPreparation */ + {0, 0, 0}, /* HandoverResourceAllocation */ + {ngap_gNB_handle_initial_context_request, 0, 0}, /* InitialContextSetup */ + {0, 0, 0}, /* InitialUEMessage */ + {0, 0, 0}, /* LocationReportingControl */ + {0, 0, 0}, /* LocationReportingFailureIndication */ + {0, 0, 0}, /* LocationReport */ + {0, 0, 0}, /* NASNonDeliveryIndication */ + {0, 0, 0}, /* NGReset */ + {0, ngap_gNB_handle_ng_setup_response, ngap_gNB_handle_ng_setup_failure}, /* NGSetup */ + {0, 0, 0}, /* OverloadStart */ + {0, 0, 0}, /* OverloadStop */ + {ngap_gNB_handle_paging, 0, 0}, /* Paging */ + {0, ngap_gNB_handle_ng_path_switch_request_ack, ngap_gNB_handle_ng_path_switch_request_failure}, /* PathSwitchRequest */ + {ngap_gNB_handle_pdusession_modify_request, 0, 0}, /* PDUSessionResourceModify */ + {0, ngap_gNB_handle_ng_ENDC_pdusession_modification_confirm, 0}, /* PDUSessionResourceModifyIndication */ + {ngap_gNB_handle_pdusession_release_command, 0, 0}, /* PDUSessionResourceRelease */ + {ngap_gNB_handle_pdusession_setup_request, 0, 0}, /* PDUSessionResourceSetup */ + {0, 0, 0}, /* PDUSessionResourceNotify */ + {0, 0, 0}, /* PrivateMessage */ + {0, 0, 0}, /* PWSCancel */ + {0, 0, 0}, /* PWSFailureIndication */ + {0, 0, 0}, /* PWSRestartIndication */ + {0, 0, 0}, /* RANConfigurationUpdate */ + {0, 0, 0}, /* RerouteNASRequest */ + {0, 0, 0}, /* RRCInactiveTransitionReport */ + {0, 0, 0}, /* TraceFailureIndication */ + {ngap_gNB_handle_trace_start, 0, 0}, /* TraceStart */ + {0, 0, 0}, /* UEContextModification */ + {ngap_gNB_handle_ue_context_release_command, 0, 0}, /* UEContextRelease */ + {0, 0, 0}, /* UEContextReleaseRequest */ + {0, 0, 0}, /* UERadioCapabilityCheck */ + {0, 0, 0}, /* UERadioCapabilityInfoIndication */ + {0, 0, 0}, /* UETNLABindingRelease */ + {0, 0, 0}, /* UplinkNASTransport */ + {0, 0, 0}, /* UplinkNonUEAssociatedNRPPaTransport */ + {0, 0, 0}, /* UplinkRANConfigurationTransfer */ + {0, 0, 0}, /* UplinkRANStatusTransfer */ + {0, 0, 0}, /* UplinkUEAssociatedNRPPaTransport */ + {0, 0, 0}, /* WriteReplaceWarning */ + {0, 0, 0}, /* SecondaryRATDataUsageReport */ + +}; + +int ngap_gNB_handle_message(uint32_t assoc_id, int32_t stream, const uint8_t *const data, const uint32_t data_length) +{ + NGAP_NGAP_PDU_t pdu; + int ret; + DevAssert(data != NULL); + memset(&pdu, 0, sizeof(pdu)); + + if (ngap_gNB_decode_pdu(&pdu, data, data_length) < 0) { + NGAP_ERROR("Failed to decode PDU\n"); + return -1; + } + + /* Checking procedure Code and direction of message */ + if (pdu.choice.initiatingMessage->procedureCode >= sizeof(ngap_messages_callback) / (3 * sizeof(ngap_message_decoded_callback)) || (pdu.present > NGAP_NGAP_PDU_PR_unsuccessfulOutcome)) { + NGAP_ERROR("[SCTP %d] Either procedureCode %ld or direction %d exceed expected\n", assoc_id, pdu.choice.initiatingMessage->procedureCode, pdu.present); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, &pdu); + return -1; + } + + /* No handler present. + * This can mean not implemented or no procedure for gNB (wrong direction). + */ + if (ngap_messages_callback[pdu.choice.initiatingMessage->procedureCode][pdu.present - 1] == NULL) { + NGAP_ERROR("[SCTP %d] No handler for procedureCode %ld in %s\n", assoc_id, pdu.choice.initiatingMessage->procedureCode, ngap_direction2String(pdu.present - 1)); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, &pdu); + return -1; + } + + /* Calling the right handler */ + ret = (*ngap_messages_callback[pdu.choice.initiatingMessage->procedureCode][pdu.present - 1])(assoc_id, stream, &pdu); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_NGAP_PDU, &pdu); + return ret; +} diff --git a/openair3/NGAP/ngap_gNB_itti_messaging.c b/openair3/NGAP/ngap_gNB_itti_messaging.c index ab10fa46e2..87b4ba4c73 100644 --- a/openair3/NGAP/ngap_gNB_itti_messaging.c +++ b/openair3/NGAP/ngap_gNB_itti_messaging.c @@ -44,16 +44,12 @@ void ngap_gNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uin sctp_data_req->assoc_id = assoc_id; sctp_data_req->buffer = buffer; sctp_data_req->buffer_length = buffer_length; - sctp_data_req->stream = stream; + sctp_data_req->stream = stream; itti_send_msg_to_task(TASK_SCTP, instance, message_p); } -void ngap_gNB_itti_send_nas_downlink_ind(instance_t instance, - uint16_t ue_initial_id, - uint32_t gNB_ue_ngap_id, - uint8_t *nas_pdu, - uint32_t nas_pdu_length) +void ngap_gNB_itti_send_nas_downlink_ind(instance_t instance, uint32_t gNB_ue_ngap_id, uint8_t *nas_pdu, uint32_t nas_pdu_length) { MessageDef *message_p; ngap_downlink_nas_t *ngap_downlink_nas; @@ -62,7 +58,6 @@ void ngap_gNB_itti_send_nas_downlink_ind(instance_t instance, ngap_downlink_nas = &message_p->ittiMsg.ngap_downlink_nas; - ngap_downlink_nas->ue_initial_id = ue_initial_id; ngap_downlink_nas->gNB_ue_ngap_id = gNB_ue_ngap_id; ngap_downlink_nas->nas_pdu.buffer = malloc(sizeof(uint8_t) * nas_pdu_length); memcpy(ngap_downlink_nas->nas_pdu.buffer, nas_pdu, nas_pdu_length); diff --git a/openair3/NGAP/ngap_gNB_itti_messaging.h b/openair3/NGAP/ngap_gNB_itti_messaging.h index 94d4058178..08224a27f5 100644 --- a/openair3/NGAP/ngap_gNB_itti_messaging.h +++ b/openair3/NGAP/ngap_gNB_itti_messaging.h @@ -33,11 +33,7 @@ void ngap_gNB_itti_send_sctp_data_req(instance_t instance, int32_t assoc_id, uint8_t *buffer, uint32_t buffer_length, uint16_t stream); -void ngap_gNB_itti_send_nas_downlink_ind(instance_t instance, - uint16_t ue_initial_id, - uint32_t gNB_ue_ngap_id, - uint8_t *nas_pdu, - uint32_t nas_pdu_length); +void ngap_gNB_itti_send_nas_downlink_ind(instance_t instance, uint32_t gNB_ue_ngap_id, uint8_t *nas_pdu, uint32_t nas_pdu_length); void ngap_gNB_itti_send_sctp_close_association(instance_t instance, int32_t assoc_id); diff --git a/openair3/NGAP/ngap_gNB_nas_procedures.c b/openair3/NGAP/ngap_gNB_nas_procedures.c index f163b5b838..fdbe6ce0f9 100644 --- a/openair3/NGAP/ngap_gNB_nas_procedures.c +++ b/openair3/NGAP/ngap_gNB_nas_procedures.c @@ -49,73 +49,80 @@ #include "ngap_gNB_nas_procedures.h" #include "ngap_gNB_management_procedures.h" +static void allocCopy(OCTET_STRING_t *out, ngap_pdu_t in) +{ + if (in.length) { + out->buf = malloc(in.length); + memcpy(out->buf, in.buffer, in.length); + } + out->size = in.length; +} + +static void allocAddrCopy(BIT_STRING_t *out, ngap_transport_layer_addr_t in) +{ + if (in.length) { + out->buf = malloc(in.length); + memcpy(out->buf, in.buffer, in.length); + out->size = in.length; + out->bits_unused = 0; + } +} + //------------------------------------------------------------------------------ -int ngap_gNB_handle_nas_first_req( - instance_t instance, ngap_nas_first_req_t *ngap_nas_first_req_p) +int ngap_gNB_handle_nas_first_req(instance_t instance, ngap_nas_first_req_t *UEfirstReq) //------------------------------------------------------------------------------ { ngap_gNB_instance_t *instance_p = NULL; - struct ngap_gNB_amf_data_s *amf_desc_p = NULL; - struct ngap_gNB_ue_context_s *ue_desc_p = NULL; - NGAP_NGAP_PDU_t pdu; - NGAP_InitialUEMessage_t *out; - NGAP_InitialUEMessage_IEs_t *ie; - NGAP_UserLocationInformationNR_t *userinfo_nr_p = NULL; + struct ngap_gNB_amf_data_s *amf_desc_p = NULL; + NGAP_NGAP_PDU_t pdu; uint8_t *buffer = NULL; uint32_t length = 0; - DevAssert(ngap_nas_first_req_p != NULL); + DevAssert(UEfirstReq != NULL); /* Retrieve the NGAP gNB instance associated with Mod_id */ instance_p = ngap_gNB_get_instance(instance); DevAssert(instance_p != NULL); memset(&pdu, 0, sizeof(pdu)); pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage; - pdu.choice.initiatingMessage = (NGAP_InitiatingMessage_t *)calloc(1,sizeof(NGAP_InitiatingMessage_t)); - pdu.choice.initiatingMessage->procedureCode = NGAP_ProcedureCode_id_InitialUEMessage; - pdu.choice.initiatingMessage->criticality = NGAP_Criticality_ignore; - pdu.choice.initiatingMessage->value.present = NGAP_InitiatingMessage__value_PR_InitialUEMessage; - out = &pdu.choice.initiatingMessage->value.choice.InitialUEMessage; + asn1cCalloc(pdu.choice.initiatingMessage, head); + head->procedureCode = NGAP_ProcedureCode_id_InitialUEMessage; + head->criticality = NGAP_Criticality_ignore; + head->value.present = NGAP_InitiatingMessage__value_PR_InitialUEMessage; + NGAP_InitialUEMessage_t *out = &head->value.choice.InitialUEMessage; /* Select the AMF corresponding to the provided GUAMI. */ //TODO have not be test. it's should be test - if (ngap_nas_first_req_p->ue_identity.presenceMask & NGAP_UE_IDENTITIES_guami) { - amf_desc_p = ngap_gNB_nnsf_select_amf_by_guami( - instance_p, - ngap_nas_first_req_p->establishment_cause, - ngap_nas_first_req_p->ue_identity.guami); + if (UEfirstReq->ue_identity.presenceMask & NGAP_UE_IDENTITIES_guami) { + amf_desc_p = ngap_gNB_nnsf_select_amf_by_guami(instance_p, UEfirstReq->establishment_cause, UEfirstReq->ue_identity.guami); if (amf_desc_p) { - NGAP_INFO("[gNB %ld] Chose AMF '%s' (assoc_id %d) through GUAMI MCC %d MNC %d AMFRI %d AMFSI %d AMFPT %d\n", - instance, - amf_desc_p->amf_name, - amf_desc_p->assoc_id, - ngap_nas_first_req_p->ue_identity.guami.mcc, - ngap_nas_first_req_p->ue_identity.guami.mnc, - ngap_nas_first_req_p->ue_identity.guami.amf_region_id, - ngap_nas_first_req_p->ue_identity.guami.amf_set_id, - ngap_nas_first_req_p->ue_identity.guami.amf_pointer); + NGAP_INFO("[gNB %ld] Chose AMF '%s' (assoc_id %d) through GUAMI MCC %d MNC %d AMFRI %d AMFSI %d AMFPT %d\n", + instance, + amf_desc_p->amf_name, + amf_desc_p->assoc_id, + UEfirstReq->ue_identity.guami.mcc, + UEfirstReq->ue_identity.guami.mnc, + UEfirstReq->ue_identity.guami.amf_region_id, + UEfirstReq->ue_identity.guami.amf_set_id, + UEfirstReq->ue_identity.guami.amf_pointer); } } if (amf_desc_p == NULL) { /* Select the AMF corresponding to the provided s-TMSI. */ //TODO have not be test. it's should be test - if (ngap_nas_first_req_p->ue_identity.presenceMask & NGAP_UE_IDENTITIES_FiveG_s_tmsi) { - amf_desc_p = ngap_gNB_nnsf_select_amf_by_amf_setid( - instance_p, - ngap_nas_first_req_p->establishment_cause, - ngap_nas_first_req_p->selected_plmn_identity, - ngap_nas_first_req_p->ue_identity.s_tmsi.amf_set_id); + if (UEfirstReq->ue_identity.presenceMask & NGAP_UE_IDENTITIES_FiveG_s_tmsi) { + amf_desc_p = ngap_gNB_nnsf_select_amf_by_amf_setid(instance_p, UEfirstReq->establishment_cause, UEfirstReq->selected_plmn_identity, UEfirstReq->ue_identity.s_tmsi.amf_set_id); - if (amf_desc_p) { - NGAP_INFO("[gNB %ld] Chose AMF '%s' (assoc_id %d) through S-TMSI AMFSI %d and selected PLMN Identity index %d MCC %d MNC %d\n", - instance, - amf_desc_p->amf_name, - amf_desc_p->assoc_id, - ngap_nas_first_req_p->ue_identity.s_tmsi.amf_set_id, - ngap_nas_first_req_p->selected_plmn_identity, - instance_p->mcc[ngap_nas_first_req_p->selected_plmn_identity], - instance_p->mnc[ngap_nas_first_req_p->selected_plmn_identity]); - } + if (amf_desc_p) { + NGAP_INFO("[gNB %ld] Chose AMF '%s' (assoc_id %d) through S-TMSI AMFSI %d and selected PLMN Identity index %d MCC %d MNC %d\n", + instance, + amf_desc_p->amf_name, + amf_desc_p->assoc_id, + UEfirstReq->ue_identity.s_tmsi.amf_set_id, + UEfirstReq->selected_plmn_identity, + instance_p->mcc[UEfirstReq->selected_plmn_identity], + instance_p->mnc[UEfirstReq->selected_plmn_identity]); + } } } @@ -123,19 +130,16 @@ int ngap_gNB_handle_nas_first_req( /* Select AMF based on the selected PLMN identity, received through RRC * Connection Setup Complete */ //TODO have not be test. it's should be test - amf_desc_p = ngap_gNB_nnsf_select_amf_by_plmn_id( - instance_p, - ngap_nas_first_req_p->establishment_cause, - ngap_nas_first_req_p->selected_plmn_identity); + amf_desc_p = ngap_gNB_nnsf_select_amf_by_plmn_id(instance_p, UEfirstReq->establishment_cause, UEfirstReq->selected_plmn_identity); if (amf_desc_p) { - NGAP_INFO("[gNB %ld] Chose AMF '%s' (assoc_id %d) through selected PLMN Identity index %d MCC %d MNC %d\n", - instance, - amf_desc_p->amf_name, - amf_desc_p->assoc_id, - ngap_nas_first_req_p->selected_plmn_identity, - instance_p->mcc[ngap_nas_first_req_p->selected_plmn_identity], - instance_p->mnc[ngap_nas_first_req_p->selected_plmn_identity]); + NGAP_INFO("[gNB %ld] Chose AMF '%s' (assoc_id %d) through selected PLMN Identity index %d MCC %d MNC %d\n", + instance, + amf_desc_p->amf_name, + amf_desc_p->assoc_id, + UEfirstReq->selected_plmn_identity, + instance_p->mcc[UEfirstReq->selected_plmn_identity], + instance_p->mnc[UEfirstReq->selected_plmn_identity]); } } @@ -145,15 +149,10 @@ int ngap_gNB_handle_nas_first_req( * identity, selects the AMF with the highest capacity. */ //TODO have not be test. it's should be test - amf_desc_p = ngap_gNB_nnsf_select_amf( - instance_p, - ngap_nas_first_req_p->establishment_cause); + amf_desc_p = ngap_gNB_nnsf_select_amf(instance_p, UEfirstReq->establishment_cause); if (amf_desc_p) { - NGAP_INFO("[gNB %ld] Chose AMF '%s' (assoc_id %d) through highest relative capacity\n", - instance, - amf_desc_p->amf_name, - amf_desc_p->assoc_id); + NGAP_INFO("[gNB %ld] Chose AMF '%s' (assoc_id %d) through highest relative capacity\n", instance, amf_desc_p->amf_name, amf_desc_p->assoc_id); } } @@ -170,120 +169,94 @@ int ngap_gNB_handle_nas_first_req( /* The gNB should allocate a unique gNB UE NGAP ID for this UE. The value * will be used for the duration of the connectivity. */ - ue_desc_p = ngap_gNB_allocate_new_UE_context(); + struct ngap_gNB_ue_context_s *ue_desc_p = calloc(1, sizeof(*ue_desc_p)); DevAssert(ue_desc_p != NULL); /* Keep a reference to the selected AMF */ ue_desc_p->amf_ref = amf_desc_p; - ue_desc_p->ue_initial_id = ngap_nas_first_req_p->ue_initial_id; + ue_desc_p->gNB_ue_ngap_id = UEfirstReq->gNB_ue_ngap_id; ue_desc_p->gNB_instance = instance_p; - ue_desc_p->selected_plmn_identity = ngap_nas_first_req_p->selected_plmn_identity; + ue_desc_p->selected_plmn_identity = UEfirstReq->selected_plmn_identity; - do { - struct ngap_gNB_ue_context_s *collision_p; - /* Peek a random value for the gNB_ue_ngap_id */ - ue_desc_p->gNB_ue_ngap_id = (random() + random()) & 0xffffffff; - - if ((collision_p = RB_INSERT(ngap_ue_map, &instance_p->ngap_ue_head, ue_desc_p)) - == NULL) { - NGAP_DEBUG("Found usable gNB_ue_ngap_id: 0x%08x %u(10)\n", - ue_desc_p->gNB_ue_ngap_id, - ue_desc_p->gNB_ue_ngap_id); - /* Break the loop as the id is not already used by another UE */ - break; - } - } while(1); + // insert in master table + ngap_store_ue_context(ue_desc_p); /* mandatory */ - ie = (NGAP_InitialUEMessage_IEs_t *)calloc(1, sizeof(NGAP_InitialUEMessage_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_reject; - ie->value.present = NGAP_InitialUEMessage_IEs__value_PR_RAN_UE_NGAP_ID; - ie->value.choice.RAN_UE_NGAP_ID = ue_desc_p->gNB_ue_ngap_id; - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_InitialUEMessage_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_reject; + ie->value.present = NGAP_InitialUEMessage_IEs__value_PR_RAN_UE_NGAP_ID; + ie->value.choice.RAN_UE_NGAP_ID = ue_desc_p->gNB_ue_ngap_id; + } /* mandatory */ - ie = (NGAP_InitialUEMessage_IEs_t *)calloc(1, sizeof(NGAP_InitialUEMessage_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_NAS_PDU; - ie->criticality = NGAP_Criticality_reject; - ie->value.present = NGAP_InitialUEMessage_IEs__value_PR_NAS_PDU; -#if 1 - ie->value.choice.NAS_PDU.buf = ngap_nas_first_req_p->nas_pdu.buffer; -#else - ie->value.choice.NAS_PDU.buf = malloc(ngap_nas_first_req_p->nas_pdu.length); - memcpy(ie->value.choice.NAS_PDU.buf, - ngap_nas_first_req_p->nas_pdu.buffer, - ngap_nas_first_req_p->nas_pdu.length); -#endif - ie->value.choice.NAS_PDU.size = ngap_nas_first_req_p->nas_pdu.length; - asn1cSeqAdd(&out->protocolIEs.list, ie); - + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_InitialUEMessage_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_NAS_PDU; + ie->criticality = NGAP_Criticality_reject; + ie->value.present = NGAP_InitialUEMessage_IEs__value_PR_NAS_PDU; + allocCopy(&ie->value.choice.NAS_PDU, UEfirstReq->nas_pdu); + } + /* mandatory */ - ie = (NGAP_InitialUEMessage_IEs_t *)calloc(1, sizeof(NGAP_InitialUEMessage_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_UserLocationInformation; - ie->criticality = NGAP_Criticality_reject; - ie->value.present = NGAP_InitialUEMessage_IEs__value_PR_UserLocationInformation; + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_InitialUEMessage_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_UserLocationInformation; + ie->criticality = NGAP_Criticality_reject; + ie->value.present = NGAP_InitialUEMessage_IEs__value_PR_UserLocationInformation; - ie->value.choice.UserLocationInformation.present = NGAP_UserLocationInformation_PR_userLocationInformationNR; + ie->value.choice.UserLocationInformation.present = NGAP_UserLocationInformation_PR_userLocationInformationNR; - ie->value.choice.UserLocationInformation.choice.userLocationInformationNR = - CALLOC(1, sizeof(*ie->value.choice.UserLocationInformation.choice.userLocationInformationNR)); - userinfo_nr_p = ie->value.choice.UserLocationInformation.choice.userLocationInformationNR; + asn1cCalloc(ie->value.choice.UserLocationInformation.choice.userLocationInformationNR, userinfo_nr_p); - /* Set nRCellIdentity. default userLocationInformationNR */ - MACRO_GNB_ID_TO_CELL_IDENTITY(instance_p->gNB_id, - 0, // Cell ID - &userinfo_nr_p->nR_CGI.nRCellIdentity); - MCC_MNC_TO_TBCD(instance_p->mcc[ue_desc_p->selected_plmn_identity], - instance_p->mnc[ue_desc_p->selected_plmn_identity], - instance_p->mnc_digit_length[ue_desc_p->selected_plmn_identity], - &userinfo_nr_p->nR_CGI.pLMNIdentity); - - /* Set TAI */ - INT24_TO_OCTET_STRING(instance_p->tac, &userinfo_nr_p->tAI.tAC); - MCC_MNC_TO_PLMNID(instance_p->mcc[ue_desc_p->selected_plmn_identity], + /* Set nRCellIdentity. default userLocationInformationNR */ + MACRO_GNB_ID_TO_CELL_IDENTITY(instance_p->gNB_id, + 0, // Cell ID + &userinfo_nr_p->nR_CGI.nRCellIdentity); + MCC_MNC_TO_TBCD(instance_p->mcc[ue_desc_p->selected_plmn_identity], instance_p->mnc[ue_desc_p->selected_plmn_identity], instance_p->mnc_digit_length[ue_desc_p->selected_plmn_identity], - &userinfo_nr_p->tAI.pLMNIdentity); - - asn1cSeqAdd(&out->protocolIEs.list, ie); + &userinfo_nr_p->nR_CGI.pLMNIdentity); + /* Set TAI */ + INT24_TO_OCTET_STRING(instance_p->tac, &userinfo_nr_p->tAI.tAC); + MCC_MNC_TO_PLMNID(instance_p->mcc[ue_desc_p->selected_plmn_identity], + instance_p->mnc[ue_desc_p->selected_plmn_identity], + instance_p->mnc_digit_length[ue_desc_p->selected_plmn_identity], + &userinfo_nr_p->tAI.pLMNIdentity); + } /* Set the establishment cause according to those provided by RRC */ - DevCheck(ngap_nas_first_req_p->establishment_cause < NGAP_RRC_CAUSE_LAST, - ngap_nas_first_req_p->establishment_cause, NGAP_RRC_CAUSE_LAST, 0); - + DevCheck(UEfirstReq->establishment_cause < NGAP_RRC_CAUSE_LAST, UEfirstReq->establishment_cause, NGAP_RRC_CAUSE_LAST, 0); + /* mandatory */ - ie = (NGAP_InitialUEMessage_IEs_t *)calloc(1, sizeof(NGAP_InitialUEMessage_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_RRCEstablishmentCause; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_InitialUEMessage_IEs__value_PR_RRCEstablishmentCause; - ie->value.choice.RRCEstablishmentCause = ngap_nas_first_req_p->establishment_cause; - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_InitialUEMessage_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_RRCEstablishmentCause; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_InitialUEMessage_IEs__value_PR_RRCEstablishmentCause; + ie->value.choice.RRCEstablishmentCause = UEfirstReq->establishment_cause; + } /* optional */ - if (ngap_nas_first_req_p->ue_identity.presenceMask & NGAP_UE_IDENTITIES_FiveG_s_tmsi) { + if (UEfirstReq->ue_identity.presenceMask & NGAP_UE_IDENTITIES_FiveG_s_tmsi) { NGAP_DEBUG("FIVEG_S_TMSI_PRESENT\n"); - ie = (NGAP_InitialUEMessage_IEs_t *)calloc(1, sizeof(NGAP_InitialUEMessage_IEs_t)); + asn1cSequenceAdd(out->protocolIEs.list, NGAP_InitialUEMessage_IEs_t, ie); ie->id = NGAP_ProtocolIE_ID_id_FiveG_S_TMSI; ie->criticality = NGAP_Criticality_reject; ie->value.present = NGAP_InitialUEMessage_IEs__value_PR_FiveG_S_TMSI; - AMF_SETID_TO_BIT_STRING(ngap_nas_first_req_p->ue_identity.s_tmsi.amf_set_id, - &ie->value.choice.FiveG_S_TMSI.aMFSetID); - AMF_SETID_TO_BIT_STRING(ngap_nas_first_req_p->ue_identity.s_tmsi.amf_pointer, - &ie->value.choice.FiveG_S_TMSI.aMFPointer); - M_TMSI_TO_OCTET_STRING(ngap_nas_first_req_p->ue_identity.s_tmsi.m_tmsi, - &ie->value.choice.FiveG_S_TMSI.fiveG_TMSI); - asn1cSeqAdd(&out->protocolIEs.list, ie); + AMF_SETID_TO_BIT_STRING(UEfirstReq->ue_identity.s_tmsi.amf_set_id, &ie->value.choice.FiveG_S_TMSI.aMFSetID); + AMF_SETID_TO_BIT_STRING(UEfirstReq->ue_identity.s_tmsi.amf_pointer, &ie->value.choice.FiveG_S_TMSI.aMFPointer); + M_TMSI_TO_OCTET_STRING(UEfirstReq->ue_identity.s_tmsi.m_tmsi, &ie->value.choice.FiveG_S_TMSI.fiveG_TMSI); } - /* optional */ - ie = (NGAP_InitialUEMessage_IEs_t *)calloc(1, sizeof(NGAP_InitialUEMessage_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_UEContextRequest; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_InitialUEMessage_IEs__value_PR_UEContextRequest; - ie->value.choice.UEContextRequest = NGAP_UEContextRequest_requested; - asn1cSeqAdd(&out->protocolIEs.list, ie); - + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_InitialUEMessage_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_UEContextRequest; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_InitialUEMessage_IEs__value_PR_UEContextRequest; + ie->value.choice.UEContextRequest = NGAP_UEContextRequest_requested; + } if (ngap_gNB_encode_pdu(&pdu, &buffer, &length) < 0) { /* Failed to encode message */ @@ -342,9 +315,7 @@ int ngap_gNB_handle_nas_downlink(uint32_t assoc_id, // } if ((amf_desc_p = ngap_gNB_get_AMF(NULL, assoc_id, 0)) == NULL) { - NGAP_ERROR( - "[SCTP %d] Received NAS downlink message for non existing AMF context\n", - assoc_id); + NGAP_ERROR("[SCTP %d] Received NAS downlink message for non existing AMF context\n", assoc_id); return -1; } @@ -360,8 +331,7 @@ int ngap_gNB_handle_nas_downlink(uint32_t assoc_id, NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID, true); gnb_ue_ngap_id = ie->value.choice.RAN_UE_NGAP_ID; - if ((ue_desc_p = ngap_gNB_get_ue_context(ngap_gNB_instance, - gnb_ue_ngap_id)) == NULL) { + if ((ue_desc_p = ngap_get_ue_context(gnb_ue_ngap_id)) == NULL) { NGAP_ERROR("[SCTP %d] Received NAS downlink message for non existing UE context gNB_UE_NGAP_ID: 0x%lx\n", assoc_id, gnb_ue_ngap_id); @@ -384,23 +354,15 @@ int ngap_gNB_handle_nas_downlink(uint32_t assoc_id, } else { /* We already have a amf ue ngap id check the received is the same */ if (ue_desc_p->amf_ue_ngap_id != amf_ue_ngap_id) { - NGAP_ERROR("[SCTP %d] Mismatch in AMF UE NGAP ID (0x%lx != 0x%"PRIx64"\n", - assoc_id, - amf_ue_ngap_id, - (uint64_t)ue_desc_p->amf_ue_ngap_id - ); - return -1; + NGAP_ERROR("[SCTP %d] Mismatch in AMF UE NGAP ID (0x%lx != 0x%" PRIx64 "\n", assoc_id, amf_ue_ngap_id, (uint64_t)ue_desc_p->amf_ue_ngap_id); + return -1; } } NGAP_FIND_PROTOCOLIE_BY_ID(NGAP_DownlinkNASTransport_IEs_t, ie, container, NGAP_ProtocolIE_ID_id_NAS_PDU, true); /* Forward the NAS PDU to NR-RRC */ - ngap_gNB_itti_send_nas_downlink_ind(ngap_gNB_instance->instance, - ue_desc_p->ue_initial_id, - ue_desc_p->gNB_ue_ngap_id, - ie->value.choice.NAS_PDU.buf, - ie->value.choice.NAS_PDU.size); + ngap_gNB_itti_send_nas_downlink_ind(ngap_gNB_instance->instance, ue_desc_p->gNB_ue_ngap_id, ie->value.choice.NAS_PDU.buf, ie->value.choice.NAS_PDU.size); return 0; } @@ -411,10 +373,7 @@ int ngap_gNB_nas_uplink(instance_t instance, ngap_uplink_nas_t *ngap_uplink_nas_ { struct ngap_gNB_ue_context_s *ue_context_p; ngap_gNB_instance_t *ngap_gNB_instance_p; - NGAP_NGAP_PDU_t pdu; - NGAP_UplinkNASTransport_t *out; - NGAP_UplinkNASTransport_IEs_t *ie; - NGAP_UserLocationInformationNR_t *userinfo_nr_p = NULL; + NGAP_NGAP_PDU_t pdu; uint8_t *buffer; uint32_t length; DevAssert(ngap_uplink_nas_p != NULL); @@ -422,7 +381,7 @@ int ngap_gNB_nas_uplink(instance_t instance, ngap_uplink_nas_t *ngap_uplink_nas_ ngap_gNB_instance_p = ngap_gNB_get_instance(instance); DevAssert(ngap_gNB_instance_p != NULL); - if ((ue_context_p = ngap_gNB_get_ue_context(ngap_gNB_instance_p, ngap_uplink_nas_p->gNB_ue_ngap_id)) == NULL) { + if ((ue_context_p = ngap_get_ue_context(ngap_uplink_nas_p->gNB_ue_ngap_id)) == NULL) { /* The context for this gNB ue ngap id doesn't exist in the map of gNB UEs */ NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: %08x\n", ngap_uplink_nas_p->gNB_ue_ngap_id); @@ -432,8 +391,7 @@ int ngap_gNB_nas_uplink(instance_t instance, ngap_uplink_nas_t *ngap_uplink_nas_ /* Uplink NAS transport can occur either during an ngap connected state * or during initial attach (for example: NAS authentication). */ - if (!(ue_context_p->ue_state == NGAP_UE_CONNECTED || - ue_context_p->ue_state == NGAP_UE_WAITING_CSR)) { + if (!(ue_context_p->ue_state == NGAP_UE_CONNECTED || ue_context_p->ue_state == NGAP_UE_WAITING_CSR)) { NGAP_WARN("You are attempting to send NAS data over non-connected " "gNB ue ngap id: %u, current state: %d\n", ngap_uplink_nas_p->gNB_ue_ngap_id, ue_context_p->ue_state); @@ -443,63 +401,63 @@ int ngap_gNB_nas_uplink(instance_t instance, ngap_uplink_nas_t *ngap_uplink_nas_ /* Prepare the NGAP message to encode */ memset(&pdu, 0, sizeof(pdu)); pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage; - pdu.choice.initiatingMessage = (NGAP_InitiatingMessage_t *)calloc(1,sizeof(NGAP_InitiatingMessage_t)); - pdu.choice.initiatingMessage->procedureCode = NGAP_ProcedureCode_id_UplinkNASTransport; - pdu.choice.initiatingMessage->criticality = NGAP_Criticality_ignore; - pdu.choice.initiatingMessage->value.present = NGAP_InitiatingMessage__value_PR_UplinkNASTransport; - out = &pdu.choice.initiatingMessage->value.choice.UplinkNASTransport; + asn1cCalloc(pdu.choice.initiatingMessage, head); + head->procedureCode = NGAP_ProcedureCode_id_UplinkNASTransport; + head->criticality = NGAP_Criticality_ignore; + head->value.present = NGAP_InitiatingMessage__value_PR_UplinkNASTransport; + NGAP_UplinkNASTransport_t *out = &head->value.choice.UplinkNASTransport; /* mandatory */ - ie = (NGAP_UplinkNASTransport_IEs_t *)calloc(1, sizeof(NGAP_UplinkNASTransport_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_reject; - ie->value.present = NGAP_UplinkNASTransport_IEs__value_PR_AMF_UE_NGAP_ID; - //ie->value.choice.AMF_UE_NGAP_ID = ue_context_p->amf_ue_ngap_id; - asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_UplinkNASTransport_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_reject; + ie->value.present = NGAP_UplinkNASTransport_IEs__value_PR_AMF_UE_NGAP_ID; + // ie->value.choice.AMF_UE_NGAP_ID = ue_context_p->amf_ue_ngap_id; + asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); + } /* mandatory */ - ie = (NGAP_UplinkNASTransport_IEs_t *)calloc(1, sizeof(NGAP_UplinkNASTransport_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_reject; - ie->value.present = NGAP_UplinkNASTransport_IEs__value_PR_RAN_UE_NGAP_ID; - ie->value.choice.RAN_UE_NGAP_ID = ue_context_p->gNB_ue_ngap_id; - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_UplinkNASTransport_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_reject; + ie->value.present = NGAP_UplinkNASTransport_IEs__value_PR_RAN_UE_NGAP_ID; + ie->value.choice.RAN_UE_NGAP_ID = ue_context_p->gNB_ue_ngap_id; + } /* mandatory */ - ie = (NGAP_UplinkNASTransport_IEs_t *)calloc(1, sizeof(NGAP_UplinkNASTransport_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_NAS_PDU; - ie->criticality = NGAP_Criticality_reject; - ie->value.present = NGAP_UplinkNASTransport_IEs__value_PR_NAS_PDU; - ie->value.choice.NAS_PDU.buf = ngap_uplink_nas_p->nas_pdu.buffer; - ie->value.choice.NAS_PDU.size = ngap_uplink_nas_p->nas_pdu.length; - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_UplinkNASTransport_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_NAS_PDU; + ie->criticality = NGAP_Criticality_reject; + ie->value.present = NGAP_UplinkNASTransport_IEs__value_PR_NAS_PDU; + ie->value.choice.NAS_PDU.buf = ngap_uplink_nas_p->nas_pdu.buffer; + ie->value.choice.NAS_PDU.size = ngap_uplink_nas_p->nas_pdu.length; + } /* mandatory */ - ie = (NGAP_UplinkNASTransport_IEs_t *)calloc(1, sizeof(NGAP_UplinkNASTransport_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_UserLocationInformation; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_UplinkNASTransport_IEs__value_PR_UserLocationInformation; + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_UplinkNASTransport_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_UserLocationInformation; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_UplinkNASTransport_IEs__value_PR_UserLocationInformation; - ie->value.choice.UserLocationInformation.present = NGAP_UserLocationInformation_PR_userLocationInformationNR; - ie->value.choice.UserLocationInformation.choice.userLocationInformationNR = CALLOC(1,sizeof(struct NGAP_UserLocationInformationNR)); - userinfo_nr_p = ie->value.choice.UserLocationInformation.choice.userLocationInformationNR; + ie->value.choice.UserLocationInformation.present = NGAP_UserLocationInformation_PR_userLocationInformationNR; + asn1cCalloc(ie->value.choice.UserLocationInformation.choice.userLocationInformationNR, userinfo_nr_p); - /* Set nRCellIdentity. default userLocationInformationNR */ - MACRO_GNB_ID_TO_CELL_IDENTITY(ngap_gNB_instance_p->gNB_id, - 0, // Cell ID - &userinfo_nr_p->nR_CGI.nRCellIdentity); - MCC_MNC_TO_TBCD(ngap_gNB_instance_p->mcc[ue_context_p->selected_plmn_identity], - ngap_gNB_instance_p->mnc[ue_context_p->selected_plmn_identity], - ngap_gNB_instance_p->mnc_digit_length[ue_context_p->selected_plmn_identity], - &userinfo_nr_p->nR_CGI.pLMNIdentity); - - /* Set TAI */ - INT24_TO_OCTET_STRING(ngap_gNB_instance_p->tac, &userinfo_nr_p->tAI.tAC); - MCC_MNC_TO_PLMNID(ngap_gNB_instance_p->mcc[ue_context_p->selected_plmn_identity], + /* Set nRCellIdentity. default userLocationInformationNR */ + MACRO_GNB_ID_TO_CELL_IDENTITY(ngap_gNB_instance_p->gNB_id, + 0, // Cell ID + &userinfo_nr_p->nR_CGI.nRCellIdentity); + MCC_MNC_TO_TBCD(ngap_gNB_instance_p->mcc[ue_context_p->selected_plmn_identity], ngap_gNB_instance_p->mnc[ue_context_p->selected_plmn_identity], ngap_gNB_instance_p->mnc_digit_length[ue_context_p->selected_plmn_identity], - &userinfo_nr_p->tAI.pLMNIdentity); - - - asn1cSeqAdd(&out->protocolIEs.list, ie); + &userinfo_nr_p->nR_CGI.pLMNIdentity); + /* Set TAI */ + INT24_TO_OCTET_STRING(ngap_gNB_instance_p->tac, &userinfo_nr_p->tAI.tAC); + MCC_MNC_TO_PLMNID(ngap_gNB_instance_p->mcc[ue_context_p->selected_plmn_identity], + ngap_gNB_instance_p->mnc[ue_context_p->selected_plmn_identity], + ngap_gNB_instance_p->mnc_digit_length[ue_context_p->selected_plmn_identity], + &userinfo_nr_p->tAI.pLMNIdentity); + } if (ngap_gNB_encode_pdu(&pdu, &buffer, &length) < 0) { NGAP_ERROR("Failed to encode uplink NAS transport\n"); /* Encode procedure has failed... */ @@ -522,9 +480,7 @@ int ngap_gNB_nas_non_delivery_ind(instance_t instance, { struct ngap_gNB_ue_context_s *ue_context_p; ngap_gNB_instance_t *ngap_gNB_instance_p; - NGAP_NGAP_PDU_t pdu; - NGAP_NASNonDeliveryIndication_t *out; - NGAP_NASNonDeliveryIndication_IEs_t *ie; + NGAP_NGAP_PDU_t pdu; uint8_t *buffer; uint32_t length; DevAssert(ngap_nas_non_delivery_ind != NULL); @@ -532,7 +488,7 @@ int ngap_gNB_nas_non_delivery_ind(instance_t instance, ngap_gNB_instance_p = ngap_gNB_get_instance(instance); DevAssert(ngap_gNB_instance_p != NULL); - if ((ue_context_p = ngap_gNB_get_ue_context(ngap_gNB_instance_p, ngap_nas_non_delivery_ind->gNB_ue_ngap_id)) == NULL) { + if ((ue_context_p = ngap_get_ue_context(ngap_nas_non_delivery_ind->gNB_ue_ngap_id)) == NULL) { /* The context for this gNB ue ngap id doesn't exist in the map of gNB UEs */ NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: %08x\n", ngap_nas_non_delivery_ind->gNB_ue_ngap_id); @@ -542,42 +498,46 @@ int ngap_gNB_nas_non_delivery_ind(instance_t instance, /* Prepare the NGAP message to encode */ memset(&pdu, 0, sizeof(pdu)); pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage; - pdu.choice.initiatingMessage = (NGAP_InitiatingMessage_t *)calloc(1,sizeof(NGAP_InitiatingMessage_t)); - pdu.choice.initiatingMessage->procedureCode = NGAP_ProcedureCode_id_NASNonDeliveryIndication; - pdu.choice.initiatingMessage->criticality = NGAP_Criticality_ignore; - pdu.choice.initiatingMessage->value.present = NGAP_InitiatingMessage__value_PR_NASNonDeliveryIndication; - out = &pdu.choice.initiatingMessage->value.choice.NASNonDeliveryIndication; + asn1cCalloc(pdu.choice.initiatingMessage, head); + head->procedureCode = NGAP_ProcedureCode_id_NASNonDeliveryIndication; + head->criticality = NGAP_Criticality_ignore; + head->value.present = NGAP_InitiatingMessage__value_PR_NASNonDeliveryIndication; + NGAP_NASNonDeliveryIndication_t *out = &head->value.choice.NASNonDeliveryIndication; /* mandatory */ - ie = (NGAP_NASNonDeliveryIndication_IEs_t *)calloc(1, sizeof(NGAP_NASNonDeliveryIndication_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_reject; - ie->value.present = NGAP_NASNonDeliveryIndication_IEs__value_PR_AMF_UE_NGAP_ID; - asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_NASNonDeliveryIndication_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_reject; + ie->value.present = NGAP_NASNonDeliveryIndication_IEs__value_PR_AMF_UE_NGAP_ID; + asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); + } /* mandatory */ - ie = (NGAP_NASNonDeliveryIndication_IEs_t *)calloc(1, sizeof(NGAP_NASNonDeliveryIndication_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_reject; - ie->value.present = NGAP_NASNonDeliveryIndication_IEs__value_PR_RAN_UE_NGAP_ID; - ie->value.choice.RAN_UE_NGAP_ID = ue_context_p->gNB_ue_ngap_id; - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_NASNonDeliveryIndication_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_reject; + ie->value.present = NGAP_NASNonDeliveryIndication_IEs__value_PR_RAN_UE_NGAP_ID; + ie->value.choice.RAN_UE_NGAP_ID = ue_context_p->gNB_ue_ngap_id; + } /* mandatory */ - ie = (NGAP_NASNonDeliveryIndication_IEs_t *)calloc(1, sizeof(NGAP_NASNonDeliveryIndication_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_NAS_PDU; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_NASNonDeliveryIndication_IEs__value_PR_NAS_PDU; - ie->value.choice.NAS_PDU.buf = ngap_nas_non_delivery_ind->nas_pdu.buffer; - ie->value.choice.NAS_PDU.size = ngap_nas_non_delivery_ind->nas_pdu.length; - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_NASNonDeliveryIndication_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_NAS_PDU; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_NASNonDeliveryIndication_IEs__value_PR_NAS_PDU; + ie->value.choice.NAS_PDU.buf = ngap_nas_non_delivery_ind->nas_pdu.buffer; + ie->value.choice.NAS_PDU.size = ngap_nas_non_delivery_ind->nas_pdu.length; + } /* mandatory */ - ie = (NGAP_NASNonDeliveryIndication_IEs_t *)calloc(1, sizeof(NGAP_NASNonDeliveryIndication_IEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_Cause; - ie->criticality = NGAP_Criticality_ignore; - /* Send a dummy cause */ - ie->value.present = NGAP_NASNonDeliveryIndication_IEs__value_PR_Cause; - ie->value.choice.Cause.present = NGAP_Cause_PR_radioNetwork; - ie->value.choice.Cause.choice.radioNetwork = NGAP_CauseRadioNetwork_radio_connection_with_ue_lost; - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_NASNonDeliveryIndication_IEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_Cause; + ie->criticality = NGAP_Criticality_ignore; + /* Send a dummy cause */ + ie->value.present = NGAP_NASNonDeliveryIndication_IEs__value_PR_Cause; + ie->value.choice.Cause.present = NGAP_Cause_PR_radioNetwork; + ie->value.choice.Cause.choice.radioNetwork = NGAP_CauseRadioNetwork_radio_connection_with_ue_lost; + } if (ngap_gNB_encode_pdu(&pdu, &buffer, &length) < 0) { NGAP_ERROR("Failed to encode NAS NON delivery indication\n"); @@ -594,30 +554,23 @@ int ngap_gNB_nas_non_delivery_ind(instance_t instance, } //------------------------------------------------------------------------------ -int ngap_gNB_initial_ctxt_resp( - instance_t instance, ngap_initial_context_setup_resp_t *initial_ctxt_resp_p) +int ngap_gNB_initial_ctxt_resp(instance_t instance, ngap_initial_context_setup_resp_t *initial_ctxt_resp_p) //------------------------------------------------------------------------------ { ngap_gNB_instance_t *ngap_gNB_instance_p = NULL; struct ngap_gNB_ue_context_s *ue_context_p = NULL; - NGAP_NGAP_PDU_t pdu; - NGAP_InitialContextSetupResponse_t *out; - NGAP_InitialContextSetupResponseIEs_t *ie; - uint8_t *buffer = NULL; - uint8_t pdusessionTransfer_buffer[1000]; + NGAP_NGAP_PDU_t pdu; + uint8_t *buffer = NULL; uint32_t length; - int i; - asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} }; + int i; - /* Retrieve the NGAP gNB instance associated with Mod_id */ ngap_gNB_instance_p = ngap_gNB_get_instance(instance); DevAssert(initial_ctxt_resp_p != NULL); DevAssert(ngap_gNB_instance_p != NULL); - if ((ue_context_p = ngap_gNB_get_ue_context(ngap_gNB_instance_p, - initial_ctxt_resp_p->gNB_ue_ngap_id)) == NULL) { + if ((ue_context_p = ngap_get_ue_context(initial_ctxt_resp_p->gNB_ue_ngap_id)) == NULL) { /* The context for this gNB ue ngap id doesn't exist in the map of gNB UEs */ NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: 0x%08x\n", initial_ctxt_resp_p->gNB_ue_ngap_id); @@ -627,8 +580,7 @@ int ngap_gNB_initial_ctxt_resp( /* Uplink NAS transport can occur either during an ngap connected state * or during initial attach (for example: NAS authentication). */ - if (!(ue_context_p->ue_state == NGAP_UE_CONNECTED || - ue_context_p->ue_state == NGAP_UE_WAITING_CSR)) { + if (!(ue_context_p->ue_state == NGAP_UE_CONNECTED || ue_context_p->ue_state == NGAP_UE_WAITING_CSR)) { NGAP_WARN("You are attempting to send NAS data over non-connected " "gNB ue ngap id: %08x, current state: %d\n", initial_ctxt_resp_p->gNB_ue_ngap_id, ue_context_p->ue_state); @@ -638,169 +590,125 @@ int ngap_gNB_initial_ctxt_resp( /* Prepare the NGAP message to encode */ memset(&pdu, 0, sizeof(pdu)); pdu.present = NGAP_NGAP_PDU_PR_successfulOutcome; - pdu.choice.successfulOutcome = (NGAP_SuccessfulOutcome_t *)calloc(1,sizeof(struct NGAP_SuccessfulOutcome)); - pdu.choice.successfulOutcome->procedureCode = NGAP_ProcedureCode_id_InitialContextSetup; - pdu.choice.successfulOutcome->criticality = NGAP_Criticality_reject; - pdu.choice.successfulOutcome->value.present = NGAP_SuccessfulOutcome__value_PR_InitialContextSetupResponse; - out = &pdu.choice.successfulOutcome->value.choice.InitialContextSetupResponse; + asn1cCalloc(pdu.choice.successfulOutcome, head); + head->procedureCode = NGAP_ProcedureCode_id_InitialContextSetup; + head->criticality = NGAP_Criticality_reject; + head->value.present = NGAP_SuccessfulOutcome__value_PR_InitialContextSetupResponse; + NGAP_InitialContextSetupResponse_t *out = &head->value.choice.InitialContextSetupResponse; /* mandatory */ - ie = (NGAP_InitialContextSetupResponseIEs_t *)calloc(1, sizeof(NGAP_InitialContextSetupResponseIEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_InitialContextSetupResponseIEs__value_PR_AMF_UE_NGAP_ID; - //ie->value.choice.AMF_UE_NGAP_ID = ue_context_p->amf_ue_ngap_id; - asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_InitialContextSetupResponseIEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_InitialContextSetupResponseIEs__value_PR_AMF_UE_NGAP_ID; + // ie->value.choice.AMF_UE_NGAP_ID = ue_context_p->amf_ue_ngap_id; + asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); + } /* mandatory */ - ie = (NGAP_InitialContextSetupResponseIEs_t *)calloc(1, sizeof(NGAP_InitialContextSetupResponseIEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_InitialContextSetupResponseIEs__value_PR_RAN_UE_NGAP_ID; - ie->value.choice.RAN_UE_NGAP_ID = initial_ctxt_resp_p->gNB_ue_ngap_id; - asn1cSeqAdd(&out->protocolIEs.list, ie); - + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_InitialContextSetupResponseIEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_InitialContextSetupResponseIEs__value_PR_RAN_UE_NGAP_ID; + ie->value.choice.RAN_UE_NGAP_ID = initial_ctxt_resp_p->gNB_ue_ngap_id; + } /* optional */ if (initial_ctxt_resp_p->nb_of_pdusessions){ - ie = (NGAP_InitialContextSetupResponseIEs_t *)calloc(1, sizeof(NGAP_InitialContextSetupResponseIEs_t)); + asn1cSequenceAdd(out->protocolIEs.list, NGAP_InitialContextSetupResponseIEs_t, ie); ie->id = NGAP_ProtocolIE_ID_id_PDUSessionResourceSetupListCxtRes; ie->criticality = NGAP_Criticality_ignore; ie->value.present = NGAP_InitialContextSetupResponseIEs__value_PR_PDUSessionResourceSetupListCxtRes; for (i = 0; i < initial_ctxt_resp_p->nb_of_pdusessions; i++) { - NGAP_PDUSessionResourceSetupItemCxtRes_t *item; - NGAP_PDUSessionResourceSetupResponseTransfer_t *pdusessionTransfer_p = NULL; - - /* mandatory */ - item = (NGAP_PDUSessionResourceSetupItemCxtRes_t *)calloc(1, sizeof(NGAP_PDUSessionResourceSetupItemCxtRes_t)); - + asn1cSequenceAdd(ie->value.choice.PDUSessionResourceSetupListCxtRes.list, NGAP_PDUSessionResourceSetupItemCxtRes_t, item); /* pDUSessionID */ item->pDUSessionID = initial_ctxt_resp_p->pdusessions[i].pdusession_id; /* dLQosFlowPerTNLInformation */ - pdusessionTransfer_p = (NGAP_PDUSessionResourceSetupResponseTransfer_t *)calloc(1, sizeof(NGAP_PDUSessionResourceSetupResponseTransfer_t)); + NGAP_PDUSessionResourceSetupResponseTransfer_t pdusessionTransfer = {0}; - pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.present = NGAP_UPTransportLayerInformation_PR_gTPTunnel; - - pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel = (NGAP_GTPTunnel_t *)calloc(1, sizeof(NGAP_GTPTunnel_t)); - struct NGAP_GTPTunnel *tmp=pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel; + pdusessionTransfer.dLQosFlowPerTNLInformation.uPTransportLayerInformation.present = NGAP_UPTransportLayerInformation_PR_gTPTunnel; + + asn1cCalloc(pdusessionTransfer.dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel, tmp); GTP_TEID_TO_ASN1(initial_ctxt_resp_p->pdusessions[i].gtp_teid, &tmp->gTP_TEID); + allocAddrCopy(&tmp->transportLayerAddress, initial_ctxt_resp_p->pdusessions[i].gNB_addr); - tmp->transportLayerAddress.buf = malloc(initial_ctxt_resp_p->pdusessions[i].gNB_addr.length); - - memcpy(tmp->transportLayerAddress.buf, - initial_ctxt_resp_p->pdusessions[i].gNB_addr.buffer, - initial_ctxt_resp_p->pdusessions[i].gNB_addr.length); - tmp->transportLayerAddress.size = initial_ctxt_resp_p->pdusessions[i].gNB_addr.length; - tmp->transportLayerAddress.bits_unused = 0; - - NGAP_DEBUG("initial_ctxt_resp_p: pdusession ID %ld\n", - item->pDUSessionID); + NGAP_DEBUG("initial_ctxt_resp_p: pdusession ID %ld\n", item->pDUSessionID); /* associatedQosFlowList. number of 1? */ for(int j=0; j < initial_ctxt_resp_p->pdusessions[i].nb_of_qos_flow; j++) { - NGAP_AssociatedQosFlowItem_t *ass_qos_item_p; - ass_qos_item_p = (NGAP_AssociatedQosFlowItem_t *)calloc(1, sizeof(NGAP_AssociatedQosFlowItem_t)); - + asn1cSequenceAdd(pdusessionTransfer.dLQosFlowPerTNLInformation.associatedQosFlowList.list, NGAP_AssociatedQosFlowItem_t, ass_qos_item_p); /* qosFlowIdentifier */ ass_qos_item_p->qosFlowIdentifier = initial_ctxt_resp_p->pdusessions[i].associated_qos_flows[j].qfi; - - /* qosFlowMappingIndication */ - //if(initial_ctxt_resp_p->pdusessions[i].associated_qos_flows[j].qos_flow_mapping_ind != QOSFLOW_MAPPING_INDICATION_NON) { - // ass_qos_item_p->qosFlowMappingIndication = malloc(sizeof(*ass_qos_item_p->qosFlowMappingIndication)); - // *ass_qos_item_p->qosFlowMappingIndication = initial_ctxt_resp_p->pdusessions[i].associated_qos_flows[j].qos_flow_mapping_ind; - // } - asn1cSeqAdd(&pdusessionTransfer_p->dLQosFlowPerTNLInformation.associatedQosFlowList.list, ass_qos_item_p); - } - - //res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer, pdusessionTransfer_p); - //item->pDUSessionResourceSetupResponseTransfer.buf = res.buffer; - //item->pDUSessionResourceSetupResponseTransfer.size = res.result.encoded; - - if (asn1_xer_print) { - xer_fprint(stdout, &asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer, pdusessionTransfer_p); } - memset(pdusessionTransfer_buffer, 0, 1000); - asn_enc_rval_t enc_rval = aper_encode_to_buffer(&asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer, - NULL, - pdusessionTransfer_p, - pdusessionTransfer_buffer,1000); - AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n", enc_rval.failed_type->name, enc_rval.encoded); - item->pDUSessionResourceSetupResponseTransfer.buf = pdusessionTransfer_buffer; - item->pDUSessionResourceSetupResponseTransfer.size = enc_rval.encoded; + void *pdusessionTransfer_buffer; + ssize_t encoded = aper_encode_to_new_buffer(&asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer, NULL, &pdusessionTransfer, &pdusessionTransfer_buffer); + AssertFatal(encoded > 0, "ASN1 message encoding failed !\n"); + item->pDUSessionResourceSetupResponseTransfer.buf = pdusessionTransfer_buffer; + item->pDUSessionResourceSetupResponseTransfer.size = encoded; - ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer, pdusessionTransfer_p); - - asn1cSeqAdd(&ie->value.choice.PDUSessionResourceSetupListCxtRes.list, item); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer, &pdusessionTransfer); } - - asn1cSeqAdd(&out->protocolIEs.list, ie); } /* optional */ if (initial_ctxt_resp_p->nb_of_pdusessions_failed) { - ie = (NGAP_InitialContextSetupResponseIEs_t *)calloc(1, sizeof(NGAP_InitialContextSetupResponseIEs_t)); + asn1cSequenceAdd(out->protocolIEs.list, NGAP_InitialContextSetupResponseIEs_t, ie); ie->id = NGAP_ProtocolIE_ID_id_PDUSessionResourceFailedToSetupListCxtRes; ie->criticality = NGAP_Criticality_ignore; ie->value.present = NGAP_InitialContextSetupResponseIEs__value_PR_PDUSessionResourceFailedToSetupListCxtRes; for (i = 0; i < initial_ctxt_resp_p->nb_of_pdusessions_failed; i++) { - NGAP_PDUSessionResourceFailedToSetupItemCxtRes_t *item= calloc(1, sizeof *item); - NGAP_PDUSessionResourceSetupUnsuccessfulTransfer_t *pdusessionUnTransfer_p = calloc(1, sizeof *pdusessionUnTransfer_p); + asn1cSequenceAdd(ie->value.choice.PDUSessionResourceFailedToSetupListCxtRes.list, NGAP_PDUSessionResourceFailedToSetupItemCxtRes_t, item); + NGAP_PDUSessionResourceSetupUnsuccessfulTransfer_t pdusessionUnTransfer = {0}; - /* pDUSessionID */ - item->pDUSessionID = initial_ctxt_resp_p->pdusessions_failed[i].pdusession_id; + /* pDUSessionID */ + item->pDUSessionID = initial_ctxt_resp_p->pdusessions_failed[i].pdusession_id; - /* cause */ + /* cause */ + pdusessionUnTransfer.cause.present = initial_ctxt_resp_p->pdusessions_failed[i].cause; + switch (pdusessionUnTransfer.cause.present) { + case NGAP_CAUSE_RADIO_NETWORK: + pdusessionUnTransfer.cause.choice.radioNetwork = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; + break; - pdusessionUnTransfer_p->cause.present = initial_ctxt_resp_p->pdusessions_failed[i].cause; - switch(pdusessionUnTransfer_p->cause.present) { - case NGAP_Cause_PR_radioNetwork: - pdusessionUnTransfer_p->cause.choice.radioNetwork = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; - break; + case NGAP_CAUSE_TRANSPORT: + pdusessionUnTransfer.cause.choice.transport = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; + break; - case NGAP_Cause_PR_transport: - pdusessionUnTransfer_p->cause.choice.transport = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; - break; + case NGAP_CAUSE_NAS: + pdusessionUnTransfer.cause.choice.nas = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; + break; - case NGAP_Cause_PR_nas: - pdusessionUnTransfer_p->cause.choice.nas = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; - break; + case NGAP_CAUSE_PROTOCOL: + pdusessionUnTransfer.cause.choice.protocol = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; + break; - case NGAP_Cause_PR_protocol: - pdusessionUnTransfer_p->cause.choice.protocol = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; - break; + case NGAP_CAUSE_MISC: + pdusessionUnTransfer.cause.choice.misc = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; + break; - case NGAP_Cause_PR_misc: - pdusessionUnTransfer_p->cause.choice.misc = initial_ctxt_resp_p->pdusessions_failed[i].cause_value; - break; - - case NGAP_Cause_PR_NOTHING: + case NGAP_CAUSE_NOTHING: default: - break; - } + break; + } - NGAP_DEBUG("initial context setup response: failed pdusession ID %ld\n", item->pDUSessionID); + NGAP_DEBUG("initial context setup response: failed pdusession ID %ld\n", item->pDUSessionID); + asn_encode_to_new_buffer_result_t res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_NGAP_PDUSessionResourceSetupUnsuccessfulTransfer, &pdusessionUnTransfer); + AssertFatal(res.buffer, "ASN1 message encoding failed (%s, %lu)!\n", res.result.failed_type->name, res.result.encoded); + item->pDUSessionResourceSetupUnsuccessfulTransfer.buf = res.buffer; + item->pDUSessionResourceSetupUnsuccessfulTransfer.size = res.result.encoded; - memset(&res, 0, sizeof(res)); - res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_NGAP_PDUSessionResourceSetupUnsuccessfulTransfer, pdusessionUnTransfer_p); - item->pDUSessionResourceSetupUnsuccessfulTransfer.buf = res.buffer; - item->pDUSessionResourceSetupUnsuccessfulTransfer.size = res.result.encoded; - - ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_PDUSessionResourceSetupUnsuccessfulTransfer, pdusessionUnTransfer_p); - - asn1cSeqAdd(&ie->value.choice.PDUSessionResourceFailedToSetupListCxtRes.list, item); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_PDUSessionResourceSetupUnsuccessfulTransfer, &pdusessionUnTransfer); } - - asn1cSeqAdd(&out->protocolIEs.list, ie); } /* optional */ if (0) { - ie = (NGAP_InitialContextSetupResponseIEs_t *)calloc(1, sizeof(NGAP_InitialContextSetupResponseIEs_t)); + asn1cSequenceAdd(out->protocolIEs.list, NGAP_InitialContextSetupResponseIEs_t, ie); ie->id = NGAP_ProtocolIE_ID_id_CriticalityDiagnostics; ie->criticality = NGAP_Criticality_ignore; ie->value.present = NGAP_InitialContextSetupResponseIEs__value_PR_CriticalityDiagnostics; // ie->value.choice.CriticalityDiagnostics =; - asn1cSeqAdd(&out->protocolIEs.list, ie); } if (asn1_xer_print) { @@ -815,23 +723,17 @@ int ngap_gNB_initial_ctxt_resp( /* UE associated signalling -> use the allocated stream */ LOG_I(NR_RRC,"Send message to sctp: NGAP_InitialContextSetupResponse\n"); - ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance, - ue_context_p->amf_ref->assoc_id, buffer, - length, ue_context_p->tx_stream); + ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance, ue_context_p->amf_ref->assoc_id, buffer, length, ue_context_p->tx_stream); return 0; } //------------------------------------------------------------------------------ -int ngap_gNB_ue_capabilities(instance_t instance, - ngap_ue_cap_info_ind_t *ue_cap_info_ind_p) +int ngap_gNB_ue_capabilities(instance_t instance, ngap_ue_cap_info_ind_t *ue_cap_info_ind_p) //------------------------------------------------------------------------------ { ngap_gNB_instance_t *ngap_gNB_instance_p; struct ngap_gNB_ue_context_s *ue_context_p; - NGAP_NGAP_PDU_t pdu; - NGAP_UERadioCapabilityInfoIndication_t *out; - NGAP_UERadioCapabilityInfoIndicationIEs_t *ie; uint8_t *buffer; uint32_t length; /* Retrieve the NGAP gNB instance associated with Mod_id */ @@ -839,56 +741,57 @@ int ngap_gNB_ue_capabilities(instance_t instance, DevAssert(ue_cap_info_ind_p != NULL); DevAssert(ngap_gNB_instance_p != NULL); - if ((ue_context_p = ngap_gNB_get_ue_context(ngap_gNB_instance_p, - ue_cap_info_ind_p->gNB_ue_ngap_id)) == NULL) { + if ((ue_context_p = ngap_get_ue_context(ue_cap_info_ind_p->gNB_ue_ngap_id)) == NULL) { /* The context for this gNB ue ngap id doesn't exist in the map of gNB UEs */ - NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: %u\n", - ue_cap_info_ind_p->gNB_ue_ngap_id); + NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: %u\n", ue_cap_info_ind_p->gNB_ue_ngap_id); return -1; } /* UE radio capabilities message can occur either during an ngap connected state * or during initial attach (for example: NAS authentication). */ - if (!(ue_context_p->ue_state == NGAP_UE_CONNECTED || - ue_context_p->ue_state == NGAP_UE_WAITING_CSR)) { - NGAP_WARN("You are attempting to send NAS data over non-connected " - "gNB ue ngap id: %u, current state: %d\n", - ue_cap_info_ind_p->gNB_ue_ngap_id, ue_context_p->ue_state); + if (!(ue_context_p->ue_state == NGAP_UE_CONNECTED || ue_context_p->ue_state == NGAP_UE_WAITING_CSR)) { + NGAP_WARN( + "You are attempting to send NAS data over non-connected " + "gNB ue ngap id: %u, current state: %d\n", + ue_cap_info_ind_p->gNB_ue_ngap_id, + ue_context_p->ue_state); return -1; } /* Prepare the NGAP message to encode */ - memset(&pdu, 0, sizeof(pdu)); + NGAP_NGAP_PDU_t pdu = {0}; pdu.present = NGAP_NGAP_PDU_PR_initiatingMessage; - pdu.choice.initiatingMessage = (NGAP_InitiatingMessage_t *)calloc(1,sizeof(NGAP_InitiatingMessage_t)); - pdu.choice.initiatingMessage->procedureCode = NGAP_ProcedureCode_id_UERadioCapabilityInfoIndication; - pdu.choice.initiatingMessage->criticality = NGAP_Criticality_ignore; - pdu.choice.initiatingMessage->value.present = NGAP_InitiatingMessage__value_PR_UERadioCapabilityInfoIndication; - out = &pdu.choice.initiatingMessage->value.choice.UERadioCapabilityInfoIndication; + asn1cCalloc(pdu.choice.initiatingMessage, head); + head->procedureCode = NGAP_ProcedureCode_id_UERadioCapabilityInfoIndication; + head->criticality = NGAP_Criticality_ignore; + head->value.present = NGAP_InitiatingMessage__value_PR_UERadioCapabilityInfoIndication; + NGAP_UERadioCapabilityInfoIndication_t *out = &head->value.choice.UERadioCapabilityInfoIndication; /* mandatory */ - ie = (NGAP_UERadioCapabilityInfoIndicationIEs_t *)calloc(1, sizeof(NGAP_UERadioCapabilityInfoIndicationIEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_reject; - ie->value.present = NGAP_UERadioCapabilityInfoIndicationIEs__value_PR_AMF_UE_NGAP_ID; - //ie->value.choice.AMF_UE_NGAP_ID = ue_context_p->amf_ue_ngap_id; - asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_UERadioCapabilityInfoIndicationIEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_reject; + ie->value.present = NGAP_UERadioCapabilityInfoIndicationIEs__value_PR_AMF_UE_NGAP_ID; + asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); + } /* mandatory */ - ie = (NGAP_UERadioCapabilityInfoIndicationIEs_t *)calloc(1, sizeof(NGAP_UERadioCapabilityInfoIndicationIEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_reject; - ie->value.present = NGAP_UERadioCapabilityInfoIndicationIEs__value_PR_RAN_UE_NGAP_ID; - ie->value.choice.RAN_UE_NGAP_ID = ue_cap_info_ind_p->gNB_ue_ngap_id; - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_UERadioCapabilityInfoIndicationIEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_reject; + ie->value.present = NGAP_UERadioCapabilityInfoIndicationIEs__value_PR_RAN_UE_NGAP_ID; + ie->value.choice.RAN_UE_NGAP_ID = (int64_t)ue_cap_info_ind_p->gNB_ue_ngap_id; + } /* mandatory */ - ie = (NGAP_UERadioCapabilityInfoIndicationIEs_t *)calloc(1, sizeof(NGAP_UERadioCapabilityInfoIndicationIEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_UERadioCapability; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_UERadioCapabilityInfoIndicationIEs__value_PR_UERadioCapability; - ie->value.choice.UERadioCapability.buf = ue_cap_info_ind_p->ue_radio_cap.buffer; - ie->value.choice.UERadioCapability.size = ue_cap_info_ind_p->ue_radio_cap.length; - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_UERadioCapabilityInfoIndicationIEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_UERadioCapability; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_UERadioCapabilityInfoIndicationIEs__value_PR_UERadioCapability; + ie->value.choice.UERadioCapability.buf = ue_cap_info_ind_p->ue_radio_cap.buffer; + ie->value.choice.UERadioCapability.size = ue_cap_info_ind_p->ue_radio_cap.length; + } /* optional */ //NGAP_UERadioCapabilityForPaging TBD if (ngap_gNB_encode_pdu(&pdu, &buffer, &length) < 0) { @@ -898,22 +801,17 @@ int ngap_gNB_ue_capabilities(instance_t instance, } /* UE associated signalling -> use the allocated stream */ - ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance, - ue_context_p->amf_ref->assoc_id, buffer, - length, ue_context_p->tx_stream); + ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance, ue_context_p->amf_ref->assoc_id, buffer, length, ue_context_p->tx_stream); return 0; } //------------------------------------------------------------------------------ -int ngap_gNB_pdusession_setup_resp(instance_t instance, - ngap_pdusession_setup_resp_t *pdusession_setup_resp_p) +int ngap_gNB_pdusession_setup_resp(instance_t instance, ngap_pdusession_setup_resp_t *pdusession_setup_resp_p) //------------------------------------------------------------------------------ { ngap_gNB_instance_t *ngap_gNB_instance_p = NULL; struct ngap_gNB_ue_context_s *ue_context_p = NULL; - NGAP_NGAP_PDU_t pdu; - NGAP_PDUSessionResourceSetupResponse_t *out; - NGAP_PDUSessionResourceSetupResponseIEs_t *ie; + NGAP_NGAP_PDU_t pdu = {0}; uint8_t *buffer = NULL; uint32_t length; @@ -922,185 +820,160 @@ int ngap_gNB_pdusession_setup_resp(instance_t instance, DevAssert(pdusession_setup_resp_p != NULL); DevAssert(ngap_gNB_instance_p != NULL); - if ((ue_context_p = ngap_gNB_get_ue_context(ngap_gNB_instance_p, - pdusession_setup_resp_p->gNB_ue_ngap_id)) == NULL) { + if ((ue_context_p = ngap_get_ue_context(pdusession_setup_resp_p->gNB_ue_ngap_id)) == NULL) { /* The context for this gNB ue ngap id doesn't exist in the map of gNB UEs */ - NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: 0x%08x\n", - pdusession_setup_resp_p->gNB_ue_ngap_id); + NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: 0x%08x\n", pdusession_setup_resp_p->gNB_ue_ngap_id); return -1; } /* Uplink NAS transport can occur either during an ngap connected state * or during initial attach (for example: NAS authentication). */ - if (!(ue_context_p->ue_state == NGAP_UE_CONNECTED || - ue_context_p->ue_state == NGAP_UE_WAITING_CSR)) { - NGAP_WARN("You are attempting to send NAS data over non-connected " - "gNB ue ngap id: %08x, current state: %d\n", - pdusession_setup_resp_p->gNB_ue_ngap_id, ue_context_p->ue_state); + if (!(ue_context_p->ue_state == NGAP_UE_CONNECTED || ue_context_p->ue_state == NGAP_UE_WAITING_CSR)) { + NGAP_WARN( + "You are attempting to send NAS data over non-connected " + "gNB ue ngap id: %08x, current state: %d\n", + pdusession_setup_resp_p->gNB_ue_ngap_id, + ue_context_p->ue_state); return -1; } /* Prepare the NGAP message to encode */ - memset(&pdu, 0, sizeof(pdu)); pdu.present = NGAP_NGAP_PDU_PR_successfulOutcome; - pdu.choice.successfulOutcome = calloc(1,sizeof *pdu.choice.successfulOutcome); - pdu.choice.successfulOutcome->procedureCode = NGAP_ProcedureCode_id_PDUSessionResourceSetup; - pdu.choice.successfulOutcome->criticality = NGAP_Criticality_reject; - pdu.choice.successfulOutcome->value.present = NGAP_SuccessfulOutcome__value_PR_PDUSessionResourceSetupResponse; - out = &pdu.choice.successfulOutcome->value.choice.PDUSessionResourceSetupResponse; + asn1cCalloc(pdu.choice.successfulOutcome, successfulOutcome); + successfulOutcome->procedureCode = NGAP_ProcedureCode_id_PDUSessionResourceSetup; + successfulOutcome->criticality = NGAP_Criticality_reject; + successfulOutcome->value.present = NGAP_SuccessfulOutcome__value_PR_PDUSessionResourceSetupResponse; + NGAP_PDUSessionResourceSetupResponse_t *out = &successfulOutcome->value.choice.PDUSessionResourceSetupResponse; /* mandatory */ - ie = calloc(1, sizeof *ie); - ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_PDUSessionResourceSetupResponseIEs__value_PR_AMF_UE_NGAP_ID; - asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_PDUSessionResourceSetupResponseIEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_PDUSessionResourceSetupResponseIEs__value_PR_AMF_UE_NGAP_ID; + asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); + } /* mandatory */ - ie = calloc(1, sizeof *ie ); - ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_PDUSessionResourceSetupResponseIEs__value_PR_RAN_UE_NGAP_ID; - ie->value.choice.RAN_UE_NGAP_ID = pdusession_setup_resp_p->gNB_ue_ngap_id; - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_PDUSessionResourceSetupResponseIEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_PDUSessionResourceSetupResponseIEs__value_PR_RAN_UE_NGAP_ID; + ie->value.choice.RAN_UE_NGAP_ID = pdusession_setup_resp_p->gNB_ue_ngap_id; + } /* optional */ if (pdusession_setup_resp_p->nb_of_pdusessions > 0) { - ie = calloc(1, sizeof *ie ); - ie->id = NGAP_ProtocolIE_ID_id_PDUSessionResourceSetupListSURes; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_PDUSessionResourceSetupResponseIEs__value_PR_PDUSessionResourceSetupListSURes; + asn1cSequenceAdd(out->protocolIEs.list, NGAP_PDUSessionResourceSetupResponseIEs_t, ie3); + ie3->id = NGAP_ProtocolIE_ID_id_PDUSessionResourceSetupListSURes; + ie3->criticality = NGAP_Criticality_ignore; + ie3->value.present = NGAP_PDUSessionResourceSetupResponseIEs__value_PR_PDUSessionResourceSetupListSURes; for (int i = 0; i < pdusession_setup_resp_p->nb_of_pdusessions; i++) { - NGAP_PDUSessionResourceSetupItemSURes_t *item=calloc(1, sizeof *item ); - NGAP_PDUSessionResourceSetupResponseTransfer_t *pdusessionTransfer_p = calloc(1, sizeof *pdusessionTransfer_p ); - + pdusession_setup_t *pdusession = pdusession_setup_resp_p->pdusessions + i; + asn1cSequenceAdd(ie3->value.choice.PDUSessionResourceSetupListSURes.list, NGAP_PDUSessionResourceSetupItemSURes_t, item); /* pDUSessionID */ - item->pDUSessionID = pdusession_setup_resp_p->pdusessions[i].pdusession_id; + item->pDUSessionID = pdusession->pdusession_id; /* dLQosFlowPerTNLInformation */ - - pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.present = NGAP_UPTransportLayerInformation_PR_gTPTunnel; - pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel = - calloc(1, sizeof(struct NGAP_GTPTunnel)); - struct NGAP_GTPTunnel *tmp=pdusessionTransfer_p->dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel; - GTP_TEID_TO_ASN1(pdusession_setup_resp_p->pdusessions[i].gtp_teid, &tmp->gTP_TEID); - if (pdusession_setup_resp_p->pdusessions[i].gNB_addr.length) { - tmp->transportLayerAddress.buf = malloc(pdusession_setup_resp_p->pdusessions[i].gNB_addr.length); - - memcpy(tmp->transportLayerAddress.buf, - pdusession_setup_resp_p->pdusessions[i].gNB_addr.buffer, - pdusession_setup_resp_p->pdusessions[i].gNB_addr.length); - tmp->transportLayerAddress.size = pdusession_setup_resp_p->pdusessions[i].gNB_addr.length; - tmp->transportLayerAddress.bits_unused = 0; - - NGAP_DEBUG("pdusession_setup_resp_p: pdusession ID %ld, gnb_addr %d.%d.%d.%d, SIZE %ld \n", - item->pDUSessionID, - tmp->transportLayerAddress.buf[0], - tmp->transportLayerAddress.buf[1], - tmp->transportLayerAddress.buf[2], - tmp->transportLayerAddress.buf[3], - tmp->transportLayerAddress.size); - } - + NGAP_PDUSessionResourceSetupResponseTransfer_t pdusessionTransfer = {0}; + pdusessionTransfer.dLQosFlowPerTNLInformation.uPTransportLayerInformation.present = NGAP_UPTransportLayerInformation_PR_gTPTunnel; + asn1cCalloc(pdusessionTransfer.dLQosFlowPerTNLInformation.uPTransportLayerInformation.choice.gTPTunnel, tmp); + GTP_TEID_TO_ASN1(pdusession->gtp_teid, &tmp->gTP_TEID); + allocAddrCopy(&tmp->transportLayerAddress, pdusession->gNB_addr); + NGAP_DEBUG("pdusession_setup_resp_p: pdusession ID %ld, gnb_addr %d.%d.%d.%d, SIZE %ld \n", + item->pDUSessionID, + tmp->transportLayerAddress.buf[0], + tmp->transportLayerAddress.buf[1], + tmp->transportLayerAddress.buf[2], + tmp->transportLayerAddress.buf[3], + tmp->transportLayerAddress.size); /* associatedQosFlowList. number of 1? */ for(int j=0; j < pdusession_setup_resp_p->pdusessions[i].nb_of_qos_flow; j++) { - NGAP_AssociatedQosFlowItem_t *ass_qos_item_p = calloc(1, sizeof *ass_qos_item_p); + asn1cSequenceAdd(pdusessionTransfer.dLQosFlowPerTNLInformation.associatedQosFlowList.list, NGAP_AssociatedQosFlowItem_t, ass_qos_item_p); /* qosFlowIdentifier */ ass_qos_item_p->qosFlowIdentifier = pdusession_setup_resp_p->pdusessions[i].associated_qos_flows[j].qfi; /* qosFlowMappingIndication */ - //if(pdusession_setup_resp_p->pdusessions[i].associated_qos_flows[j].qos_flow_mapping_ind != QOSFLOW_MAPPING_INDICATION_NON) { - // ass_qos_item_p->qosFlowMappingIndication = malloc(sizeof(*ass_qos_item_p->qosFlowMappingIndication)); - // *ass_qos_item_p->qosFlowMappingIndication = pdusession_setup_resp_p->pdusessions[i].associated_qos_flows[j].qos_flow_mapping_ind; - //} - asn1cSeqAdd(&pdusessionTransfer_p->dLQosFlowPerTNLInformation.associatedQosFlowList.list, ass_qos_item_p); + // if(pdusession_setup_resp_p->pdusessions[i].associated_qos_flows[j].qos_flow_mapping_ind != QOSFLOW_MAPPING_INDICATION_NON) { + // ass_qos_item_p->qosFlowMappingIndication = malloc(sizeof(*ass_qos_item_p->qosFlowMappingIndication)); + // *ass_qos_item_p->qosFlowMappingIndication = pdusession_setup_resp_p->pdusessions[i].associated_qos_flows[j].qos_flow_mapping_ind; + // } } - asn_encode_to_new_buffer_result_t res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, - &asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer, pdusessionTransfer_p); + asn_encode_to_new_buffer_result_t res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer, &pdusessionTransfer); AssertFatal (res.buffer, "ASN1 message encoding failed (%s, %lu)!\n", res.result.failed_type->name, res.result.encoded); item->pDUSessionResourceSetupResponseTransfer.buf = res.buffer; item->pDUSessionResourceSetupResponseTransfer.size = res.result.encoded; - ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer, pdusessionTransfer_p); - - asn1cSeqAdd(&ie->value.choice.PDUSessionResourceSetupListSURes.list, item); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_PDUSessionResourceSetupResponseTransfer, &pdusessionTransfer); } - asn1cSeqAdd(&out->protocolIEs.list, ie); } /* optional */ if (pdusession_setup_resp_p->nb_of_pdusessions_failed > 0) { - ie = calloc(1, sizeof *ie); + asn1cSequenceAdd(out->protocolIEs.list, NGAP_PDUSessionResourceSetupResponseIEs_t, ie); ie->id = NGAP_ProtocolIE_ID_id_PDUSessionResourceFailedToSetupListSURes; ie->criticality = NGAP_Criticality_ignore; ie->value.present = NGAP_PDUSessionResourceSetupResponseIEs__value_PR_PDUSessionResourceFailedToSetupListSURes; for (int i = 0; i < pdusession_setup_resp_p->nb_of_pdusessions_failed; i++) { LOG_W(NGAP,"add a failed session\n"); - NGAP_PDUSessionResourceFailedToSetupItemSURes_t *item=calloc(1, sizeof *item); - NGAP_PDUSessionResourceSetupUnsuccessfulTransfer_t *pdusessionUnTransfer_p = calloc(1, sizeof *pdusessionUnTransfer_p); + pdusession_failed_t *pdusession_failed = pdusession_setup_resp_p->pdusessions_failed + i; + asn1cSequenceAdd(ie->value.choice.PDUSessionResourceFailedToSetupListSURes.list, NGAP_PDUSessionResourceFailedToSetupItemSURes_t, item); + NGAP_PDUSessionResourceSetupUnsuccessfulTransfer_t pdusessionUnTransfer_p = {0}; /* pDUSessionID */ - item->pDUSessionID = pdusession_setup_resp_p->pdusessions_failed[i].pdusession_id; + item->pDUSessionID = pdusession_failed->pdusession_id; /* cause */ - pdusessionUnTransfer_p->cause.present = pdusession_setup_resp_p->pdusessions_failed[i].cause; - switch(pdusessionUnTransfer_p->cause.present) { - case NGAP_Cause_PR_radioNetwork: - pdusessionUnTransfer_p->cause.choice.radioNetwork = pdusession_setup_resp_p->pdusessions_failed[i].cause_value; - break; + pdusessionUnTransfer_p.cause.present = pdusession_failed->cause; + switch (pdusessionUnTransfer_p.cause.present) { + case NGAP_CAUSE_RADIO_NETWORK: + pdusessionUnTransfer_p.cause.choice.radioNetwork = pdusession_failed->cause_value; + break; - case NGAP_Cause_PR_transport: - pdusessionUnTransfer_p->cause.choice.transport = pdusession_setup_resp_p->pdusessions_failed[i].cause_value; - break; + case NGAP_CAUSE_TRANSPORT: + pdusessionUnTransfer_p.cause.choice.transport = pdusession_failed->cause_value; + break; - case NGAP_Cause_PR_nas: - pdusessionUnTransfer_p->cause.choice.nas = pdusession_setup_resp_p->pdusessions_failed[i].cause_value; - break; + case NGAP_CAUSE_NAS: + pdusessionUnTransfer_p.cause.choice.nas = pdusession_failed->cause_value; + break; - case NGAP_Cause_PR_protocol: - pdusessionUnTransfer_p->cause.choice.protocol = pdusession_setup_resp_p->pdusessions_failed[i].cause_value; - break; + case NGAP_CAUSE_PROTOCOL: + pdusessionUnTransfer_p.cause.choice.protocol = pdusession_failed->cause_value; + break; - case NGAP_Cause_PR_misc: - pdusessionUnTransfer_p->cause.choice.misc = pdusession_setup_resp_p->pdusessions_failed[i].cause_value; - break; + case NGAP_CAUSE_MISC: + pdusessionUnTransfer_p.cause.choice.misc = pdusession_failed->cause_value; + break; - case NGAP_Cause_PR_NOTHING: - default: - break; + case NGAP_CAUSE_NOTHING: + default: + break; } NGAP_DEBUG("pdusession setup response: failed pdusession ID %ld\n", item->pDUSessionID); - asn_encode_to_new_buffer_result_t res = - asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, - &asn_DEF_NGAP_PDUSessionResourceSetupUnsuccessfulTransfer, pdusessionUnTransfer_p); + asn_encode_to_new_buffer_result_t res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_NGAP_PDUSessionResourceSetupUnsuccessfulTransfer, &pdusessionUnTransfer_p); item->pDUSessionResourceSetupUnsuccessfulTransfer.buf = res.buffer; item->pDUSessionResourceSetupUnsuccessfulTransfer.size = res.result.encoded; - ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_PDUSessionResourceSetupUnsuccessfulTransfer, pdusessionUnTransfer_p); - - asn1cSeqAdd(&ie->value.choice.PDUSessionResourceFailedToSetupListSURes.list, item); + ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_PDUSessionResourceSetupUnsuccessfulTransfer, &pdusessionUnTransfer_p); } - - asn1cSeqAdd(&out->protocolIEs.list, ie); } /* optional */ if (0) { - ie = calloc(1, sizeof *ie); - ie->id = NGAP_ProtocolIE_ID_id_CriticalityDiagnostics; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_PDUSessionResourceSetupResponseIEs__value_PR_CriticalityDiagnostics; - // ie->value.choice.CriticalityDiagnostics = ; - asn1cSeqAdd(&out->protocolIEs.list, ie); + asn1cSequenceAdd(out->protocolIEs.list, NGAP_PDUSessionResourceSetupResponseIEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_CriticalityDiagnostics; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_PDUSessionResourceSetupResponseIEs__value_PR_CriticalityDiagnostics; + // ie->value.choice.CriticalityDiagnostics = ; } - if (ngap_gNB_encode_pdu(&pdu, &buffer, &length) < 0) { NGAP_ERROR("Failed to encode uplink transport\n"); /* Encode procedure has failed... */ @@ -1108,100 +981,90 @@ int ngap_gNB_pdusession_setup_resp(instance_t instance, } /* UE associated signalling -> use the allocated stream */ - ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance, - ue_context_p->amf_ref->assoc_id, buffer, - length, ue_context_p->tx_stream); + ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance, ue_context_p->amf_ref->assoc_id, buffer, length, ue_context_p->tx_stream); return 0; } //------------------------------------------------------------------------------ -int ngap_gNB_pdusession_modify_resp(instance_t instance, - ngap_pdusession_modify_resp_t *pdusession_modify_resp_p) +int ngap_gNB_pdusession_modify_resp(instance_t instance, ngap_pdusession_modify_resp_t *pdusession_modify_resp_p) //------------------------------------------------------------------------------ { ngap_gNB_instance_t *ngap_gNB_instance_p = NULL; struct ngap_gNB_ue_context_s *ue_context_p = NULL; - NGAP_NGAP_PDU_t pdu; - NGAP_PDUSessionResourceModifyResponse_t *out; - NGAP_PDUSessionResourceModifyResponseIEs_t *ie; + NGAP_NGAP_PDU_t pdu; uint8_t *buffer = NULL; uint32_t length; - int i; - asn_encode_to_new_buffer_result_t res = { NULL, {0, NULL, NULL} }; - + /* Retrieve the NGAP gNB instance associated with Mod_id */ ngap_gNB_instance_p = ngap_gNB_get_instance(instance); DevAssert(pdusession_modify_resp_p != NULL); DevAssert(ngap_gNB_instance_p != NULL); - if ((ue_context_p = ngap_gNB_get_ue_context(ngap_gNB_instance_p, - pdusession_modify_resp_p->gNB_ue_ngap_id)) == NULL) { + if ((ue_context_p = ngap_get_ue_context(pdusession_modify_resp_p->gNB_ue_ngap_id)) == NULL) { /* The context for this gNB ue ngap id doesn't exist in the map of gNB UEs */ - NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: 0x%08x\n", - pdusession_modify_resp_p->gNB_ue_ngap_id); + NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: 0x%08x\n", pdusession_modify_resp_p->gNB_ue_ngap_id); return -1; } /* Uplink NAS transport can occur either during an ngap connected state * or during initial attach (for example: NAS authentication). */ - if (!(ue_context_p->ue_state == NGAP_UE_CONNECTED || - ue_context_p->ue_state == NGAP_UE_WAITING_CSR)) { - NGAP_WARN("You are attempting to send NAS data over non-connected " - "gNB ue ngap id: %08x, current state: %d\n", - pdusession_modify_resp_p->gNB_ue_ngap_id, ue_context_p->ue_state); + if (!(ue_context_p->ue_state == NGAP_UE_CONNECTED || ue_context_p->ue_state == NGAP_UE_WAITING_CSR)) { + NGAP_WARN( + "You are attempting to send NAS data over non-connected " + "gNB ue ngap id: %08x, current state: %d\n", + pdusession_modify_resp_p->gNB_ue_ngap_id, + ue_context_p->ue_state); return -1; } /* Prepare the NGAP message to encode */ memset(&pdu, 0, sizeof(pdu)); pdu.present = NGAP_NGAP_PDU_PR_successfulOutcome; - pdu.choice.successfulOutcome = (NGAP_SuccessfulOutcome_t *)calloc(1,sizeof(struct NGAP_SuccessfulOutcome)); - pdu.choice.successfulOutcome->procedureCode = NGAP_ProcedureCode_id_PDUSessionResourceModify; - pdu.choice.successfulOutcome->criticality = NGAP_Criticality_reject; - pdu.choice.successfulOutcome->value.present = NGAP_SuccessfulOutcome__value_PR_PDUSessionResourceModifyResponse; - out = &pdu.choice.successfulOutcome->value.choice.PDUSessionResourceModifyResponse; + asn1cCalloc(pdu.choice.successfulOutcome, head); + head->procedureCode = NGAP_ProcedureCode_id_PDUSessionResourceModify; + head->criticality = NGAP_Criticality_reject; + head->value.present = NGAP_SuccessfulOutcome__value_PR_PDUSessionResourceModifyResponse; + NGAP_PDUSessionResourceModifyResponse_t *out = &head->value.choice.PDUSessionResourceModifyResponse; /* mandatory */ - ie = (NGAP_PDUSessionResourceModifyResponseIEs_t *)calloc(1, sizeof(NGAP_PDUSessionResourceModifyResponseIEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_PDUSessionResourceModifyResponseIEs__value_PR_AMF_UE_NGAP_ID; - asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_PDUSessionResourceModifyResponseIEs_t, ie); + ie = (NGAP_PDUSessionResourceModifyResponseIEs_t *)calloc(1, sizeof(NGAP_PDUSessionResourceModifyResponseIEs_t)); + ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_PDUSessionResourceModifyResponseIEs__value_PR_AMF_UE_NGAP_ID; + asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); + asn1cSeqAdd(&out->protocolIEs.list, ie); + } /* mandatory */ - ie = (NGAP_PDUSessionResourceModifyResponseIEs_t *)calloc(1, sizeof(NGAP_PDUSessionResourceModifyResponseIEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_PDUSessionResourceModifyResponseIEs__value_PR_RAN_UE_NGAP_ID; - ie->value.choice.RAN_UE_NGAP_ID = pdusession_modify_resp_p->gNB_ue_ngap_id; - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_PDUSessionResourceModifyResponseIEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_PDUSessionResourceModifyResponseIEs__value_PR_RAN_UE_NGAP_ID; + ie->value.choice.RAN_UE_NGAP_ID = pdusession_modify_resp_p->gNB_ue_ngap_id; + } /* PDUSessionResourceModifyListModRes optional */ if (pdusession_modify_resp_p->nb_of_pdusessions > 0) { - ie = (NGAP_PDUSessionResourceModifyResponseIEs_t *)calloc(1, sizeof(NGAP_PDUSessionResourceModifyResponseIEs_t)); + asn1cSequenceAdd(out->protocolIEs.list, NGAP_PDUSessionResourceModifyResponseIEs_t, ie); ie->id = NGAP_ProtocolIE_ID_id_PDUSessionResourceModifyListModRes; ie->criticality = NGAP_Criticality_ignore; ie->value.present = NGAP_PDUSessionResourceModifyResponseIEs__value_PR_PDUSessionResourceModifyListModRes; - for (i = 0; i < pdusession_modify_resp_p->nb_of_pdusessions; i++) { - NGAP_PDUSessionResourceModifyItemModRes_t *item; - NGAP_PDUSessionResourceModifyResponseTransfer_t *transfer_p = NULL; - - item = (NGAP_PDUSessionResourceModifyItemModRes_t *)calloc(1, sizeof(NGAP_PDUSessionResourceModifyItemModRes_t)); + for (int i = 0; i < pdusession_modify_resp_p->nb_of_pdusessions; i++) { + asn1cSequenceAdd(ie->value.choice.PDUSessionResourceModifyListModRes.list, NGAP_PDUSessionResourceModifyItemModRes_t, item); item->pDUSessionID = pdusession_modify_resp_p->pdusessions[i].pdusession_id; - transfer_p = (NGAP_PDUSessionResourceModifyResponseTransfer_t *)calloc(1, sizeof(NGAP_PDUSessionResourceModifyResponseTransfer_t)); - transfer_p->qosFlowAddOrModifyResponseList = (NGAP_QosFlowAddOrModifyResponseList_t *)calloc(1, sizeof(NGAP_QosFlowAddOrModifyResponseList_t)); + NGAP_PDUSessionResourceModifyResponseTransfer_t transfer = {0}; + asn1cCalloc(transfer.qosFlowAddOrModifyResponseList, tmp); - uint8_t qos_flow_index; - for (qos_flow_index = 0; qos_flow_index < pdusession_modify_resp_p->pdusessions[i].nb_of_qos_flow; qos_flow_index++) { - NGAP_QosFlowAddOrModifyResponseItem_t *qosFlowAddOrModifyResponseItem_p = calloc(1, sizeof(NGAP_QosFlowAddOrModifyResponseItem_t)); - qosFlowAddOrModifyResponseItem_p->qosFlowIdentifier = - pdusession_modify_resp_p->pdusessions[i].qos[qos_flow_index].qfi; - asn1cSeqAdd(&transfer_p->qosFlowAddOrModifyResponseList->list, qosFlowAddOrModifyResponseItem_p); + for (int qos_flow_index = 0; qos_flow_index < pdusession_modify_resp_p->pdusessions[i].nb_of_qos_flow; qos_flow_index++) { + asn1cSequenceAdd(tmp->list, NGAP_QosFlowAddOrModifyResponseItem_t, qos); + qos->qosFlowIdentifier = pdusession_modify_resp_p->pdusessions[i].qos[qos_flow_index].qfi; } - - memset(&res, 0, sizeof(res)); + asn_encode_to_new_buffer_result_t res = {0}; + NGAP_PDUSessionResourceModifyResponseTransfer_t *transfer_p = NULL; res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_NGAP_PDUSessionResourceModifyResponseTransfer, transfer_p); item->pDUSessionResourceModifyResponseTransfer.buf = res.buffer; item->pDUSessionResourceModifyResponseTransfer.size = res.result.encoded; @@ -1209,82 +1072,70 @@ int ngap_gNB_pdusession_modify_resp(instance_t instance, ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_PDUSessionResourceModifyResponseTransfer, transfer_p); NGAP_DEBUG("pdusession_modify_resp: modified pdusession ID %ld\n", item->pDUSessionID); - asn1cSeqAdd(&ie->value.choice.PDUSessionResourceModifyListModRes.list, item); } - - asn1cSeqAdd(&out->protocolIEs.list, ie); } /* optional */ if (pdusession_modify_resp_p->nb_of_pdusessions_failed > 0) { - ie = (NGAP_PDUSessionResourceModifyResponseIEs_t *)calloc(1, sizeof(NGAP_PDUSessionResourceModifyResponseIEs_t)); + asn1cSequenceAdd(out->protocolIEs.list, NGAP_PDUSessionResourceModifyResponseIEs_t, ie); ie->id = NGAP_ProtocolIE_ID_id_PDUSessionResourceFailedToModifyListModRes; ie->criticality = NGAP_Criticality_ignore; ie->value.present = NGAP_PDUSessionResourceModifyResponseIEs__value_PR_PDUSessionResourceFailedToModifyListModRes; - for (i = 0; i < pdusession_modify_resp_p->nb_of_pdusessions_failed; i++) { - NGAP_PDUSessionResourceFailedToModifyItemModRes_t *item; - NGAP_PDUSessionResourceModifyUnsuccessfulTransfer_t *pdusessionTransfer_p = NULL; - - item = (NGAP_PDUSessionResourceFailedToModifyItemModRes_t *)calloc(1, sizeof(NGAP_PDUSessionResourceFailedToModifyItemModRes_t)); + for (int i = 0; i < pdusession_modify_resp_p->nb_of_pdusessions_failed; i++) { + asn1cSequenceAdd(ie->value.choice.PDUSessionResourceFailedToModifyListModRes.list, NGAP_PDUSessionResourceFailedToModifyItemModRes_t, item); item->pDUSessionID = pdusession_modify_resp_p->pdusessions_failed[i].pdusession_id; - pdusessionTransfer_p = (NGAP_PDUSessionResourceModifyUnsuccessfulTransfer_t *)calloc(1, sizeof(NGAP_PDUSessionResourceModifyUnsuccessfulTransfer_t)); - pdusessionTransfer_p->cause.present = pdusession_modify_resp_p->pdusessions_failed[i].cause; - - switch(pdusessionTransfer_p->cause.present) { - case NGAP_Cause_PR_radioNetwork: - pdusessionTransfer_p->cause.choice.radioNetwork = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; - break; + NGAP_PDUSessionResourceModifyUnsuccessfulTransfer_t pdusessionTransfer = {0}; + pdusessionTransfer.cause.present = pdusession_modify_resp_p->pdusessions_failed[i].cause; - case NGAP_Cause_PR_transport: - pdusessionTransfer_p->cause.choice.transport = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; - break; + switch (pdusessionTransfer.cause.present) { + case NGAP_CAUSE_RADIO_NETWORK: + pdusessionTransfer.cause.choice.radioNetwork = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; + break; - case NGAP_Cause_PR_nas: - pdusessionTransfer_p->cause.choice.nas = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; - break; + case NGAP_CAUSE_TRANSPORT: + pdusessionTransfer.cause.choice.transport = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; + break; - case NGAP_Cause_PR_protocol: - pdusessionTransfer_p->cause.choice.protocol = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; - break; + case NGAP_CAUSE_NAS: + pdusessionTransfer.cause.choice.nas = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; + break; - case NGAP_Cause_PR_misc: - pdusessionTransfer_p->cause.choice.misc = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; - break; + case NGAP_CAUSE_PROTOCOL: + pdusessionTransfer.cause.choice.protocol = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; + break; - case NGAP_Cause_PR_NOTHING: + case NGAP_CAUSE_MISC: + pdusessionTransfer.cause.choice.misc = pdusession_modify_resp_p->pdusessions_failed[i].cause_value; + break; + + case NGAP_CAUSE_NOTHING: default: break; } - memset(&res, 0, sizeof(res)); - res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_NGAP_PDUSessionResourceModifyUnsuccessfulTransfer, pdusessionTransfer_p); + asn_encode_to_new_buffer_result_t res = {0}; + NGAP_PDUSessionResourceModifyUnsuccessfulTransfer_t *pdusessionTransfer_p = NULL; + res = asn_encode_to_new_buffer(NULL, ATS_ALIGNED_CANONICAL_PER, &asn_DEF_NGAP_PDUSessionResourceModifyUnsuccessfulTransfer, &pdusessionTransfer); item->pDUSessionResourceModifyUnsuccessfulTransfer.buf = res.buffer; item->pDUSessionResourceModifyUnsuccessfulTransfer.size = res.result.encoded; ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_NGAP_PDUSessionResourceModifyUnsuccessfulTransfer, pdusessionTransfer_p); - NGAP_DEBUG("pdusession_modify_resp: failed pdusession ID %ld\n", item->pDUSessionID); - asn1cSeqAdd(&ie->value.choice.PDUSessionResourceFailedToModifyListModRes.list, item); } - - asn1cSeqAdd(&out->protocolIEs.list, ie); } /* optional */ if (0) { - ie = (NGAP_PDUSessionResourceModifyResponseIEs_t *)calloc(1, sizeof(NGAP_PDUSessionResourceModifyResponseIEs_t)); + asn1cSequenceAdd(out->protocolIEs.list, NGAP_PDUSessionResourceModifyResponseIEs_t, ie); ie->id = NGAP_ProtocolIE_ID_id_CriticalityDiagnostics; ie->criticality = NGAP_Criticality_ignore; ie->value.present = NGAP_PDUSessionResourceModifyResponseIEs__value_PR_CriticalityDiagnostics; // ie->value.choice.CriticalityDiagnostics = ; - asn1cSeqAdd(&out->protocolIEs.list, ie); } - fprintf(stderr, "start encode\n"); - if (ngap_gNB_encode_pdu(&pdu, &buffer, &length) < 0) { NGAP_ERROR("Failed to encode uplink transport\n"); /* Encode procedure has failed... */ @@ -1292,22 +1143,17 @@ int ngap_gNB_pdusession_modify_resp(instance_t instance, } /* UE associated signalling -> use the allocated stream */ - ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance, - ue_context_p->amf_ref->assoc_id, buffer, - length, ue_context_p->tx_stream); + ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance, ue_context_p->amf_ref->assoc_id, buffer, length, ue_context_p->tx_stream); return 0; } //------------------------------------------------------------------------------ -int ngap_gNB_pdusession_release_resp(instance_t instance, - ngap_pdusession_release_resp_t *pdusession_release_resp_p) +int ngap_gNB_pdusession_release_resp(instance_t instance, ngap_pdusession_release_resp_t *pdusession_release_resp_p) //------------------------------------------------------------------------------ { ngap_gNB_instance_t *ngap_gNB_instance_p = NULL; struct ngap_gNB_ue_context_s *ue_context_p = NULL; - NGAP_NGAP_PDU_t pdu; - NGAP_PDUSessionResourceReleaseResponse_t *out; - NGAP_PDUSessionResourceReleaseResponseIEs_t *ie; + NGAP_NGAP_PDU_t pdu; uint8_t *buffer = NULL; uint32_t length; int i; @@ -1316,68 +1162,52 @@ int ngap_gNB_pdusession_release_resp(instance_t instance, DevAssert(pdusession_release_resp_p != NULL); DevAssert(ngap_gNB_instance_p != NULL); - if ((ue_context_p = ngap_gNB_get_ue_context(ngap_gNB_instance_p, - pdusession_release_resp_p->gNB_ue_ngap_id)) == NULL) { + if ((ue_context_p = ngap_get_ue_context(pdusession_release_resp_p->gNB_ue_ngap_id)) == NULL) { /* The context for this gNB ue ngap id doesn't exist in the map of gNB UEs */ - NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: 0x%08x\n", - pdusession_release_resp_p->gNB_ue_ngap_id); + NGAP_WARN("Failed to find ue context associated with gNB ue ngap id: 0x%08x\n", pdusession_release_resp_p->gNB_ue_ngap_id); return -1; } /* Prepare the NGAP message to encode */ memset(&pdu, 0, sizeof(pdu)); pdu.present = NGAP_NGAP_PDU_PR_successfulOutcome; - pdu.choice.successfulOutcome = (NGAP_SuccessfulOutcome_t *)calloc(1,sizeof(struct NGAP_SuccessfulOutcome)); - pdu.choice.successfulOutcome->procedureCode = NGAP_ProcedureCode_id_PDUSessionResourceRelease; - pdu.choice.successfulOutcome->criticality = NGAP_Criticality_reject; - pdu.choice.successfulOutcome->value.present = NGAP_SuccessfulOutcome__value_PR_PDUSessionResourceReleaseResponse; - out = &pdu.choice.successfulOutcome->value.choice.PDUSessionResourceReleaseResponse; + asn1cCalloc(pdu.choice.successfulOutcome, head); + head->procedureCode = NGAP_ProcedureCode_id_PDUSessionResourceRelease; + head->criticality = NGAP_Criticality_reject; + head->value.present = NGAP_SuccessfulOutcome__value_PR_PDUSessionResourceReleaseResponse; + NGAP_PDUSessionResourceReleaseResponse_t *out = &head->value.choice.PDUSessionResourceReleaseResponse; /* mandatory */ - ie = (NGAP_PDUSessionResourceReleaseResponseIEs_t *)calloc(1, sizeof(NGAP_PDUSessionResourceReleaseResponseIEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_PDUSessionResourceReleaseResponseIEs__value_PR_AMF_UE_NGAP_ID; - asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_PDUSessionResourceReleaseResponseIEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_AMF_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_PDUSessionResourceReleaseResponseIEs__value_PR_AMF_UE_NGAP_ID; + asn_uint642INTEGER(&ie->value.choice.AMF_UE_NGAP_ID, ue_context_p->amf_ue_ngap_id); + } /* mandatory */ - ie = (NGAP_PDUSessionResourceReleaseResponseIEs_t *)calloc(1, sizeof(NGAP_PDUSessionResourceReleaseResponseIEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_PDUSessionResourceReleaseResponseIEs__value_PR_RAN_UE_NGAP_ID; - ie->value.choice.RAN_UE_NGAP_ID = pdusession_release_resp_p->gNB_ue_ngap_id; - asn1cSeqAdd(&out->protocolIEs.list, ie); - - /* optional */ - if (pdusession_release_resp_p->nb_of_pdusessions_released > 0) { - ie = (NGAP_PDUSessionResourceReleaseResponseIEs_t *)calloc(1, sizeof(NGAP_PDUSessionResourceReleaseResponseIEs_t)); - ie->id = NGAP_ProtocolIE_ID_id_PDUSessionResourceReleasedListRelRes; - ie->criticality = NGAP_Criticality_ignore; - ie->value.present = NGAP_PDUSessionResourceReleaseResponseIEs__value_PR_PDUSessionResourceReleasedListRelRes; - - for (i = 0; i < pdusession_release_resp_p->nb_of_pdusessions_released; i++) { - NGAP_PDUSessionResourceReleasedItemRelRes_t *item; - item = (NGAP_PDUSessionResourceReleasedItemRelRes_t *)calloc(1, sizeof(NGAP_PDUSessionResourceReleasedItemRelRes_t)); - - item->pDUSessionID = pdusession_release_resp_p->pdusession_release[i].pdusession_id; - if(pdusession_release_resp_p->pdusession_release[i].transfer_length > 0){ - item->pDUSessionResourceReleaseResponseTransfer.size = pdusession_release_resp_p->pdusession_release[i].transfer_length; - item->pDUSessionResourceReleaseResponseTransfer.buf = malloc(sizeof(uint8_t) * pdusession_release_resp_p->pdusession_release[i].transfer_length); - memcpy(item->pDUSessionResourceReleaseResponseTransfer.buf, - pdusession_release_resp_p->pdusession_release[i].transfer_buffer, - pdusession_release_resp_p->pdusession_release[i].transfer_length); - }else { - item->pDUSessionResourceReleaseResponseTransfer.size = 0; - item->pDUSessionResourceReleaseResponseTransfer.buf = NULL; - NGAP_DEBUG("pdusession_release_resp: transfer_buffer is NULL!\n"); - } - NGAP_DEBUG("pdusession_release_resp: pdusession ID %ld\n", item->pDUSessionID); - asn1cSeqAdd(&ie->value.choice.PDUSessionResourceReleasedListRelRes.list, item); - } - - asn1cSeqAdd(&out->protocolIEs.list, ie); + { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_PDUSessionResourceReleaseResponseIEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_RAN_UE_NGAP_ID; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_PDUSessionResourceReleaseResponseIEs__value_PR_RAN_UE_NGAP_ID; + ie->value.choice.RAN_UE_NGAP_ID = pdusession_release_resp_p->gNB_ue_ngap_id; } - + /* optional */ + if (pdusession_release_resp_p->nb_of_pdusessions_released > 0) { + asn1cSequenceAdd(out->protocolIEs.list, NGAP_PDUSessionResourceReleaseResponseIEs_t, ie); + ie->id = NGAP_ProtocolIE_ID_id_PDUSessionResourceReleasedListRelRes; + ie->criticality = NGAP_Criticality_ignore; + ie->value.present = NGAP_PDUSessionResourceReleaseResponseIEs__value_PR_PDUSessionResourceReleasedListRelRes; + + for (i = 0; i < pdusession_release_resp_p->nb_of_pdusessions_released; i++) { + asn1cSequenceAdd(ie->value.choice.PDUSessionResourceReleasedListRelRes.list, NGAP_PDUSessionResourceReleasedItemRelRes_t, item); + item->pDUSessionID = pdusession_release_resp_p->pdusession_release[i].pdusession_id; + allocCopy(&item->pDUSessionResourceReleaseResponseTransfer, pdusession_release_resp_p->pdusession_release[i].data); + NGAP_DEBUG("pdusession_release_resp: pdusession ID %ld\n", item->pDUSessionID); + } + } + if (ngap_gNB_encode_pdu(&pdu, &buffer, &length) < 0) { NGAP_ERROR("Failed to encode release response\n"); /* Encode procedure has failed... */ @@ -1385,17 +1215,17 @@ int ngap_gNB_pdusession_release_resp(instance_t instance, } /* UE associated signalling -> use the allocated stream */ - ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance, - ue_context_p->amf_ref->assoc_id, buffer, - length, ue_context_p->tx_stream); + ngap_gNB_itti_send_sctp_data_req(ngap_gNB_instance_p->instance, ue_context_p->amf_ref->assoc_id, buffer, length, ue_context_p->tx_stream); NGAP_INFO("pdusession_release_response sended gNB_UE_NGAP_ID %u amf_ue_ngap_id %lu nb_of_pdusessions_released %d nb_of_pdusessions_failed %d\n", - pdusession_release_resp_p->gNB_ue_ngap_id, (uint64_t)ue_context_p->amf_ue_ngap_id,pdusession_release_resp_p->nb_of_pdusessions_released,pdusession_release_resp_p->nb_of_pdusessions_failed); + pdusession_release_resp_p->gNB_ue_ngap_id, + (uint64_t)ue_context_p->amf_ue_ngap_id, + pdusession_release_resp_p->nb_of_pdusessions_released, + pdusession_release_resp_p->nb_of_pdusessions_failed); return 0; } -int ngap_gNB_path_switch_req(instance_t instance, - ngap_path_switch_req_t *path_switch_req_p) +int ngap_gNB_path_switch_req(instance_t instance, ngap_path_switch_req_t *path_switch_req_p) //------------------------------------------------------------------------------ { //TODO @@ -1403,13 +1233,9 @@ int ngap_gNB_path_switch_req(instance_t instance, return 0; } -int ngap_gNB_generate_PDUSESSION_Modification_Indication( - instance_t instance, - ngap_pdusession_modification_ind_t *pdusession_modification_ind) +int ngap_gNB_generate_PDUSESSION_Modification_Indication(instance_t instance, ngap_pdusession_modification_ind_t *pdusession_modification_ind) //----------------------------------------------------------------------------- { //TODO return 0; } - - diff --git a/openair3/NGAP/ngap_gNB_trace.h b/openair3/NGAP/ngap_gNB_trace.h index 91ea07ae80..70863e3737 100644 --- a/openair3/NGAP/ngap_gNB_trace.h +++ b/openair3/NGAP/ngap_gNB_trace.h @@ -30,23 +30,10 @@ #ifndef NGAP_GNB_TRACE_H_ #define NGAP_GNB_TRACE_H_ -// int ngap_gNB_generate_trace_failure(sctp_data_t *sctp_data_p, -// int32_t stream, -// uint32_t gNB_ue_ngap_id, -// uint32_t amf_ue_ngap_id, -// E_UTRAN_Trace_ID_t *trace_id, -// Cause_t *cause_p); - -// int ngap_gNB_handle_trace_start(gNB_amf_desc_t *gNB_desc_p, -// sctp_queue_item_t *packet_p, -// struct ngap_message_s *message_p); int ngap_gNB_handle_trace_start(uint32_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu); -// int ngap_gNB_handle_deactivate_trace(gNB_amf_desc_t *gNB_desc_p, -// sctp_queue_item_t *packet_p, -// struct ngap_message_s *message_p); int ngap_gNB_handle_deactivate_trace(uint32_t assoc_id, uint32_t stream, NGAP_NGAP_PDU_t *pdu); diff --git a/openair3/NGAP/ngap_gNB_ue_context.c b/openair3/NGAP/ngap_gNB_ue_context.c index 8beb4d9485..0be4fc480e 100644 --- a/openair3/NGAP/ngap_gNB_ue_context.c +++ b/openair3/NGAP/ngap_gNB_ue_context.c @@ -40,8 +40,15 @@ #include "ngap_gNB_defs.h" #include "ngap_gNB_ue_context.h" -int ngap_gNB_compare_gNB_ue_ngap_id( - struct ngap_gNB_ue_context_s *p1, struct ngap_gNB_ue_context_s *p2) +/* Tree of UE ordered by gNB_ue_ngap_id's + * NO INSTANCE, the 32 bits id is large enough to handle all UEs, regardless the cell, gNB, ... + */ +static RB_HEAD(ngap_ue_map, ngap_gNB_ue_context_s) ngap_ue_head = RB_INITIALIZER(&ngap_ue_head); + +/* Generate the tree management functions prototypes */ +RB_PROTOTYPE(ngap_ue_map, ngap_gNB_ue_context_s, entries, ngap_gNB_compare_gNB_ue_ngap_id); + +static int ngap_gNB_compare_gNB_ue_ngap_id(struct ngap_gNB_ue_context_s *p1, struct ngap_gNB_ue_context_s *p2) { if (p1->gNB_ue_ngap_id > p2->gNB_ue_ngap_id) { return 1; @@ -58,46 +65,26 @@ int ngap_gNB_compare_gNB_ue_ngap_id( RB_GENERATE(ngap_ue_map, ngap_gNB_ue_context_s, entries, ngap_gNB_compare_gNB_ue_ngap_id); -struct ngap_gNB_ue_context_s *ngap_gNB_allocate_new_UE_context(void) +void ngap_store_ue_context(struct ngap_gNB_ue_context_s *ue_desc_p) { - struct ngap_gNB_ue_context_s *new_p; + if (RB_INSERT(ngap_ue_map, &ngap_ue_head, ue_desc_p)) + LOG_E(NGAP, "Bug in UE uniq number allocation %u, we try to add a existing UE\n", ue_desc_p->gNB_ue_ngap_id); + return; +} - new_p = malloc(sizeof(struct ngap_gNB_ue_context_s)); +struct ngap_gNB_ue_context_s *ngap_get_ue_context(uint32_t gNB_ue_ngap_id) +{ + ngap_gNB_ue_context_t temp = {.gNB_ue_ngap_id = gNB_ue_ngap_id}; + return RB_FIND(ngap_ue_map, &ngap_ue_head, &temp); +} - if (new_p == NULL) { - NGAP_ERROR("Cannot allocate new ue context\n"); +struct ngap_gNB_ue_context_s *ngap_detach_ue_context(uint32_t gNB_ue_ngap_id) +{ + struct ngap_gNB_ue_context_s *tmp = ngap_get_ue_context(gNB_ue_ngap_id); + if (tmp == NULL) { + NGAP_ERROR("Trying to free a NULL UE context, %u\n", gNB_ue_ngap_id); return NULL; } - - memset(new_p, 0, sizeof(struct ngap_gNB_ue_context_s)); - - return new_p; -} - -struct ngap_gNB_ue_context_s *ngap_gNB_get_ue_context( - ngap_gNB_instance_t *instance_p, - uint32_t gNB_ue_ngap_id) -{ - ngap_gNB_ue_context_t temp; - - memset(&temp, 0, sizeof(struct ngap_gNB_ue_context_s)); - - /* gNB ue ngap id = 32 bits wide */ - temp.gNB_ue_ngap_id = gNB_ue_ngap_id & 0xFFFFFFFF; - - return RB_FIND(ngap_ue_map, &instance_p->ngap_ue_head, &temp); -} - -void ngap_gNB_free_ue_context(struct ngap_gNB_ue_context_s *ue_context_p) -{ - if (ue_context_p == NULL) { - NGAP_ERROR("Trying to free a NULL context\n"); - return; - } - - /* TODO: check that context is currently not in the tree of known - * contexts. - */ - - free(ue_context_p); + RB_REMOVE(ngap_ue_map, &ngap_ue_head, tmp); + return tmp; } diff --git a/openair3/NGAP/ngap_gNB_ue_context.h b/openair3/NGAP/ngap_gNB_ue_context.h index 4b300c6fea..8de03b63ba 100644 --- a/openair3/NGAP/ngap_gNB_ue_context.h +++ b/openair3/NGAP/ngap_gNB_ue_context.h @@ -37,7 +37,6 @@ // Forward declarations struct ngap_gNB_amf_data_s; -struct ngap_ue_map; struct gNB_amf_desc_s; typedef enum { @@ -59,11 +58,7 @@ typedef struct ngap_gNB_ue_context_s { */ uint32_t gNB_ue_ngap_id; - /* UE id for initial connection to NGAP */ - uint16_t ue_initial_id; - - /* Uniquely identifies the UE within AMF. Encoded on 32 bits. */ - uint64_t amf_ue_ngap_id:40; + uint64_t amf_ue_ngap_id; /* Stream used for this particular UE */ int32_t tx_stream; @@ -84,20 +79,9 @@ typedef struct ngap_gNB_ue_context_s { ngap_gNB_instance_t *gNB_instance; } ngap_gNB_ue_context_t; -int ngap_gNB_compare_gNB_ue_ngap_id( - struct ngap_gNB_ue_context_s *p1, struct ngap_gNB_ue_context_s *p2); - -/* Generate the tree management functions prototypes */ -RB_PROTOTYPE(ngap_ue_map, ngap_gNB_ue_context_s, entries, - ngap_gNB_compare_gNB_ue_ngap_id); - -struct ngap_gNB_ue_context_s *ngap_gNB_allocate_new_UE_context(void); - -struct ngap_gNB_ue_context_s *ngap_gNB_get_ue_context( - ngap_gNB_instance_t *instance_p, - uint32_t gNB_ue_ngap_id); - -void ngap_gNB_free_ue_context(struct ngap_gNB_ue_context_s *ue_context_p); +void ngap_store_ue_context(ngap_gNB_ue_context_t *ue_desc_p); +ngap_gNB_ue_context_t *ngap_get_ue_context(uint32_t gNB_ue_ngap_id); +ngap_gNB_ue_context_t *ngap_detach_ue_context(uint32_t gNB_ue_ngap_id); #endif /* NGAP_GNB_UE_CONTEXT_H_ */ diff --git a/openair3/S1AP/s1ap_eNB.c b/openair3/S1AP/s1ap_eNB.c index f9dcd73f6b..adfeb69cb4 100644 --- a/openair3/S1AP/s1ap_eNB.c +++ b/openair3/S1AP/s1ap_eNB.c @@ -373,7 +373,7 @@ void s1ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa timer_kind = timer_kind | SCTP_REQ_WAIT; if( s1ap_timer_setup( instance_p->sctp_req_timer, 0, TASK_S1AP, instance_p->instance, - timer_kind, S1AP_TIMER_ONE_SHOT, NULL, &s1ap_mme_data_p->timer_id) < 0 ) { + timer_kind, TIMER_ONE_SHOT, NULL, &s1ap_mme_data_p->timer_id) < 0 ) { S1AP_ERROR("Timer Start NG(SCTP retransmission wait timer) : MME=%d\n",s1ap_mme_data_p->cnx_id); s1ap_sctp_req( instance_p, s1ap_mme_data_p ); } @@ -750,7 +750,7 @@ static int s1ap_eNB_generate_s1_setup_request( timer_kind = timer_kind | S1AP_MMEIND; timer_kind = timer_kind | S1_SETRSP_WAIT; - if( s1ap_timer_setup(instance_p->s1_setuprsp_wait_timer, 0, TASK_S1AP, instance_p->instance, timer_kind, S1AP_TIMER_ONE_SHOT, + if( s1ap_timer_setup(instance_p->s1_setuprsp_wait_timer, 0, TASK_S1AP, instance_p->instance, timer_kind, TIMER_ONE_SHOT, NULL, &s1ap_mme_data_p->timer_id) < 0 ) { S1AP_ERROR("Timer Start NG(S1 Setup Response) : MME=%d\n",s1ap_mme_data_p->cnx_id); diff --git a/openair3/S1AP/s1ap_eNB_handlers.c b/openair3/S1AP/s1ap_eNB_handlers.c index 8291294bd2..fe8b2d3597 100644 --- a/openair3/S1AP/s1ap_eNB_handlers.c +++ b/openair3/S1AP/s1ap_eNB_handlers.c @@ -349,7 +349,7 @@ int s1ap_eNB_handle_s1_setup_failure(uint32_t assoc_id, timer_kind = timer_kind | S1AP_MMEIND; timer_kind = timer_kind | S1_SETREQ_WAIT; - if( s1ap_timer_setup(interval_sec, 0, TASK_S1AP, instance_p->instance, timer_kind, S1AP_TIMER_ONE_SHOT, + if( s1ap_timer_setup(interval_sec, 0, TASK_S1AP, instance_p->instance, timer_kind, TIMER_ONE_SHOT, NULL, &mme_desc_p->timer_id) < 0 ) { S1AP_ERROR("Timer Start NG(S1 Setup Request) : MME=%d\n",mme_desc_p->cnx_id); s1ap_eNB_snd_s1_setup_request( instance_p, mme_desc_p ); @@ -1445,7 +1445,7 @@ int s1ap_eNB_handle_e_rab_modify_request(uint32_t assoc_id, item_p = &(((S1AP_E_RABToBeModifiedItemBearerModReqIEs_t *) ie->value.choice.E_RABToBeModifiedListBearerModReq.list.array[nb_of_e_rabs_failed])->value.choice.E_RABToBeModifiedItemBearerModReq); S1AP_E_RAB_MODIFY_RESP(message_p).e_rabs_failed[nb_of_e_rabs_failed].e_rab_id = item_p->e_RAB_ID; - S1AP_E_RAB_MODIFY_RESP(message_p).e_rabs_failed[nb_of_e_rabs_failed].cause = S1AP_Cause_PR_radioNetwork; + S1AP_E_RAB_MODIFY_RESP(message_p).e_rabs_failed[nb_of_e_rabs_failed].cause = S1AP_CAUSE_RADIO_NETWORK; S1AP_E_RAB_MODIFY_RESP(message_p).e_rabs_failed[nb_of_e_rabs_failed].cause_value = S1AP_CauseRadioNetwork_unknown_mme_ue_s1ap_id; } } else { @@ -1981,7 +1981,7 @@ static int s1ap_eNB_snd_s1_setup_request( timer_kind = timer_kind | S1AP_MMEIND; timer_kind = timer_kind | S1_SETRSP_WAIT; - if( s1ap_timer_setup(instance_p->s1_setuprsp_wait_timer, 0, TASK_S1AP, instance_p->instance, timer_kind, S1AP_TIMER_ONE_SHOT, + if( s1ap_timer_setup(instance_p->s1_setuprsp_wait_timer, 0, TASK_S1AP, instance_p->instance, timer_kind, TIMER_ONE_SHOT, NULL, &s1ap_mme_data_p->timer_id) < 0 ) { S1AP_ERROR("Timer Start NG(S1 Setup Response) : MME=%d\n",s1ap_mme_data_p->cnx_id); diff --git a/openair3/S1AP/s1ap_eNB_nas_procedures.c b/openair3/S1AP/s1ap_eNB_nas_procedures.c index e493629535..69730cb83a 100644 --- a/openair3/S1AP/s1ap_eNB_nas_procedures.c +++ b/openair3/S1AP/s1ap_eNB_nas_procedures.c @@ -687,52 +687,56 @@ int s1ap_eNB_initial_ctxt_resp( /* optional */ if (initial_ctxt_resp_p->nb_of_e_rabs_failed) { - ie = (S1AP_InitialContextSetupResponseIEs_t *)calloc(1, sizeof(S1AP_InitialContextSetupResponseIEs_t)); - ie->id = S1AP_ProtocolIE_ID_id_E_RABFailedToSetupListCtxtSURes; - ie->criticality = S1AP_Criticality_ignore; - ie->value.present = S1AP_InitialContextSetupResponseIEs__value_PR_E_RABList; + ie = (S1AP_InitialContextSetupResponseIEs_t *)calloc(1, sizeof(S1AP_InitialContextSetupResponseIEs_t)); + ie->id = S1AP_ProtocolIE_ID_id_E_RABFailedToSetupListCtxtSURes; + ie->criticality = S1AP_Criticality_ignore; + ie->value.present = S1AP_InitialContextSetupResponseIEs__value_PR_E_RABList; - for (i = 0; i < initial_ctxt_resp_p->nb_of_e_rabs_failed; i++) { - S1AP_E_RABItemIEs_t *item; - /* mandatory */ - item = (S1AP_E_RABItemIEs_t *)calloc(1, sizeof(S1AP_E_RABItemIEs_t)); - item->id = S1AP_ProtocolIE_ID_id_E_RABItem; - item->criticality = S1AP_Criticality_ignore; - item->value.present = S1AP_E_RABItemIEs__value_PR_E_RABItem; - item->value.choice.E_RABItem.e_RAB_ID = initial_ctxt_resp_p->e_rabs_failed[i].e_rab_id; - item->value.choice.E_RABItem.cause.present = initial_ctxt_resp_p->e_rabs_failed[i].cause; + for (i = 0; i < initial_ctxt_resp_p->nb_of_e_rabs_failed; i++) { + S1AP_E_RABItemIEs_t *item; + /* mandatory */ + item = (S1AP_E_RABItemIEs_t *)calloc(1, sizeof(S1AP_E_RABItemIEs_t)); + item->id = S1AP_ProtocolIE_ID_id_E_RABItem; + item->criticality = S1AP_Criticality_ignore; + item->value.present = S1AP_E_RABItemIEs__value_PR_E_RABItem; + item->value.choice.E_RABItem.e_RAB_ID = initial_ctxt_resp_p->e_rabs_failed[i].e_rab_id; - switch(item->value.choice.E_RABItem.cause.present) { - case S1AP_Cause_PR_radioNetwork: - item->value.choice.E_RABItem.cause.choice.radioNetwork = initial_ctxt_resp_p->e_rabs_failed[i].cause_value; - break; + switch(initial_ctxt_resp_p->e_rabs_failed[i].cause) { + case S1AP_CAUSE_RADIO_NETWORK: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_radioNetwork; + item->value.choice.E_RABItem.cause.choice.radioNetwork = initial_ctxt_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_transport: - item->value.choice.E_RABItem.cause.choice.transport = initial_ctxt_resp_p->e_rabs_failed[i].cause_value; - break; + case S1AP_CAUSE_TRANSPORT: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_transport; + item->value.choice.E_RABItem.cause.choice.transport = initial_ctxt_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_nas: - item->value.choice.E_RABItem.cause.choice.nas = initial_ctxt_resp_p->e_rabs_failed[i].cause_value; - break; + case S1AP_CAUSE_NAS: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_nas; + item->value.choice.E_RABItem.cause.choice.nas = initial_ctxt_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_protocol: - item->value.choice.E_RABItem.cause.choice.protocol = initial_ctxt_resp_p->e_rabs_failed[i].cause_value; - break; + case S1AP_CAUSE_PROTOCOL: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_protocol; + item->value.choice.E_RABItem.cause.choice.protocol = initial_ctxt_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_misc: - item->value.choice.E_RABItem.cause.choice.misc = initial_ctxt_resp_p->e_rabs_failed[i].cause_value; - break; + case S1AP_CAUSE_MISC: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_misc; + item->value.choice.E_RABItem.cause.choice.misc = initial_ctxt_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_NOTHING: + case S1AP_Cause_PR_NOTHING: default: - break; - } - - S1AP_DEBUG("initial context setup response: failed e_rab ID %ld\n", item->value.choice.E_RABItem.e_RAB_ID); - asn1cSeqAdd(&ie->value.choice.E_RABList.list, item); + break; } - asn1cSeqAdd(&out->protocolIEs.list, ie); + S1AP_DEBUG("initial context setup response: failed e_rab ID %ld\n", item->value.choice.E_RABItem.e_RAB_ID); + asn1cSeqAdd(&ie->value.choice.E_RABList.list, item); + } + + asn1cSeqAdd(&out->protocolIEs.list, ie); } /* optional */ @@ -935,51 +939,55 @@ int s1ap_eNB_e_rab_setup_resp(instance_t instance, /* optional */ if (e_rab_setup_resp_p->nb_of_e_rabs_failed > 0) { - ie = (S1AP_E_RABSetupResponseIEs_t *)calloc(1, sizeof(S1AP_E_RABSetupResponseIEs_t)); - ie->id = S1AP_ProtocolIE_ID_id_E_RABFailedToSetupListBearerSURes; - ie->criticality = S1AP_Criticality_ignore; - ie->value.present = S1AP_E_RABSetupResponseIEs__value_PR_E_RABList; + ie = (S1AP_E_RABSetupResponseIEs_t *)calloc(1, sizeof(S1AP_E_RABSetupResponseIEs_t)); + ie->id = S1AP_ProtocolIE_ID_id_E_RABFailedToSetupListBearerSURes; + ie->criticality = S1AP_Criticality_ignore; + ie->value.present = S1AP_E_RABSetupResponseIEs__value_PR_E_RABList; - for (i = 0; i < e_rab_setup_resp_p->nb_of_e_rabs_failed; i++) { - S1AP_E_RABItemIEs_t *item; - item = (S1AP_E_RABItemIEs_t *)calloc(1, sizeof(S1AP_E_RABItemIEs_t)); - item->id = S1AP_ProtocolIE_ID_id_E_RABItem; - item->criticality = S1AP_Criticality_ignore; - item->value.present = S1AP_E_RABItemIEs__value_PR_E_RABItem; - item->value.choice.E_RABItem.e_RAB_ID = e_rab_setup_resp_p->e_rabs_failed[i].e_rab_id; - item->value.choice.E_RABItem.cause.present = e_rab_setup_resp_p->e_rabs_failed[i].cause; + for (i = 0; i < e_rab_setup_resp_p->nb_of_e_rabs_failed; i++) { + S1AP_E_RABItemIEs_t *item; + item = (S1AP_E_RABItemIEs_t *)calloc(1, sizeof(S1AP_E_RABItemIEs_t)); + item->id = S1AP_ProtocolIE_ID_id_E_RABItem; + item->criticality = S1AP_Criticality_ignore; + item->value.present = S1AP_E_RABItemIEs__value_PR_E_RABItem; + item->value.choice.E_RABItem.e_RAB_ID = e_rab_setup_resp_p->e_rabs_failed[i].e_rab_id; - switch(item->value.choice.E_RABItem.cause.present) { - case S1AP_Cause_PR_radioNetwork: - item->value.choice.E_RABItem.cause.choice.radioNetwork = e_rab_setup_resp_p->e_rabs_failed[i].cause_value; - break; + switch(e_rab_setup_resp_p->e_rabs_failed[i].cause) { + case S1AP_CAUSE_RADIO_NETWORK: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_radioNetwork; + item->value.choice.E_RABItem.cause.choice.radioNetwork = e_rab_setup_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_transport: - item->value.choice.E_RABItem.cause.choice.transport = e_rab_setup_resp_p->e_rabs_failed[i].cause_value; - break; + case S1AP_CAUSE_TRANSPORT: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_transport; + item->value.choice.E_RABItem.cause.choice.transport = e_rab_setup_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_nas: - item->value.choice.E_RABItem.cause.choice.nas = e_rab_setup_resp_p->e_rabs_failed[i].cause_value; - break; + case S1AP_CAUSE_NAS: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_nas; + item->value.choice.E_RABItem.cause.choice.nas = e_rab_setup_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_protocol: - item->value.choice.E_RABItem.cause.choice.protocol = e_rab_setup_resp_p->e_rabs_failed[i].cause_value; - break; + case S1AP_CAUSE_PROTOCOL: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_protocol; + item->value.choice.E_RABItem.cause.choice.protocol = e_rab_setup_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_misc: - item->value.choice.E_RABItem.cause.choice.misc = e_rab_setup_resp_p->e_rabs_failed[i].cause_value; - break; + case S1AP_CAUSE_MISC: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_misc; + item->value.choice.E_RABItem.cause.choice.misc = e_rab_setup_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_NOTHING: + case S1AP_Cause_PR_NOTHING: default: - break; - } - - S1AP_DEBUG("e_rab_setup_resp: failed e_rab ID %ld\n", item->value.choice.E_RABItem.e_RAB_ID); - asn1cSeqAdd(&ie->value.choice.E_RABList.list, item); + break; } - asn1cSeqAdd(&out->protocolIEs.list, ie); + S1AP_DEBUG("e_rab_setup_resp: failed e_rab ID %ld\n", item->value.choice.E_RABItem.e_RAB_ID); + asn1cSeqAdd(&ie->value.choice.E_RABList.list, item); + } + + asn1cSeqAdd(&out->protocolIEs.list, ie); } /* optional */ @@ -1095,51 +1103,54 @@ int s1ap_eNB_e_rab_modify_resp(instance_t instance, /* optional */ if (e_rab_modify_resp_p->nb_of_e_rabs_failed > 0) { - ie = (S1AP_E_RABModifyResponseIEs_t *)calloc(1, sizeof(S1AP_E_RABModifyResponseIEs_t)); - ie->id = S1AP_ProtocolIE_ID_id_E_RABFailedToModifyList; - ie->criticality = S1AP_Criticality_ignore; - ie->value.present = S1AP_E_RABModifyResponseIEs__value_PR_E_RABList; + ie = (S1AP_E_RABModifyResponseIEs_t *)calloc(1, sizeof(S1AP_E_RABModifyResponseIEs_t)); + ie->id = S1AP_ProtocolIE_ID_id_E_RABFailedToModifyList; + ie->criticality = S1AP_Criticality_ignore; + ie->value.present = S1AP_E_RABModifyResponseIEs__value_PR_E_RABList; - for (i = 0; i < e_rab_modify_resp_p->nb_of_e_rabs_failed; i++) { - S1AP_E_RABItemIEs_t *item; - item = (S1AP_E_RABItemIEs_t *)calloc(1, sizeof(S1AP_E_RABItemIEs_t)); - item->id = S1AP_ProtocolIE_ID_id_E_RABItem; - item->criticality = S1AP_Criticality_ignore; - item->value.present = S1AP_E_RABItemIEs__value_PR_E_RABItem; - item->value.choice.E_RABItem.e_RAB_ID = e_rab_modify_resp_p->e_rabs_failed[i].e_rab_id; - item->value.choice.E_RABItem.cause.present = e_rab_modify_resp_p->e_rabs_failed[i].cause; + for (i = 0; i < e_rab_modify_resp_p->nb_of_e_rabs_failed; i++) { + S1AP_E_RABItemIEs_t *item; + item = (S1AP_E_RABItemIEs_t *)calloc(1, sizeof(S1AP_E_RABItemIEs_t)); + item->id = S1AP_ProtocolIE_ID_id_E_RABItem; + item->criticality = S1AP_Criticality_ignore; + item->value.present = S1AP_E_RABItemIEs__value_PR_E_RABItem; + item->value.choice.E_RABItem.e_RAB_ID = e_rab_modify_resp_p->e_rabs_failed[i].e_rab_id; - switch(item->value.choice.E_RABItem.cause.present) { - case S1AP_Cause_PR_radioNetwork: - item->value.choice.E_RABItem.cause.choice.radioNetwork = e_rab_modify_resp_p->e_rabs_failed[i].cause_value; - break; + switch(e_rab_modify_resp_p->e_rabs_failed[i].cause) { + case S1AP_CAUSE_RADIO_NETWORK: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_radioNetwork; + item->value.choice.E_RABItem.cause.choice.radioNetwork = e_rab_modify_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_transport: - item->value.choice.E_RABItem.cause.choice.transport = e_rab_modify_resp_p->e_rabs_failed[i].cause_value; - break; + case S1AP_CAUSE_TRANSPORT: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_transport; + item->value.choice.E_RABItem.cause.choice.transport = e_rab_modify_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_nas: - item->value.choice.E_RABItem.cause.choice.nas = e_rab_modify_resp_p->e_rabs_failed[i].cause_value; - break; + case S1AP_CAUSE_NAS: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_nas; + item->value.choice.E_RABItem.cause.choice.nas = e_rab_modify_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_protocol: - item->value.choice.E_RABItem.cause.choice.protocol = e_rab_modify_resp_p->e_rabs_failed[i].cause_value; - break; + case S1AP_CAUSE_PROTOCOL: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_protocol; + item->value.choice.E_RABItem.cause.choice.protocol = e_rab_modify_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_misc: - item->value.choice.E_RABItem.cause.choice.misc = e_rab_modify_resp_p->e_rabs_failed[i].cause_value; - break; + case S1AP_CAUSE_MISC: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_misc; + item->value.choice.E_RABItem.cause.choice.misc = e_rab_modify_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_NOTHING: + case S1AP_Cause_PR_NOTHING: default: - break; - } - - S1AP_DEBUG("e_rab_modify_resp: failed e_rab ID %ld\n", item->value.choice.E_RABItem.e_RAB_ID); - asn1cSeqAdd(&ie->value.choice.E_RABList.list, item); + break; } - asn1cSeqAdd(&out->protocolIEs.list, ie); + S1AP_DEBUG("e_rab_modify_resp: failed e_rab ID %ld\n", item->value.choice.E_RABItem.e_RAB_ID); + asn1cSeqAdd(&ie->value.choice.E_RABList.list, item); + } + asn1cSeqAdd(&out->protocolIEs.list, ie); } /* optional */ @@ -1243,48 +1254,47 @@ int s1ap_eNB_e_rab_release_resp(instance_t instance, ie->value.present = S1AP_E_RABReleaseResponseIEs__value_PR_E_RABList; for (i = 0; i < e_rab_release_resp_p->nb_of_e_rabs_failed; i++) { - S1AP_E_RABItemIEs_t *item; - item = (S1AP_E_RABItemIEs_t *)calloc(1, sizeof(S1AP_E_RABItemIEs_t)); - item->id = S1AP_ProtocolIE_ID_id_E_RABItem; - item->criticality = S1AP_Criticality_ignore; - item->value.present = S1AP_E_RABItemIEs__value_PR_E_RABItem; - item->value.choice.E_RABItem.e_RAB_ID = e_rab_release_resp_p->e_rabs_failed[i].e_rab_id; - item->value.choice.E_RABItem.cause.present = e_rab_release_resp_p->e_rabs_failed[i].cause; + S1AP_E_RABItemIEs_t *item; + item = (S1AP_E_RABItemIEs_t *)calloc(1, sizeof(S1AP_E_RABItemIEs_t)); + item->id = S1AP_ProtocolIE_ID_id_E_RABItem; + item->criticality = S1AP_Criticality_ignore; + item->value.present = S1AP_E_RABItemIEs__value_PR_E_RABItem; + item->value.choice.E_RABItem.e_RAB_ID = e_rab_release_resp_p->e_rabs_failed[i].e_rab_id; - switch(item->value.choice.E_RABItem.cause.present) { - case S1AP_Cause_PR_radioNetwork: - item->value.choice.E_RABItem.cause.choice.radioNetwork = e_rab_release_resp_p->e_rabs_failed[i].cause_value; - break; + switch(e_rab_release_resp_p->e_rabs_failed[i].cause) { + case S1AP_CAUSE_RADIO_NETWORK: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_radioNetwork; + item->value.choice.E_RABItem.cause.choice.radioNetwork = e_rab_release_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_transport: - item->value.choice.E_RABItem.cause.choice.transport = e_rab_release_resp_p->e_rabs_failed[i].cause_value; - break; + case S1AP_CAUSE_TRANSPORT: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_transport; + item->value.choice.E_RABItem.cause.choice.transport = e_rab_release_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_nas: - item->value.choice.E_RABItem.cause.choice.nas = e_rab_release_resp_p->e_rabs_failed[i].cause_value; - break; + case S1AP_CAUSE_NAS: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_nas; + item->value.choice.E_RABItem.cause.choice.nas = e_rab_release_resp_p->e_rabs_failed[i].cause_value; + break; - case S1AP_Cause_PR_protocol: - item->value.choice.E_RABItem.cause.choice.protocol = e_rab_release_resp_p->e_rabs_failed[i].cause_value; - break; - - case S1AP_Cause_PR_misc: - item->value.choice.E_RABItem.cause.choice.misc = e_rab_release_resp_p->e_rabs_failed[i].cause_value; - break; + case S1AP_CAUSE_PROTOCOL: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_protocol; + item->value.choice.E_RABItem.cause.choice.protocol = e_rab_release_resp_p->e_rabs_failed[i].cause_value; + break; + case S1AP_CAUSE_MISC: + item->value.choice.E_RABItem.cause.present = S1AP_Cause_PR_misc; + item->value.choice.E_RABItem.cause.choice.misc = e_rab_release_resp_p->e_rabs_failed[i].cause_value; + break; case S1AP_Cause_PR_NOTHING: default: - break; - } - - asn1cSeqAdd(&ie->value.choice.E_RABList.list, item); + break; + } + asn1cSeqAdd(&ie->value.choice.E_RABList.list, item); } - asn1cSeqAdd(&out->protocolIEs.list, ie); } - - if (s1ap_eNB_encode_pdu(&pdu, &buffer, &length) < 0) { S1AP_ERROR("Failed to encode release response\n"); /* Encode procedure has failed... */ diff --git a/openair3/SCTP/sctp_eNB_task.c b/openair3/SCTP/sctp_eNB_task.c index 14128dd53e..7706137b2e 100644 --- a/openair3/SCTP/sctp_eNB_task.c +++ b/openair3/SCTP/sctp_eNB_task.c @@ -650,7 +650,7 @@ static void sctp_send_data(sctp_data_req_t *sctp_data_req_p) /* TODO: notify upper layer */ return; } - + free(sctp_data_req_p->buffer); // assuming it has been malloced SCTP_DEBUG("Successfully sent %u bytes on stream %d for assoc_id %u\n", sctp_data_req_p->buffer_length, sctp_data_req_p->stream, sctp_cnx->assoc_id); diff --git a/openair3/UICC/usim_interface.c b/openair3/UICC/usim_interface.c index 36285ee468..51a50fc8b8 100644 --- a/openair3/UICC/usim_interface.c +++ b/openair3/UICC/usim_interface.c @@ -38,16 +38,16 @@ extern uint16_t NB_UE_INST; /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ #define UICC_PARAMS_DESC { \ - {"imsi", "USIM IMSI\n", 0, strptr:&uicc->imsiStr, defstrval:"2089900007487", TYPE_STRING, 0 }, \ - {"nmc_size" "number of digits in NMC", 0, iptr:&uicc->nmc_size, defintval:2, TYPE_INT, 0 }, \ - {"key", "USIM Ki\n", 0, strptr:&uicc->keyStr, defstrval:"fec86ba6eb707ed08905757b1bb44b8f", TYPE_STRING, 0 }, \ - {"opc", "USIM OPc\n", 0, strptr:&uicc->opcStr, defstrval:"c42449363bbad02b66d16bc975d77cc1", TYPE_STRING, 0 }, \ - {"amf", "USIM amf\n", 0, strptr:&uicc->amfStr, defstrval:"8000", TYPE_STRING, 0 }, \ - {"sqn", "USIM sqn\n", 0, strptr:&uicc->sqnStr, defstrval:"000000", TYPE_STRING, 0 }, \ - {"dnn", "UE dnn (apn)\n", 0, strptr:&uicc->dnnStr, defstrval:"oai", TYPE_STRING, 0 }, \ - {"nssai_sst", "UE nssai\n", 0, iptr:&uicc->nssai_sst, defintval:1, TYPE_INT, 0 }, \ - {"nssai_sd", "UE nssai\n", 0, iptr:&uicc->nssai_sd, defintval:0xffffff, TYPE_INT, 0 }, \ - {"imeisv", "IMEISV\n", 0, strptr:&uicc->imeisvStr, defstrval:"6754567890123413", TYPE_STRING, 0 }, \ + {"imsi", "USIM IMSI\n", 0, .strptr=&uicc->imsiStr, .defstrval="2089900007487", TYPE_STRING, 0 }, \ + {"nmc_size" "number of digits in NMC", 0, .iptr=&uicc->nmc_size, .defintval=2, TYPE_INT, 0 }, \ + {"key", "USIM Ki\n", 0, .strptr=&uicc->keyStr, .defstrval="fec86ba6eb707ed08905757b1bb44b8f", TYPE_STRING, 0 }, \ + {"opc", "USIM OPc\n", 0, .strptr=&uicc->opcStr, .defstrval="c42449363bbad02b66d16bc975d77cc1", TYPE_STRING, 0 }, \ + {"amf", "USIM amf\n", 0, .strptr=&uicc->amfStr, .defstrval="8000", TYPE_STRING, 0 }, \ + {"sqn", "USIM sqn\n", 0, .strptr=&uicc->sqnStr, .defstrval="000000", TYPE_STRING, 0 }, \ + {"dnn", "UE dnn (apn)\n", 0, .strptr=&uicc->dnnStr, .defstrval="oai", TYPE_STRING, 0 }, \ + {"nssai_sst", "UE nssai\n", 0, .iptr=&uicc->nssai_sst, .defintval=1, TYPE_INT, 0 }, \ + {"nssai_sd", "UE nssai\n", 0, .iptr=&uicc->nssai_sd, .defintval=0xffffff, TYPE_INT, 0 }, \ + {"imeisv", "IMEISV\n", 0, .strptr=&uicc->imeisvStr, .defstrval="6754567890123413", TYPE_STRING, 0 }, \ }; static uicc_t** uiccArray=NULL; @@ -133,4 +133,4 @@ uint8_t getImeisvDigit(int Mod_id,uint8_t i) } } return (0x0f & r); -} \ No newline at end of file +} diff --git a/openair3/UTILS/mme_config.h b/openair3/UTILS/mme_config.h index 417c8bbd5f..0f6247e623 100644 --- a/openair3/UTILS/mme_config.h +++ b/openair3/UTILS/mme_config.h @@ -39,10 +39,6 @@ #define MME_CONFIG_STRING_INTERTASK_INTERFACE_CONFIG "INTERTASK_INTERFACE" #define MME_CONFIG_STRING_INTERTASK_INTERFACE_QUEUE_SIZE "ITTI_QUEUE_SIZE" -#define MME_CONFIG_STRING_S6A_CONFIG "S6A" -#define MME_CONFIG_STRING_S6A_CONF_FILE_PATH "S6A_CONF" -#define MME_CONFIG_STRING_S6A_HSS_HOSTNAME "HSS_HOSTNAME" - #define MME_CONFIG_STRING_SCTP_CONFIG "SCTP" #define MME_CONFIG_STRING_SCTP_INSTREAMS "SCTP_INSTREAMS" #define MME_CONFIG_STRING_SCTP_OUTSTREAMS "SCTP_OUTSTREAMS" @@ -149,10 +145,6 @@ typedef struct mme_config_s { uint32_t sgw_ip_address_for_S11; } ipv4; - struct { - char *conf_file; - char *hss_host_name; - } s6a_config; struct { uint32_t queue_size; char *log_file; diff --git a/openair3/UTILS/mme_default_values.h b/openair3/UTILS/mme_default_values.h index f02e94e2c5..de7ab6b62f 100644 --- a/openair3/UTILS/mme_default_values.h +++ b/openair3/UTILS/mme_default_values.h @@ -41,12 +41,6 @@ #define S1AP_OUTCOME_TIMER_DEFAULT (5) ///< S1AP Outcome drop timer (s) -/******************************************************************************* - * S6A Constants - ******************************************************************************/ - -#define S6A_CONF_FILE "../S6A/freediameter/s6a.conf" - /******************************************************************************* * SCTP Constants ******************************************************************************/ diff --git a/openair3/UTILS/mme_parser.y b/openair3/UTILS/mme_parser.y deleted file mode 100644 index ceaedeb8e4..0000000000 --- a/openair3/UTILS/mme_parser.y +++ /dev/null @@ -1,570 +0,0 @@ -/* For development only : */ -%debug -%error-verbose - -%parse-param {struct mme_config_s *mme_config_p} - -/* Keep track of location */ -%locations -%defines -%pure-parser - -%{ -#include -#include -#include -#include -#include -#include -#include - -#include "mme_config.h" -#include "mme_parser.h" - -void yyerror (YYLTYPE *llocp, struct mme_config_s *mme_config_p, const char *s); - -extern int yywrap(); -extern int yylex(); - -/* The Lex parser prototype */ -int fddlex(YYSTYPE *lvalp, YYLTYPE *llocp); -%} - -/* Values returned by lex for token */ -%union { - char *string; /* The string is allocated by strdup in lex.*/ - int integer; /* Store integer values */ -} - -%token LEX_ERROR - -%token QSTRING -%token INTEGER - -%token EMERGENCY_ATTACH_SUPPORTED -%token UNAUTHENTICATED_IMSI_SUPPORTED -%token S6A_CONF -%token MAX_UE -%token MAX_ENB -%token ITTI_QUEUE_SIZE -%token SCTP_INSTREAMS -%token SCTP_OUTSTREAMS -%token MME_CODE -%token MME_GID -%token PLMN_Y -%token REALM -%token RELATIVE_CAP -%token S1AP_OUTCOME_TIMER -%token MME_STATISTIC_TIMER -%token SGW_INTERFACE_NAME_FOR_S11 -%token SGW_IP_ADDRESS_FOR_S11 -%token SGW_IP_NETMASK_FOR_S11 -%token SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP -%token SGW_IP_ADDRESS_FOR_S1U_S12_S4_UP -%token SGW_IP_NETMASK_FOR_S1U_S12_S4_UP -%token SGW_INTERFACE_NAME_FOR_S5_S8_UP -%token SGW_IP_ADDRESS_FOR_S5_S8_UP -%token SGW_IP_NETMASK_FOR_S5_S8_UP -%token PGW_INTERFACE_NAME_FOR_S5_S8 -%token PGW_IP_ADDRESS_FOR_S5_S8 -%token PGW_IP_NETMASK_FOR_S5_S8 -%token PGW_INTERFACE_NAME_FOR_SGI -%token PGW_IP_ADDR_FOR_SGI -%token PGW_IP_NETMASK_FOR_SGI -%token MME_INTERFACE_NAME_FOR_S1_MME -%token MME_IP_ADDRESS_FOR_S1_MME -%token MME_IP_NETMASK_FOR_S1_MME -%token MME_INTERFACE_NAME_FOR_S11_MME -%token MME_IP_ADDRESS_FOR_S11_MME -%token MME_IP_NETMASK_FOR_S11_MME - -%% -conffile: /* If options not provided, we will default values */ - | conffile s6aconf - | conffile emergency_attach_supported - | conffile unauthenticated_imsi_supported - | conffile maxenb - | conffile maxue - | conffile mmec - | conffile mmegid - | conffile plmn - | conffile realm - | conffile relative_capacity - | conffile itti_queue_size - | conffile s1ap_outcome_timer - | conffile mme_statistic_timer - | conffile sgw_interface_name_for_S11 - | conffile sgw_ip_address_for_S11 - | conffile sgw_ip_netmask_for_S11 - | conffile sgw_interface_name_for_S1u_S12_S4_up - | conffile sgw_ip_address_for_S1u_S12_S4_up - | conffile sgw_ip_netmask_for_S1u_S12_S4_up - | conffile sgw_interface_name_for_S5_S8_up - | conffile sgw_ip_address_for_S5_S8_up - | conffile sgw_ip_netmask_for_S5_S8_up - | conffile pgw_interface_name_for_S5_S8 - | conffile pgw_ip_address_for_S5_S8 - | conffile pgw_ip_netmask_for_S5_S8 - | conffile pgw_interface_name_for_SGI - | conffile pgw_ip_addr_for_SGI - | conffile pgw_ip_netmask_for_SGI - | conffile mme_interface_name_for_S1_MME - | conffile mme_ip_address_for_S1_MME - | conffile mme_ip_netmask_for_S1_MME - | conffile mme_interface_name_for_S11_MME - | conffile mme_ip_address_for_S11_MME - | conffile mme_ip_netmask_for_S11_MME - | conffile sctp_instreams - | conffile sctp_outstreams - | conffile errors - { - yyerror(&yylloc, mme_config_p, "An error occurred while parsing the configuration file"); - return EINVAL; - } - ; - -emergency_attach_supported: EMERGENCY_ATTACH_SUPPORTED '=' INTEGER ';' - { - if ($3 != 0 && $3 != 1) { - yyerror(&yylloc, mme_config_p, "Invalid value (possible values are 0 or 1"); - return EINVAL; - } - mme_config_p->emergency_attach_supported = $3; - }; - -unauthenticated_imsi_supported: UNAUTHENTICATED_IMSI_SUPPORTED '=' INTEGER ';' - { - if ($3 != 0 && $3 != 1) { - yyerror(&yylloc, mme_config_p, "Invalid value (possible values are 0 or 1"); - return EINVAL; - } - mme_config_p->unauthenticated_imsi_supported = $3; - }; - -mme_statistic_timer: MME_STATISTIC_TIMER '=' INTEGER ';' - { - if ($3 <= 0) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } - mme_config_p->mme_statistic_timer = $3; - } - ; - -s1ap_outcome_timer: S1AP_OUTCOME_TIMER '=' INTEGER ';' - { - /* 0 is not a valid value here */ - if ($3 <= 0 || $3 >= (1 << (8 * sizeof(mme_config_p->s1ap_config.outcome_drop_timer_sec)))) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } - mme_config_p->s1ap_config.outcome_drop_timer_sec = $3; - } - ; - -s6aconf: S6A_CONF '=' QSTRING ';' - { - mme_config_p->s6a_config.conf_file = $3; - } - ; - -maxenb: MAX_ENB '=' INTEGER ';' - { - if ($3 <= 0) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } - mme_config_p->max_eNBs = (uint32_t)$3; - } - ; - -maxue: MAX_UE '=' INTEGER ';' - { - if ($3 <= 0) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } - mme_config_p->max_ues = (uint32_t)$3; - } - ; - -mmec: MME_CODE '=' mmeclist ';' - ; - -mmeclist: - { - yyerror(&yylloc, mme_config_p, "Empty value is not allowed"); - return EINVAL; - } - | mmecvalue ',' mmeclist - | mmecvalue - ; - -mmecvalue: INTEGER - { - if (mme_config_p->gummei.nb_mmec == 256) { - yyerror(&yylloc, mme_config_p, "Reached maximum number of mmec"); - return EINVAL; - } - if ($1 >= 256) { - yyerror(&yylloc, mme_config_p, "Value exceed limit <= 255"); - return EINVAL; - } - mme_config_p->gummei.nb_mmec++; - mme_config_p->gummei.mmec = realloc(mme_config_p->gummei.mmec, - mme_config_p->gummei.nb_mmec * sizeof(uint8_t)); - mme_config_p->gummei.mmec[mme_config_p->gummei.nb_mmec-1] = (uint8_t)$1; - } - ; - -mmegid: MME_GID '=' mmegidlist ';' - ; - -mmegidlist: - { - yyerror(&yylloc, mme_config_p, "Empty value is not allowed"); - return EINVAL; - } - | mmegidvalue - | mmegidvalue ',' mmegidlist - ; - -mmegidvalue: INTEGER - { - if (mme_config_p->gummei.nb_mme_gid == 65535) { - yyerror(&yylloc, mme_config_p, "Reached maximum number of mmegid"); - return EINVAL; - } - if ($1 >= 65356) { - yyerror(&yylloc, mme_config_p, "Value exceed limit <= 65535"); - return EINVAL; - } - mme_config_p->gummei.nb_mme_gid++; - mme_config_p->gummei.mme_gid = realloc(mme_config_p->gummei.mme_gid, - mme_config_p->gummei.nb_mme_gid * sizeof(uint16_t)); - mme_config_p->gummei.mme_gid[mme_config_p->gummei.nb_mme_gid-1] = (uint16_t)$1; - } - ; - -realm: REALM '=' QSTRING ';' - { - mme_config_p->realm = $3; - mme_config_p->realm_length = strlen(mme_config_p->realm); - } - ; - -plmn: PLMN_Y '=' plmnlist ';' - ; - -plmnlist: - { - yyerror(&yylloc, mme_config_p, "Empty value is not allowed"); - return EINVAL; - } - | plmnvalue - | plmnvalue ',' plmnlist - ; - -plmnvalue: INTEGER '.' INTEGER ':' INTEGER - { - if (mme_config_p->gummei.nb_plmns == 32) { - yyerror(&yylloc, mme_config_p, "Reached maximum number of plmns"); - return EINVAL; - } - if ($1 > 999 || $3 > 999) { - yyerror(&yylloc, mme_config_p, "PLMN value exceed limit <= 999"); - return EINVAL; - } - if ($5 > 65535) { - yyerror(&yylloc, mme_config_p, "TAC value exceed limit <= 65535"); - return EINVAL; - } - mme_config_p->gummei.nb_plmns++; - mme_config_p->gummei.plmn_mcc = realloc(mme_config_p->gummei.plmn_mcc, - mme_config_p->gummei.nb_plmns * sizeof(uint16_t)); - mme_config_p->gummei.plmn_mnc = realloc(mme_config_p->gummei.plmn_mnc, - mme_config_p->gummei.nb_plmns * sizeof(uint16_t)); - mme_config_p->gummei.plmn_tac = realloc(mme_config_p->gummei.plmn_tac, - mme_config_p->gummei.nb_plmns * sizeof(uint16_t)); - mme_config_p->gummei.plmn_mcc[mme_config_p->gummei.nb_plmns-1] = (uint16_t)$1; - mme_config_p->gummei.plmn_mnc[mme_config_p->gummei.nb_plmns-1] = (uint16_t)$3; - mme_config_p->gummei.plmn_tac[mme_config_p->gummei.nb_plmns-1] = (uint16_t)$5; - } - ; - -relative_capacity: RELATIVE_CAP '=' INTEGER ';' - { - if ($3 >= 256 || $3 < 0) { - yyerror(&yylloc, mme_config_p, "Value exceed limit <= 255"); - return EINVAL; - } - mme_config_p->relative_capacity = $3; - } - ; - -itti_queue_size: ITTI_QUEUE_SIZE '=' INTEGER ';' - { - if ($3 <= 0) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } - mme_config_p->itti_config.queue_size = (uint32_t)$3; - } - ; - -sctp_instreams: SCTP_INSTREAMS '=' INTEGER ';' - { - if ($3 <= 0) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } else if ($3 > UINT16_MAX) { - yyerror(&yylloc, mme_config_p, "Value exceed container"); - return EINVAL; - } - mme_config_p->sctp_config.in_streams = (uint16_t)$3; - } - ; - -sctp_outstreams: SCTP_OUTSTREAMS '=' INTEGER ';' - { - if ($3 <= 0) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } else if ($3 > UINT16_MAX) { - yyerror(&yylloc, mme_config_p, "Value exceed container"); - return EINVAL; - } - mme_config_p->sctp_config.out_streams = (uint16_t)$3; - } - ; - -sgw_interface_name_for_S11: SGW_INTERFACE_NAME_FOR_S11 '=' QSTRING ';' - { - mme_config_p->ipv4.sgw_interface_name_for_S11 = $3; - } - ; - -sgw_ip_address_for_S11: SGW_IP_ADDRESS_FOR_S11 '=' QSTRING ';' - { - struct in_addr inp; - if ( inet_aton($3, &inp ) < 0 ) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } else { - mme_config_p->ipv4.sgw_ip_address_for_S11 = inp.s_addr; - } - } - ; - -sgw_ip_netmask_for_S11: SGW_IP_NETMASK_FOR_S11 '=' INTEGER ';' - { - if ($3 <= 0) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } else if ($3 > UINT16_MAX) { - yyerror(&yylloc, mme_config_p, "Value exceed container"); - return EINVAL; - } - mme_config_p->ipv4.sgw_ip_netmask_for_S11 = (uint16_t)$3; - } - ; - -sgw_interface_name_for_S1u_S12_S4_up: SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP '=' QSTRING ';' - { - mme_config_p->ipv4.sgw_interface_name_for_S1u_S12_S4_up = $3; - } - ; - -sgw_ip_address_for_S1u_S12_S4_up: SGW_IP_ADDRESS_FOR_S1U_S12_S4_UP '=' QSTRING ';' - { - struct in_addr inp; - if ( inet_aton($3, &inp ) < 0 ) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } else { - mme_config_p->ipv4.sgw_ip_address_for_S1u_S12_S4_up = inp.s_addr; - } - } - ; - -sgw_ip_netmask_for_S1u_S12_S4_up: SGW_IP_NETMASK_FOR_S1U_S12_S4_UP '=' INTEGER ';' - { - if ($3 <= 0) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } else if ($3 > UINT16_MAX) { - yyerror(&yylloc, mme_config_p, "Value exceed container"); - return EINVAL; - } - mme_config_p->ipv4.sgw_ip_netmask_for_S1u_S12_S4_up = (uint16_t)$3; - } - ; - -sgw_interface_name_for_S5_S8_up: SGW_INTERFACE_NAME_FOR_S5_S8_UP '=' QSTRING ';' - { - mme_config_p->ipv4.sgw_interface_name_for_S5_S8_up = $3; - } - ; - -sgw_ip_address_for_S5_S8_up: SGW_IP_ADDRESS_FOR_S5_S8_UP '=' QSTRING ';' - { - struct in_addr inp; - if ( inet_aton($3, &inp ) < 0 ) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } else { - mme_config_p->ipv4.sgw_ip_address_for_S5_S8_up = inp.s_addr; - } - } - ; - -sgw_ip_netmask_for_S5_S8_up: SGW_IP_NETMASK_FOR_S5_S8_UP '=' INTEGER ';' - { - if ($3 <= 0) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } else if ($3 > UINT16_MAX) { - yyerror(&yylloc, mme_config_p, "Value exceed container"); - return EINVAL; - } - mme_config_p->ipv4.sgw_ip_netmask_for_S5_S8_up = (uint16_t)$3; - } - ; - -pgw_interface_name_for_S5_S8: PGW_INTERFACE_NAME_FOR_S5_S8 '=' QSTRING ';' - { - mme_config_p->ipv4.pgw_interface_name_for_S5_S8 = $3; - } - ; - -pgw_ip_address_for_S5_S8: PGW_IP_ADDRESS_FOR_S5_S8 '=' QSTRING ';' - { - struct in_addr inp; - if ( inet_aton($3, &inp ) < 0 ) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } else { - mme_config_p->ipv4.pgw_ip_address_for_S5_S8 = inp.s_addr; - } - } - ; - -pgw_ip_netmask_for_S5_S8: PGW_IP_NETMASK_FOR_S5_S8 '=' INTEGER ';' - { - if ($3 <= 0) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } else if ($3 > UINT16_MAX) { - yyerror(&yylloc, mme_config_p, "Value exceed container"); - return EINVAL; - } - mme_config_p->ipv4.pgw_ip_netmask_for_S5_S8 = (uint16_t)$3; - } - ; - -pgw_interface_name_for_SGI: PGW_INTERFACE_NAME_FOR_SGI '=' QSTRING ';' - { - mme_config_p->ipv4.pgw_interface_name_for_SGI = $3; - } - ; - -pgw_ip_addr_for_SGI: PGW_IP_ADDR_FOR_SGI '=' QSTRING ';' - { - struct in_addr inp; - if ( inet_aton($3, &inp ) < 0 ) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } else { - mme_config_p->ipv4.pgw_ip_addr_for_SGI = inp.s_addr; - } - } - ; - -pgw_ip_netmask_for_SGI: PGW_IP_NETMASK_FOR_SGI '=' INTEGER ';' - { - if ($3 <= 0) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } else if ($3 > UINT16_MAX) { - yyerror(&yylloc, mme_config_p, "Value exceed container"); - return EINVAL; - } - mme_config_p->ipv4.pgw_ip_netmask_for_SGI = (uint16_t)$3; - } - ; - -mme_interface_name_for_S1_MME: MME_INTERFACE_NAME_FOR_S1_MME '=' QSTRING ';' - { - mme_config_p->ipv4.mme_interface_name_for_S1_MME = $3; - } - ; - -mme_ip_address_for_S1_MME: MME_IP_ADDRESS_FOR_S1_MME '=' QSTRING ';' - { - struct in_addr inp; - if ( inet_aton($3, &inp ) < 0 ) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } else { - mme_config_p->ipv4.mme_ip_address_for_S1_MME = inp.s_addr; - } - } - ; - -mme_ip_netmask_for_S1_MME: MME_IP_NETMASK_FOR_S1_MME '=' INTEGER ';' - { - if ($3 <= 0) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } else if ($3 > UINT16_MAX) { - yyerror(&yylloc, mme_config_p, "Value exceed container"); - return EINVAL; - } - mme_config_p->ipv4.mme_ip_netmask_for_S1_MME = (uint16_t)$3; - } - ; - -mme_interface_name_for_S11_MME: MME_INTERFACE_NAME_FOR_S11_MME '=' QSTRING ';' - { - mme_config_p->ipv4.mme_interface_name_for_S11 = $3; - } - ; - -mme_ip_address_for_S11_MME: MME_IP_ADDRESS_FOR_S11_MME '=' QSTRING ';' - { - struct in_addr inp; - if ( inet_aton($3, &inp ) < 0 ) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } else { - mme_config_p->ipv4.mme_ip_address_for_S11 = inp.s_addr; - } - } - ; - -mme_ip_netmask_for_S11_MME: MME_IP_NETMASK_FOR_S11_MME '=' INTEGER ';' - { - if ($3 <= 0) { - yyerror(&yylloc, mme_config_p, "Invalid value"); - return EINVAL; - } else if ($3 > UINT16_MAX) { - yyerror(&yylloc, mme_config_p, "Value exceed container"); - return EINVAL; - } - mme_config_p->ipv4.mme_ip_netmask_for_S11 = (uint16_t)$3; - } - ; - - - /* Lexical or syntax error */ -errors: LEX_ERROR - | error - ; -%% - -void yyerror(YYLTYPE *llocp, struct mme_config_s *mme_config_p, const char *str) -{ - fprintf(stderr, "Error in %s ( on line %i column %i -> line %i column %i) : %s\n", - mme_config_p->config_file, llocp->first_line, llocp->first_column, - llocp->last_line, llocp->last_column, str); -} diff --git a/openair3/ocp-gtpu/gtp_itf.cpp b/openair3/ocp-gtpu/gtp_itf.cpp index 284b5cda35..2f60d5238c 100644 --- a/openair3/ocp-gtpu/gtp_itf.cpp +++ b/openair3/ocp-gtpu/gtp_itf.cpp @@ -998,7 +998,7 @@ static int Gtpv1uHandleGpdu(int h, //Minimum length of GTP-U header if non of the optional fields are present unsigned int offset = sizeof(Gtpv1uMsgHeaderT); - uint8_t qfi = -1; + int8_t qfi = -1; bool rqi = false; uint32_t NR_PDCP_PDU_SN = 0; @@ -1232,7 +1232,7 @@ void *gtpv1uTask(void *args) { itti_receive_msg(TASK_GTPV1_U, &message_p); if (message_p != NULL ) { - openAddr_t addr= {0}; + openAddr_t addr= {{0}}; const instance_t myInstance = ITTI_MSG_DESTINATION_INSTANCE(message_p); const int msgType = ITTI_MSG_ID(message_p); LOG_D(GTPU, "GTP-U received %s for instance %ld\n", messages_info[msgType].name, myInstance); diff --git a/radio/COMMON/common_lib.c b/radio/COMMON/common_lib.c index b5d90d3621..c9bd91b526 100644 --- a/radio/COMMON/common_lib.c +++ b/radio/COMMON/common_lib.c @@ -110,7 +110,10 @@ int load_lib(openair0_device *device, openair0_cfg->recplay_mode = read_recplayconfig(&(openair0_cfg->recplay_conf),&(device->recplay_state)); - if ( openair0_cfg->recplay_mode == RECPLAY_REPLAYMODE ) { + if (openair0_cfg->recplay_mode == RECPLAY_RECORDMODE) { + set_softmodem_optmask(SOFTMODEM_RECRECORD_BIT); // softmodem has to know we use the iqrecorder to workaround randomized algorithms + } + if (openair0_cfg->recplay_mode == RECPLAY_REPLAYMODE) { deflibname=OAI_IQPLAYER_LIBNAME; shlib_fdesc[0].fname="device_init"; set_softmodem_optmask(SOFTMODEM_RECPLAY_BIT); // softmodem has to know we use the iqplayer to workaround randomized algorithms diff --git a/radio/COMMON/common_lib.h b/radio/COMMON/common_lib.h index 9492e036b7..d0dad33e93 100644 --- a/radio/COMMON/common_lib.h +++ b/radio/COMMON/common_lib.h @@ -605,7 +605,7 @@ extern "C" /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ #define DEVICE_PARAMS_DESC {\ - { CONFIG_DEVICEOPT_NAME, CONFIG_HLP_DEVICE, 0, strptr:&devname, defstrval:NULL, TYPE_STRING, 0}\ + { CONFIG_DEVICEOPT_NAME, CONFIG_HLP_DEVICE, 0, .strptr=&devname, .defstrval=NULL, TYPE_STRING, 0}\ } diff --git a/radio/COMMON/record_player.c b/radio/COMMON/record_player.c index 37f985b6b2..2041ab29e1 100644 --- a/radio/COMMON/record_player.c +++ b/radio/COMMON/record_player.c @@ -40,13 +40,11 @@ * recplay_state: store recorder or player data while the device runs */ int read_recplayconfig(recplay_conf_t **recplay_conf, recplay_state_t **recplay_state) { - unsigned int u_sf_record = 0; // record mode - unsigned int u_sf_replay = 0; // replay mode *recplay_conf = calloc(sizeof(recplay_conf_t),1); paramdef_t device_recplay_params[]=DEVICE_RECPLAY_PARAMS_DESC ; config_get(device_recplay_params,sizeof(device_recplay_params)/sizeof(paramdef_t),DEVICE_RECPLAY_SECTION); - if (u_sf_record || u_sf_replay ) { + if ((*recplay_conf)->u_sf_record || (*recplay_conf)->u_sf_replay ) { struct sysinfo systeminfo; *recplay_state = calloc(sizeof(recplay_state_t),1); @@ -62,17 +60,18 @@ int read_recplayconfig(recplay_conf_t **recplay_conf, recplay_state_t **recplay_ LOG_W(HW,"System with %f GB of mem (<6GB), mmap usage disabled\n",systeminfo.totalram/10E9); (*recplay_conf)->use_mmap = 0; } - } else { /* record player enabled */ + } else { /* player-recorder disable */ free(*recplay_conf); *recplay_conf=NULL; + return RECPLAY_DISABLED; } - if (u_sf_replay == 1) + if ((*recplay_conf)->u_sf_replay == 1) return RECPLAY_REPLAYMODE; - else if (u_sf_record == 1) + else if ((*recplay_conf)->u_sf_record == 1) return RECPLAY_RECORDMODE; - return 0; + return RECPLAY_DISABLED; } /*! \brief Terminate operation of the oai iq recorder. to be called by any device @@ -81,21 +80,15 @@ int read_recplayconfig(recplay_conf_t **recplay_conf, recplay_state_t **recplay_ */ void iqrecorder_end(openair0_device *device) { if (device->recplay_state != NULL) { // subframes store - iqfile_header_t fh = {device->type,device->openair0_cfg->tx_sample_advance, device->openair0_cfg->rx_bw,0,OAIIQFILE_ID}; + iqfile_header_t fh = {device->type,device->openair0_cfg->tx_sample_advance, device->openair0_cfg->rx_bw,0,OAIIQFILE_ID}; recplay_state_t *rs = device->recplay_state; - recplay_conf_t *rc = device->openair0_cfg[0].recplay_conf; + recplay_conf_t *rc = device->openair0_cfg[0].recplay_conf; rs->pFile = fopen (rc->u_sf_filename,"wb+"); if (rs->pFile == NULL) { LOG_E(HW,"Cannot open %s\n", rc->u_sf_filename); } else { unsigned int i = 0; - unsigned int modu = 0; - - if ((modu = rs->nbSamplesBlocks % 10) != 0) { - rs->nbSamplesBlocks -= modu; // store entire number of frames - } - fh.nbSamplesBlocks=rs->nbSamplesBlocks; LOG_I(HW,"Writing file header to %s \n", rc->u_sf_filename ); fwrite(&fh, sizeof(fh), 1, rs->pFile); @@ -103,7 +96,7 @@ void iqrecorder_end(openair0_device *device) { uint8_t *ptr=(uint8_t *)rs->ms_sample; for (i = 0; i < rs->nbSamplesBlocks; i++) { - int blockBytes=sizeof(iqrec_t)+((iqrec_t *)ptr)->nbBytes; + int blockBytes=sizeof(iqrec_t)+BELL_LABS_IQ_BYTES_PER_SF; fwrite(ptr, sizeof(unsigned char), blockBytes, rs->pFile); ptr+=blockBytes; } diff --git a/radio/COMMON/record_player.h b/radio/COMMON/record_player.h index 2f5a6fa57b..7869fe4cf3 100644 --- a/radio/COMMON/record_player.h +++ b/radio/COMMON/record_player.h @@ -44,9 +44,8 @@ extern "C" #define RECPLAY_REPLAYMODE 2 #define BELL_LABS_IQ_HEADER 0xabababababababab -#define BELL_LABS_IQ_PER_SF 46080 // 7680 => 5MHz bw for now; 46080 => 3/4 40MHz (106 PRBs) +#define BELL_LABS_IQ_PER_SF 23040 // 23040 => 46080/2 slots => 3/4 40MHz (106 PRBs) #define BELL_LABS_IQ_BYTES_PER_SF (BELL_LABS_IQ_PER_SF * 4) -#define MAX_BELL_LABS_IQ_BYTES_PER_SF BELL_LABS_IQ_BYTES_PER_SF*10 #define OAIIQFILE_ID {'O', 'I','Q','F'} typedef struct { @@ -61,7 +60,9 @@ typedef struct { int64_t header; int64_t ts; int64_t nbBytes; - int64_t rfu2; // pad for 256 bits alignement required by AVX2 + int64_t tv_sec; // nb of secs since EPOCH + int64_t tv_usec; // nb of µsecs since EPOCH + int64_t rfu2; // pad for 256 bits alignement required by AVX2 } iqrec_t; #define DEF_NB_SF 120000 // default nb of sf or ms to capture (2 minutes at 5MHz) #define DEF_SF_FILE "/tmp/iqfile" // default subframes file name @@ -95,29 +96,31 @@ typedef struct { /* optname helpstr paramflags XXXptr defXXXval type numelt */ /*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ #define DEVICE_RECPLAY_PARAMS_DESC { \ - {CONFIG_OPT_SF_FILE, CONFIG_HLP_SF_FILE, 0, strptr:&((*recplay_conf)->u_sf_filename), defstrval:DEF_SF_FILE, TYPE_STRING, 0}, \ - {CONFIG_OPT_SF_REC, CONFIG_HLP_SF_REC, PARAMFLAG_BOOL, uptr:&(u_sf_record), defuintval:0, TYPE_UINT, 0}, \ - {CONFIG_OPT_SF_REP, CONFIG_HLP_SF_REP, PARAMFLAG_BOOL, uptr:&(u_sf_replay), defuintval:0, TYPE_UINT, 0}, \ - {CONFIG_OPT_SF_MAX, CONFIG_HLP_SF_MAX, 0, uptr:&((*recplay_conf)->u_sf_max), defintval:DEF_NB_SF, TYPE_UINT, 0}, \ - {CONFIG_OPT_SF_LOOPS, CONFIG_HLP_SF_LOOPS, 0, uptr:&((*recplay_conf)->u_sf_loops), defintval:DEF_SF_NB_LOOP, TYPE_UINT, 0}, \ - {CONFIG_OPT_SF_RDELAY, CONFIG_HLP_SF_RDELAY, 0, uptr:&((*recplay_conf)->u_sf_read_delay), defintval:DEF_SF_DELAY_READ, TYPE_UINT, 0}, \ - {CONFIG_OPT_SF_WDELAY, CONFIG_HLP_SF_WDELAY, 0, uptr:&((*recplay_conf)->u_sf_write_delay), defintval:DEF_SF_DELAY_WRITE, TYPE_UINT, 0}, \ - {CONFIG_OPT_USE_MMAP, CONFIG_HLP_USE_MMAP, PARAMFLAG_BOOL, uptr:&((*recplay_conf)->use_mmap), defuintval:1, TYPE_UINT, 0}, \ + {CONFIG_OPT_SF_FILE, CONFIG_HLP_SF_FILE, 0, .strptr=&((*recplay_conf)->u_sf_filename), .defstrval=DEF_SF_FILE, TYPE_STRING, 0}, \ + {CONFIG_OPT_SF_REC, CONFIG_HLP_SF_REC, PARAMFLAG_BOOL, .uptr=&((*recplay_conf)->u_sf_record), .defuintval=0, TYPE_UINT, 0}, \ + {CONFIG_OPT_SF_REP, CONFIG_HLP_SF_REP, PARAMFLAG_BOOL, .uptr=&((*recplay_conf)->u_sf_replay), .defuintval=0, TYPE_UINT, 0}, \ + {CONFIG_OPT_SF_MAX, CONFIG_HLP_SF_MAX, 0, .uptr=&((*recplay_conf)->u_sf_max), .defintval=DEF_NB_SF, TYPE_UINT, 0}, \ + {CONFIG_OPT_SF_LOOPS, CONFIG_HLP_SF_LOOPS, 0, .uptr=&((*recplay_conf)->u_sf_loops), .defintval=DEF_SF_NB_LOOP, TYPE_UINT, 0}, \ + {CONFIG_OPT_SF_RDELAY, CONFIG_HLP_SF_RDELAY, 0, .uptr=&((*recplay_conf)->u_sf_read_delay), .defintval=DEF_SF_DELAY_READ, TYPE_UINT, 0}, \ + {CONFIG_OPT_SF_WDELAY, CONFIG_HLP_SF_WDELAY, 0, .uptr=&((*recplay_conf)->u_sf_write_delay), .defintval=DEF_SF_DELAY_WRITE, TYPE_UINT, 0}, \ + {CONFIG_OPT_USE_MMAP, CONFIG_HLP_USE_MMAP, PARAMFLAG_BOOL, .uptr=&((*recplay_conf)->use_mmap), .defuintval=1, TYPE_UINT, 0}, \ }/*! \brief Record Player Configuration and state */ typedef struct { - char *u_sf_filename; // subframes file path - unsigned int u_sf_max ; // max number of recorded subframes - unsigned int u_sf_loops ; // number of loops in replay mode + char *u_sf_filename; // subframes file path + unsigned int u_sf_max ; // max number of recorded subframes + unsigned int u_sf_loops ; // number of loops in replay mode unsigned int u_sf_read_delay; // read delay in replay mode unsigned int u_sf_write_delay ; // write delay in replay mode - unsigned int use_mmap; // default is to use mmap + unsigned int use_mmap; // default is to use mmap + unsigned int u_sf_replay; // replay mode (if 1) + unsigned int u_sf_record; // record mode (if 1) } recplay_conf_t; typedef struct { size_t mapsize; FILE *pFile; int fd; - iqrec_t *ms_sample; // memory for all subframes + iqrec_t *ms_sample; // memory for all subframes unsigned int nbSamplesBlocks; uint8_t *currentPtr; uint64_t currentTs; diff --git a/radio/USRP/README.md b/radio/USRP/README.md new file mode 100644 index 0000000000..131be06436 --- /dev/null +++ b/radio/USRP/README.md @@ -0,0 +1,36 @@ +USRP device documentation + +OAI works with the most common USRP models like, B200, B200mini, B210, X310, N300, N310, N320, X410. This is achieved by using the Ettus Universal Hardware Driver (UHD) (https://github.com/EttusResearch/uhd). The file usrp_lib.cpp provides an abstraction layer of UHD to OAI. + +The USRP can be configured in the RU section of the config file. The field "sdr_addrs" uses the same syntax as the USRP device identification string (https://files.ettus.com/manual/page_identification.html). Here are a few examples + +sdr_addrs = "addr=192.168.10.2" # uses a single 10Gb Ethernet interface on an N3x0 or X3x0 or X4x0 + +sdr_addrs = "addr=192.168.10.2,second_addr=192.168.20.2" # uses 2 10Gb Ethernet interfaces on a N3x0 or X3x0 or X4x0 (requires that you flashed the FPGA wth the XG image) + +you can also use the multi USRP feature and specify multiple USRPs, in which case you will get the aggregated number of channels on all the devices + +sdr_addrs = "addr0=192.168.10.2,addr1=192.168.30.2" + +You can specify if you want to use external or interal clock or time source either by adding the parameters in the sdr_addrs field or by using the fields clock_src or time_src + +sdr_addrs = "addr=192.168.10.2,clock_source=external,time_source=external" + +is equivalent to + +sdr_addrs = "addr=192.168.10.2" +clock_src = "external" +time_src = "external" + +Valid choices for clock and time source are "internal", "external", and "gpsdo" + +Careful: the USRP remembers the choice of the clock source. If you want to make sure it uses always the same, always specify the clock_source and time_source. + +Last but not least you may specify that only a specfic subdevice of the USRP is used. See also https://files.ettus.com/manual/page_configuration.html#config_subdev + +For example on a USRP N310 the following fields will specify that you use channel 0 of subdevice A. + +tx_subdev = "A:0" +rx_subdev = "A:0" + +When combining this with the multi USRP feature you can easily create a distributed antenna array with only 1 channel used at each USRP. \ No newline at end of file diff --git a/radio/USRP/USERSPACE/LIB/usrp_lib.cpp b/radio/USRP/USERSPACE/LIB/usrp_lib.cpp index cb7c9fe3b3..8053411516 100644 --- a/radio/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/radio/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -659,36 +659,12 @@ int trx_usrp_write_init(openair0_device *device){ printf("end of tx write thread\n"); pthread_mutex_init(&write_thread->mutex_write, NULL); pthread_cond_init(&write_thread->cond_write, NULL); - struct sched_param sparam={0}; - sparam.sched_priority = sched_get_priority_max(SCHED_RR); - pthread_attr_t attr; - int ret=pthread_attr_init(&attr); - if (ret!=0) { - printf("error initializing USRP tx-thread attribute ret %d, errno: %d\n",ret,errno); - exit(-1); - } - else printf("USRP tx-thread attribute initialized\n"); - ret=pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED); - if (ret!=0) { - printf("error setting USRP tx-thread inheritance ret %d, errno: %d\n",ret,errno); - exit(-1); - } - else printf("USRP tx-thread inheritance set\n"); - ret=pthread_attr_setschedpolicy(&attr, SCHED_RR); - if (ret!=0) { - printf("error setting USRP tx-thread scheduling policy ret %d, errno: %d\n",ret,errno); - exit(-1); - } - else printf("USRP tx-thread scheduling policy set to SCHED_RR\n"); - ret = pthread_attr_setschedparam(&attr, &sparam); - if (ret!=0) { - printf("error setting USRP tx-thread priority ret %d, errno: %d\n",ret,errno); - exit(-1); - } - else printf("USRP tx-thread priority set to %d\n",sparam.sched_priority); - - pthread_create(&write_thread->pthread_write,&attr,trx_usrp_write_thread,(void *)device); - + threadCreate(&write_thread->pthread_write, + trx_usrp_write_thread, + (void *)device, + (char*)"trx_usrp_write_thread", + -1, + OAI_PRIORITY_RT_MAX); return(0); } @@ -727,7 +703,7 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp nsamps2 = (nsamps+3)>>2; int16x8_t buff_tmp[cc<2 ? 2 : cc][nsamps2]; #endif - + static int read_count = 0; int rxshift; switch (device->type) { case USRP_B200_DEV: @@ -798,25 +774,30 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp recplay_state_t *recPlay=device->recplay_state; - if ( recPlay != NULL) { // record mode + if (device->openair0_cfg->recplay_mode == RECPLAY_RECORDMODE) { // record mode // Copy subframes to memory (later dump on a file) - if (recPlay->nbSamplesBlocks < device->openair0_cfg->recplay_conf->u_sf_max && - recPlay->maxSizeBytes > (recPlay->currentPtr-(uint8_t *)recPlay->ms_sample) + - sizeof(iqrec_t) + nsamps*4 ) { + // The number of read samples might differ from BELL_LABS_IQ_BYTES_PER_SF + // The number of read samples is always stored in nbBytes but the record is always of BELL_LABS_IQ_BYTES_PER_SF size + if (recPlay->nbSamplesBlocks <= device->openair0_cfg->recplay_conf->u_sf_max && + recPlay->maxSizeBytes >= (recPlay->currentPtr-(uint8_t *)recPlay->ms_sample) + + sizeof(iqrec_t) + BELL_LABS_IQ_BYTES_PER_SF) { iqrec_t *hdr=(iqrec_t *)recPlay->currentPtr; + struct timespec trec; + (void) clock_gettime(CLOCK_REALTIME, &trec); hdr->header = BELL_LABS_IQ_HEADER; hdr->ts = *ptimestamp; - hdr->nbBytes=nsamps*4; + hdr->nbBytes=nsamps*4; // real number of samples bytes + hdr->tv_sec = trec.tv_sec; // record secs + hdr->tv_usec = trec.tv_nsec/1000; // record µsecs memcpy(hdr+1, buff[0], nsamps*4); - recPlay->currentPtr+=sizeof(iqrec_t)+nsamps*4; + recPlay->currentPtr+=sizeof(iqrec_t)+BELL_LABS_IQ_BYTES_PER_SF; // record size is constant (BELL_LABS_IQ_BYTES_PER_SF) recPlay->nbSamplesBlocks++; -#if 0 // BMC: this is too verbose - LOG_D(HW,"recorded %d samples, for TS %lu, shift in buffer %ld\n", nsamps, hdr->ts, recPlay->currentPtr-(uint8_t *)recPlay->ms_sample); -#endif + LOG_D(HW,"recorded %d samples, for TS %lu, shift in buffer %ld nbBytes %d nbSamplesBlocks %d\n", nsamps, hdr->ts, recPlay->currentPtr-(uint8_t *)recPlay->ms_sample, (int)hdr->nbBytes, (int)recPlay->nbSamplesBlocks); } else - exit_function(__FILE__, __FUNCTION__, __LINE__,"Recording reaches max iq limit\n"); + exit_function(__FILE__, __FUNCTION__, __LINE__, "Recording reaches max iq limit\n", OAI_EXIT_NORMAL); } - + read_count++; + LOG_D(HW,"usrp_lib: returning %d samples at ts %lu read_count %d\n", samples_received, *ptimestamp, read_count); return samples_received; } @@ -1096,18 +1077,28 @@ extern "C" { return -1; } - LOG_I(HW,"Found USRP %s\n", device_adds[0].get("type").c_str()); + std::string type_str, product_str; + if (args.find("addr0") != std::string::npos) { + type_str = "type0"; + product_str = "product0"; + } + else { + type_str = "type"; + product_str = "product"; + } + + LOG_I(HW,"Found USRP %s\n", device_adds[0].get(type_str).c_str()); double usrp_master_clock; - if (device_adds[0].get("type") == "b200") { + if (device_adds[0].get(type_str) == "b200") { device->type = USRP_B200_DEV; usrp_master_clock = 30.72e6; args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock); args += ",num_send_frames=256,num_recv_frames=256, send_frame_size=7680, recv_frame_size=7680" ; } - if (device_adds[0].get("type") == "n3xx") { - const std::string product = device_adds[0].get("product"); + if (device_adds[0].get(type_str) == "n3xx") { + const std::string product = device_adds[0].get(product_str); printf("Found USRP %s\n", product.c_str()); device->type=USRP_N300_DEV; if (product == "n320") @@ -1120,7 +1111,7 @@ extern "C" { LOG_W(HW,"Can't set kernel parameters for N3x0\n"); } - if (device_adds[0].get("type") == "x300") { + if (device_adds[0].get(type_str) == "x300") { printf("Found USRP x300\n"); device->type=USRP_X300_DEV; usrp_master_clock = 184.32e6; @@ -1131,7 +1122,7 @@ extern "C" { LOG_W(HW,"Can't set kernel parameters for X3xx\n"); } - if (device_adds[0].get("type") == "x4xx") { + if (device_adds[0].get(type_str) == "x4xx") { printf("Found USRP x400\n"); device->type = USRP_X400_DEV; usrp_master_clock = 245.76e6; diff --git a/radio/iqplayer/iqplayer_lib.c b/radio/iqplayer/iqplayer_lib.c index 8fd3da5ed1..7ac587bb95 100644 --- a/radio/iqplayer/iqplayer_lib.c +++ b/radio/iqplayer/iqplayer_lib.c @@ -35,10 +35,33 @@ #include #include #include +#include +#include #include "common_lib.h" #include "assertions.h" #include "common/utils/LOG/log.h" +static void busy_wait(uint32_t usecs) { + uint32_t elapsed_usecs; + double temp; + int j; + struct timespec requestStart, requestEnd; + + // Active wait + clock_gettime(CLOCK_REALTIME, &requestStart); + temp = 0; + while (1) { + for (j=0; j < 40; j++) + temp += sin(j); + clock_gettime(CLOCK_REALTIME, &requestEnd); + elapsed_usecs = ( requestEnd.tv_sec - requestStart.tv_sec ) / 1e-6 + + ( requestEnd.tv_nsec - requestStart.tv_nsec ) / 1e3; + if (elapsed_usecs >= usecs) + break; + } + //LOG_I(HW, "Expected: %d Elapsed: %d us\n", usecs, elapsed_usecs); +} + static void parse_iqfile_header(openair0_device *device, iqfile_header_t *iq_fh) { char tmp[4]=OAIIQFILE_ID; AssertFatal((memcmp(iq_fh->oaiid,tmp,sizeof(iq_fh->oaiid)) == 0), @@ -92,8 +115,8 @@ static int iqplayer_loadfile(openair0_device *device, openair0_config_t *openair fstat(s->fd, &sb); s->mapsize=sb.st_size; LOG_I(HW, "Loading %u subframes from %s,size=%lu bytes ...\n",s->nbSamplesBlocks, c->u_sf_filename,(uint64_t)sb.st_size); - // allocate buffer for 1 sample at a time - s->ms_sample = (iqrec_t *) malloc(sizeof(iqrec_t)+MAX_BELL_LABS_IQ_BYTES_PER_SF*4); + // allocate buffer for 1 subframe at a time + s->ms_sample = (iqrec_t *) malloc(sizeof(iqrec_t)+BELL_LABS_IQ_BYTES_PER_SF); if (s->ms_sample == NULL) { LOG_E(HW,"Memory allocation failed for individual subframe replay mode.\n" ); @@ -120,6 +143,56 @@ static int iqplayer_loadfile(openair0_device *device, openair0_config_t *openair return 0; } +/*! \brief print the device statistics + * \param device the hardware to use + * \returns 0 on success + */ +static int trx_iqplayer_get_stats(openair0_device *device) +{ + LOG_I(HW, "trx_iqplayer_get_stats() called, not implemented\n"); + return 0; +} + +/*! \brief Reset device statistics + * \param device the hardware to use + * \returns 0 in success + */ +static int trx_iqplayer_reset_stats(openair0_device *device) +{ + LOG_I(HW, "trx_iqplayer_reset_stats() called, not implemented\n"); + return 0; +} + +/*! \brief Stop operation of the transceiver + */ +static int trx_iqplayer_stop(openair0_device *device) +{ + LOG_I(HW, "trx_iqplayer_stop() called, not implemented\n"); + return 0; +} + +/*! \brief Set RX frequencies + * \param device the hardware to use + * \param openair0_cfg RF frontend parameters set by application + * \returns 0 in success + */ +static int trx_iqplayer_set_freq(openair0_device *device, openair0_config_t *openair0_cfg) +{ + LOG_I(HW, "trx_iqplayer_set_freq() called, not implemented\n"); + return 0; +} + +/*! \brief Set gains + * \param device the hardware to use + * \param openair0_cfg RF frontend parameters set by application + * \returns 0 in success + */ +static int trx_iqplayer_set_gains(openair0_device *device, openair0_config_t *openair0_cfg) +{ + LOG_I(HW, "trx_iqplayer_set_gains() called, not implemented\n"); + return 0; +} + /*! \brief start the oai iq player * \param device, the hardware used */ @@ -181,24 +254,28 @@ static int trx_iqplayer_write(openair0_device *device, openair0_timestamp timest */ static int trx_iqplayer_read(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps, int cc) { recplay_state_t *s = device->recplay_state; + static struct timeval tprev; + static int read_count = 0; if (s->curSamplesBlock==0 && s->wrap_count==0) { s->currentTs=s->ms_sample->ts; + tprev.tv_sec = s->ms_sample->tv_sec; + tprev.tv_usec = s->ms_sample->tv_usec; LOG_I(HW, "First timestamp=%lu s->nbSamplesBlocks=%u\n", s->currentTs, s->nbSamplesBlocks); } if (s->curSamplesBlock == s->nbSamplesBlocks) { - LOG_I(HW, "wrapping on iq file (%ld)\n", s->wrap_count); - s->curSamplesBlock = 0; - s->wrap_count++; - if (s->wrap_count == device->openair0_cfg->recplay_conf->u_sf_loops) { LOG_W(HW, "iqplayer device terminating subframes replay after %u iteration\n", device->openair0_cfg->recplay_conf->u_sf_loops); - exit_function(__FILE__, __FUNCTION__, __LINE__,"replay ended, triggering process termination\n"); + exit_function(__FILE__, __FUNCTION__, __LINE__,"replay ended, triggering process termination\n", OAI_EXIT_NORMAL); } - LOG_I(HW,"go back at the beginning of IQ file"); + if (s->wrap_count > 0) { + LOG_I(HW, "wrapping on iq file (%ld)\n", s->wrap_count); + } + s->curSamplesBlock = 0; + s->wrap_count++; device->recplay_state->currentPtr=(uint8_t *)device->recplay_state->ms_sample; if (!(device->openair0_cfg->recplay_conf->use_mmap) ) { @@ -210,20 +287,23 @@ static int trx_iqplayer_read(openair0_device *device, openair0_timestamp *ptimes if (!(device->openair0_cfg->recplay_conf->use_mmap)) { // read sample from file if (read(s->fd, s->ms_sample, sizeof(iqrec_t)) != sizeof(iqrec_t)) { - LOG_E(HW,"pb reading iqfile at index %lu %s\n",sizeof(iqrec_t)*s->curSamplesBlock, strerror(errno) ); + LOG_E(HW,"pb reading iq record header at index %lu %s\n",sizeof(iqrec_t)*s->curSamplesBlock, strerror(errno) ); exit(-1); } else { - if (read(s->fd, s->ms_sample+1, s->ms_sample->nbBytes) != s->ms_sample->nbBytes) { - LOG_E(HW,"pb reading iqfile at index %lu %s\n",sizeof(iqrec_t)*s->curSamplesBlock, strerror(errno) ); + if (read(s->fd, s->ms_sample+1, BELL_LABS_IQ_BYTES_PER_SF) != BELL_LABS_IQ_BYTES_PER_SF) { + LOG_E(HW,"pb reading iq record data at index %lu %s\n",sizeof(iqrec_t)*s->curSamplesBlock, strerror(errno) ); exit(-1); } } } iqrec_t *curHeader=(iqrec_t *)s->currentPtr; - AssertFatal(curHeader->header==BELL_LABS_IQ_HEADER,"" ); + if (curHeader->header != BELL_LABS_IQ_HEADER) { + LOG_I(HW,"Problem iq header nsamps %d\n", nsamps); + AssertFatal(curHeader->header==BELL_LABS_IQ_HEADER,"" ); + } // the current timestamp is the stored timestamp until we wrap on input - AssertFatal(nsamps*4==curHeader->nbBytes,""); + AssertFatal(nsamps*4==curHeader->nbBytes,"nsamps=%d curHeader->nbBytes=%d", (int)nsamps, (int)curHeader->nbBytes); *ptimestamp = s->currentTs; memcpy(buff[0], curHeader+1, nsamps*4); s->curSamplesBlock++; @@ -231,33 +311,40 @@ static int trx_iqplayer_read(openair0_device *device, openair0_timestamp *ptimes s->currentTs+=nsamps; if (device->openair0_cfg->recplay_conf->use_mmap) - s->currentPtr+=sizeof(iqrec_t)+s->ms_sample->nbBytes; + s->currentPtr+=sizeof(iqrec_t)+BELL_LABS_IQ_BYTES_PER_SF; - // BMC TODO: support 1 second or more subframe read delay - struct timespec req; - req.tv_sec = 0; - req.tv_nsec = (device->openair0_cfg[0].recplay_conf->u_sf_read_delay) * 1000; - nanosleep(&req, NULL); - LOG_D(HW, "returning %d samples at ts %lu\n", nsamps, *ptimestamp); + // subframe read delay is not taken into account + // Real time interval is handle to mimic RF board latcency + struct timeval tcur, tdiff; + tcur.tv_sec = curHeader->tv_sec; + tcur.tv_usec = curHeader->tv_usec; + timersub(&tcur, &tprev, &tdiff); + if (tdiff.tv_usec > 0) { + busy_wait(tdiff.tv_usec); + } + tprev = tcur; + + read_count++; + LOG_D(HW, "returning %d samples at ts %lu read_count %d\n", nsamps, *ptimestamp, read_count); return nsamps; } int device_init(openair0_device *device, openair0_config_t *openair0_cfg) { device->openair0_cfg = openair0_cfg; device->trx_start_func = trx_iqplayer_start; - device->trx_get_stats_func = NULL; - device->trx_reset_stats_func = NULL; - device->trx_end_func = trx_iqplayer_end; - device->trx_stop_func = NULL; - device->trx_set_freq_func = NULL; - device->trx_set_gains_func = NULL; + device->trx_get_stats_func = trx_iqplayer_get_stats; + device->trx_reset_stats_func = trx_iqplayer_reset_stats; + device->trx_end_func = trx_iqplayer_end; + device->trx_stop_func = trx_iqplayer_stop; + device->trx_set_freq_func = trx_iqplayer_set_freq; + device->trx_set_gains_func = trx_iqplayer_set_gains; // Replay subframes from from file // openair0_cfg[0].rx_gain_calib_table = calib_table_b210_38; // bw_gain_adjust=1; device->trx_write_func = trx_iqplayer_write; device->trx_read_func = trx_iqplayer_read; iqplayer_loadfile(device, openair0_cfg); - LOG_UI(HW,"iqplayer device initialized, replay %s for %i iterations",openair0_cfg->recplay_conf->u_sf_filename,openair0_cfg->recplay_conf->u_sf_loops); + LOG_UI(HW,"iqplayer device initialized, replay %s for %i iteration(s)\n",openair0_cfg->recplay_conf->u_sf_filename,openair0_cfg->recplay_conf->u_sf_loops); return 0; } /*@}*/ diff --git a/radio/rfsimulator/README.md b/radio/rfsimulator/README.md index 9ea855e9da..e3070538da 100644 --- a/radio/rfsimulator/README.md +++ b/radio/rfsimulator/README.md @@ -115,7 +115,7 @@ make rfsimulator ### Launch gNB in one window ```bash -sudo RFSIMULATOR=server ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf --parallel-config PARALLEL_SINGLE_THREAD --rfsim --phy-test --nokrnmod 1 +sudo RFSIMULATOR=server ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf --parallel-config PARALLEL_SINGLE_THREAD --rfsim --phy-test ``` ### Launch UE in another window diff --git a/radio/rfsimulator/simulator.c b/radio/rfsimulator/simulator.c index 1dac4e059a..bcd568cd50 100644 --- a/radio/rfsimulator/simulator.c +++ b/radio/rfsimulator/simulator.c @@ -84,7 +84,8 @@ {"modelname", "\n", simOpt, strptr:&modelname, defstrval:"AWGN", TYPE_STRING, 0 },\ {"ploss", "\n", simOpt, dblptr:&(rfsimulator->chan_pathloss), defdblval:0, TYPE_DOUBLE, 0 },\ {"forgetfact", "\n", simOpt, dblptr:&(rfsimulator->chan_forgetfact), defdblval:0, TYPE_DOUBLE, 0 },\ - {"offset", "\n", simOpt, iptr:&(rfsimulator->chan_offset), defintval:0, TYPE_INT, 0 }\ + {"offset", "\n", simOpt, iptr:&(rfsimulator->chan_offset), defintval:0, TYPE_INT, 0 },\ + {"wait_timeout", "\n", simOpt, iptr:&(rfsimulator->wait_timeout), defintval:1, TYPE_INT, 0 },\ }; static void getset_currentchannels_type(char *buf, int debug, webdatadef_t *tdata, telnet_printfunc_t prnt); @@ -141,6 +142,7 @@ typedef struct { float noise_power_dB; void *telnetcmd_qid; poll_telnetcmdq_func_t poll_telnetcmdq; + int wait_timeout; } rfsimulator_state_t; @@ -817,7 +819,7 @@ static int rfsimulator_read(openair0_device *device, openair0_timestamp *ptimest if ( t->nextRxTstamp == 0) LOG_W(HW,"No connected device, generating void samples...\n"); - if (!flushInput(t, 1, nsamps)) { + if (!flushInput(t, t->wait_timeout, nsamps)) { for (int x=0; x < nbAnt; x++) memset(samplesVoid[x],0,sampleToByte(nsamps,1)); diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf index edcf7986e0..bcbbe101ca 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band77.fr1.273PRB.2x2.usrpn300.conf @@ -10,7 +10,7 @@ gNBs = ( // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = 1; - plmn_list = ({ mcc = 001; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1; sd = 0x1; }); }); + plmn_list = ({ mcc = 001; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1; }); }); nr_cellid = 12345678L; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf index eb7c27149c..32a6c8b65f 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf @@ -11,7 +11,7 @@ gNBs = // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = 1; - plmn_list = ({ mcc = 208; mnc = 99; mnc_length = 2; snssaiList = ({ sst = 1 }) }); + plmn_list = ({ mcc = 001; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1; }) }); nr_cellid = 12345678L; @@ -21,7 +21,6 @@ gNBs = pusch_AntennaPorts = 2; do_CSIRS = 1; do_SRS = 1; - ul_prbblacklist = "51,52,53,54" servingCellConfigCommon = ( { diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf index 36614b0e9c..7d5d49fe87 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf @@ -187,6 +187,7 @@ MACRLCs = ( pusch_TargetSNRx10 = 150; pucch_TargetSNRx10 = 200; ulsch_max_frame_inactivity = 0; + ul_max_mcs = 28; } ); diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf index 17959af775..ff29e1f572 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf @@ -11,7 +11,7 @@ gNBs = // Tracking area code, 0x0000 and 0xfffe are reserved values tracking_area_code = 1; - plmn_list = ({ mcc = 001; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1; sd = 1; }) }); + plmn_list = ({ mcc = 001; mnc = 01; mnc_length = 2; snssaiList = ({ sst = 1; }) }); nr_cellid = 12345678L; diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/uecap_ports1.xml b/targets/PROJECTS/GENERIC-NR-5GC/CONF/uecap_ports1.xml index ec0288fd26..b8e895aef5 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/uecap_ports1.xml +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/uecap_ports1.xml @@ -93,7 +93,7 @@ 78 - + diff --git a/targets/PROJECTS/GENERIC-NR-5GC/CONF/uecap_ports2.xml b/targets/PROJECTS/GENERIC-NR-5GC/CONF/uecap_ports2.xml index baca6649cb..d877d91dab 100644 --- a/targets/PROJECTS/GENERIC-NR-5GC/CONF/uecap_ports2.xml +++ b/targets/PROJECTS/GENERIC-NR-5GC/CONF/uecap_ports2.xml @@ -93,7 +93,7 @@ 78 - + diff --git a/targets/README.txt b/targets/README.txt deleted file mode 100644 index b32e0640e5..0000000000 --- a/targets/README.txt +++ /dev/null @@ -1,114 +0,0 @@ ------------------------------------------ -1) Folders and files description ------------------------------------------ - -This directory contains different targets for OpenAirInterface.org implementations - -RTAI/USER - Target to run .11p (uses openairITS) or LTE modem (uses openair1 and openair2) for x86 in RTAI user-space -SIMU - Simulator/Emulator target for x86 -DOCS - Doxygen documentation generation for openair1/openair2 - - -First, you must have all four openair SW directories, openair1, openair2, openair3, and targets at the same hierarchical level as this directory. - -1. The following packages must be available on your system: - - - ssh, python, python pexpect - - libblas and libblas-dev - - libconfig++8-dev - - libgtk-3-dev - - libpgm-5.1 and libpgm-5.1-dev for distributed simulation with reliable multicast transmport - - libxml2 and libxml2-dev - - libforms-bin libforms-dev - - openssl libssl-dev - - libatlas-base-dev and libatlas-headers (for Ubuntu 11.04, libatlas-dev instead of libatlas-headers) - - asn1c and the LTE ASN1 files (for more information on how to install this and generate the required files see the README file in openair2/RRC/LITE/MESSAGES) - ----------------------------------------------------- -2) Organization of the folders and their dependancies ----------------------------------------------------- -The 3 folders have the following structures - - - EXAMPLES: there you can find some basic examples with/without the network interface - - KERN: this folder includes the files for kernel space compilation targeting realtime operation (RF/emulation platform) - - USER: this folder includes the files for user space compilation targeting soft realtime operation (emulation/simulation/debugging) - ----------------------------------------------------------------- -3) How to use through a tutorial: run a simple experimentation ----------------------------------------------------------------- -1. Up to know you should have created a directory: mkdir openair4G - -2. Check out the openair4G/trunk repository: svn co https://svn.eurecom.fr/openairsvn/openair4G/trunk openair4G - -3. Now, please check the following: - - - the env variables in .bashrc the following lines, and source them if necessary : - set OPENAIR_DIR variable and export the following: - export OPENAIR1_DIR=$OPENAIR_DIR/openair4G/openair1 - export OPENAIR2_DIR=$OPENAIR_DIR/openair4G/openair2 - export OPENAIR3_DIR=$OPENAIR_DIR/openair4G/openair3 - export OPENAIRITS_DIR=$OPENAIR_DIR/openair4G/openairITS - export OPENAIR_TARGETS=$OPENAIR_DIR/openair4G/targets/ - - - checkout and compile the asn1 messages - follow the README.txt in OPENAIR2_DIR/RRC/LITE/MESSAGES to checkout the ASN.1 RRC messages - follow the OPENAIR2_DIR/RRC/LITE/MESSAGE/asn1c/asn1c/INSTALL to install the asn1c - go back to $OPENAIR_TARGET and "make install" if you have not used the shell script to install asn1c - - cd $OPENAIR_TARGET/SIMU/USER, and make a sanity check by doing make pre-ci (require 15 minutes) - - Check out simple examples in $OPENAIR_TARGET/SIMU/EXAMPLES - -4. to automatically bring up the oai interfaces and configure the default radio bearer (useful when sending data traffic): - - add your username into the list of sudoers - + edit /etc/sudoers as a super user - + after the line: # User privilege specification, add : user_name ALL=(ALL:ALL) ALL - + after the line: %admin ALL=(ALL) ALL, add : user_name ALL=(ALL) NOPASSWD: ALL - - include this line: alias sudo='sudo -E', to the .bashrc - - run oai as follows: sudo ./oaisim arg1 arg2 .... - - ----------------------------------------------------------------- -4) Detail Instructions ----------------------------------------------------------------- - - Please follow the instructions given in DOCS/oaisim_walkthrough.pdf - - ----------------------------------------------------------------- -5) OAI on virtual machine ----------------------------------------------------------------- - you may download the image using this URL: https://emu.openairinterface.org/openairlab/openairlab.zip - check that all the packages are there as some packages might be added later. - - ----------------------------------------------------------------- -6) Installing phpmyadmin for HSS ----------------------------------------------------------------- - -Step 1: - -Configure database for phpmyadmin with dbconfig-common? SELECT - - -Step 2: - -Please provide the password for the administrative account with which this package should create its MySQL database and user. -Password of the database's administrative user: The mysql administrative user. - - -Step 3: - -Please provide a password for phpmyadmin to register with the database server. If left blank, a random password will be generated. -MySQL application password for phpmyadmin: admin - - -Step 4: - -Password confirmation: admin - - -Step 5: - -Please choose the web server that should be automatically configured to run phpMyAdmin. -Web server to reconfigure automatically: - [*] apache2 - [ ] lighttpd diff --git a/targets/TEST/AT_COMMANDS/Makefile b/targets/TEST/AT_COMMANDS/Makefile index fc5f550329..aa834872e7 100644 --- a/targets/TEST/AT_COMMANDS/Makefile +++ b/targets/TEST/AT_COMMANDS/Makefile @@ -48,7 +48,6 @@ RRC_DIR = $(OPENAIR2_TOP)/RRC/LITE L2_INTERFACE_DIR = $(OPENAIR2_TOP)/RRC/L2_INTERFACE MAC_DIR = $(OPENAIR2_TOP)/LAYER2/MAC LOG_DIR=$(OPENAIR2_TOP)/UTIL/LOG -OCG_DIR=$(OPENAIR2_TOP)/UTIL/OCG OPT_DIR=$(OPENAIR2_TOP)/UTIL/OPT diff --git a/targets/TEST/AT_COMMANDS/oaisim.c b/targets/TEST/AT_COMMANDS/oaisim.c index e14373f87f..bbbbe3da5f 100644 --- a/targets/TEST/AT_COMMANDS/oaisim.c +++ b/targets/TEST/AT_COMMANDS/oaisim.c @@ -36,7 +36,6 @@ #include "UTIL/LOG/log_extern.h" #include "RRC/LTE/vars.h" #include "PHY_INTERFACE/vars.h" -#include "UTIL/OCG/OCG.h" #include "UTIL/AT_COMMANDS/parser.h" mapping level_names[] = { diff --git a/targets/TEST/PACKET_TRACER/Makefile b/targets/TEST/PACKET_TRACER/Makefile index e7a4e70bf9..f49fefe454 100644 --- a/targets/TEST/PACKET_TRACER/Makefile +++ b/targets/TEST/PACKET_TRACER/Makefile @@ -20,10 +20,7 @@ endif # activate OCG and libxml only under linux ifeq ($(linux),1) CFLAGS += -I/usr/include/libxml2 -L/usr/local/lib -I/usr/include/atlas -L/usr/X11R6/lib -OCG_FLAG = 1 CFLAGS += -DLINUX -else -OCG_FLAG = 0 endif @@ -100,7 +97,6 @@ printvars: @echo LINUX variable is $(linux) @echo rrc_cellular variable is $(rrc_cellular) @echo EXTRA_CFLAGS = $(EXTRA_CFLAGS) - @echo OAI Config generator is $(OCG_FLAG) @echo OAI NETLINK FLAG is $(NAS_FLAG) @echo SSE3 proc is $(SSE3PROC) @echo IS_REL_8 is $(IS_REL_8) @@ -153,7 +149,6 @@ cleanasn1: rm -f $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated print: - @echo $(OCG_FLAG) @echo $(CFLAGS) @echo $(EXTRA_CFLAGS) @echo $(OBJ) diff --git a/targets/TEST/PACKET_TRACER/pt.c b/targets/TEST/PACKET_TRACER/pt.c index 54f3a09405..24c1fe495a 100644 --- a/targets/TEST/PACKET_TRACER/pt.c +++ b/targets/TEST/PACKET_TRACER/pt.c @@ -39,7 +39,6 @@ #include "RRC/LTE/vars.h" #include "PHY_INTERFACE/vars.h" #include "UTIL/LOG/log.h" -#include "OCG_vars.h" #include "UTIL/OTG/otg_tx.h" #include "UTIL/OTG/otg.h" #include "UTIL/OTG/otg_vars.h" @@ -512,7 +511,6 @@ int main (int argc, char **argv) /* set_log(OMG, LOG_INFO, 20); set_log(EMU, LOG_INFO, 10); - set_log(OCG, LOG_INFO, 1); set_log(MAC, LOG_TRACE, 1); set_log(RLC, LOG_TRACE, 1); set_log(PHY, LOG_DEBUG, 1); diff --git a/targets/TEST/PDCP/Makefile b/targets/TEST/PDCP/Makefile index 805cabe7cb..c1f4416bee 100644 --- a/targets/TEST/PDCP/Makefile +++ b/targets/TEST/PDCP/Makefile @@ -48,7 +48,6 @@ RRC_DIR = $(OPENAIR2_TOP)/RRC/LITE L2_INTERFACE_DIR = $(OPENAIR2_TOP)/RRC/L2_INTERFACE MAC_DIR = $(OPENAIR2_TOP)/LAYER2/MAC LOG_DIR=$(OPENAIR2_TOP)/UTIL/LOG -OCG_DIR=$(OPENAIR2_TOP)/UTIL/OCG OPT_DIR=$(OPENAIR2_TOP)/UTIL/OPT SOURCES_L2 = $(LIST_DIR)/list.c @@ -66,8 +65,7 @@ OPT_OBJS = $(OPT_DIR)/probe.o L2_OBJS=$(addsuffix .o,$(basename $(SOURCES_L2))) $(PHY_INTERFACE_OBJS) $(MAC_OBJS) $(L2_INTERFACE_OBJS) $(RRC_OBJS) $(LOG_OBJS) $(OPT_OBJS) L2_incl = -I$(OPENAIR2_TOP) -I$(COMMON_DIR) -I$(RLC_DIR) -I$(RLC_AM_DIR) -I$(RLC_UM_DIR) -I$(RLC_TM_DIR) -I$(PDCP_DIR) -I$(MEM_DIR) -I$(LIST_DIR) \ - -I$(LOG_DIR) -I$(MATH_DIR) -I$(TIMER_DIR) -I$(OPENAIR3)/MESH -I$(OPENAIR2_TOP)/RRC/MESH -I$(OPENAIR2_TOP)/RRC/MESH/MESSAGES -I$(OPENAIR3)/MESH/RRM -I$(OPT_DIR) \ - -I$(OCG_DIR) + -I$(LOG_DIR) -I$(MATH_DIR) -I$(TIMER_DIR) -I$(OPENAIR3)/MESH -I$(OPENAIR2_TOP)/RRC/MESH -I$(OPENAIR2_TOP)/RRC/MESH/MESSAGES -I$(OPENAIR3)/MESH/RRM -I$(OPT_DIR) ASN1_MSG_OBJS2 := $(foreach file, $(ASN1_MSG_OBJS), $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/$(file)) diff --git a/targets/TEST/PDCP/test_pdcp.c b/targets/TEST/PDCP/test_pdcp.c index d6becf87c1..f5f34daec6 100644 --- a/targets/TEST/PDCP/test_pdcp.c +++ b/targets/TEST/PDCP/test_pdcp.c @@ -28,7 +28,6 @@ #include "MAC_INTERFACE/vars.h" #include "LAYER2/MAC/vars.h" #include "UTIL/LOG/log_if.h" -#include "OCG_vars.h" #include "test_util.h" #include "test_pdcp.h" diff --git a/targets/TEST/PDCP/with_rlc/Makefile.data_bearer b/targets/TEST/PDCP/with_rlc/Makefile.data_bearer index d1397d3f49..865545c50f 100644 --- a/targets/TEST/PDCP/with_rlc/Makefile.data_bearer +++ b/targets/TEST/PDCP/with_rlc/Makefile.data_bearer @@ -48,7 +48,6 @@ RRC_DIR = $(OPENAIR2_TOP)/RRC/LITE L2_INTERFACE_DIR = $(OPENAIR2_TOP)/RRC/L2_INTERFACE MAC_DIR = $(OPENAIR2_TOP)/LAYER2/MAC LOG_DIR=$(OPENAIR2_TOP)/UTIL/LOG -OCG_DIR=$(OPENAIR2_TOP)/UTIL/OCG OPT_DIR=$(OPENAIR2_TOP)/UTIL/OPT SOURCES_L2 = $(LIST_DIR)/list.c @@ -104,8 +103,7 @@ OPT_OBJS = $(OPT_DIR)/probe.o L2_OBJS=$(addsuffix .o,$(basename $(SOURCES_L2))) $(PHY_INTERFACE_OBJS) $(MAC_OBJS) $(L2_INTERFACE_OBJS) $(RRC_OBJS) $(LOG_OBJS) $(OPT_OBJS) L2_incl = -I$(OPENAIR2_TOP) -I$(COMMON_DIR) -I$(RLC_DIR) -I$(RLC_AM_DIR) -I$(RLC_UM_DIR) -I$(RLC_TM_DIR) -I$(PDCP_DIR) -I$(MEM_DIR) -I$(LIST_DIR) \ - -I$(LOG_DIR) -I$(MATH_DIR) -I$(TIMER_DIR) -I$(OPENAIR3)/MESH -I$(OPENAIR2_TOP)/RRC/MESH -I$(OPENAIR2_TOP)/RRC/MESH/MESSAGES -I$(OPENAIR3)/MESH/RRM -I$(OPT_DIR) \ - -I$(OCG_DIR) + -I$(LOG_DIR) -I$(MATH_DIR) -I$(TIMER_DIR) -I$(OPENAIR3)/MESH -I$(OPENAIR2_TOP)/RRC/MESH -I$(OPENAIR2_TOP)/RRC/MESH/MESSAGES -I$(OPENAIR3)/MESH/RRM -I$(OPT_DIR) ASN1_MSG_OBJS2 := $(foreach file, $(ASN1_MSG_OBJS), $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/$(file)) diff --git a/targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c b/targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c index 507521ee1e..d2a0d4c6dc 100644 --- a/targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c +++ b/targets/TEST/PDCP/with_rlc/test_pdcp_rlc.c @@ -36,9 +36,7 @@ #include "UTIL/LOG/log_extern.h" #include "RRC/LTE/vars.h" #include "PHY_INTERFACE/vars.h" -#include "UTIL/OCG/OCG.h" #include "LAYER2/PDCP_v10.1.0/pdcp.h" -#include "OCG_vars.h" #include "rlc.h" #include "pdcp.h" diff --git a/targets/RT/USER/eNB_usrp.gtkw b/targets/gtkwave/eNB_usrp.gtkw similarity index 100% rename from targets/RT/USER/eNB_usrp.gtkw rename to targets/gtkwave/eNB_usrp.gtkw diff --git a/targets/RT/USER/gNB_usrp.gtkw b/targets/gtkwave/gNB_usrp.gtkw similarity index 100% rename from targets/RT/USER/gNB_usrp.gtkw rename to targets/gtkwave/gNB_usrp.gtkw diff --git a/targets/RT/USER/pnf.gtkw b/targets/gtkwave/pnf.gtkw similarity index 100% rename from targets/RT/USER/pnf.gtkw rename to targets/gtkwave/pnf.gtkw diff --git a/targets/RT/USER/rau_if4_single_thread.gtkw b/targets/gtkwave/rau_if4_single_thread.gtkw similarity index 100% rename from targets/RT/USER/rau_if4_single_thread.gtkw rename to targets/gtkwave/rau_if4_single_thread.gtkw diff --git a/targets/RT/USER/rcc_if4.gtkw b/targets/gtkwave/rcc_if4.gtkw similarity index 100% rename from targets/RT/USER/rcc_if4.gtkw rename to targets/gtkwave/rcc_if4.gtkw diff --git a/targets/RT/USER/rcc_if5.gtkw b/targets/gtkwave/rcc_if5.gtkw similarity index 100% rename from targets/RT/USER/rcc_if5.gtkw rename to targets/gtkwave/rcc_if5.gtkw diff --git a/targets/RT/USER/rru_if4p5_simulator.gtkw b/targets/gtkwave/rru_if4p5_simulator.gtkw similarity index 100% rename from targets/RT/USER/rru_if4p5_simulator.gtkw rename to targets/gtkwave/rru_if4p5_simulator.gtkw diff --git a/targets/RT/USER/rru_if4p5_single_thread.gtkw b/targets/gtkwave/rru_if4p5_single_thread.gtkw similarity index 100% rename from targets/RT/USER/rru_if4p5_single_thread.gtkw rename to targets/gtkwave/rru_if4p5_single_thread.gtkw diff --git a/targets/RT/USER/rru_if4p5_usrp.gtkw b/targets/gtkwave/rru_if4p5_usrp.gtkw similarity index 100% rename from targets/RT/USER/rru_if4p5_usrp.gtkw rename to targets/gtkwave/rru_if4p5_usrp.gtkw diff --git a/targets/RT/USER/rru_if5_usrp.gtkw b/targets/gtkwave/rru_if5_usrp.gtkw similarity index 100% rename from targets/RT/USER/rru_if5_usrp.gtkw rename to targets/gtkwave/rru_if5_usrp.gtkw diff --git a/targets/RT/USER/ue_usrp.gtkw b/targets/gtkwave/ue_usrp.gtkw similarity index 100% rename from targets/RT/USER/ue_usrp.gtkw rename to targets/gtkwave/ue_usrp.gtkw diff --git a/targets/itti_vcd_tasks.sav b/targets/itti_vcd_tasks.sav deleted file mode 100644 index fca66612ac..0000000000 --- a/targets/itti_vcd_tasks.sav +++ /dev/null @@ -1,268 +0,0 @@ -[*] -[*] GTKWave Analyzer v3.3.34 (w)1999-2012 BSI -[*] Thu Dec 19 10:33:06 2013 -[*] -[dumpfile] "/tmp/openair_dump_eNB.vcd" -[dumpfile_mtime] "Thu Dec 19 10:26:58 2013" -[dumpfile_size] 68919271 -[savefile] "$OPENAIR_TARGETS/itti_vcd_tasks.sav" -[timestart] 0 -[size] 1871 1056 -[pos] -1 -1 -*-30.425148 4756417000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -[sst_width] 223 -[signals_width] 449 -[sst_expanded] 1 -[sst_vpaned_height] 583 -@8024 -variables.frame_number_eNB[63:0] -@20000 -- -@8024 -variables.slot_number_eNB[63:0] -@20000 -- -@8024 -[color] 3 -variables.frame_number_UE[63:0] -@20000 -- -@8024 -[color] 3 -variables.slot_number_UE[63:0] -@20000 -- -@c08022 -[color] 1 -variables.mp_alloc[63:0] -@28 -[color] 2 -(42)variables.mp_alloc[63:0] -[color] 2 -(43)variables.mp_alloc[63:0] -[color] 2 -(44)variables.mp_alloc[63:0] -[color] 2 -(45)variables.mp_alloc[63:0] -[color] 2 -(46)variables.mp_alloc[63:0] -[color] 2 -(47)variables.mp_alloc[63:0] -[color] 2 -(48)variables.mp_alloc[63:0] -[color] 2 -(49)variables.mp_alloc[63:0] -[color] 2 -(50)variables.mp_alloc[63:0] -[color] 2 -(51)variables.mp_alloc[63:0] -[color] 2 -(52)variables.mp_alloc[63:0] -[color] 2 -(53)variables.mp_alloc[63:0] -[color] 2 -(54)variables.mp_alloc[63:0] -[color] 2 -(55)variables.mp_alloc[63:0] -[color] 2 -(56)variables.mp_alloc[63:0] -[color] 2 -(57)variables.mp_alloc[63:0] -[color] 2 -(58)variables.mp_alloc[63:0] -[color] 2 -(59)variables.mp_alloc[63:0] -[color] 2 -(60)variables.mp_alloc[63:0] -[color] 2 -(61)variables.mp_alloc[63:0] -[color] 2 -(62)variables.mp_alloc[63:0] -[color] 2 -(63)variables.mp_alloc[63:0] -@1401200 --group_end -@c08022 -[color] 5 -variables.mp_free[63:0] -@28 -[color] 6 -(42)variables.mp_free[63:0] -[color] 6 -(43)variables.mp_free[63:0] -[color] 6 -(44)variables.mp_free[63:0] -[color] 6 -(45)variables.mp_free[63:0] -[color] 6 -(46)variables.mp_free[63:0] -[color] 6 -(47)variables.mp_free[63:0] -[color] 6 -(48)variables.mp_free[63:0] -[color] 6 -(49)variables.mp_free[63:0] -[color] 6 -(50)variables.mp_free[63:0] -[color] 6 -(51)variables.mp_free[63:0] -[color] 6 -(52)variables.mp_free[63:0] -[color] 6 -(53)variables.mp_free[63:0] -[color] 6 -(54)variables.mp_free[63:0] -[color] 6 -(55)variables.mp_free[63:0] -[color] 6 -(56)variables.mp_free[63:0] -[color] 6 -(57)variables.mp_free[63:0] -[color] 6 -(58)variables.mp_free[63:0] -[color] 6 -(59)variables.mp_free[63:0] -[color] 6 -(60)variables.mp_free[63:0] -[color] 6 -(61)variables.mp_free[63:0] -[color] 6 -(62)variables.mp_free[63:0] -[color] 6 -(63)variables.mp_free[63:0] -@1401200 --group_end -@c08024 -[color] 1 -variables.itti_alloc_msg[63:0] -@1401200 --group_end -@c08022 -[color] 1 -variables.itti_send_msg[63:0] -@28 -[color] 2 -+{UE NAS} (44)variables.itti_send_msg[63:0] -[color] 2 -+{UE RRC} (45)variables.itti_send_msg[63:0] -[color] 2 -+{UE PDCP} (46)variables.itti_send_msg[63:0] -[color] 2 -+{UE RLC} (47)variables.itti_send_msg[63:0] -[color] 2 -+{UE MAC} (48)variables.itti_send_msg[63:0] -[color] 2 -+{UE PHY} (49)variables.itti_send_msg[63:0] -[color] 2 -+{eNB app} (50)variables.itti_send_msg[63:0] -[color] 2 -+{eNB SCTP} (51)variables.itti_send_msg[63:0] -[color] 2 -+{eNB X2AP} (52)variables.itti_send_msg[63:0] -[color] 2 -+{eNB S1AP} (53)variables.itti_send_msg[63:0] -[color] 2 -+{eNB RAL} (54)variables.itti_send_msg[63:0] -[color] 2 -+{eNB RRC} (55)variables.itti_send_msg[63:0] -[color] 2 -+{eNB PDCP} (56)variables.itti_send_msg[63:0] -[color] 2 -+{eNB RLC} (57)variables.itti_send_msg[63:0] -[color] 2 -+{eNB MAC} (58)variables.itti_send_msg[63:0] -[color] 2 -+{eNB PHY} (59)variables.itti_send_msg[63:0] -[color] 2 -+{BM} (60)variables.itti_send_msg[63:0] -[color] 2 -+{L2L1} (61)variables.itti_send_msg[63:0] -[color] 2 -+{Timer} (62)variables.itti_send_msg[63:0] -[color] 2 -+{Unknown} (63)variables.itti_send_msg[63:0] -@1401200 --group_end -@28 -[color] 7 -functions.log_record -[color] 1 -functions.itti_dump_enqueue_message_malloc -[color] 3 -functions.itti_dump_enqueue_message -[color] 3 -functions.itti_enqueue_message -@200 -- -@c08022 -[color] 5 -variables.itti_poll_msg[63:0] -@28 -[color] 6 -+{UE PDCP} (46)variables.itti_poll_msg[63:0] -[color] 6 -+{UE RLC} (47)variables.itti_poll_msg[63:0] -[color] 6 -+{UE MAC} (48)variables.itti_poll_msg[63:0] -[color] 6 -+{UE PHY} (49)variables.itti_poll_msg[63:0] -[color] 6 -+{eNB PDCP} (56)variables.itti_poll_msg[63:0] -[color] 6 -+{eNB RLC} (57)variables.itti_poll_msg[63:0] -[color] 6 -+{eNB MAC} (58)variables.itti_poll_msg[63:0] -[color] 6 -+{eNB PHY} (59)variables.itti_poll_msg[63:0] -[color] 6 -+{L2L1} (61)variables.itti_poll_msg[63:0] -functions.itti_relay_thread -@1401200 --group_end -@c08022 -[color] 5 -variables.itti_recv_msg[63:0] -@28 -[color] 6 -+{UE NAS} (44)variables.itti_recv_msg[63:0] -[color] 6 -+{UE RRC} (45)variables.itti_recv_msg[63:0] -[color] 6 -+{eNB app} (50)variables.itti_recv_msg[63:0] -[color] 6 -+{eNB SCTP} (51)variables.itti_recv_msg[63:0] -[color] 6 -+{eNB X2AP} (52)variables.itti_recv_msg[63:0] -[color] 6 -+{eNB S1AP} (53)variables.itti_recv_msg[63:0] -[color] 6 -+{eNB RRC} (55)variables.itti_recv_msg[63:0] -[color] 6 -+{BM} (60)variables.itti_recv_msg[63:0] -[color] 6 -+{L2L1} (61)variables.itti_recv_msg[63:0] -@1401200 --group_end -@200 -- -@28 -functions.phy_procedures_eNB_lte -functions.phy_procedures_eNb_rx -functions.phy_procedures_eNb_tx -@200 -- -@28 -[color] 3 -functions.phy_procedures_UE_lte -[color] 3 -functions.phy_procedures_ue_rx -[color] 3 -functions.phy_procedures_ue_tx -@200 -- -@28 -[color] 5 -functions.rrc_mac_config_req -functions.pdcp_run -[pattern_trace] 1 -[pattern_trace] 0